Transfer is the action of sending a token from the owner’s wallet to another wallet on the blockchain.

1

Transfer a token

First, we need to transfer the token.

Please use the read a wallet endpoint to find the ID of the token that you wan’t to transfer.

Remember to switch <CONTRACT_ID>, <WALLET_ID>, <EXTERNAL_WALLET_ADDRESS> and <TOKEN_ID>.
curl --request POST \
  --url https://protocol-sandbox.lumx.io/v2/transactions/transfers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "contractId": <CONTRACT_ID>,
  "from": "<WALLET_ID>",
  "to": "<EXTERNAL_WALLET_ADDRESS>",
  "tokenId": "<TOKEN_ID"
}'

You will receive a status 202 with an object containing the ID of the transaction.

2

Read a transaction

Every new transfer is queued up to mitigate the possibility of a transaction failing.

Now, let’s check the transaction’s status on the blockchain.

Remember to switch <TRANSACTION_ID>.
curl --request GET \
  --url https://protocol-sandbox.lumx.io/v2/transactions/<TRANSACTION_ID> \
  --header 'Authorization: Bearer $API_KEY'

You will receive a status 200 with an object containing the transaction status and transaction hash.

Congratulations! You can check your transaction on the block explorer.