Skip to main content
POST
/
private
/
tx
/
withdraw
Private Withdraw
curl --request POST \
  --url https://api.docs.magicblock.app/private/tx/withdraw \
  --header 'Content-Type: application/json' \
  --data '
{
  "owner": "<string>",
  "user": "<string>",
  "mint": "<string>",
  "amount": 1,
  "endpoint_url": "<string>"
}
'
{
  "transaction": "<string>",
  "message": "Transaction created successfully"
}

Body

application/json
owner
string
required

Owner of ephemeral ATA (payer and signer)

user
string
required

Owner of the ephemeral ATA

mint
string
required

SPL token mint

amount
integer
required

Amount of tokens to withdraw

Required range: x >= 0
endpoint_url
string | null

Solana endpoint URL override

Response

Successful Response

transaction
string
required

Base64-encoded serialized transaction

message
string
default:Transaction created successfully