Types
Type reference for order executions. GraphQL notation: ! means non-null, [...] is a list; a field without ! can be null.
OrderExecution
The economic snapshot is immutable from the moment of the cross; only status and its timestamps move.
| Field | Type | Description |
|---|---|---|
id | UUID! | Execution id |
orderNumber | String! | Human-facing order number: TPST- plus eight alphanumerics, unique, non-sequential |
buySideOrderId | UUID! | The resting buy-side order that crossed |
sellSideOrderId | UUID! | The resting sell-side order that crossed |
buyerAccountId | UUID! | Buying account |
sellerAccountId | UUID! | Selling account |
marketId | UUID | Venue the fill cleared in |
inventoryItemId | UUID! | Inventory item the fill moved |
assetConfigurationId | UUID! | Traded product |
keyId | UUID | Graded/condition key |
takerSide | OrderSubmissionDirection! | Which side crossed the book: the aggressor |
quantity | Int! | Units filled |
executionPriceCents | Int! | Per-unit cross price, in cents |
grossAmountCents | Int! | executionPriceCents × quantity |
status | OrderExecutionStatus! | See enum below |
executedAt | DateTime! | When the cross happened |
settledAt | DateTime | When settlement completed |
failedAt | DateTime | When settlement failed |
failureReason | String | Why settlement failed |
createdAt | DateTime! | Row creation time |
updatedAt | DateTime! | Last status movement |
Opt-in fields
Populated only when the corresponding include flag is set on the query; empty or null otherwise.
| Field | Type | Include flag | Description |
|---|---|---|---|
transfers | [Transfer!]! | includeTransfers | Shipment/transfer records sourced off this fill |
moneyMovements | [MoneyMovement!]! | includeMoneyMovements | The fill's ledger lines |
disputes | [Dispute!]! | includeDisputes | Disputes raised against this fill |
returns | [Return!]! | includeReturns | Return legs unwinding this fill |
lineItemEvents | [InventoryLineItemEvent!]! | includeLineItemEvents | The durable record of which inventory units the fill moved — the only way to recover the traded units after settlement clears the execution link off the line items |
assetConfiguration | AssetConfiguration | includeProductData | Traded product's catalog row |
asset | Asset | includeProductData | Parent asset |
key | Key | includeProductData | Graded/condition key with display label |
market | Market | includeMarket | The venue — says where the fill happened, never what traded |
pnl | ExecutionPnl | includePnl | The fill's economics. Null for fills that predate receipts |
handChanges | [ExecutionHandChange!] | includeHandChanges | Your own prior movements of this product and grade, newest first. getOrderExecution only |
ExecutionPnl
Quantities are outcome quantities — a dispute resolution may have moved them off the fill's committed quantity. Prices are cash-actual per unit with fees folded in.
| Field | Type | Description |
|---|---|---|
soldQuantity | Int! | Units that permanently left the seller |
boughtQuantity | Int! | Units the buyer kept. Both zero when the trade unwound |
sellUnitPriceCents | BigInt | Seller's per-unit proceeds, net of fees |
sellFeesCents | BigInt | Seller's fees |
buyUnitPriceCents | BigInt | Buyer's per-unit cost, fees in |
buyFeesCents | BigInt | Buyer's fees |
unitCostBasisCents | BigInt | Seller's moving-average basis per unit |
realizedPnlCents | BigInt | Seller's realized profit. Null — unknown, never zero — when the basis predates recorded history |
acquiredAt | DateTime | When the seller most recently acquired this product before the sell. Null when nothing is on record |
ExecutionHandChange
One movement of your units of the fill's product — an acquisition or disposal off the receipts ledger. Gross history, not lot attribution.
| Field | Type | Description |
|---|---|---|
occurredAt | DateTime! | When it happened |
direction | HandChangeDirection! | ACQUIRED or DISPOSED |
quantity | Int! | Units moved |
unitPriceCents | BigInt | Your per-unit cash on that movement; null when unpriced (e.g. intake) |
eventType | String! | What kind of movement it was |
PublicExecution
The anonymized shape recentOrderExecutions returns — what traded, at what price, when, and where, with no party or account fields.
| Field | Type | Description |
|---|---|---|
id | UUID! | Execution id — dedupe key against the live trade stream |
executedAt | DateTime | When the cross happened |
takerSide | OrderSubmissionDirection! | Aggressor side, for buy/sell styling |
market | Market! | Venue |
assetConfiguration | AssetConfiguration! | Traded product |
asset | Asset! | Parent asset |
key | Key | Graded/condition key |
quantity | Int! | Units filled |
executionPriceCents | Int! | Per-unit cross price, in cents |
InventoryLineItemEvent
One recorded event in a line item's history — the append-only receipt of what a fill moved.
| Field | Type | Description |
|---|---|---|
id | ID! | Event id |
lineItemId | ID! | The line item this event belongs to |
eventType | InventoryLineItemEventType! | TRADE or MOVEMENT_REQUEST |
orderExecutionId | ID | The fill that caused it, when trade-caused |
transferId | ID | Associated transfer |
facilityMovementRequestId | ID | Associated facility movement |
fromInventoryItemId | ID | Ownership moved from |
toInventoryItemId | ID | Ownership moved to |
quantity | Int! | Units the event covers |
createdAt | DateTime! | When it was recorded |
OrderExecutionTotals
Aggregates over everything the list filters match, independent of pagination. Both value fields are BigInt, serialized as strings.
| Field | Type | Description |
|---|---|---|
totalCount | Int! | Matching fills |
pendingValueCents | BigInt! | Gross value of PENDING fills |
completedValueCents | BigInt! | Gross value of SETTLING + SETTLED fills |
Enums
OrderExecutionStatus
The settlement lifecycle. See the overview for how these drive submission statuses.
| Value | Meaning |
|---|---|
PENDING | Matched, settlement not yet started |
SETTLING | Settlement in flight: charge, payout, inventory transfer |
IN_DISPUTE | The buyer raised a dispute mid-settlement. Settlement is frozen — nothing settles, auto-confirms, or gets auto-cancelled — until the dispute resolves and hands the trade back to SETTLING. In flight, not terminal |
SETTLED | Fully settled |
FAILED | Settlement failed; awaiting retry or intervention |
REVERSED | Unwound after settlement (refund / clawback) |
IN_DISPUTE is the one non-terminal state that can persist indefinitely. Treat it as still in flight: a fill sitting there will move again, and the wait is bounded by dispute resolution rather than by settlement.