Get quote
Changed onRetrieves a quote for the purchase or sale of a given asset. Exactly one of quantity or total must be provided.
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
Allows platforms to specify the side of the quote
the underlying asset
Allows platforms to specify the underlying asset
The quoted currency in the trading pair. E.g. USD in the pair BTC/USD.
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
Optional custom spread in basis points applied to the quote. Requires the platform to be configured to pass spread through this endpoint.
Optional custom commission in basis points applied to the quote. Mutually exclusive with spread; only available to platforms with spread_as_commission enabled.
Optional quote expiration window. Feature-flag gated per platform.
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 retrieved quote. Returns the quote envelope ({ message: {...} }) with pricing 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": "32ad471b-824e-4f04-94ff-45c4439b4fe9",
"expire_ts": 1568311649602,
"account_group": "GRP001",
"account_label": "sub_account_test",
"obo_participant": {
"participant_code": "CUST01",
"account_group": "PLAT01",
"account_label": "general"
},
"total_notional": "2.00",
"settlement_type": "STANDARD",
"underlying": "BTC",
"asset_cost_notional": "2.00",
"spread_notional": "2.12",
"spread_bps": "50",
"payment_processor": {
"name": "checkout.com",
"id": "593dd810-f051-40a9-9f26-d45280efe8f3"
}
}
}Changes
- info
endpoint added
- info