On this page

latest contributor to this doc

Last Edit:

@smk762

Withdraw NFT

API-v2withdraw_nft

To withdraw NFTs, you must activate the coin that holds the NFTs first. The withdraw_nft method will return signed raw transaction hex, which must be broadcast using the send_raw_transaction method to complete the withdrawal.

ParameterTypeRequiredDefaultDescription
typestring-The contract type of the NFT to withdraw. Either withdraw_erc721 or withdraw_erc1155.
withdraw_dataobject-A standard WithdrawNftData object.

ParameterTypeDescription
amountstringAmount of tokens to withdraw.
block_heightintegerBlock height of the transaction. If the value is 0, the transaction is unconfirmed.
coinstringCoin name. One of AVALANCHE, BSC, ETH, FANTOM, or POLYGON.
contract_typestringContract type. ERC721 or ERC1155.
fee_detailsobjectA standard WithdrawFee object.
fromarrayList of source addresses.
internal_idintegerUsed for internal transaction identification; for some coins, it may be equal to transaction hash.
timestampintegerTimestamp of the block containing the withdrawal transaction in unix epoch format.
toarrayList of destination addresses.
token_addressstringToken address.
token_idstringToken ID.
transaction_typestringThis will always be NftTransfer.
tx_hashstringTransaction ID of the withdrawal.
tx_hexstringRaw hex of signed transaction. Use this with the send_raw_transaction RPC to broadcast the transaction.

Withdraw NFT (ERC721)

POST
withdraw_nft
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "withdraw_nft",
  "mmrpc": "2.0",
  "params": {
    "type": "withdraw_erc721",
    "withdraw_data": {
      "chain": "POLYGON",
      "to": "0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498",
      "token_address": "0x73a5299824cd955af6377b56f5762dc3ca4cc078",
      "token_id": "1"
    }
  }
}

If you are sending two or more NFTs, you must use the withdraw_erc1155 withdraw type.

Withdraw NFT (ERC1155)

POST
withdraw_nft
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "withdraw_nft",
  "mmrpc": "2.0",
  "params": {
    "type": "withdraw_erc1155",
    "withdraw_data": {
      "chain": "POLYGON",
      "to": "0xaB95D01Bc8214E4D993043E8Ca1B68dB2c946498",
      "token_address": "0x73a5299824cd955af6377b56f5762dc3ca4cc078",
      "token_id": "1"
    }
  }
}

If you would like to withdraw all NFTs from a token_address, you must use the withdraw_erc1155 withdraw type and set max to true.

Withdraw NFT (ERC1155 Max)

POST
withdraw_nft
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "withdraw_nft",
  "mmrpc": "2.0",
  "params": {
    "type": "withdraw_erc1155",
    "withdraw_data": {
      "chain": "POLYGON",
      "to": "0x27Ad1F808c1ef82626277Ae38998AfA539565660",
      "token_address": "0x2953399124f0cbb46d2cbacd8a89cf0599974963",
      "token_id": "110473361632261669912565539602449606788298723469812631769659886404530570536720",
      "max": true
    }
  }
}