Skip to main content

Trade Revisions

Return the current live (or historical) trade plus the snapshots taken each time it was amended or cancelled.

URL : /api/trade/{internalTradeID}/revisions

Method : GET

Auth required : YES (API Key)

Permissions required : None

internalTradeID is the UUID from GET /api/trade (internalTradeID), not the user tradeID.

Request headers

X-API-KEY: "<api_key>"
X-API-SECRET: "<api_secret>"

Success Response

Code : 200 OK

A New trade with no amendments has revisions: [].

{
"timestamp": "2026-09-21T17:16:12.424011385Z",
"status": 200,
"result": {
"current": {
"internalTradeID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tradeID": "20241119-001",
"side": "Buy",
"quantity": 700,
"price": 2010.50000000,
"tradeDate": "2024-11-19",
"mic": "XNYM",
"assetClass": "Future",
"instrumentCode": "CL",
"client": "CTCINC",
"executingBroker": "JJFUTLTD",
"clearingBroker": "DBAG",
"clearingAccount": "GC123",
"confirmationStatus": "Unconfirmed",
"status": "Amend",
"version": 2
},
"revisions": [
{
"revision": 1,
"version": 1,
"status": "New",
"supersededAt": "2026-09-21T16:02:11Z",
"supersededById": "uploader@broker.com",
"changedFields": {
"quantity": { "from": 676, "to": 700 },
"price": { "from": 2009, "to": 2010.5 },
"lifecycle_status": { "from": "New", "to": "Amend" }
}
}
]
},
"path": "/api/trade/3fa85f64-5717-4562-b3fc-2c963f66afa6/revisions"
}
FieldMeaning
currentThe live row (or the historical row after EOD), same shape as GET /api/trade.
revisions[].revisionThe version this snapshot was when it was superseded.
revisions[].versionSame as revision for that snapshot.
revisions[].statusLifecycle of that snapshot (New or Amend typically).
revisions[].supersededAtWhen the snapshot was written.
revisions[].supersededByIdUsername of the user who amended or cancelled.
revisions[].changedFieldsMap of field path → { "from": …, "to": … }. Leg diffs use keys such as legs[0].price.

A Cancel writes a snapshot with lifecycle_status from the previous status to Cancel. Version does not increment.

After EOD archive the same URL still works: current is the historical row and revisions are the archived copies.

Error Response

Condition : No live or historical trade with that UUID.

Code : 400 BAD REQUEST

{
"timestamp": "2026-09-21T17:16:12.424011385Z",
"status": 400,
"result": [
{
"id": "TRADE_NOT_FOUND",
"status": "ERROR",
"message": "Trade [3fa85f64-5717-4562-b3fc-2c963f66afa6] not found"
}
],
"path": "/api/trade/3fa85f64-5717-4562-b3fc-2c963f66afa6/revisions"
}

Condition : The key is not allowed to read that trade.

Code : 403 FORBIDDENACTION_UNAUTHORIZED

Code : 500 INTERNAL SERVER ERROR