Liquidity

Retrieves a quote for the purchase or sale of a given asset. Exactly one of quantity or total must be provided.

get/liquidity/rfq

Request

  • Base URL
    https://api.cert.zerohash.com
  • 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'USD' | 'EUR' | 'USDC.ETH' required

The quoted currency in the trading pair. E.g. USD in the pair BTC/USD.

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

spreadstring

Optional custom spread in basis points applied to the quote. Requires the platform to be configured to pass spread through this endpoint.

commissionstring

Optional custom commission in basis points applied to the quote. Mutually exclusive with spread; only available to platforms with spread_as_commission enabled.

quote_expiry'5s' | '30s' | '1m' | '5m' | '10m' | '15m'

Optional quote expiration window. Feature-flag gated per platform.

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 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