Skip to main content
POST
/
api
/
public
/
v1
/
wallet
/
withdrawals
Withdraw an asset
curl --request POST \
  --url https://thefirm.biz/api/public/v1/wallet/withdrawals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "withdrawAddress": "0x1234567890123456789012345678901234567890",
  "tokenAddress": "0x1234567890123456789012345678901234567890",
  "amount": "12.5"
}
'
{
  "txHash": "0xa3f5c9e1b7d2048fa3f5c9e1b7d2048fa3f5c9e1b7d2048fa3f5c9e1b7d2048f",
  "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "withdrawAddress": "0x1234567890123456789012345678901234567890",
  "amount": "12500000"
}

Authorizations

Authorization
string
header
required

API key issued via POST /api/public/v1/api-keys.

Body

application/json

The asset, destination, and amount to withdraw.

withdrawAddress
string
required

Destination address that receives the withdrawn asset.

Example:

"0x1234567890123456789012345678901234567890"

tokenAddress
string
required

ERC-20 contract address, or the native-ETH sentinel 0xEeee…EEeE.

Example:

"0x1234567890123456789012345678901234567890"

amount
string
required

Decimal amount to withdraw, e.g. "12.5", or "max" to withdraw the entire on-chain balance of the asset.

Minimum string length: 1
Example:

"12.5"

Response

The withdrawal was confirmed on-chain.

txHash
string
required

Hash of the confirmed on-chain transaction.

Example:

"0xa3f5c9e1b7d2048fa3f5c9e1b7d2048fa3f5c9e1b7d2048fa3f5c9e1b7d2048f"

tokenAddress
string
required
Example:

"0x1234567890123456789012345678901234567890"

withdrawAddress
string
required
Example:

"0x1234567890123456789012345678901234567890"

amount
string
required

Atomic units actually transferred (decimal string).

Example:

"12500000"