Convert and Withdraw

Retrieves a quote for the purchase of an asset and the network fees associated with an imminent and automatic withdrawal of the asset. Exactly one of quantity or total must be supplied.

get/convert_withdraw/rfq

Request

  • Base URL
    https://api.cert.zerohash.com
  • URL
    https://api.cert.zerohash.com/convert_withdraw/rfq
  • Auth
    API key in header X-SCX-API-KEY and API key in header X-SCX-PASSPHRASE

Query parameters

side'buy' | 'sell' required

Allows platforms to specify the side of the quote

underlying'AAVE.ETH' | 'ADA' | 'ALGO' | 'AVAX' | 'BAT.ETH' | 'BCH' | 'BTC' | 'BUSD.ETH' | 'COMP.ETH' | 'DAI.ETH' | 'DOGE' | 'DOT' | 'EGLD' | 'EOS' | 'ETC' | 'ETH' | 'ETH.ARBITRUM' | 'GRT.ETH' | 'GYEN.ETH' | 'HBAR' | 'LINK.ETH' | 'LTC' | 'LUNA' | 'MATIC.ETH' | 'MATIC.POLYGON' | 'MKR.ETH' | 'MOB' | 'SAND.ETH' | 'SOL' | 'UNI.ETH' | 'USDC.ETH' | 'USDC.ALGO' | 'USDC.POLYGON' | 'USDC.SOL' | 'USDC.HBAR' | 'USDC.XLM' | 'USDC.AVAX' | 'USDT.ETH' | 'UST' | 'WBTC.ETH' | 'XEM' | 'XLM' | 'XRP' | 'XTZ' | 'ZUSD.ETH' required

the underlying asset

Example:BTC

Allows platforms to specify the underlying asset

quoted_currency'CAD' | 'EUR' | 'GBP' | 'JPY' | 'MXN' | 'USD' required

the quoted asset

Example:USD

Allows platforms to specify the quoted asset

quantitystring

The quantity of the underlying asset requested in the quote. Exactly one of quantity or total must be supplied.

totalstring

The total of the quoted_currency asset requested in the quote. Exactly one of quantity or total must be supplied.

participant_codestring

The participant requesting a quote to buy or sell an asset

account_labelstring

The account_label that's used to fund the trade

withdrawal_addressstring required

The on-chain address where the withdrawal should be sent

fee_inclusiveboolean

Allows platforms to specify if fees are inclusive This parameter is only applicable for requests made by total

spreadstring

Allows the platform to define the quote spread in basis points

destination_tagstring

The destination tag or memo ID associated with the transaction. If the asset is EOS, XLM or XRP and no_destination_tag is false, then this is required

no_destination_tagstring

Whether or not the specific withdrawal and destination address requires a destination tag. If the asset is EOS, XLM or XRP, this field is required. Note: zerohash requires that no_destination_tag be false for EOS

beneficiary_participant_codestring

The participant benefiting from the quote to buy or sell an asset

beneficiary_first_namestring

The first name of the participant benefiting from the quote request Only applies to individual beneficiaries. Cannot be used along with business_beneficiary_name. Note: Redundant if beneficiary_participant_code is provided in request

beneficiary_last_namestring

The last name of the participant benefiting from the quote request Only applies to individual beneficiaries. Cannot be used along with business_beneficiary_name. Note: Redundant if beneficiary_participant_code is provided in request

beneficiary_business_namestring

The name of the the business participant benefiting from the quote request Only applies to business beneficiaries. Cannot be used along with first/last_beneficiary_name. Note: Redundant if beneficiary_participant_code is provided in request

Headers

X-SCX-SIGNEDstring required

HMAC-SHA256 signature of the request, base64-encoded. See the Authentication guide for the exact signing formula.

X-SCX-TIMESTAMPstring required
Example:1678901234

Current Unix timestamp in seconds. Must be within 60 seconds of server time or the request is rejected.

Response

Successfully generated convert-and-withdraw quote. Returns the quote envelope ({ message: {...} }) with pricing, network fees, and an ephemeral quote_id.

Example response

{
  "message": {
    "request_id": "ce819fe8-b1d7-43bb-961c-e09ede0988d3",
    "participant_code": "CUST01",
    "quoted_currency": "USD",
    "side": "buy",
    "quantity": "1",
    "price": "11430.90",
    "quote_id": "5cd07738b861c31e3bd61467BTC1Buy1568311644602",
    "expire_ts": 1568311649602,
    "account_group": "GRP001",
    "account_label": "general",
    "obo_participant": {
      "participant_code": "CUST01",
      "account_group": "PLAT01",
      "account_label": "general"
    },
    "network_fee_notional": "1",
    "network_fee_quantity": "1",
    "withdrawal_fee_tiers_list": [],
    "total_notional": "2.00",
    "underlying": "BTC",
    "asset_cost_notional": "2.00",
    "withdrawal_address": "2NCgV7BXXafJZ86utcYFs5m3tCpkcpLafeG",
    "payment_processor": {
      "name": "checkout.com",
      "id": "593dd810-f051-40a9-9f26-d45280efe8f3"
    },
    "spread_notional": "0.12",
    "spread_bps": "50",
    "commission_notional": "5.00",
    "commission_bps": "25"
  }
}

Changes