Transfer NFTs Between Wallets

To transfer NFTs between wallets, send a POST request to the /wallet/erc721/tokens endpoint, calling the :transfer method.

Transfer an NFT between wallets

POST https://api.playfix.io/wallet/erc721/tokens:transfer

Headers

NameTypeDescription

Authorization*

String

Bearer <your_access_token>

Request Body

NameTypeDescription

wallet*

String

Name of the sender's wallet containing the NFT. This should be the value of name from a previously created wallet. It begins with wallets/ followed by a ULID.

receiverAddress*

String

Wallet address of the destination where you want to send the NFT to. This begins with "0x..."

contractAddress*

String

Contract address of the NFT item you want to transfer. You can get this by reading the details of the NFT item.

tokenId*

String

The unique number assigned to the NFT item when the NFT collection contract is deployed.

password*

String

The 32-character long wallet password entered when creating the wallet.

{
  "transactionHash": "0xee0b6d2c894ac4e557d84ac4be31e2967a7162b119c03ba6bb2c0c837a09ab42"
}

Example cURL API Call

curl --request POST \
  --url 'https://api.playfix.io/wallet/erc721/tokens:transfer' \
  --header 'Authorization: Bearer <your_access_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "wallet": "<wallet_name>",
    "receiverAddress": "<receiver_address>",
    "contractAddress": "<nft_contract_address>",
    "tokenId": "<token_id>",
    "password": "<wallet_password>"
}'

Example Python API Call

import requests
import json

payload = {
    "wallet": "<wallet_name>",
    "receiverAddress": "<receiver_address>",
    "contractAddress": "<nft_contract_address>",
    "tokenId": "<token_id>",
    "password": "<wallet_password>"
    }

r = requests.post(
    "https://api.playfix.io/wallet/erc721/tokens:transfer",
    headers = {
        "Authorization": "Bearer <your_access_token>",
        "Accept": "application/json",
        "Content-Type": "application/json"
        },
    data = json.dumps(payload)
    )

print(r.text)

Request Body

  • wallet - Name of the sender's wallet. This should be the value of name from a previously created wallet. It begins with wallets/ followed by a ULID.

  • receiverAddress - Wallet address of the destination where you want to send the NFT. This begins with "0x..."

  • contractAddress - Contract address of the NFT item you want to transfer. You can get this by reading the details of the NFT item.

  • tokenId - The unique number assigned to the NFT item when the NFT collection contract is deployed.

  • password - The 32-character long wallet password entered when creating the wallet.

Response

{
  "transactionHash": "0xee0b6d2c894ac4e557d84ac4be31e2967a7162b119c03ba6bb2c0c837a09ab42"
}

Last updated