Ask us anything. We're here to help.

Session Tags

Session Tags

Session tags are now available via the /trade API endpoint. These tags help identify the session a trade was executed within and provide for a discrete start and finish based on the selected settlement schedule.

 

Session Period Codified

The Session Period is a series of characters that identify the date and time of a trading session. For example, the first 8 characters are the date in the format YYYYMMDD. The last 6 characters is the time in a 24 hour format 00:00:00 to 23:59:59 based on UTC.

For payment processors with 1 minute schedules, the beginning of a session may be 08/10/2021 10:00:00 and end 08/10/2021 10:00:59. This should be designated as 20210810100000. All intraday session periods use the floor of the designated time during the trading period. A trade occurring at 2021-08-10 10:01:30 is during the trading session 20210810100100

For trading organizations with periods spanning more than one day, the session should use the ceiling of the trading period. For example, if the session period begins 08/10/2021 at 00:00:00 and trades 8/10/2021 23:59:59. The trade date and session would be 20210810000000. However, if the session begins 08/10/2021 at 17:00:00 and completes 08/11/2021 16:59:59 PM. The trade date and session would be 20210811000000.

 

Session Tag Information

Session Tags are available in the /trades endpoint response after a trade has been submitted and when a user queries for trades via the GET /trades or GET /trades/:trade_id endpoints.

 

{
"message": {
"trade_id": "12316fce-31d3-465a-af01-0fb5d2dc4d40",
"client_trade_id": "aba14251-e296-42ac-9bc7-01c9186b9219",
"trade_state": "terminated",
"market_identifier_code": "TEST",
"trade_reporter": "reporter@mail.com",
"reporting_party": "ABC123",
"symbol": "BTC/USD",
"trade_quantity": "1.0",
"trade_price": "10000.000000",
"trade_type": "regular",
"physical_delivery": true,
"comment": "Some comments about the trade for Zero Hash to store",
"settlement_timestamp": 1575849302321,
"transaction_timestamp": 1575849302321,
"accepted_timestamp": 1564686909724,
"settled_timestamp": null,
"defaulted_timestamp": null,
"contract_size": 1,
"bank_fee": 1,
"underlying": "BTC",
"quoted_currency": "USD",
"platform_code": "00TEST",
"product_type": "spot",
"parties_anonymous": true,
"last_update": 1564686909724,
"parties": [
{
"participant_code": "PKOHXY",
"side": "buy",
"asset": "BTC",
"amount": "1.0",
"liquidity_indicator": null,
"execution_id": null,
"order_id": null,
"current_obligations_met_timestamp": 1564686909724,
"obligations_outstanding_timestamp": 1564686909724,
"client_order_id": null,
"settling": true
},
{
"participant_code": "S1I5ED",
"side": "sell",
"asset": "USD",
"amount": "4000.0000",
"liquidity_indicator": null,
"execution_id": null,
"order_id": null,
"current_obligations_met_timestamp": 1564686909724,
"obligations_outstanding_timestamp": 1564686909724,
"client_order_id": null,
"settling": true
}
]
“session_id”: 20190801000000, <- This is the new session_id
}
}