Get quote
Changed onRetrieves 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.
Request
- Base URLhttps://api.cert.zerohash.com
- URLhttps://api.cert.zerohash.com/convert_withdraw/rfq
- AuthAPI key in header X-SCX-API-KEY and API key in header X-SCX-PASSPHRASE
Query parameters
Allows platforms to specify the side of the quote
the underlying asset
Allows platforms to specify the underlying asset
the quoted asset
Allows platforms to specify the quoted asset
The quantity of the underlying asset requested in the quote. Exactly one of quantity or total must be supplied.
The total of the quoted_currency asset requested in the quote. Exactly one of quantity or total must be supplied.
The participant requesting a quote to buy or sell an asset
The account_label that's used to fund the trade
The on-chain address where the withdrawal should be sent
Allows platforms to specify if fees are inclusive This parameter is only applicable for requests made by total
Allows the platform to define the quote spread in basis points
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
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
The participant benefiting from the quote to buy or sell an asset
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
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
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
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
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
- info
endpoint added
- info