custody

Create Withdrawal

Trigger a withdrawal, requires bearer token in authorization header

The BX-SIGNATURE header should be created by signing the request with an ECDSA API Key as follows:

  1. Construct a string that concatenates the following fields:
    • timestamp - current epoch milliseconds e.g. 1697008474031
    • nonce - a UUID identifier to protect against replay attacks e.g. 255241a1-2cde-4954-87b1-13beef547960
    • request method - e.g. POST
    • request path - e.g. /trading-api/v1/wallets/withdrawal
    • request body JSON string, removing any spaces and newline characters
  2. Hash the string using a SHA-256 hash function and sign the resulting hexdigest with your <PRIVATE_KEY>.
  3. DER encode the signature, and base64 encode the DER encoded signature.

Bullish requires you to whitelist a withdrawal destination address before submitting a withdrawal request. You may view, approve, and manage your list of destination addresses in Account Settings on the Bullish website. If you attempt a withdrawal without first whitelisting an address in Account Settings, then the withdrawal attempt will fail.

For a full example of using the withdrawal endpoint please see the Custody Withdrawal Example

Please note that Custody endpoints utilize a non-multiplied asset format for long decimal assets like SHIB and PEPE, ensuring consistency with real-world asset representation. This differs from Trading endpoints, which use a multiplied asset format, such as SHIB1M and PEPE1M. For more information, please see help center

The currently supported precisions for withdrawal quantities are as follows. Please note that fees are always specified in units of the symbol itself, not in smaller denominations (e.g. BTC not Satoshi, ETH not Wei) :

SymbolPrecisionRemarks
USD2dp
BTC8dp
DOGE8dp
ETH8dp
LTC8dp
XRP6dp
AAVE8dp
CRV8dp
LINK8dp
MANA8dp
MATIC8dp
SUSHI8dp
UNI8dp
USDC6dp
USDT6dp
SHIB2dpPlease ensure to use the non-multiplied asset format (e.g., SHIB, PEPE, BONK) when creating withdrawals, as Custody endpoints align with real-world asset representation
PEPE2dpPlease ensure to use the non-multiplied asset format (e.g., SHIB, PEPE, BONK) when creating withdrawals, as Custody endpoints align with real-world asset representation
BONKRound to the nearest ten (e.g., 120 or 130, not 125).Please ensure to use the non-multiplied asset format (e.g., SHIB, PEPE, BONK) when creating withdrawals, as Custody endpoints align with real-world asset representation

Ratelimited: True - see custody limits

post/v1/wallets/withdrawal

Request

Headers

BX-SIGNATUREstring required

signature obtained using the signing format

Request body

timestampstring string required

unsigned 64 bit integer value which is the number of milliseconds since EPOCH expressed as string

noncestring required

a UUID withdrawal nonce to protect against replay attacks

authorizerstring string required

JWT authorizer you obtain along with the JWT token

Example request

{
  "timestamp": "1621490985000",
  "nonce": "1628376611",
  "authorizer": "03E02367E8C900000500000000000000",
  "command": {
    "commandType": "V1Withdrawal",
    "destinationId": "1560ec0b406c0d909bb9f5f827dd6aa14a1f638884f33a2a3134878102e78038",
    "symbol": "USDC",
    "network": "ETH",
    "quantity": "100000.00"
  }
}

Response

OK

statusReasonstring

status reason, describes why withdrawal challenge is in a specific state

statusReasonCodeinteger

status reason code, see details

custodyTransactionIdstring

unique identifier for tracking a withdrawal during signing and in history

Example response

{
  "statusReason": "Withdrawal accepted",
  "statusReasonCode": 1001,
  "custodyTransactionId": "DB:9e6304a08c9cc2a33e6bc6429a088eae2a6b940c8e312aede3a3780257b9b979"
}

Changes

No recorded changes to this operation across all 1 revision of this API.