Positions are a computed view of a session at its current clock time; transactions are the session's ledger for the whole day. 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 for the whole day |
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). What they do without one differs: positions are computed at the session's current clock, while transactions come back in full — every entry of the day, with no time cutoff.
The runnable blocks below read a practice session, which you can open at any hour; the response shapes are identical under an account. These three set one up — open a day, move its clock into the data range, and put one spread on — so the reads afterwards have something to compute:
POST /practice/sessions
Opens a throwaway $100,000 practice day. Any past trading date works — take one from GET /market-data/sessions if this one isn't in the archive.
Interactive — run this request from the docs
PATCH /practice/sessions/{{session_id}}
Moves the replay clock. Positions and transactions are both computed at this moment, so this is the dial the reads below follow.
Interactive — run this request from the docs
POST /practice/sessions/{{session_id}}/orders
Places the vertical in your practice day — once filled it gives the reads two positions and two transactions. The legs' YYMMDD must match the session date, and the strikes must exist on it.
Interactive — run this request from the docs
Positions
curl -s https://api.0dtespx.com/accounts/$ACCT/sessions/$SID/positions -H "Authorization: $TOKEN"
GET /practice/sessions/{{session_id}}/positions
Computed live from the visible trades — move the clock with PATCH and run this again to watch delta and P&L change.
Interactive — run this request from the docs
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": "1400",
"unrealized_profit_loss": "5",
"realized_profit_loss": "0",
"total_profit_loss": "3.28",
"price": "14.05",
"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"
GET /practice/sessions/{{session_id}}/transactions
Returns the session's whole trade and settlement log — one entry per leg fill, plus the day's settlement entries. Add ?at= to cut it off at a moment of your choosing.
Interactive — run this request from the docs
Returns every trade and settlement entry of the day, newest first, with no time cutoff. 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": "1400",
"value": "1400",
"effect": "debit",
"fees": "1.72"
}
price and value already include the ×100 contract multiplier.
Settlement transactions
Settlement entries are dated at the 4:00 PM ET close and have no order_id — they belong to the session, not to any single order. Out-of-the-money options produce an expiration; each in-the-money leg produces an exercise — a credit for a long leg, a debit for a short — cash-settled at (underlying − strike) × 100 for calls and (strike − underlying) × 100 for puts. (SPX is cash-settled, so a short in-the-money leg settles as an exercise with debit effect — never an assignment, which belongs to the physical share-delivery path.)
On a practice session these are computed up front from the orders on the book, so the full read carries them as the day's projected outcome even while your clock is hours short of the close — and recomputes them whenever you add or remove an order. Ask for ?at=<a moment before the close> to read the ledger without them.
Only positions is a function of the clock, so rewinding a practice session changes what that endpoint returns while transactions keeps answering with the whole day. No data is deleted either way — only the window moves.
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"
GET /practice/sessions/{{session_id}}/positions
The same read at a different moment — the stored clock doesn't move. Keep the cursor inside the session's own day.
Interactive — run this request from the docs
- On a historical (practice) session,
atoverrides the replay-clock moment for that one read; omit it andpositionsuses the stored session time, unchanged, whiletransactionsreturns the day in full. - 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
atandpositionsis taken at the session close (the fully-settled end-of-day state, including expiration and exercise) andtransactionsreturns the whole day — which for a settled day is the same tape either way. Its end-of-day settlement transactions are always included. - On an open live session,
atis 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.