Ask us anything. We're here to help.

2022-08-12 Quote Retrieval with Estimated Network Fee

API Updates

  • Platforms can now call the GET /liquidity/rfq endpoint and specify a withdrawal_address as a query parameter
  • Zero Hash will accept the request and lock in a network fee quote associated with an imminent on-chain withdrawal of the purchased crypto

Example Flow

Request:

  • participant_code: CUST01
  • underlying: ETH
  • quoted_currency: USD
  • quantity: 1
  • withdrawal_address: 0x4d2f8c3b4052aca0360a50ae9b47cfc084cd1e28

Response:

{
"message": {
"request_id": "07d81e73-6afa-43c6-b054-9ae8b7579794",
"participant_code": "CUST01",
"quoted_currency": "USD",
"side": "buy",
"quantity": "1",
"price": "1400",
"quote_id": "3fb9de3b-cc2e-4829-8135-c391d9f8f835",
"expire_ts": 1660240933628,
"account_group": "00SCXM",
"account_label": "general",
"obo_participant": {
"participant_code": "CUST01",
"account_group": "PLAT01",
"account_label": "general"
},
"network_fee_notional": "2.63", → Fiat (quoted_currency) - denominated value of the quoted network fee
"network_fee_quantity": "0.00139101", → Crypto (network fee asset) - denominated value of the quoted network fee
"total_notional": "1400.00139101", → Total notional amount charged to the end-customer
"underlying": "ETH",
"asset_cost_notional": "1400" → Total (total field) specified on the initial GET /liquidity/rfq request
}
}

 

Bold = new fields

  • NOTE: These new fields will be provided in the response regardless of whether a withdrawal_address is sent as a query parameter

 

Differing Assets and Network Fee Assets

  • For some assets, such as USDC.ETH, the base asset requires that the sender pay the network fee in the network fee asset (ETH in this example)
  • In the API response, if a buyer requests to buy USDC.ETH, the client should perceive that the network_fee_quantity is being displayed in terms of the network fee asset (ETH in this example)

 

Added Validation

  • If an invalid withdrawal_address is provided per the specified asset, you will receive a 400 HTTP Error Message: “[withdrawal_address] is not a supported [underlying] address”
    • Example: “0x21cE19Ea1ad8fCC194bd4cAE571A6D936e12c857 is not a supported BTC address”

 

Performance Expectations

GET /liquidity/rfq

  • CERT: A platform should expect latency response times of less than 800ms, at the 99th percentile, at a maximum of 20 requests per seconds

* Please note that certification performance at the stated rps may be impacted (i.e. higher latency and/or error rates) given LPs own cert environment. LPs tend to limit bandwidth in cert (reduce allocated resources) based on production trading needs.

  • PROD: A platform should expect latency response times of less than 800ms, at the 99th percentile, at a maximum of 100 requests per seconds

 

Upcoming Releases

  • Platforms will be able to execute quotes which lead to not only the execution of the Buy, but the automatic initiation of an on-chain withdrawal