Close Empty Token Accounts

This API is used to batch close multiple token accounts with a balance of 0 and reclaim the account rent (A maximum of 50 accounts can be closed per request)

FreePlusProEnterpriseCredit Usage
✅✅✅✅20

Response Data

{
 "err": false, // Error or not
    "res": [
      {
        "err": false,
        "msg": "OK", 
        "accounts": [ //Close Token Accounts
          "4e2Dz8a6aMxHDmZqMNmqCsVbDZqYNwvusi1UKhGDxfeB",
          "54oinhKhvUUAoSkF1eNoUGY8ocWzj8qpe4mKsFfBkVkU",
          "55L4B1VJWZnjUGYjUhwnnEk6bNuCzEUhDRQqSP4myBz4",
          "5Lv6Day5VLeCnnkz2itqjCkxTFoBvSfkPN2LZmL6N2oU",
          "6Rm9F2cJapEtrQx2AxK9e3h19QKHVNR2179QmELLCDYA",
        ],
        "txid": "transaction hash" //Transaction hash for the closed account
      }
    ]
  }

Request Parameters visualization reference

Body Params
string
required

The wallet id of the empty token accounts to be closed

string
required

The token account addresses to be closed. Use the Get Token Accounts API to obtain them. The value should be the account field from the returned results. (The state of the token must be 1, and a maximum of 50 addresses can be specified per request)

Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json