General
Platforms can retrieve revenue information related to individual trades via the GET /trades
and GET /trades/:trade_id
endpoints. There are 2 fields on each endpoint:
spread_notional
: notional value of the spread applied, expressed in terms of thequoted_currency
spread_bps
: basis point value of the spread applied
The spread applied to each trade, whether applied using the Custom Spread feature or the standard statically configured method, will populate the above 2 fields.
This feature is available on the RFQ, Convert Withdraw, Rewards, and Awards product.
Use Cases
- Finance team members of Platforms who are closing month/quarter/annual-end accounting books
- Operations team members of Platforms attempting to reconcile monthly revenue activity
Flow
Using Custom Spreads as the spread mechanism for the example
Get Quote
- Example request:
POST /convert_withdraw/rfq
{
"side": "buy",
"participant_code": "CUST01",
"underlying": "ETH",
"quoted_currency": "USD",
"total": "100",
"withdrawal_address": "0x6E0C18D71f470cc5076A74FE34c19Ab51129C6F7",
"fee_inclusive": true,
"spread": "200"
}
- Example response:
{
"message": {
"request_id": "1367f818-bc3e-4f44-9248-3b609df3ba44",
"participant_code": "PLAT01",
"quoted_currency": "USD",
"side": "buy",
"quantity": "0.045139334192361",
"price": "2213.8120064897038273",
"quote_id": "111cee26-f351-44c6-a82d-a132d6b4e3f5",
"expire_ts": 1701630113828,
"account_group": "00SCXM",
"account_label": "general",
"obo_participant": {
"participant_code": "CUST01",
"account_group": "PLAT01",
"account_label": "general"
},
"network_fee_notional": "0.07",
"network_fee_quantity": "0.0000315000003024",
"total_notional": "100",
"underlying": "ETH",
"asset_cost_notional": "99.93",
"spread_notional": "1.9986",
"spread_bps": "200"
}
}
Execute Quote
- Example request:
POST /convert_withdraw/execute
{
"quote_id": "111cee26-f351-44c6-a82d-a132d6b4e3f5"
}
- Example response:
{
"message": {
"request_id": "0b357995-2450-48e2-8ca7-eb62ebf106bd",
"quote": {
"request_id": "79def6a9-895f-4ae8-a9fa-59d7137000a3",
"participant_code": "PLAT01",
"quoted_currency": "USD",
"side": "buy",
"quantity": "0.045139334192361",
"price": "2213.8120064897038273",
"quote_id": "af2b747e-1f1c-44e7-a3b1-9fedc903897c",
"expire_ts": 1701630128565,
"account_group": "00SCXM",
"account_label": "general",
"obo_participant": {
"participant_code": "CUST01",
"account_group": "PLAT01",
"account_label": "general"
},
"network_fee_notional": "0.07",
"network_fee_quantity": "0.0000315000003276",
"total_notional": "100",
"underlying": "ETH",
"asset_cost_notional": "99.93",
"spread_notional": "1.9986",
"spread_bps": "200",
"transaction_timestamp": 1701630125757
},
"trade_id": "7de4d374-1d99-4eef-b0ec-29299291935c",
"status": "Completed",
"trade_ids_list": [
"7de4d374-1d99-4eef-b0ec-29299291935c"
],
"withdrawal_request_id": "6bf66a37-893f-446f-a949-230550c6f17d"
}
}
Reporting
- Platforms can retroactively poll the Zero Hash api in order to record the
spread_bps
andspread_notional
that was assessed on a given trade via 2 endpoints:GET /trades
GET /trades/:trade_id
- Example request:
GET /trades/7de4d374-1d99-4eef-b0ec-29299291935c
- Example response:
{
"message": {
"batch_trade_id": null,
"trade_id": "7de4d374-1d99-4eef-b0ec-29299291935c",
"client_trade_id": "af2b747e-1f1c-44e7-a3b1-9fedc903897c",
"trade_state": "accepted",
"market_identifier_code": "SCXM",
"trade_reporter_code": "00SCXM",
"symbol": "ETH/USD",
"trade_quantity": "0.045139334192361",
"trade_price": "2213.8120064897038273",
"trade_type": "regular",
"physical_delivery": true,
"comment": "",
"last_update": 1701630126232,
"transaction_timestamp": 1701630125000,
"accepted_timestamp": 1701630125803,
"defaulted_timestamp": null,
"settled_timestamp": null,
"expiry_timestamp": null,
"settlement_timestamp": null,
"settlement_price_index_id": null,
"contract_size": 1,
"underlying": "ETH",
"quoted_currency": "USD",
"trade_reporter": "00SCXM",
"platform_code": "00SCXM",
"product_type": "spot",
"parties_anonymous": false,
"bank_fee": null,
"reporting_party": "00SCXM",
"settlement_schedule": null,
"parties": [
{
"settling": true,
"participant_code": "CUST01",
"side": "buy",
"asset": "ETH",
"amount": "null",
"liquidity_indicator": null,
"execution_id": "",
"order_id": "",
"obligations_outstanding_timestamp": null,
"current_obligations_met_timestamp": null,
"settlement_state": null,
"client_order_id": "",
"collateral_percentage": null,
"account_label": "general",
"account_profile": null
},
{
"settling": true,
"participant_code": "00SCXM",
"side": "sell",
"asset": "USD",
"amount": "null",
"liquidity_indicator": null,
"execution_id": "",
"order_id": "",
"obligations_outstanding_timestamp": null,
"current_obligations_met_timestamp": null,
"settlement_state": null,
"client_order_id": "",
"collateral_percentage": null,
"account_label": "inventory",
"account_profile": null
}
],
"session_id": null,
"dynamic_fees": [],
"network_fee_notional": "0.07",
"network_fee_quantity": "0.0000315000003276",
"total_notional": "100.00",
"asset_cost_notional": "99.93",
"spread_notional": "1.9986",
"spread_bps": "200"
}
}