POST
/
withdraw
/
create
cURL
curl --request POST \
  --url https://core-api-dev.vanish.trade/withdraw/create \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "user_address": "<string>",
  "token_address": "<string>",
  "amount": "<string>",
  "timestamp": "<string>",
  "additional_sol": "<string>",
  "user_signature": "<string>"
}'
{
  "tx_id": "<string>",
  "transaction_data": "<string>"
}

Authorizations

x-api-key
string
header
required

Body

application/json

Details of the withdrawal, including the token address and the amount to be withdrawn.

user_address
string
required

The wallet address of the user making the withdrawal.

token_address
string
required

The address of the token being withdrawn.

amount
required

The amount of tokens to withdraw, specified in the smallest unit (e.g., lamports for SOL). Can be provided as a string or a number

timestamp
required

Unix timestamp (in milliseconds) representing the time of the request. Can be provided as a string or a number

additional_sol
required

An additional amount of SOL (in lamports) used to support the withdrawal, typically for ATA creation. Can be provided as a string or a number

user_signature
string
required

A digital signature of 'withdraw:{token_address}:{amount}{additional_sol}:{timestamp}', signed by the user's wallet.

Response

Successful withdrawal transaction data response.

tx_id
string
required

The transaction ID of the withdrawal.

transaction_data
string
required

Serialized withdraw transaction body to be executed on-chain.