Close token account

POST

Close a wallets token account for a particular Pump.fun token, the token account must be empty.

Request Body

mint

(string)

The token's mint address you wish to check balance for.

fromWallet

(string)

The wallet address you want to close token account for.

feePayer

(string) nullable

The wallet address of the fee payer.

Attributes

result

(object)

The token balance object.


mint

(string)

The token's mint address.

tokenAccount

(string)

The wallets token account address.

wallet

(string)

The wallet address.

signature

(string)

The signature of the transaction.

solscan

(object)

An object containing Solana Explorer URLs for the token.


mint

(string)

The Solana Explorer URL for the token.

tokenAccount

(string)

The Solana Explorer URL for the token account.

wallet

(string)

The Solana Explorer URL for the wallet.

tx

(string)

The Solana Explorer URL for the transaction.

pumpfun

(object)

An object containing the Pump.fun URL for the token.


mint

(string)

The Pump.fun URL for the token.

Useful for

  • Closing a wallets token account for a particular token.

  • Getting back the SOL fee for the token account.

Endpoint

https://api.tradepump.fun/v1/token/close-token-account

Example Request

Node
Curl
Axios
1 2 3 4 5 6 7 8 9 10 11 import { PumpApiClient } from 'tradepumpfun'; const client = new PumpApiClient({ apiKey: '<your-api-key>' }); await client.token.closeTokenAccount({ mint: "<mint>", fromWallet: "<wallet>", feePayer: "<feePayer>", });