Get withdrawal quote
Changed onReturns a locked network fee quote for a planned crypto withdrawal. The returned withdrawal_quote_id is valid for 30 seconds and must be passed to POST /withdrawals/execute to complete the withdrawal. Exactly one of withdrawal_account_id or withdrawal_address must be supplied; if max_amount is false (the default), amount is required. Fee denomination, since the key names do not make it obvious: network_fee, withdrawal_fee and the net_withdrawal_* amounts are all denominated in asset. network_fee_asset is the asset the blockchain charged, which for a token withdrawal is the native coin of the chain, and it labels network_fee_native_amount — not network_fee, which has already been converted into asset. The *_notional values are denominated in their matching *_notional_currency, always USD.
Request
- Base URLhttps://api.cert.zerohash.com
- AuthAPI key in header X-SCX-API-KEY and API key in header X-SCX-PASSPHRASE
Query parameters
The participant the withdrawal will be debited from. 6-character alphanumeric code.
The account_group for the source account. Defaults to the caller's participant_code when omitted.
The account_label for the source account. Defaults to general when omitted.
The asset code of the asset being withdrawn, e.g. BTC.
The requested withdrawal amount. Required (and must be positive) unless max_amount is true.
When true, zerohash will generate a withdrawal for the full available balance of asset in the source account; in that case amount can be omitted. Defaults to false. Accepted as the string "true" or "false".
The withdrawal_account_id of the whitelisted destination account. Required when withdrawal_address is not provided.
The on-chain address that will receive the crypto asset. Required when withdrawal_account_id is not provided.
The destination tag or memo ID associated with the transaction. Required when the asset is EOS, XLM, or XRP and no_destination_tag is false.
Whether the destination address requires a destination tag. Required for tag-based assets (EOS, XLM, XRP). zerohash requires no_destination_tag to be false for EOS. Accepted as the string "true" or "false".
Headers
HMAC-SHA256 signature of the request, base64-encoded. See the Authentication guide for the exact signing formula.
Current Unix timestamp in seconds. Must be within 60 seconds of server time or the request is rejected.
Response
Fee quote locked and returned, OR — EU deployments only — a Travel Rule pre-check discriminator when the address is not yet cleared. Discriminator shape: { message: { travel_rule: { account_status } } } where account_status is action_required, processing, blocked, or unknown.
Example response
{
"message": {
"participant_code": "ABCDEF",
"account_group": "PLAT01",
"account_label": "general",
"asset": "USDT.ETH",
"amount": "0.04867615",
"withdrawal_address": "bc1qy08yh0cm565gvtx2z80dz6dnyr635mwtknl36e",
"withdrawal_quote_id": "bdc4c936-8505-4e61-b859-f3a5a6bdc880",
"network_fee": "0.00000282",
"network_fee_notional": "0.22",
"net_withdrawal_quantity": "0.04867333",
"net_withdrawal_notional": "3832.29",
"amount_notional": "3832.51",
"withdrawal_fee": "0",
"network_fee_asset": "ETH",
"network_fee_native_amount": "0.00000021",
"network_fee_notional_currency": "USD",
"withdrawal_fee_asset": "USDT.ETH",
"withdrawal_fee_notional": "15.00",
"withdrawal_fee_notional_currency": "USD"
}
}Changes
- breaking
added to the response body
oneOflist for the response status - breaking
the response's body type changed from
objectto no type for status - breaking
the response property
became optional for the status - warning
removed the optional property
from the response with the status
- breaking