Crypto/crypto trading via API

Crypto/Crypto Trades Support in Zero Hash

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

  1. POST /liquidity/execute

    • Crypto/crypto trading not yet supported (coming soon).
  2. POST /trades

    • Crypto/crypto trading supported.

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

Example Payload for Double-Side Crypto/Crypto Trade

{
    "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": "[email protected]",
        "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.