> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trdrs.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the account snapshot

> Returns the account summary, positions, and working orders at a single consistent revision. Read this rather than combining the one-shot reads: three reads taken separately are three moments, and nothing in them says whether they agree. It serves the same body the stream frames carry, so a client with no stream open, or one coming back after a disconnect, reads exactly what it would have received.



## OpenAPI

````yaml /partner-platform/openapi.json get /api/account/snapshot
openapi: 3.1.0
info:
  title: trdrs Engine API
  version: 1.1.0
  description: >-
    ## API Reference


    This is the served OpenAPI contract for the trdrs engine: market data,
    trading and account

    routes for your firm's traders, trdrs Connect account-registration handoff,
    and preview

    challenge routes.


    See Quick Start for the first integration path: key setup, market config,
    chart data, Connect

    account registrations, idempotency, stream reconnects, and conformance.


    See Overview and API Standards for the cross-cutting contract rules.
servers:
  - url: https://app.trdrs.co
    description: Production
  - url: /
    description: This engine
security: []
tags:
  - name: Market data
    description: >-
      Symbol search and resolution, OHLCV history, quote snapshots, the server
      clock, and the live bar stream. Crypto rides each venue’s public feed;
      futures stream from the caller’s own connected Rithmic account. With none
      connected, futures requests answer 503 `feed_requires_connection`.
  - name: News
    description: >-
      Aggregated market news and the economic calendar, from licensed/open
      sources, keyword-tagged with futures roots at ingest. Platform-wide
      content (nothing per-user), admitted exactly like Market data: a licensed
      origin, a session, or a firm API key. Headlines page by published time,
      scope by instrument root, and stream live over SSE; thumbnails serve
      through the image proxy.
  - name: Trading
    description: >-
      The money surface: entries, exits, replaces, cancels, and position/account
      flattening. Every order-placing call uses `clientOrderId` as its
      idempotency key.
  - name: Account
    description: >-
      Reading a connected account. You do not create trading accounts here: a
      trader connects their own broker account (or creates a free demo account)
      in the app, and firms create evaluation accounts through the Partner API
      (Firm accounts → Create evaluation accounts) or register venue accounts
      through Connect (Create an account registration). Account state and the
      durable ledgers: balances, positions, working orders, fills, P&L history,
      and the live account stream.
  - name: Connect
    description: >-
      trdrs Connect account registration, for partner firms. Register an account
      you issued on your own venue — a pending account registration — with the
      trader’s sign-in email, optionally the venue account id and the login name
      your venue issued. The trader finds it waiting in the connect flow the
      moment they sign in with that email: the connect step is pre-filled with
      everything except the credential, which the trader always enters
      themselves. A registration never transmits a password and never grants
      access to anything before the trader’s own login succeeds. These routes
      answer a partner-scoped key only; a firm API key or a user session gets
      401. Registrations expire after 30 days; re-registering the same email +
      account refreshes the expiry instead of duplicating. The end-to-end flow
      guide is **[Quick Start](/docs/guides/quick-start)**.
  - name: Firm accounts
    description: >-
      Evaluation accounts your firm issues on the trdrs venue, through your
      partner key — the other half of account setup. Connect registrations hand
      off accounts that exist on your venue; these routes create and manage
      accounts on ours: the trader trades them on trdrs, and your firm owns the
      lifecycle. Every route is scoped to accounts your firm created through
      this API — an account the same trader opened themselves is invisible and
      untouchable here, by construction. Creation is batched with per-item
      results, and every write carries your own `referenceId`, so a crashed
      pipeline retries safely. Served when the deployment runs the prop engine;
      without it, every route in this group answers `404`.
  - name: Webhooks
    description: >-
      The outbound event bus: register an https endpoint and the platform pushes
      events to it instead of your back office polling us. Every delivery is
      signed (`trdrs-signature: t=<unix>,v1=<hmac-sha256>` over
      `${t}.${rawBody}`) so you can prove it came from us and is fresh, and
      every delivery is durable — a failed attempt is retried with backoff for
      about nine hours and the whole log is readable, so an endpoint that was
      down is a delay rather than a lost event. Serves brokers and prop firms
      alike: the account-registration (`registration.*`) events fire wherever
      Connect does, and the account events fire where the prop engine runs.
  - name: Challenges
    description: >-
      The prop evaluation surface: challenge programs and a trader’s own
      enrollments. **Preview: the one group on this page outside the
      additive-only guarantee** (the pre-contract v1 scaffold; the Phase-1
      rebuild will change these shapes; see Stability). **Cookie-authenticated,
      not key-authenticated**, and served only when the engine runs with
      `CHALLENGES_ENABLED`; without that flag the bundle is absent and every
      route below returns `404`. The firm-console/admin half of this surface is
      deliberately not documented here. It is back office, not licensed surface.
paths:
  /api/account/snapshot:
    get:
      tags:
        - Account
      summary: Get the account snapshot
      description: >-
        Returns the account summary, positions, and working orders at a single
        consistent revision. Read this rather than combining the one-shot reads:
        three reads taken separately are three moments, and nothing in them says
        whether they agree. It serves the same body the stream frames carry, so
        a client with no stream open, or one coming back after a disconnect,
        reads exactly what it would have received.
      parameters:
        - name: broker
          in: query
          schema:
            type: string
        - name: account
          in: query
          schema:
            type: string
      responses:
        '200':
          description: The account at one revision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSnapshot'
        '401':
          description: Missing/unknown/revoked credential
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: The venue read failed; a partial snapshot is never served
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - tenantKey: []
      x-codeSamples:
        - lang: javascript
          label: TypeScript
          source: >-
            const res = await fetch('https://app.trdrs.co/api/account/snapshot',
            {
              headers: { Authorization: `Bearer ${process.env.TRDRS_API_KEY}` },
            })

            const data = await res.json()
        - lang: shell
          label: cURL
          source: |-
            curl 'https://app.trdrs.co/api/account/snapshot' \
              -H "Authorization: Bearer $TRDRS_API_KEY"
components:
  schemas:
    AccountSnapshot:
      type: object
      description: >-
        WireAccountSnapshot (@trdrs/contracts): the whole account at one
        revision. This is the body of this endpoint and of every `account` frame
        on the stream — one shape, not two. It replaced three independently
        timed reads, which no client could tell apart from one coherent picture.
        Apply it by the revision and nothing else: keep the newest frame you
        have for this `accountId`, drop anything at or behind it, and replace
        your whole picture with anything ahead of it. A frame that skips
        revisions is still complete, so there is nothing to recover and no
        resync to make. Never compute a revision of your own. `accountId` is
        opaque: key panels and subscriptions by it, never take it apart. `clock`
        says whether the revision is the account's own history ('engine') or
        trdrs reading a venue ('observation'). On an observation clock every
        read is a new reading and carries a new revision, so two reads of an
        account nothing happened to still differ: compare revisions, never count
        them. `positionModel` is 'net', so there is at most one signed position
        row per instrument.
      properties:
        accountId:
          type: string
        revision:
          type: integer
        clock:
          type: string
          enum:
            - engine
            - observation
        positionModel:
          type: string
          enum:
            - net
        capabilities:
          $ref: '#/components/schemas/AccountCapabilities'
        connected:
          type: boolean
        account:
          $ref: '#/components/schemas/AccountSummary'
        positions:
          type: array
          items:
            $ref: '#/components/schemas/PositionRow'
        orders:
          type: array
          items:
            $ref: '#/components/schemas/WorkingOrderRow'
        brackets:
          type: array
          items:
            $ref: '#/components/schemas/AccountBracket'
        managedExits:
          type: array
          items:
            $ref: '#/components/schemas/ManagedExit'
      required:
        - accountId
        - revision
        - clock
        - positionModel
        - capabilities
        - connected
        - account
        - positions
        - orders
        - brackets
        - managedExits
      example:
        accountId: 7a1f4c93b28d05e6f1a3c7d9b4e28f60
        revision: 4831
        clock: observation
        positionModel: net
        capabilities:
          adapter: rithmic
          assetClasses:
            - futures
          orderTypes:
            - market
            - limit
            - stop
            - stop_limit
          tifs:
            - day
            - gtc
          nativeBracket: true
          multiTargetBracket: true
          nativeAutoBreakeven: false
          bracketLevelAmend: true
          amendOrder: true
          reduceOnly: false
          exits: true
          symbolConfig: false
          marginPreview: estimate
          updates:
            summary: true
            positions: true
            orders: true
            executions: false
          instrumentFacts:
            priceIncrement: true
            quantityStep: true
            quantityBounds: false
            contractMultiplier: true
          exitPlanSupport:
            - stop_loss
            - take_profit
            - multiple_targets
            - runner_leg
            - breakeven
            - trailing_stop
          completeOrderBook: false
        connected: true
        account:
          broker: rithmic
          accountNumber: PA-4821-07
          balance: 50245.5
          realizedPnl: 245.5
          unrealizedPnl: 75
          netLiquidating: 50320.5
          availableBuyingPower: 47120.5
          usedBuyingPower: 3200
          marginBalance: null
          currency: USD
          asOf: 1787581920
        positions:
          - instrument: ESU6
            root: ES
            qty: 2
            avgPrice: 6480.5
            unrealizedPnl: 75
            liquidationPrice: null
            leverage: null
            margin: null
        orders:
          - brokerOrderId: '234992187'
            instrument: ESU6
            side: sell
            qty: 2
            orderType: limit
            triggerPrice: null
            limitPrice: 6492.25
            status: working
            clientOrderId: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d
            submittedAt: 1787581400
            tif: gtc
            reduceOnly: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
      example:
        error: invalid_instrument
    AccountCapabilities:
      type: object
      description: >-
        WireAccountCapabilities (@trdrs/contracts): what the adapter behind this
        account implements, so a host renders only what the account supports
        rather than offering a control the venue will refuse. Every flag is
        about code that exists and is verified against the venue; anything
        unproven is false and the order path refuses it. A time-in-force absent
        from `tifs` is refused, never silently mapped to a different lifetime.
        This is not permission: whether the account may trade right now is the
        risk lock, which rides the stream's own `lock` channel.
      properties:
        adapter:
          type: string
        assetClasses:
          type: array
          items:
            type: string
        orderTypes:
          type: array
          items:
            type: string
            enum:
              - market
              - limit
              - stop
              - stop_limit
        tifs:
          type: array
          items:
            type: string
            enum:
              - day
              - gtc
              - ioc
              - fok
              - post_only
        nativeBracket:
          type: boolean
        multiTargetBracket:
          type: boolean
        nativeAutoBreakeven:
          type: boolean
        bracketLevelAmend:
          type: boolean
        amendOrder:
          type: boolean
        reduceOnly:
          type: boolean
        exits:
          type: boolean
        symbolConfig:
          type: boolean
        marginPreview:
          type: string
          enum:
            - real
            - estimate
            - none
        updates:
          type: object
          properties:
            summary:
              type: boolean
            positions:
              type: boolean
            orders:
              type: boolean
            executions:
              type: boolean
          required:
            - summary
            - positions
            - orders
            - executions
        instrumentFacts:
          type: object
          properties:
            priceIncrement:
              type: boolean
            quantityStep:
              type: boolean
            quantityBounds:
              type: boolean
            contractMultiplier:
              type: boolean
          required:
            - priceIncrement
            - quantityStep
            - quantityBounds
            - contractMultiplier
        exitPlanSupport:
          type: array
          items:
            type: string
            enum:
              - stop_loss
              - take_profit
              - multiple_targets
              - runner_leg
              - breakeven
              - trailing_stop
          description: >-
            Which parts of a saved exit plan this account can actually run,
            derived from the capabilities beside it. Compare it against a plan's
            own `requires` to offer only the plans that will work.
        completeOrderBook:
          type: boolean
      required:
        - adapter
        - assetClasses
        - orderTypes
        - tifs
        - nativeBracket
        - multiTargetBracket
        - nativeAutoBreakeven
        - bracketLevelAmend
        - amendOrder
        - reduceOnly
        - exits
        - symbolConfig
        - marginPreview
        - updates
        - instrumentFacts
        - exitPlanSupport
        - completeOrderBook
    AccountSummary:
      type: object
      properties:
        broker:
          type: string
        accountNumber:
          type: string
        balance:
          type:
            - number
            - 'null'
        realizedPnl:
          type:
            - number
            - 'null'
        unrealizedPnl:
          type:
            - number
            - 'null'
        netLiquidating:
          type:
            - number
            - 'null'
        availableBuyingPower:
          type:
            - number
            - 'null'
          description: >-
            The real margin/leverage denominator (leverage = netLiquidating /
            marginRequired).
        usedBuyingPower:
          type:
            - number
            - 'null'
        marginBalance:
          type:
            - number
            - 'null'
        currency:
          type: string
        asOf:
          type:
            - number
            - 'null'
          description: Epoch seconds; null until the first broker snapshot.
      required:
        - broker
        - accountNumber
        - currency
      example:
        broker: rithmic
        accountNumber: PA-4821-07
        balance: 50245.5
        realizedPnl: 245.5
        unrealizedPnl: 75
        netLiquidating: 50320.5
        availableBuyingPower: 47120.5
        usedBuyingPower: 3200
        marginBalance: null
        currency: USD
        asOf: 1787581920
    PositionRow:
      type: object
      properties:
        instrument:
          type: string
        root:
          type: string
        qty:
          type: number
          description: 'Signed: long > 0, short < 0.'
        avgPrice:
          type:
            - number
            - 'null'
        unrealizedPnl:
          type:
            - number
            - 'null'
        liquidationPrice:
          type:
            - number
            - 'null'
          description: >-
            Venue-reported, for leveraged positions. Null where the concept does
            not exist (futures, prop accounts).
        leverage:
          type:
            - number
            - 'null'
          description: >-
            Venue-reported position leverage. Null where the concept does not
            exist: render “—”, never a faked 1.
        margin:
          type:
            - number
            - 'null'
          description: >-
            Venue-reported margin allocated to this position, or null where the
            venue exposes none.
      required:
        - instrument
        - qty
        - margin
    WorkingOrderRow:
      type: object
      description: >-
        WorkingOrderRow (@trdrs/contracts). One live broker order row; prices
        are true nulls where not applicable.
      properties:
        brokerOrderId:
          type: string
        instrument:
          type: string
        side:
          type: string
          enum:
            - buy
            - sell
        qty:
          type: number
        orderType:
          type: string
          enum:
            - market
            - stop
            - limit
            - stop_limit
            - trailing_stop
        triggerPrice:
          type:
            - number
            - 'null'
        limitPrice:
          type:
            - number
            - 'null'
        status:
          type: string
          enum:
            - working
            - filled
            - cancelled
            - rejected
        clientOrderId:
          type:
            - string
            - 'null'
        submittedAt:
          type:
            - number
            - 'null'
          description: Epoch seconds
        tif:
          type:
            - string
            - 'null'
          enum:
            - day
            - gtc
            - ioc
            - fok
            - post_only
            - null
        reduceOnly:
          type: boolean
      required:
        - brokerOrderId
        - instrument
        - side
        - qty
        - orderType
        - triggerPrice
        - limitPrice
        - status
        - clientOrderId
        - submittedAt
        - tif
        - reduceOnly
    AccountBracket:
      type: object
      description: >-
        WireAccountBracket (@trdrs/contracts): the protection around one
        position, as the engine records it. `side` is the entry's; a stop and a
        target are the opposite side by construction. `failed` is terminal and
        never quiet: it means the entry filled and the protection could not be
        established, and `endReason` says what happened.
      properties:
        id:
          type: string
        accountId:
          type: string
        instrument:
          type: string
        side:
          type: string
          enum:
            - buy
            - sell
        state:
          type: string
          enum:
            - pending_entry
            - active
            - completed
            - cancelled
            - failed
        clientOrderId:
          type: string
        entryOrderId:
          type:
            - string
            - 'null'
        qty:
          type: number
        filledQty:
          type: number
        legs:
          type: array
          items:
            $ref: '#/components/schemas/AccountBracketLeg'
        endReason:
          type:
            - string
            - 'null'
        createdAt:
          type: integer
          description: Epoch milliseconds
        updatedAt:
          type: integer
          description: Epoch milliseconds
      required:
        - id
        - accountId
        - instrument
        - side
        - state
        - clientOrderId
        - qty
        - filledQty
        - legs
        - createdAt
        - updatedAt
      example:
        id: b41e7d2a-9c58-4f03-a6b1-2e8d5c7f0a94
        accountId: 7a1f4c93b28d05e6f1a3c7d9b4e28f60
        instrument: ESU6
        side: buy
        state: pending_entry
        clientOrderId: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d
        entryOrderId: '234992187'
        qty: 2
        filledQty: 0
        legs:
          - id: 3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83
            role: stop
            seq: 1
            qty: 1
            filledQty: 0
            state: pre_armed
            brokerOrderId: null
            ocoGroup: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d:oco
            triggerPrice: 6477.5
            limitPrice: null
            parentOrderId: '234992187'
            parentInstrument: ESU6
            rejectReason: null
          - id: 5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75
            role: target
            seq: 1
            qty: 1
            filledQty: 0
            state: pre_armed
            brokerOrderId: null
            ocoGroup: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d:oco
            triggerPrice: null
            limitPrice: 6485.5
            parentOrderId: '234992187'
            parentInstrument: ESU6
            rejectReason: null
        endReason: null
        createdAt: 1787581400000
        updatedAt: 1787581400000
    ManagedExit:
      type: object
      description: >-
        WireManagedExit (@trdrs/contracts): one exit the engine is actively
        managing — a breakeven move, a trailing stop, or both. `paused` is
        honest degradation rather than failure: the last acknowledged stop is
        still resting at the venue, and `pauseReason` says why nothing is moving
        it. `planId` and `planRevision` are a receipt for the revision this
        instance accepted; the definition it runs was frozen then, so editing
        the saved plan cannot reach an already-open position.
      properties:
        id:
          type: string
        accountId:
          type: string
        bracketId:
          type:
            - string
            - 'null'
        planId:
          type:
            - string
            - 'null'
        planRevision:
          type:
            - string
            - 'null'
        instrument:
          type: string
        side:
          type: string
          enum:
            - buy
            - sell
        state:
          type: string
          enum:
            - pending
            - managing
            - paused
            - completed
            - cancelled
            - failed
        phase:
          type: string
          enum:
            - awaiting_entry
            - protecting
            - breakeven
            - trailing
            - done
        actionable:
          type: boolean
        stopLevel:
          type:
            - number
            - 'null'
        targetLevels:
          type: array
          items:
            type: number
        relatedOrderIds:
          type: array
          items:
            type: string
        pauseReason:
          type:
            - string
            - 'null'
          enum:
            - venue_disconnected
            - no_price_feed
            - no_instrument_facts
            - unsupported_shape
            - account_locked
            - null
        failureReason:
          type:
            - string
            - 'null'
        asOfRevision:
          type: integer
      required:
        - id
        - accountId
        - instrument
        - side
        - state
        - phase
        - actionable
        - targetLevels
        - relatedOrderIds
        - asOfRevision
      example:
        id: 9d2b6a30-4e17-4c85-b0f3-6a1c8e5d7204
        accountId: 7a1f4c93b28d05e6f1a3c7d9b4e28f60
        bracketId: b41e7d2a-9c58-4f03-a6b1-2e8d5c7f0a94
        planId: 0f6c2d18-7b4a-4a3e-9d21-8c5e4b0a9f37
        planRevision: q2Jm4XxT0aVnR7cLp1sZfE9d
        instrument: ESU6
        side: buy
        state: pending
        phase: awaiting_entry
        actionable: true
        stopLevel: null
        targetLevels:
          - 6485.5
        relatedOrderIds:
          - '234992187'
        pauseReason: null
        failureReason: null
        asOfRevision: 4831
    AccountBracketLeg:
      type: object
      description: >-
        WireAccountBracketLeg (@trdrs/contracts): one recorded leg of a bracket.
        `pre_armed` is a leg the engine has priced and recorded but which is
        deliberately not resting yet, because the position it protects does not
        exist. `parentOrderId` with `parentInstrument` is the re-parenting: a
        pre-armed leg hangs off the entry order, and once that entry fills the
        leg protects the position and `parentOrderId` is null. Do not key a leg
        by its parent order.
      properties:
        id:
          type: string
        role:
          type: string
          enum:
            - entry
            - stop
            - target
        seq:
          type: integer
        qty:
          type: number
        filledQty:
          type: number
        state:
          type: string
          enum:
            - pre_armed
            - working
            - filled
            - cancelled
            - rejected
        brokerOrderId:
          type:
            - string
            - 'null'
        ocoGroup:
          type:
            - string
            - 'null'
        triggerPrice:
          type:
            - number
            - 'null'
        limitPrice:
          type:
            - number
            - 'null'
        parentOrderId:
          type:
            - string
            - 'null'
        parentInstrument:
          type: string
        rejectReason:
          type:
            - string
            - 'null'
      required:
        - id
        - role
        - seq
        - qty
        - filledQty
        - state
        - parentInstrument
      example:
        id: 3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83
        role: stop
        seq: 1
        qty: 1
        filledQty: 0
        state: pre_armed
        brokerOrderId: null
        ocoGroup: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d:oco
        triggerPrice: 6477.5
        limitPrice: null
        parentOrderId: '234992187'
        parentInstrument: ESU6
        rejectReason: null
  securitySchemes:
    tenantKey:
      type: http
      scheme: bearer
      description: >-
        Your firm’s API key (the API calls this the `tenant` key; `trdrs_sk_…`),
        server-to-server only.

````