Ask us anything. We're here to help.

Overview: Zero Hash Liquidity Service

Zero Hash Liquidity Service (ZHLS)

ZHLS provides in-house liquidity to connected platforms. The product is convenient and API lift is minimal.

The liquidity pairs we support for Crypto-to-Fiat and Crypto-to-Crypto vary by environment. Please contact us if you have any questions.

Price Precision - The maximum number of decimals in the quote price returned.
Quantity Precision - The maximum number of decimals that can be submitted for quote retrieval. Any quantity submitted with higher precision will be rounded down.

Note: If the 'total' field is used instead of 'quantity' when retrieving quotes you will get price precision to 16 decimal places. The quantity returned will have the precision detailed below.

Any ending zeros will be dropped from the price and quantity precision.

Digital Assets Supported

ASSET

ENVIRONMENT

TYPE

PRICE PRECISION

QUANTITY PRECISION

AAVE Prod ERC20 4 8
ADA Prod/Cert Base 6 6
ALGO Prod/Cert Base 8 6
APE.ETH Prod ERC20 6 8
AVAX Prod/Cert C-Chain 7 8
AXS Prod/Cert ERC20 7 8
BAT Prod ERC20 9 8
BCH Prod/Cert Base 6 8
BTC Prod/Cert Base 6 8
BUSD Prod ERC20 8 8
COMP Prod ERC20 6 8
DAI Prod/Cert ERC20  8 8
DOGE Prod Base 10 8
DOT Prod Base 8 8
EGLD Prod Base 6 8
ENJ Prod ERC20 8 8
EOS Prod Base 7 4
ETC Prod/Cert Base 6 8
ETH Prod/Cert Base 6 8
FTM Prod Base 9 8
GRT Prod ERC20 8 8
KNC Prod ERC20 8 8
LINK Prod ERC20 9 8
LTC Prod/Cert Base 6 8
MANA Prod ERC20 8 8
MATIC Prod ERC20 9 8
MATIC.POLYGON Prod ERC20 9 8
MKR Prod ERC20 6 8
OMG Prod ERC20 8 8
PAXG Prod ERC20 6 8
SAND Prod ERC20 8 8
SHIB Prod ERC20 12 0
SOL Prod/Cert Base 6 8
TUSD Prod ERC20 8 8
UNI Prod ERC20 7 8
USDC Prod/Cert ERC20 8 6
USDP Prod ERC20 8 8
USDT Prod/Cert ERC20 8 6
WBTC Prod/Cert ERC20 6 8
XLM Prod/Cert Base 10 7
XRP Prod/Cert Base 9 6
ZRX Prod ERC20 9 8
XTZ Prod Base 7 6

 

The supported fiat currencies are USD, CAD, EUR and GBP. 

The supported fiat currencies must be in the account prior to exchange to prevent delayed settlement.

It's possible that some asset configurations must be made on a per-participant basis, so please communicate with a Zero Hash representative if you are getting a rejection message.

Introduction to ZHLS

Similar to how “Banking as a Service” enabled FinTechs to focus on building products, Zero Hash provides the infrastructure to clear and settle digital assets in a completely automated and regulated way. Zero Hash provides liquidity as a service, providing a “one stop shop” for settlement and liquidity services through API that enables best execution and customization.

This FAQ outlines how to incorporate ZHLS execution streamline to the Zero Hash settlement workflow.

Benefits of Using the ZHLS

Zero Hash’s liquidity provides clients the ability to source liquidity across assets through a couple of lines of code. This provides a building block to innovate and develop products within the digital asset eco-system.

In addition, since liquidity is sourced directly from Zero hash as opposed to an external party, settlement occurs instantaneously improving speed and cost since there are no network fees or on-chain confirms.

Technology

General Guidelines

  • All quotes expire after 5 seconds.
  • Certain configurations need to be made by the Zero Hash Client Services team. Please reach out via a shared Slack or Telegram channel to enquire about using the product.
  • We currently support 3 different models (See below sections for details). Work directly with a Zero Hash representative to learn which suits your platform best:

Model

Platform a counterparty to trades?

Credit Check

Notes

Standard Yes Platform's Account
  • Preferred if the platform is indifferent to taking on a crypto side of the trade
Novated No Float Account
  • Preferred if the platform does not wish to touch crypto in any trade
  • Crypto and fiat legs of a trade settle immediately
Novated Deferred No Float Account
  • Preferred if the platform does not wish to touch crypto in any trade
  • Crypto legs settles immediately, fiat leg settles T+1
Platform Direct No Platform Customer Account
  • Useful for platforms that wish to ledger the customer's fiat balance at Zero Hash
  • Platforms can show a "Available" versus "Pending" balance on their front end

 

High Level Flow - All Models

mceclip1.png

 

API Documentation

 

Models

Standard Step-by-Step

1. Get a quote

  • Send a GET /liquidity/rfq request.
  • Assume a Platform with the participant_code PLAT01 is submitting this request
  • Request examples with parameters (you must enter either a quantity or total figure):

Quantity

"side":"buy",
"underlying":"BTC",
"quoted_currency":"USD",
"quantity": 1

 

Total

"side":"buy",
"underlying":"BTC",
"quoted_currency":"USD",
"total": 65000

 

2. Receive response

  • Response example (applicable to both Quantity and Total example above)
{

"message": {
"request_id": "ce819fe8-b1d7-43bb-961c-e09ede0988d3",
"participant_code": "PLAT01",
"quoted_currency": "USD",
"side": "buy",
"quantity": "1",
"price": "65000",
"quote_id": "5cd07738b861c31e3bd61467BTC1Buy1568311644602",
"expire_ts": 1624314992377,
"account_group": "00SCXM",
"account_label": "general",
"underlying": "BTC"
}
}

 

3. Execute order

  • Send a POST /liquidity/execute request using the quote_id from the response in step 2.
  • The credit check is done on the PLAT01's USD balance, 00SCXM account group.
  • You will have 5 seconds before the quote expires.
  • Execution example:
{
“quote_id”: “5cd07738b861c31e3bd61467BTC1Buy1568311644602"
}

 

4. Receive confirmation

{
“request_id:” “14f8ebb8-7530-4aa4-bef9-9d73d56313f3",
“quote”: {
“request_id”:“ce819fe8-b1d7-43bb-961c-e09ede0988d3”,
“participant_code”: “PLAT01”,
“underlying_currency”: “BTC”,
“quoted_currency”: “USD”,
“side”: “BUY”,
“quantity”: “1”,
“price”: “65000”,
“quote_id”: “5cd07738b861c31e3bd61467BTC1Buy1568311644602”,
“expire_ts”: 1568311649602,
"account_group": "00SCXM",
"account_label": "general,
},
“trade_id”: “ba97133e-ab15-4c86-86c1-86671b8420bc”,
“status”: “Completed”
}

When your trade has completed, the asset that the platform purchased will be auto-allocated to the Zero Hash Liquidity Services (00SCXM) platform, or account group. If you wish to allocate assets purchased via the liquidity stream to a separate account group, you will need to do this via the allocations page on the portal or the POST /transfers endpoint.

 

Novated Step-by-Step

1. Get a quote

  • Send a GET /liquidity/rfq request
  • Enter your customer participant code as participant_code
  • Request examples with parameters:

Quantity

"side":"buy",
"underlying":"BTC",
"quoted_currency":"USD",
"participant_code":"CUST01",
"quantity": 1

 

Total

"side":"buy",
"underlying":"BTC",
"quoted_currency":"USD",
"participant_code":"CUST01",
"total": 65000

 

2. Receive response

  • obo: on-behalf-of
  • Response example:
{
"message": {
"request_id": "f6171dba-8713-44c3-a6c0-d31c77530c56",
"participant_code": "CUST01",
"quoted_currency": "USD",
"side": "buy",
"quantity": "1",
"price": "22461.637",
"quote_id": "a4d474f4-7c07-44f4-8cea-3ab4a781acd3",
"expire_ts": 1655764212708,
"account_group": "00SCXM",
"account_label": "general",
"obo_participant": {
"participant_code": "CUST01",
"account_group": "PLAT01",
"account_label": "general"
},
"underlying": "BTC"
}
}

 

3. Execute order

  • Send a POST /liquidity/execute request using the quote_id from the response in step 2.
  • The credit check is done on the PLAT01's Float Account. This is under the 00SCXM participant code, PLAT01 account group.
  • You will have 5 seconds before the quote expires.
  • Execution example:
{
“quote_id”: “a4d474f4-7c07-44f4-8cea-3ab4a781acd3"
}

 

4. Receive confirmation

{
"message": {
"request_id": "ceae7a05-5bf9-430c-a498-26c4a7f26561",
"quote": {
"request_id": "f6171dba-8713-44c3-a6c0-d31c77530c56",
"participant_code": "CUST01",
"quoted_currency": "USD",
"side": "buy",
"quantity": "1",
"price": "22461.637",
"quote_id": "a4d474f4-7c07-44f4-8cea-3ab4a781acd3",
"expire_ts": 1655764212708,
"account_group": "00SCXM",
"account_label": "general",
"obo_participant": {
"participant_code": "CUST01",
"account_group": "PLAT01",
"account_label": "general"
},
"underlying": "BTC",
"transaction_timestamp": 1655764207911
},
"trade_id": "c0547c90-b7c1-4e64-81d3-afa702172bb9",
"status": "Completed",
"trade_ids_list": ["c0547c90-b7c1-4e64-81d3-afa702172bb9"]
}
}

 

Trade ID is a single trade where both the crypto and fiat legs settle immediately.

 

Novated Deferred Step-by-Step

1. Get a quote

  • Send a GET /liquidity/rfq request
  • Enter your customer participant code as participant_code
  • Request examples with parameters:

Quantity

"side":"buy",
"underlying":"BTC",
"quoted_currency":"USD",
"participant_code":"CUST01",
"quantity": 1

 

Total

"side":"buy",
"underlying":"BTC",
"quoted_currency":"USD",
"participant_code":"CUST01",
"total": 65000

 

2. Receive response

  • obo: on-behalf-of
  • Response example:
{
"message": {
"request_id": "ce819fe8-b1d7-43bb-961c-e09ede0988d3",
"participant_code": "PLAT01",
"quoted_currency": "USD",
"side": "buy",
"quantity": "1",
"price": "65000",
"quote_id": "5cd07738b861c31e3bd61467BTC1Buy1568311644602",
"expire_ts": 1624314992377,
"account_group": "00SCXM",
"account_label": "general",
"obo_participant": {
"participant_code": "CUST01",
"account_group": "PLAT01",
"account_label": "general"
},
"underlying": "BTC"
}
}

 

3. Execute order

  • Send a POST /liquidity/execute request using the quote_id from the response in step 2.
  • The credit check is done on the PLAT01's Float Account. This is under the 00SCXM participant code, PLAT01 account group.
  • You will have 5 seconds before the quote expires.
  • Execution example:
{
“quote_id”: “5cd07738b861c31e3bd61467BTC1Buy1568311644602"
}

 

4. Receive confirmation

{
“request_id:” “14f8ebb8-7530-4aa4-bef9-9d73d56313f3",
“quote”: {
“request_id”:“ce819fe8-b1d7-43bb-961c-e09ede0988d3”,
“participant_code”: “PLAT01”,
“underlying_currency”: “BTC”,
“quoted_currency”: “USD”,
“side”: “BUY”,
“quantity”: “1”,
“price”: “65000”,
“quote_id”: “5cd07738b861c31e3bd61467BTC1Buy1568311644602”,
“expire_ts”: 1568311649602,
"account_group": "00SCXM",
"account_label": "general",
"obo_participant": {
"participant_code": "CUST01",
"account_group": "PLAT01",
"account_label": "general"
},
“trade_ids”: { “ba97133e-ab15-4c86-86c1-86671b8420bc”,
"6e6aa53f-8454-42a4-ad5b-9c941b92e642"
}
“status”: “Completed”
}

 

You will receive 2 trade id's in the response. 1 is settling the crypto leg immediately into the customer account, and the other trade is reserved for the USD leg, which will settle on a T+X basis.

 

Platform Direct Step-by-Step

1. Get a quote

  • Send a GET /liquidity/rfq request.
  • Enter your customer participant code as participant_code
  • Request examples with parameters:

Quantity

"side":"buy",
"underlying":"BTC",
"quoted_currency":"USD",
"participant_code":"CUST01",
"quantity": 1

 

Total

"side":"buy",
"underlying":"BTC",
"quoted_currency":"USD",
"participant_code":"CUST01",
"total": 65000

 

2. Receive response

  • obo: on-behalf-of
  • Response example:
{
"message": {
"request_id": "ce819fe8-b1d7-43bb-961c-e09ede0988d3",
"participant_code": "PLAT01",
"quoted_currency": "USD",
"side": "buy",
"quantity": "1",
"price": "65000",
"quote_id": "5cd07738b861c31e3bd61467BTC1Buy1568311644602",
"expire_ts": 1624314992377,
"account_group": "00SCXM",
"account_label": "general",
"obo_participant": {
"participant_code": "CUST01",
"account_group": "PLAT01",
"account_label": "general"
},
"underlying": "BTC"
}
}

 

3. Execute order

  • Send a POST /liquidity/execute request using the quote_id from the response in step 2.
  • The credit check is done on the CUST01's USD account. This is under the CUST01 participant code, PLAT01 account group.
  • You will have 5 seconds before the quote expires.
  • Execution example:
{
“quote_id”: “5cd07738b861c31e3bd61467BTC1Buy1568311644602"
}

 

4. Receive confirmation

{
“request_id:” “14f8ebb8-7530-4aa4-bef9-9d73d56313f3",
“quote”: {
“request_id”:“ce819fe8-b1d7-43bb-961c-e09ede0988d3”,
“participant_code”: “PLAT01”,
“underlying_currency”: “BTC”,
“quoted_currency”: “USD”,
“side”: “BUY”,
“quantity”: “1”,
“price”: “65000”,
“quote_id”: “5cd07738b861c31e3bd61467BTC1Buy1568311644602”,
“expire_ts”: 1568311649602,
"account_group": "00SCXM",
"account_label": "general",
"obo_participant": {
"participant_code": "CUST01",
"account_group": "PLAT01",
"account_label": "general"
},
“trade_id“:"ba97133e-ab15-4c86-86c1-86671b8420bc",
“status”: “Completed”
}