Transfers
The Transfer APIs provide users the entries to tranfer the NFTs easily.
Transfer Actions
The Transfer APIs provide two methods to help users transfer NFTs, including the tranfer or batch transfer NFTs.
Transfer NFT
The Transfer NFT
provides users with the entry to transfer the NFT.
Authorization
Bearer Token
Header
string
contract_type
The type of the contract, which includes erc721 and erc1155
body
string
token_id
The id of the NFT
body
string
chain
The chain type. The types include conflux
and conflux_test
body
string
transfer_from_address
The sender of the sending NFT
body
string
contract_address
The address of the contract
body
string
transfer_to_address
The receiver of the sending NFT
body
string
amount
The amount of the sending NFT
body
integer
{
"chain": "conflux_test",
"contract_address": "cfxtest:accy6epch754uamc4x55mcv3pzgae8vfvaufj6v4uj",
"contract_type":"erc1155",
"transfer_from_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"token_id":"20",
"amount":1
}
created_at
The time of creating the item in the database
string
updated_at
The time of updating the item in the database
string
deleted_at
The time of deleting the item in the database
string
id
The id of the item in the database
integer
app_id
The id of the app
integer
chain_type
The type of the chain. 1-CFX, 2-ETH.
integer
chain_id
The id of the chain. 1029-mainnet, 1-testnet
integer
contract
The address of the contract
string
contract_type
The type of the contract. 1-ERC721, 2-ERC1155
integer
token_id
The id of the token
string
transfer_from
The sender of the sending NFT
string
transfer_to
The receiver of the sending NFT
string
amount
The amount of the sending NFT
integer
status
The status of the transaction. 0-pending, 1-success, 2-failed
integer
hash
The hash of the transaction
string
tx_id
The id of the transaction
integer
error
The error during executing the transaction
string
{
"id": 1,
"created_at": "2022-08-24T07:33:59.985Z",
"updated_at": "2022-08-24T07:33:59.985Z",
"deleted_at": null,
"app_id": 2,
"chain_type": 1,
"chain_id": 1,
"contract": "cfxtest:accy6epch754uamc4x55mcv3pzgae8vfvaufj6v4uj",
"contract_type": 2,
"tx_id": 8127,
"hash": "",
"status": 0,
"error": "",
"transfer_from": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"token_id": "20",
"amount": 1
}
curl --request POST \
--url https://api.nftrainbow.cn/v1/transfers/customizable \
--header 'Authorization: Bearer {JWT}' \
--header 'Content-Type: application/json' \
--data-raw '{
"chain": "conflux_test",
"contract_address": "cfxtest:accy6epch754uamc4x55mcv3pzgae8vfvaufj6v4uj",
"contract_type":"erc1155",
"transfer_from_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"token_id":"20",
"amount":1
}'
The token_id is the number like "123", which type is string
Batch Transfer NFTs
The Batch Transfer NFTs
API provides users with the entry to transfer several NFTs once.
Authorization
Bearer Token
Header
string
chain
The chain type. The types include conflux
and conflux_test
body
string
contract_type
The type of the contract, which includes erc721
and erc1155
body
string
contract_address
The address of the contract
body
string
items
The mint tasks
body
The array of the TransferItem
The TransferItem construct is presented in the following.
transfer_from_address
The sender of the sending NFT
body
string
transfer_to_address
The receiver of the sending NFT
body
string
amount
The amount of the NFTs
body
integer
token_id
The id of the token
body
string
{
"chain": "conflux_test",
"contract_address": "cfxtest:accy6epch754uamc4x55mcv3pzgae8vfvaufj6v4uj",
"contract_type": "erc1155",
"items": [
{
"transfer_from_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to_address": "cfxtest:aanpu16mtgc7dke5xhuktyfyef8f00pz8a2z5mc14g",
"token_id": "20",
"amount": 2
},
{
"transfer_from_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to_address": "cfxtest:aang4d91rejdbpgmgtmspdyefxkubj2bbywrwm9j3z",
"token_id": "21",
"amount": 1
}
]
}
The response is the array of transferTask construct. The construct is showed in the following.
created_at
The time of creating the item in the database
string
updated_at
The time of updating the item in the database
string
deleted_at
The time of deleting the item in the database
string
id
The id of the item in the database
integer
app_id
The id of the app
integer
chain_type
The type of the chain. 1-CFX, 2-ETH.
integer
chain_id
The id of the chain. 1029-mainnet, 1-testnet
integer
contract
The address of the contract
string
contract_type
The type of the contract. 1-ERC721, 2-ERC1155
integer
status
The status of the transaction. 0-pending, 1-success, 2-failed
integer
hash
The hash of the transaction
string
tx_id
The id of the transaction
integer
error
The error during executing the transaction
string
transfer_to
The receiver of the sending NFT
string
transfer_from
The sender of the sending NFT
string
token_id
The id of the token
integer
amount
The amount of the sending NFT
integer
[
{
"id": 1,
"created_at": "2022-08-24T07:47:48.558Z",
"updated_at": "2022-08-24T07:47:48.558Z",
"deleted_at": null,
"app_id": 2,
"chain_type": 1,
"chain_id": 1,
"contract": "cfxtest:acbf8taf6zzy99kncvu7d81vyavaz2ay5254ca3j7c",
"contract_type": 1,
"tx_id": 8474,
"hash": "",
"status": 0,
"error": "",
"transfer_from": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to": "cfxtest:aanpu16mtgc7dke5xhuktyfyef8f00pz8a2z5mc14g",
"token_id": "20",
"amount": 2,
},
{
"id": 2,
"created_at": "2022-08-24T07:47:48.558Z",
"updated_at": "2022-08-24T07:47:48.558Z",
"deleted_at": null,
"app_id": 2,
"chain_type": 1,
"chain_id": 1,
"contract": "cfxtest:acbf8taf6zzy99kncvu7d81vyavaz2ay5254ca3j7c",
"contract_type": 1,
"tx_id": 8474,
"hash": "",
"status": 0,
"error": "",
"transfer_from": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to": "cfxtest:aang4d91rejdbpgmgtmspdyefxkubj2bbywrwm9j3z",
"token_id": "21",
"amount": 1,
}
]
curl --request POST \
--url https://api.nftrainbow.cn/v1/transfers/customizable/batch \
--header 'Authorization: Bearer {JWT}' \
--header 'Content-Type: application/json' \
--data-raw '{
"chain": "conflux_test",
"contract_address": "cfxtest:accy6epch754uamc4x55mcv3pzgae8vfvaufj6v4uj",
"contract_type": "erc1155",
"items": [
{
"transfer_from_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to_address": "cfxtest:aanpu16mtgc7dke5xhuktyfyef8f00pz8a2z5mc14g",
"token_id": "20",
"amount": 2
},
{
"transfer_from_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to_address": "cfxtest:aang4d91rejdbpgmgtmspdyefxkubj2bbywrwm9j3z",
"token_id": "21",
"amount": 1
}
]
}'
Obtain Informations
Obtain transferred NFT list
The Obtain transferred NFT list
API provides users with the entry to query the transferred NFTs information.
Authorization
Bearer Token
Header
string
page
Page Query
query
integer
1
limit
Page Query
query
integer
10
count
The number of the tranferred NFTs
integer
items
The nfts information
[]TransferTask
The TransferTask Struct
is listed as follow:
created_at
The time of creating the item in the database
string
updated_at
The time of updating the item in the database
string
deleted_at
The time of deleting the item in the database
string
id
The id of the item in the database
integer
amount
The amount of the sending NFTs
integer
app_id
The id of the app
integer
chain_id
The id of the chain. 1029-mainnet, 1-testnet
integer
chain_type
The type of the chain. 1-CFX, 2-ETH
integer
contract
The address of the nft
string
contract_type
The type of the contract. 1-ERC721, 2-ERC1155
integer
error
The error during executing tx
string
hash
The hash of the transaction
string
transfer_to
The receiver of the sending NFT
string
status
The status of the transaction. 0-pending, 1-success, 2-failed
integer
token_id
The id of the token
string
transfer_from
The sender of the sending NFT
string
tx_id
The id of the transaction
integer
{
"count": 3,
"items": [
{
"id": 3,
"created_at": "2022-08-24T07:47:48.56Z",
"updated_at": "2022-08-24T07:47:51.882Z",
"deleted_at": null,
"app_id": 2,
"chain_type": 1,
"chain_id": 1,
"contract": "cfxtest:accy6epch754uamc4x55mcv3pzgae8vfvaufj6v4uj",
"contract_type": 2,
"tx_id": 8129,
"hash": "",
"status": 2,
"error": "",
"transfer_from": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to": "cfxtest:aang4d91rejdbpgmgtmspdyefxkubj2bbywrwm9j3z",
"token_id": "21",
"amount": 1
},
{
"id": 2,
"created_at": "2022-08-24T07:47:48.56Z",
"updated_at": "2022-08-24T07:47:51.877Z",
"deleted_at": null,
"app_id": 2,
"chain_type": 1,
"chain_id": 1,
"contract": "cfxtest:accy6epch754uamc4x55mcv3pzgae8vfvaufj6v4uj",
"contract_type": 2,
"tx_id": 8129,
"hash": "",
"status": 2,
"error": "",
"transfer_from": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to": "cfxtest:aanpu16mtgc7dke5xhuktyfyef8f00pz8a2z5mc14g",
"token_id": "20",
"amount": 2
},
{
"id": 1,
"created_at": "2022-08-24T07:33:59.985Z",
"updated_at": "2022-08-24T07:34:21.757Z",
"deleted_at": null,
"app_id": 2,
"chain_type": 1,
"chain_id": 1,
"contract": "cfxtest:accy6epch754uamc4x55mcv3pzgae8vfvaufj6v4uj",
"contract_type": 2,
"tx_id": 8127,
"hash": "",
"status": 2,
"error": "",
"transfer_from": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"token_id": "20",
"amount": 1
}
]
}
curl --request GET \
--url https://api.nftrainbow.cn/v1/transfers/ \
--header 'Authorization: Bearer {JWT}' \
--header 'Content-Type: application/json'
Obtain Detialed NFT Transfer Information
The Obtain Detialed NFT Transfer Information
API provides users with the entry to query the transferred NFT information according to its id
.
Authorization
Bearer Token
Header
string
id
transfer id
path
integer
created_at
The time of creating the item in the database
string
updated_at
The time of updating the item in the database
string
deleted_at
The time of deleting the item in the database
string
id
The id of the item in the database
integer
amount
The amount of the sending NFTs
integer
app_id
The id of the app
integer
chain_id
The id of the chain. 1029-mainnet, 1-testnet
integer
chain_type
The type of the chain. 1-CFX, 2-ETH
integer
contract
The address of the nft
string
contract_type
The type of the contract. 1-ERC721, 2-ERC1155
integer
error
The error during executing tx
string
hash
The hash of the transaction
string
transfer_to
The receiver of the sending NFT
string
status
The status of the transaction. 0-pending, 1-success, 2-failed
integer
token_id
The id of the token
string
transfer_from
The sender of the sending NFT
string
tx_id
The id of the transaction
integer
{
"id": 3,
"created_at": "2022-08-24T07:47:48.56Z",
"updated_at": "2022-08-24T07:47:51.882Z",
"deleted_at": null,
"app_id": 2,
"chain_type": 1,
"chain_id": 1,
"contract": "cfxtest:accy6epch754uamc4x55mcv3pzgae8vfvaufj6v4uj",
"contract_type": 2,
"tx_id": 8129,
"hash": "",
"status": 2,
"error": "",
"transfer_from": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
"transfer_to": "cfxtest:aang4d91rejdbpgmgtmspdyefxkubj2bbywrwm9j3z",
"token_id": "21",
"amount": 1
}
curl --request GET \
--url https://api.nftrainbow.cn/v1/transfers/{id} \
--header 'Authorization: Bearer {JWT}' \
--header 'Content-Type: application/json'
Last updated