New Liquidity Endpoint (POST /liquidity/rfq)

Release Details

Release Date: June 7th, 2024

Release Type

Informational – Optional action from platforms

Summary

Zero Hash has created a new endpoint: POST /liquidity/rfq. Its fundamental purpose is identical to the existing GET /liquidity/rfq endpoint, however the POST variation allows the submission of fees. Platforms should use the same execution endpoint, POST /liquidity/execute, to execute on the quotes requested via POST /liquidity/rfq.


It's worth calling out this endpoint has 3 additional features compared to its GET counterpart:

  • Custom Spreads: A platform that is configured to do so can specify the spread on each individual order via the spread parameter
  • Transaction Fees: A platform that is configured to do so can specify fees on each individual order via the fees object
  • Per-order quote expiries: A platform can specify the quote length of the order. Acceptable values are:
    • 5 seconds: 5s
    • 30 seconds: 30s
    • 1 minute: 1m
    • 5 minutes: 5m
    • 15 minutes: 15m

Action Required

  • POST /liquidity/rfq is immediately available for all platforms that are configured to use our liquidity endpoints.
  • Your platform must be configured by a Zero Hash employee to use custom spreads and fees, so get in touch with your rep if interested in these features.

Endpoints Impacted

  • POST /liquidity/rfq

Example Request

  • Platform (PLAT01) requests a quote on behalf of its customer (CUST01): POST /liquidity/rfq
{
    "side": "buy",
    "participant_code": "CUST01",
    "underlying": "ETH",
    "quoted_currency": "USD",
    "total": "20",
    "spread": "200",
    "fees": [
        {
            "amount": "2.50",
            "name": "fee_1"
        }
    ]
}
  • Zero Hash responds:
{
    "message": {
        "request_id": "9e910f82-4d23-410f-bebd-a3e6e9d93abb",
        "participant_code": "PLAT01",
        "quoted_currency": "USD",
        "side": "buy",
        "quantity": "0.00451975",
        "price": "3871.8955694452126777",
        "quote_id": "9b31abce-6427-45a0-9086-d861a11cdaa7",
        "expire_ts": 1717780227909,
        "account_group": "00SCXM",
        "account_label": "general",
        "obo_participant": {
            "participant_code": "CUST01",
            "account_group": "PLAT01",
            "account_label": "general"
        },
        "total_notional": "20",
        "underlying": "ETH",
        "asset_cost_notional": "17.5",
        "spread_notional": "0.35",
        "spread_bps": "200",
        "fees": [
            {
                "name": "fee_1",
                "amount": "2.50"
            }
        ]
    }
}
  • Platform executes the quote:
{
    "message": {
        "request_id": "94cfc7fb-162e-4a83-beac-cc8861aaf353",
        "quote": {
            "request_id": "9e910f82-4d23-410f-bebd-a3e6e9d93abb",
            "participant_code": "PLAT01",
            "quoted_currency": "USD",
            "side": "buy",
            "quantity": "0.00451975",
            "price": "3871.8955694452126777",
            "quote_id": "9b31abce-6427-45a0-9086-d861a11cdaa7",
            "expire_ts": 1717780227909,
            "account_group": "00SCXM",
            "account_label": "general",
            "obo_participant": {
                "participant_code": "CUST01",
                "account_group": "PLAT01",
                "account_label": "general"
            },
            "total_notional": "20",
            "underlying": "ETH",
            "asset_cost_notional": "17.5",
            "spread_notional": "0.35",
            "spread_bps": "200",
            "fees": [
                {
                    "name": "fee_1",
                    "amount": "2.50"
                }
            ],
            "transaction_timestamp": 1717780227734
        },
        "trade_id": "9d7fe862-e4a0-4a2e-8d66-26f8b70e3c59",
        "status": "Completed",
        "trade_ids_list": [
            "9d7fe862-e4a0-4a2e-8d66-26f8b70e3c59"
        ]
    }
}

Relevant Documentation