Update to CLOB Trading Model

Overview

zerohash currently acts as the Central Counter Party (CCP) for trades that match on the Central Limit Order Book. We are transitioning away from acting as CCP and trades will now be directly booked against the counterparty of the trade which will remain anonymous.

As part of this transition, we are updating the CLOB trade-booking structure such that the counterparty on each trade will appear as an anonymous participant, rather than the zerohash participant's inventory account.

Non Material Update to GET /trades Endpoint

Scenario 1: Customer Fills Against External Party

The shape of the parties attribute will not change, however, the participant_code field will now always display Anonymous. The full payload remains the same, as seen below:

{
    "parties": [
        {
            "settling": true,
            "participant_code": "CUST01",
            "side": "buy",
            "asset": "BTC",
            "amount": "0.0001",
            "liquidity_indicator": null,
            "execution_id": "execution-id",
            "order_id": "order-id",
            "obligations_outstanding_timestamp": 1762201548140,
            "current_obligations_met_timestamp": null,
            "settlement_state": "settled",
            "client_order_id": "client-order-id",
            "collateral_percentage": null,
            "account_label": "label",
            "account_profile": "prefunded",
            "trader": "PLAT01",
            "commission": "0.11",
            "commission_asset": "USD"
        },
        {
            "participant_code": "Anonymous",
            "side": "sell",
            "asset": "USD",
            "amount": "10.67",
            "liquidity_indicator": null
        }
    ]
}

Scenario 2: Customer Fills Against Internal Party

Where two parties of the same platform execute against one another, the two parties will show in the same parties object. In the sample response below, execution_id should be used for either party to identify the trade.

{
  "parties": [
    {
      "settling": true,
      "participant_code": "CUST01",
      "side": "sell",
      "asset": "USD",
      "amount": "10",
      "liquidity_indicator": null,
      "execution_id": "6XRHR4TG003Y",
      "order_id": "6WW50NV1862G",
      "obligations_outstanding_timestamp": 1765456952163,
      "current_obligations_met_timestamp": null,
      "settlement_state": "obligations_outstanding",
      "client_order_id": "1167639010536696210000",
      "collateral_percentage": null,
      "account_label": "0ca185ce-392b-4814-9eae-add8e629bdd4",
      "account_profile": "nonprefunded",
      "trader": "CUST01",
      "commission": "0",
      "commission_asset": "USD"
    },
    {
      "settling": true,
      "participant_code": "CUST02",
      "side": "buy",
      "asset": "ETH",
      "amount": "0.0001",
      "liquidity_indicator": null,
      "execution_id": "6XRHR4TG203Y",
      "order_id": "6WW50NV1662G",
      "obligations_outstanding_timestamp": 1765456952163,
      "current_obligations_met_timestamp": null,
      "settlement_state": "obligations_outstanding",
      "client_order_id": "1166639010536259566000",
      "collateral_percentage": null,
      "account_label": "dc087f25-0bd3-4b3d-9f40-b36607550149",
      "account_profile": "nonprefunded",
      "trader": "CUST02",
      "commission": "0",
      "commission_asset": "USD"
    }