Create NFT Transfer
Request: Send NFT to a destination:
import axios from 'axios';
const options = {
method: 'POST',
url: 'https:/api.aqua.test.krayondigital.com/main/api/v1/nft-transfers',
headers: {
accept: 'application/json',
'content-type': 'application/json',
'Bearer': 'API-TOKEN'
},
data: {
"to_address": "0xd09f41abf24e16228ad3f93f2a4fd92499158603",
"token_id": "{{TOKEN_ID}}",
"wallet": "{{WALLET_ID}}",
"symbol": "MFNFT",
"amount": "1",
"tags": [
"krayon",
"NFT"
],
"note": "NFT transfer"
}
};
axios
.request(options)
.then(function (response) {
console.log(response.data);
})
.catch(function (error) {
console.error(error);
});
import requests
url = "https:/api.aqua.test.krayondigital.com/main/api/v1/nft-transfers"
payload = {
"to_address": "0xd09f41abf24e16228ad3f93f2a4fd92499158603",
"token_id": "{{TOKEN_ID}}",
"wallet": "{{WALLET_ID}}",
"symbol": "MFNFT",
"amount": "1",
"tags": [
"NFT Transfer"
],
"note": "Test one NFT transfer"
}
headers = {
"accept": "application/json",
"content-type": "application/json"
"Bearer": "API-TOKEN"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
Response:
{
"data": {
"id": "3ea4dc230619452d9a932d8ef333627b",
"status": "TRANSACTION_PENDING",
"direction": "OUT",
"transaction": {
"id": "26d6c9a45d2247a9a3de610e5e827bb1",
"nonce": 93,
"gas_price": 150481712919,
"gas_limit": 47936,
"gas_used": 47936,
"native_price": "0.000000000000000000",
"transaction_fee": 0.007213491390485184,
"transaction_fee_usd": "0.000000000000000000",
"from_address": "0xab5b4728f430a3cb5a34729d1f2372b91f233b05",
"to_address": "0xd09f41abf24e16228ad3f93f2a4fd92499158603",
"hash": "0x86c3ca86c0ba5995d8f2d096ee1bca189e8309a5136bf1e50aa8ef816dcd43d9",
"value": 1000000000000000000,
"type": 0,
"chain_id": 5,
"status": "PENDING",
"block": 1,
"block_time_stamp": "2023-03-20T10:07:16.582256Z"
},
"initiator": "a8402c4e732c4367bff4ab3b472807be",
"to_address": "0xd09f41abf24e16228ad3f93f2a4fd92499158603",
"amount": "1.000000000000000000",
"wallet": "0075015935af4334acc8a24071917504",
"token_id": "2554810",
"symbol": "MFNFT",
"note": "NFT transfer",
"tags": [
"nft",
"krayon"
]
}
}
Updated 7 months ago