Ask us anything. We're here to help.

Does Zero Hash support crypto/crypto trade via API?

 

There are two API endpoints in Zero Hash where customers can submit a trade:

  • via POST /liquidity/execute endpoint
  • via POST /trades endpoint

For crypto/crypto trades support, see the below table:

Endpoint Support crypto/crypto trade

POST /liquidity/execute

 NOT YET.

It is coming soon. 

POST /trades

YES, already supported

 

For details on how to submit a trade via POST /trades , please see our API documentation for details here API Documentation.

An example of a double-side crypto-crypto trade payload is also provided below:

{

    "message": {

        "trade_id": "72d2e971-e2ff-4507-9536-4c699309fce6",

        "client_trade_id": "test_id",

        "trade_state": "accepted",

        "market_identifier_code": null,

        "trade_reporter_code": "ZKWL66",

        "symbol": "BTC/ETH",

        "trade_quantity": "0.0001",

        "trade_price": "1",

        "trade_type": "regular",

        "physical_delivery": true,

        "comment": null,

        "last_update": 1649159306971,

        "transaction_timestamp": 1570456044000,

        "accepted_timestamp": 1649159306973,

        "defaulted_timestamp": null,

        "settled_timestamp": null,

        "expiry_timestamp": null,

        "settlement_timestamp": null,

        "settlement_price_index_id": null,

        "contract_size": 1,

        "underlying": "BTC",

        "quoted_currency": "ETH",

        "trade_reporter": "test@test.com",

        "platform_code": "ZKWL66",

        "product_type": "spot",

        "parties_anonymous": false,

        "bank_fee": null,

        "reporting_party": null,

        "settlement_schedule": null,

        "parties": [

            {

                "settling": true,

                "participant_code": "Q1S577",

                "side": "buy",

                "asset": "BTC",

                "amount": "0.0001",

                "liquidity_indicator": null,

                "execution_id": null,

                "order_id": null,

                "obligations_outstanding_timestamp": null,

                "current_obligations_met_timestamp": null,

                "settlement_state": null,

                "client_order_id": null,

                "collateral_percentage": null,

                "account_label": null

            },

            {

                "settling": true,

                "participant_code": "JYVWER",

                "side": "sell",

                "asset": "ETH",

                "amount": "0.0001",

                "liquidity_indicator": null,

                "execution_id": null,

                "order_id": null,

                "obligations_outstanding_timestamp": null,

                "current_obligations_met_timestamp": null,

                "settlement_state": null,

                "client_order_id": null,

                "collateral_percentage": null,

                "account_label": null

            }

        ],

        "session_id": null

    }

}

 

For more information on the trade state, please refer here Transaction States.