> ## 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.

# List brackets

> Returns the brackets around the account's positions: the live ones and those that ended in the last day, each with its ladders, the automation its stop losses run and the orders resting for it, and the account revision they were read at. Where a stop loss's automation is paused, it says why nothing is moving the stop; the stop resting at the provider still protects the position while it is paused. If you already hold a snapshot, you don't need this: the snapshot's `brackets` is the same list. This read makes no call to the provider and doesn't advance the revision.

Required key: Trading API key. A Connect app's backend can also send it with the app's API key, and a venue's backend with its Venue key, which carries `trader:read` or `trader:trade`, each naming one of its own traders in `x-trdrs-trader`: it then runs on that trader's own accounts.



## OpenAPI

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


    Every route the trdrs engine serves, with what to send and what comes back.
    It covers market

    data and news, trading and account state for a trader's own software, the
    Connect API a Connect

    app's backend calls and the Connect dashboard's routes, Connect
    pre-registration, the statements

    that carry a Connect account between environments, the venue routes a prop
    firm or brokerage runs its

    accounts through, and a trader's own challenges.


    Start with the Quickstart for your first call. The API standards hold the
    rules every route

    shares: keys, errors, rate limits, idempotency, paging and streaming.
servers:
  - url: https://app.trdrs.co
    description: Production
  - url: /
    description: This engine
security: []
tags:
  - name: Venue platform preview
    description: >-
      Run your venue: its providers, instruments, conditions, groups, routes,
      stages, venue rules, keys, accounts, usage, balance receipts and webhooks.
      These routes are in preview. They are served on the sandbox to every
      venue, and production access is arranged when a venue qualifies. Every
      route here under `/api/venues/` takes a Venue key. The back office reaches
      the same routes under `/api/back-office/` with a verified owner’s session,
      because the Venue key stays on your server, and both run the same checks.
      The team’s routes under `/api/organizations` serve the back office and the
      Connect dashboard alike, since one organization can run venues and Connect
      apps with one team. Changes to these routes are additive only from here
      on.
  - name: Market data
    description: >-
      Search and look up symbols, read price history and quotes, check the
      server clock, and stream live bars. Crypto prices come from each
      provider’s public feed. Futures prices are licensed to each user and
      stream only from that trader’s own futures source: a login on their
      venue’s production Rithmic system, under their own market data
      subscription. A Rithmic Test login carries no market data. Without a
      source, a futures request answers 503 `feed_requires_connection` and the
      symbol search lists no futures.
  - name: News
    description: >-
      Market news and the economic calendar, from licensed and open sources,
      tagged with futures roots as they arrive. The content is the same for
      everyone, and these routes admit the same callers as market data: a
      licensed origin, a session or a Trading API key. Page headlines by publish
      time, filter them by instrument root, and stream them live over
      server-sent events. Thumbnails come through the image route.
  - name: Trading
    description: >-
      Place, change and cancel orders, protect a position with a bracket and
      change or withdraw it, and close or flatten positions. Every call that
      places an order takes a `clientOrderId` as its idempotency key.
  - name: Account
    description: >-
      Read an account a trader can trade: its balance, positions, working
      orders, fills, profit and loss history, and the live account stream. You
      don’t create accounts here. A trader connects their own account at a
      provider, or opens their own Demo on the paper book, in the trdrs app. A
      venue issues accounts on the paper book with Issue an account into a
      group, and a venue pre-registers accounts at a provider through Connect
      with Pre-register a trader’s account.
  - name: Connect
    description: >-
      Connect is the account picker a trader opens: in the trdrs app, where it
      lists the built-in providers and every listed venue, and in hosted Connect
      on a Connect app’s website, where it lists the tiles the app chose. The
      pre-registration routes let a venue fill Connect in the trdrs app ahead of
      time, for a trader who signs in to trdrs. You tell trdrs that a trader has
      an account at a built-in provider: their sign-in email, and optionally the
      account number and login name. When that trader signs in, Connect shows
      the account ready to link, and they sign in to the provider themselves,
      once. The trader types their own password, and access starts when their
      own login succeeds. You can list who you pre-registered and who has
      linked, and cancel a pre-registration that hasn’t been used. A
      pre-registration expires after 30 days, and sending it again refreshes it.
      These routes take the pre-registration key. The whole flow is in the
      **[Quick Start](/docs/guides/quick-start)**.
  - name: Connect apps preview
    description: >-
      Run a Connect app: your own trading interface, whose traders connect their
      accounts in hosted Connect on your website and trade them on your screens.
      The Connect API is what your backend calls with your app’s API key: Create
      a Connect link, read and close it, and the account, market and trading
      routes with your trader named in `x-trdrs-trader`. Hosted Connect calls
      its own routes with the frame session a Connect link opens. The Connect
      dashboard calls the rest with your Connect sign-in session: your apps,
      each app’s name and logo, API keys, websites, tiles, white-label paper and
      Demos, traders and active traders, invoices, conformance runs and its
      Connect pass. These routes are in preview, served on the sandbox, where
      they are free. Once production opens to Connect apps, it serves the route
      that records an app’s Connect pass, which opens the app’s production.
  - name: Connect accounts
    description: >-
      A Connect client's team signs in to the Connect dashboard with a Connect
      account of its own, never a trader's, and one login reaches both
      environments. Production answers a short statement for the signed-in
      account, naming its verified email and the Connect apps it owns, and
      sandbox exchanges it for a sandbox session and the counterpart app of
      each: the sandbox app that stands for the production one. The environments
      share no credential: production signs the statement with its own key, and
      sandbox checks it with production's public key alone. These routes take
      the Connect dashboard's own session, from the dashboard's origin; a
      trader's session and every key are refused, and a Connect account's
      session reaches no trading, account, market or AI route.
  - name: Challenges
    description: >-
      These routes list evaluation programs and a trader’s own enrollments.
      **Preview: the one group in this reference outside the additive-only
      guarantee.** Their shapes will change when challenges are rebuilt; see
      Stability. **They take a signed-in session, not a key**, and are served
      only where the engine runs with `CHALLENGES_ENABLED`. Without it, the
      routes don’t exist and every one answers `404`. The administration half
      isn’t documented here, because it is trdrs’s own tooling, not part of the
      API.
paths:
  /api/account/brackets:
    get:
      tags:
        - Account
      summary: List brackets
      description: >-
        Returns the brackets around the account's positions: the live ones and
        those that ended in the last day, each with its ladders, the automation
        its stop losses run and the orders resting for it, and the account
        revision they were read at. Where a stop loss's automation is paused, it
        says why nothing is moving the stop; the stop resting at the provider
        still protects the position while it is paused. If you already hold a
        snapshot, you don't need this: the snapshot's `brackets` is the same
        list. This read makes no call to the provider and doesn't advance the
        revision.


        Required key: Trading API key. A Connect app's backend can also send it
        with the app's API key, and a venue's backend with its Venue key, which
        carries `trader:read` or `trader:trade`, each naming one of its own
        traders in `x-trdrs-trader`: it then runs on that trader's own accounts.
      parameters:
        - name: provider
          in: query
          schema:
            type: string
          description: >-
            The provider the account is at. Omit it to use your default
            provider.
        - name: account
          in: query
          schema:
            type: string
          description: >-
            The account number at that provider. It must be one of your own
            accounts.
      responses:
        '200':
          description: The brackets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BracketsResponse'
        '401':
          description: The key is missing, unknown or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - tradingApiKey: []
        - connectApiKey: []
          trader: []
        - venueKey: []
          trader: []
      x-codeSamples:
        - lang: javascript
          label: TypeScript
          source: >-
            const res = await fetch('https://app.trdrs.co/api/account/brackets',
            {
              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/brackets' \
              -H "Authorization: Bearer $TRDRS_API_KEY"
components:
  schemas:
    BracketsResponse:
      type: object
      description: The account's brackets and the revision they were read at.
      properties:
        revision:
          type: integer
          description: >-
            The account revision these rows were read at. This read only looks
            at the current revision and never advances it.
        items:
          type: array
          items:
            $ref: '#/components/schemas/AccountBracket'
          description: The live brackets, and those that ended in the last day.
      required:
        - revision
        - items
      example:
        revision: 412
        items:
          - id: b41e7d2a-9c58-4f03-a6b1-2e8d5c7f0a94
            accountId: c3e81b5f0a9d47e2b6f14d8a2c7e9031
            instrument: ESU6
            side: buy
            state: active
            clientOrderId: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d
            entryOrderId: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d
            positionId: null
            qty: 2
            filledQty: 2
            avgEntry: 6480.5
            takeProfits:
              - id: 5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75
                rank: 1
                price: 6485.5
                qty: 1
                filledQty: 0
                state: working
                automation: null
            stopLosses:
              - id: 3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83
                rank: 1
                price: 6477.5
                qty: 2
                filledQty: 0
                state: working
                automation:
                  rules:
                    breakeven:
                      triggerTicks: 8
                      plusTicks: 0
                    trail:
                      - triggerTicks: 16
                        distanceTicks: 8
                        frequencyTicks: 2
                  state: managing
                  phase: protecting
                  pauseReason: null
                  failureReason: null
            orders:
              - id: 8f2c5a91-3d6e-4b07-a1c8-5e9f0d2b7a46
                legId: 5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75
                role: target
                pairId: e7a40c2d-95b1-4f68-8d3e-2c1b6a0f9e57
                qty: 1
                filledQty: 0
                state: working
                providerOrderId: 1b8e6d24-07c3-4a9f-b5e2-9d4a7c0f3e18
                clientOrderId: 1b8e6d24-07c3-4a9f-b5e2-9d4a7c0f3e18
                holding: null
                rejectReason: null
              - id: 2a7d9e03-6c18-4f52-b4a9-0e3c8d1f6b25
                legId: 3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83
                role: stop
                pairId: e7a40c2d-95b1-4f68-8d3e-2c1b6a0f9e57
                qty: 1
                filledQty: 0
                state: working
                providerOrderId: 4c0f2b87-9e15-4d63-a8b7-6f1e3d5c2a90
                clientOrderId: 4c0f2b87-9e15-4d63-a8b7-6f1e3d5c2a90
                holding: null
                rejectReason: null
              - id: 6e1b4c78-2f9a-4d05-9c63-b8a2e7d0f413
                legId: 3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83
                role: stop
                pairId: 9d5f2e60-4b83-4a1c-be07-3a6c9f1d8e24
                qty: 1
                filledQty: 0
                state: working
                providerOrderId: 7a3e9c15-8d40-4f2b-91e6-c5b0a2d7f839
                clientOrderId: 7a3e9c15-8d40-4f2b-91e6-c5b0a2d7f839
                holding: null
                rejectReason: null
            runner: 1
            unprotected: 0
            endReason: null
            createdAt: 1787581400000
            updatedAt: 1787581460000
    ErrorResponse:
      type: object
      description: >-
        The body of every error response. It always carries `error`, an English
        sentence you can show. A refused trading request also carries `code`,
        one of the refusal codes, and `params`, the details of that refusal.
        Translate by `code` and `params`, and show a generic message for a code
        you don't recognize. Other errors may carry a `code` of their own.
      properties:
        error:
          type: string
          description: What went wrong, as an English sentence.
        code:
          type: string
          description: >-
            A stable machine code. On a refused trading request, it is one of
            the refusal codes.
        params:
          type: object
          description: >-
            The details of the refusal named by `code`, on a refused trading
            request.
      required:
        - error
      example:
        error: invalid_instrument
    AccountBracket:
      type: object
      description: >-
        The protection around one position, or around the position one entry
        will open: up to three take profits and three stop losses, laid out as
        pairs along the position, nearest the entry first. Each pair's take
        profit and stop loss cancel each other.
      properties:
        id:
          type: string
          description: The bracket's id.
        accountId:
          type: string
          description: The account's id.
        instrument:
          type: string
          description: The instrument.
        side:
          type: string
          enum:
            - buy
            - sell
          description: >-
            The side of the position it protects. Every leg trades the other
            side.
        state:
          type: string
          enum:
            - pending_entry
            - active
            - completed
            - cancelled
            - failed
          description: >-
            `failed` is final and never quiet: the provider refused the entry,
            or a position is open and its protection could not be put in place.
            `endReason` says which, and why.
        clientOrderId:
          type: string
          description: >-
            The command it was placed under: the entry's `clientOrderId`, or the
            protection's.
        entryOrderId:
          type:
            - string
            - 'null'
          description: >-
            The entry it waits on, by its id at the provider. Null for a bracket
            placed on an open position, and until the provider names the entry.
        positionId:
          type:
            - string
            - 'null'
          description: >-
            The one position it protects, where the account names its positions;
            null elsewhere.
        qty:
          type: number
          description: >-
            The quantity it protects: the entry's, or the position's when it was
            placed.
        filledQty:
          type: number
          description: How much of that has filled.
        avgEntry:
          type:
            - number
            - 'null'
          description: >-
            The average entry its stop losses move from, once the entry has
            filled.
        takeProfits:
          type: array
          items:
            $ref: '#/components/schemas/BracketLeg'
          description: >-
            The take-profit ladder, live legs nearest the entry first, then the
            legs that ended.
        stopLosses:
          type: array
          items:
            $ref: '#/components/schemas/BracketLeg'
          description: The stop-loss ladder, in the same order.
        orders:
          type: array
          items:
            $ref: '#/components/schemas/BracketOrder'
          description: The orders resting, and rested, for the legs.
        runner:
          type: number
          description: How much of what it protects has a stop and no take profit.
        unprotected:
          type: number
          description: How much of what it protects has no stop at all.
        endReason:
          type:
            - string
            - 'null'
          description: Why it ended, or null while it is live.
        createdAt:
          type: integer
          description: When it was placed, in epoch milliseconds.
        updatedAt:
          type: integer
          description: When it last changed, in epoch milliseconds.
      required:
        - id
        - accountId
        - instrument
        - side
        - state
        - clientOrderId
        - entryOrderId
        - positionId
        - qty
        - filledQty
        - avgEntry
        - takeProfits
        - stopLosses
        - orders
        - runner
        - unprotected
        - endReason
        - createdAt
        - updatedAt
      example:
        id: b41e7d2a-9c58-4f03-a6b1-2e8d5c7f0a94
        accountId: c3e81b5f0a9d47e2b6f14d8a2c7e9031
        instrument: ESU6
        side: buy
        state: active
        clientOrderId: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d
        entryOrderId: a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d
        positionId: null
        qty: 2
        filledQty: 2
        avgEntry: 6480.5
        takeProfits:
          - id: 5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75
            rank: 1
            price: 6485.5
            qty: 1
            filledQty: 0
            state: working
            automation: null
        stopLosses:
          - id: 3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83
            rank: 1
            price: 6477.5
            qty: 2
            filledQty: 0
            state: working
            automation:
              rules:
                breakeven:
                  triggerTicks: 8
                  plusTicks: 0
                trail:
                  - triggerTicks: 16
                    distanceTicks: 8
                    frequencyTicks: 2
              state: managing
              phase: protecting
              pauseReason: null
              failureReason: null
        orders:
          - id: 8f2c5a91-3d6e-4b07-a1c8-5e9f0d2b7a46
            legId: 5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75
            role: target
            pairId: e7a40c2d-95b1-4f68-8d3e-2c1b6a0f9e57
            qty: 1
            filledQty: 0
            state: working
            providerOrderId: 1b8e6d24-07c3-4a9f-b5e2-9d4a7c0f3e18
            clientOrderId: 1b8e6d24-07c3-4a9f-b5e2-9d4a7c0f3e18
            holding: null
            rejectReason: null
          - id: 2a7d9e03-6c18-4f52-b4a9-0e3c8d1f6b25
            legId: 3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83
            role: stop
            pairId: e7a40c2d-95b1-4f68-8d3e-2c1b6a0f9e57
            qty: 1
            filledQty: 0
            state: working
            providerOrderId: 4c0f2b87-9e15-4d63-a8b7-6f1e3d5c2a90
            clientOrderId: 4c0f2b87-9e15-4d63-a8b7-6f1e3d5c2a90
            holding: null
            rejectReason: null
          - id: 6e1b4c78-2f9a-4d05-9c63-b8a2e7d0f413
            legId: 3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83
            role: stop
            pairId: 9d5f2e60-4b83-4a1c-be07-3a6c9f1d8e24
            qty: 1
            filledQty: 0
            state: working
            providerOrderId: 7a3e9c15-8d40-4f2b-91e6-c5b0a2d7f839
            clientOrderId: 7a3e9c15-8d40-4f2b-91e6-c5b0a2d7f839
            holding: null
            rejectReason: null
        runner: 1
        unprotected: 0
        endReason: null
        createdAt: 1787581400000
        updatedAt: 1787581460000
    BracketLeg:
      type: object
      description: >-
        One take profit or stop loss of a bracket, at its price, closing its
        quantity.
      properties:
        id:
          type: string
          description: The leg's id.
        rank:
          type: integer
          description: 'Its place in its ladder, nearest the entry first: 1 is TP1 or SL1.'
        price:
          type: number
          description: 'The leg''s price: a take profit''s limit, or a stop loss''s trigger.'
        qty:
          type: number
          description: >-
            How much of the position the leg closes in all: what it has filled,
            what rests, and what it rests as more of the entry fills.
        filledQty:
          type: number
          description: How much of the leg has filled.
        state:
          type: string
          enum:
            - pre_armed
            - working
            - filled
            - cancelled
            - rejected
          description: >-
            `pre_armed` is priced and recorded but deliberately not resting yet,
            because the part of the position it protects has not filled.
        automation:
          oneOf:
            - $ref: '#/components/schemas/StopAutomation'
            - type: 'null'
          description: On a stop loss that moves itself, how it runs. Null otherwise.
      required:
        - id
        - rank
        - price
        - qty
        - filledQty
        - state
        - automation
      example:
        id: 3c9a0f61-52d4-4b78-8e15-7f6b2a4d0c83
        rank: 1
        price: 6477.5
        qty: 2
        filledQty: 0
        state: working
        automation:
          rules:
            breakeven:
              triggerTicks: 8
              plusTicks: 0
            trail:
              - triggerTicks: 16
                distanceTicks: 8
                frequencyTicks: 2
          state: managing
          phase: protecting
          pauseReason: null
          failureReason: null
    BracketOrder:
      type: object
      description: >-
        One order resting for one leg of one pair. Draw the legs; use the orders
        to tell which of the account's working orders belong to a bracket.
      properties:
        id:
          type: string
          description: The order's id in the bracket.
        legId:
          type: string
          description: The leg it rests for.
        role:
          type: string
          enum:
            - target
            - stop
          description: A take profit or a stop loss.
        pairId:
          type: string
          description: >-
            The pair it belongs to. Both orders of a pair carry it, and a fill
            of one ends the other.
        qty:
          type: number
          description: The order's quantity.
        filledQty:
          type: number
          description: How much of it has filled.
        state:
          type: string
          enum:
            - pre_armed
            - working
            - filled
            - cancelled
            - rejected
          description: Where the order stands.
        providerOrderId:
          type:
            - string
            - 'null'
          description: The order's id at the provider, once it rests there.
        clientOrderId:
          type:
            - string
            - 'null'
          description: The name trdrs gave the order before placing it.
        holding:
          type:
            - string
            - 'null'
          enum:
            - provider_managed
            - null
          description: >-
            Who holds it while it has no provider id: `provider_managed` means
            the provider holds it with the entry under the name trdrs gave it.
            Null is the normal case.
        rejectReason:
          type:
            - string
            - 'null'
          description: Why the provider refused it, or null.
      required:
        - id
        - legId
        - role
        - pairId
        - qty
        - filledQty
        - state
        - providerOrderId
        - clientOrderId
        - holding
        - rejectReason
      example:
        id: 8f2c5a91-3d6e-4b07-a1c8-5e9f0d2b7a46
        legId: 5e7d1b04-8a26-4c39-9f52-1d0c6b8e3a75
        role: target
        pairId: e7a40c2d-95b1-4f68-8d3e-2c1b6a0f9e57
        qty: 1
        filledQty: 0
        state: working
        providerOrderId: 1b8e6d24-07c3-4a9f-b5e2-9d4a7c0f3e18
        clientOrderId: 1b8e6d24-07c3-4a9f-b5e2-9d4a7c0f3e18
        holding: null
        rejectReason: null
    StopAutomation:
      type: object
      description: >-
        How a stop loss that moves itself is running: the rules it accepted and
        where it has got to.
      properties:
        rules:
          $ref: '#/components/schemas/StopAutomationRules'
          description: The rules, in whole ticks.
        state:
          type: string
          enum:
            - pending
            - managing
            - paused
            - completed
            - cancelled
            - failed
          description: >-
            `pending` waits for the entry to fill. `paused` means nothing is
            moving the stop right now, not that it failed: the last stop the
            provider accepted still rests, and `pauseReason` says why it is not
            moving.
        phase:
          type: string
          enum:
            - awaiting_entry
            - protecting
            - breakeven
            - trailing
            - done
          description: >-
            Which stop rests now: the one placed (`protecting`), the breakeven
            one, or a trailing one.
        pauseReason:
          type:
            - string
            - 'null'
          enum:
            - provider_disconnected
            - no_price_feed
            - no_instrument_facts
            - account_locked
            - null
          description: Why it is paused, or null.
        failureReason:
          type:
            - string
            - 'null'
          description: Why it failed, or null.
      required:
        - rules
        - state
        - phase
        - pauseReason
        - failureReason
      example:
        rules:
          breakeven:
            triggerTicks: 8
            plusTicks: 0
          trail:
            - triggerTicks: 16
              distanceTicks: 8
              frequencyTicks: 2
        state: managing
        phase: protecting
        pauseReason: null
        failureReason: null
    StopAutomationRules:
      type: object
      description: >-
        How a stop loss moves itself, in whole ticks, as trdrs worked it out
        when the bracket was placed or last changed.
      properties:
        breakeven:
          oneOf:
            - type: object
              properties:
                triggerTicks:
                  type: integer
                  description: >-
                    How far in profit, in ticks, the position must be before the
                    stop moves.
                plusTicks:
                  type: integer
                  description: >-
                    How far beyond the entry, in ticks, the stop goes. Zero is
                    exact breakeven.
              required:
                - triggerTicks
                - plusTicks
            - type: 'null'
          description: The one-time move to breakeven, or null for none.
        trail:
          type: array
          maxItems: 3
          items:
            type: object
            properties:
              triggerTicks:
                type: integer
                description: How far in profit, in ticks, the tier starts.
              distanceTicks:
                type: integer
                description: How far behind the best price, in ticks, the stop follows.
              frequencyTicks:
                type: integer
                description: >-
                  How far, in ticks, the price must advance before the stop
                  moves again.
            required:
              - triggerTicks
              - distanceTicks
              - frequencyTicks
          description: >-
            The trailing tiers, lowest trigger first. Empty for no trailing
            stop.
      required:
        - breakeven
        - trail
      example:
        breakeven:
          triggerTicks: 8
          plusTicks: 0
        trail:
          - triggerTicks: 16
            distanceTicks: 8
            frequencyTicks: 2
  securitySchemes:
    tradingApiKey:
      type: http
      scheme: bearer
      description: >-
        The Trading API key (`trdrs_sk_…`), for market data, orders and account
        state on the accounts its owner holds. Use it server-to-server, and keep
        it on your server. Its scope is named `trading` in the API.
    connectApiKey:
      type: http
      scheme: bearer
      description: >-
        A Connect app's API key (`trdrs_ck_sandbox_…` or
        `trdrs_ck_production_…`), in preview. It belongs to one app in one
        environment, has a name and an expiry, and carries the whole Connect
        API. An owner of the app creates it in the Connect dashboard. It
        creates, reads and closes the app's Connect links under
        `/api/connect/links`, and on the account, market and trading routes it
        reads the app's own traders' accounts and market data and routes their
        orders, each request naming its trader in `x-trdrs-trader`. It stops
        working when it is revoked or expires, or when the owner who created it
        stops being an owner. Keep it on your server.
    trader:
      type: apiKey
      in: header
      name: x-trdrs-trader
      description: >-
        Your own id for one of your traders: the id your Connect links name, or
        the id the accounts your venue issues them use. Send it with your app's
        API key, or with your Venue key carrying `trader:read`, or
        `trader:trade` to also route the trader's orders, and the request runs
        as that trader on their own accounts. An id that names none of your
        traders is refused with `404` `trader_not_found` and a suspended trader
        with `403` `trader_suspended`. A request that also carries a cookie or a
        browser `Origin` is refused with `400` `credential_not_allowed`.
    venueKey:
      type: http
      scheme: bearer
      description: >-
        The Venue key (`trdrs_vk_sandbox_…` or `trdrs_vk_production_…`), in
        preview. It belongs to one venue in one environment and carries the
        scopes it was created with. The venue's verified owner creates it while
        signed in. It works on the `/api/venues/{venueId}` routes and, with
        `trader:read` or `trader:trade`, on the account, market and trading
        routes, reading the venue's own traders' accounts and routing their
        orders, each request naming its trader in `x-trdrs-trader`. A
        `trdrs_sk_…` key can't be used in its place. It reaches its venue's
        routes and its venue's own traders, and the owner manages keys from a
        signed-in session. Keep it on your server.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.