Positions & transactions

Read computed positions with delta and P&L, and the transaction log.

Positions and transactions are computed views of a session at its current clock time. Both require authentication.

Endpoints

Method Path Purpose
GET /accounts/{id}/sessions/{sid}/positions Open positions with delta and P&L
GET /accounts/{id}/sessions/{sid}/transactions Trade and settlement log up to the current time

Both accept an optional ?at=<RFC3339> cursor to read at an arbitrary moment of the day without moving the stored clock (see Scrubbing a settled day).

Positions

curl -s https://api.0dtespx.com/accounts/$ACCT/sessions/$SID/positions -H "Authorization: $TOKEN"

Each position is computed on the fly from your visible trades and the market data at the session's current time (the replay clock for a practice session, the latest tick for a live one):

[
	{
		"id": "33dffe55-…",
		"instrument": "SPXW  250115C05950000",
		"direction": "long",
		"quantity": "1",
		"cost_basis": "430",
		"unrealized_profit_loss": "5",
		"realized_profit_loss": "0",
		"total_profit_loss": "3.28",
		"price": "4.35",
		"delta": "0.523"
	}
]

Delta scaling

delta is signed by your direction — long calls have positive delta, short calls negative (and the reverse for puts). It recomputes on every clock change. Delta is the only Greek in the data model — positions (and the option chain) don't carry gamma, theta, vega, IV, or a theoretical price.

The id is a stable synthetic UUID derived from session + instrument + direction, so positions keep the same id across requests even though they aren't stored.

Transactions

curl -s https://api.0dtespx.com/accounts/$ACCT/sessions/$SID/transactions -H "Authorization: $TOKEN"

Returns every trade and settlement entry with datetime ≤ the session's current time. Each trade carries its instrument, type (one of the four leg actions or a settlement type), quantity, price, value, effect, and fees:

{
	"instrument": "SPXW  250115C05950000",
	"type": "buy to open",
	"quantity": "1",
	"price": "430",
	"value": "430",
	"effect": "debit",
	"fees": "1.72"
}

price and value already include the ×100 contract multiplier.

Settlement transactions

Settlement entries appear once the clock reaches the 4:00 PM ET close. They have no order_id — they belong to the session, not to any single order. Out-of-the-money options produce an expiration; in-the-money options produce an exercise (long) or assignment (short), cash-settled at (underlying − strike) × 100.

Because both endpoints filter by the current clock time, rewinding a practice session shrinks what they return — no data is deleted, only the time window changes.

Scrubbing a settled day (?at=)

Both endpoints accept an optional ?at=<RFC3339> query parameter (UTC) that overrides the clock for a single stateless read — it does not advance the stored session time. This is what powers the read-only review of a live account's past days: once a live session has settled, its full trade tape is replayable moment by moment.

# positions as they stood at 18:30:00 UTC that day
curl -s "https://api.0dtespx.com/accounts/$ACCT/sessions/$SID/positions?at=2025-01-15T18:30:00Z" \
	-H "Authorization: $TOKEN"
  • On a historical (practice) session, at overrides the replay-clock moment for that one read; omit it and the stored session time is used, unchanged.
  • On a settled live session, the day's positions and transactions are reconstructed server-side from the market data and the settled trade log. Omit at and the read is taken at the session close (the fully-settled end-of-day state, including expiration / exercise / assignment). Its end-of-day settlement transactions are always included.
  • On an open live session, at is ignored — the read reflects the latest processed tick.

All money math (cost basis, realized/unrealized P&L, settlement cash) is computed on the server; the cursor only selects the moment.