openapi: 3.1.0
info:
  title: CrossTrade API
  version: 1.0.0
  description: "The CrossTrade API provides programmatic access to NinjaTrader 8 through the CrossTrade add-on,\nand to Tradovate\
    \ through your linked Tradovate account.\n\n## Architecture\n\nNinjaTrader endpoints (`/v1/api/*`, excluding `/v1/api/tv/*`\
    \ and `/v1/api/manage/*`) require an\nactive NinjaTrader 8 instance with the CrossTrade add-on connected. Requests are\
    \ forwarded via RPC to the add-on\nrunning on your machine.\n\nTradovate endpoints (`/v1/api/tv/*`) require a linked Tradovate\
    \ account (link one from the\nTradovate Account Manager in the dashboard). Calls execute server-side against the Tradovate\n\
    Web API — NinjaTrader does not need to be running.\n\nManagement endpoints (`/v1/api/manage/*`, Elite) read and change\
    \ your saved CrossTrade settings\ninstead of trading: global controls and the kill switch, news lockout, NinjaTrader connection\n\
    settings, Account Manager monitors, trade copiers, webhook account groups and Tradovate ATM\ntemplates. Reads and most\
    \ changes work while NinjaTrader is closed. They have their own error\nenvelope (`ManagementError`), PATCH rules, ETags\
    \ and rate limits:\nhttps://crosstrade.io/docs/api/management\n\n**Access methods:**\n1. **REST API** (this spec) — Standard\
    \ HTTP endpoints at `/v1/api/*`, `/v1/api/tv/*` and `/v1/api/manage/*`\n2. **WebSocket API** — Connect to `/ws/stream`\
    \ for real-time data and RPC. `origin: nt8` (default)\n   streams through the NT8 add-on; `origin: tradovate` streams\
    \ linked Tradovate accounts server-side\n   (events, P&L, `Tv_*` RPC; no market data)\n\n## Authentication\n\nAll endpoints\
    \ require a Bearer token in the `Authorization` header.\nAPI access requires a **Pro subscription**. Tradovate endpoints\
    \ additionally require a linked\nTradovate account. The Management API (`/v1/api/manage/*`) requires **Elite** (active\
    \ Elite\ntrials included).\n\n## Rate Limits\n\n- **180 requests/minute** per user (shared across HTTP and WebSocket)\n\
    - **20-request burst** allowance\n- Market data subscription changes: ~20/minute\n- The Management API has its own budgets\
    \ and never uses this one:\n  https://crosstrade.io/docs/api/management/rate-limits\n\n## WebSocket API\n\nConnect to\
    \ `/ws/stream` for real-time market data, PnL streaming, and RPC calls.\n\n### Actions\n\n| Action | Description |\n|--------|-------------|\n\
    | `rpc` | Call any RPC function: `{\"action\": \"rpc\", \"id\": \"req-1\", \"api\": \"PlaceOrder\", \"args\": {...}}`\
    \ |\n| `subscribe` | Market data: `{\"action\": \"subscribe\", \"instruments\": [\"ES 12-26\"]}`. Events: `{\"action\"\
    : \"subscribe\", \"events\": [\"orders\", \"executions\", \"positions\", \"connections\"]}` |\n| `unsubscribe` | Same\
    \ payload shapes as `subscribe` |\n| `streamPnl` | Toggle PnL streaming: `{\"action\": \"streamPnl\", \"enabled\": true,\
    \ \"interval\": 1000}` |\n| `ping` | Keepalive: `{\"action\": \"ping\"}` |\n\nAn optional `origin` field (`nt8` default,\
    \ or `tradovate`) names the data source on every action and every pushed frame. Tradovate adds `executionReports` events,\
    \ `resync` frames, and `environment` / `contractId` / `eventType` header fields.\n\n### Events Received\n\nEvery pushed\
    \ frame carries `type`, `origin`, `seq` (per-connection counter; a gap means dropped frames) and `epoch`.\n\n| Type |\
    \ Description |\n|------|-------------|\n| `marketData` | `{\"type\": \"marketData\", \"origin\": \"nt8\", \"seq\": 1,\
    \ \"quotes\": [...]}` |\n| `pnlUpdate` | `{\"type\": \"pnlUpdate\", \"origin\": \"nt8\", \"seq\": 2, \"epoch\": ..., \"\
    accounts\": [...]}` |\n| `orderUpdate` | `{\"type\": \"orderUpdate\", \"origin\": \"nt8\", \"seq\": 3, \"epoch\": ...,\
    \ \"account\": \"Sim101\", \"instrument\": \"ES 12-26\", \"order\": {...}}` |\n| `executionUpdate` | Same envelope with\
    \ `\"execution\": {...}` |\n| `positionUpdate` | Same envelope with `\"position\": {...}` |\n| `connectionUpdate` | `{\"\
    type\": \"connectionUpdate\", ..., \"connection\": {\"name\": ..., \"status\": ..., \"affectedAccounts\": [...]}}` |\n\
    | `status` | `{\"type\": \"status\", \"origin\": \"nt8\", \"state\": \"connected\" or \"disconnected\"}` |\n| RPC response\
    \ | `{\"id\": \"req-1\", \"data\": {...}}` |\n"
  contact:
    name: CrossTrade
    url: https://crosstrade.io
servers:
- url: https://app.crosstrade.io
  description: Production
- url: https://dev.crosstrade.io
  description: Development
security:
- bearerAuth: []
paths:
  /v1/api/accounts/{account}/watermarks:
    get:
      tags:
      - Accounts
      x-rpc-api: GetWatermarks
      summary: Get Watermarks (per-account high/low water marks)
      description: '**RPC Function:** `GetWatermarks`'
      operationId: handle_get_watermarks
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/atm-templates:
    get:
      tags:
      - General
      x-rpc-api: GetAtmTemplates
      summary: Get All ATM Templates
      description: '**RPC Function:** `GetAtmTemplates`'
      operationId: get_templates
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts:
    get:
      tags:
      - Accounts
      x-rpc-api: ListAccounts
      summary: Get Accounts
      description: '**RPC Function:** `ListAccounts`'
      operationId: accts
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/positions:
    get:
      tags:
      - Positions
      x-rpc-api: GetAllPositions
      summary: Get All Open Positions (Across all accounts)
      description: '**RPC Function:** `GetAllPositions`


        **Optional fields (from add-on):** `includeFlat`'
      operationId: get_all_positions
      parameters:
      - name: includeFlat
        in: query
        required: false
        schema:
          type: string
          default: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/orders:
    get:
      tags:
      - Orders
      x-rpc-api: GetAllOrders
      summary: Get All Orders (Across all accounts)
      description: '**RPC Function:** `GetAllOrders`


        **Optional fields (from add-on):** `activeOnly`, `lookbackTime`'
      operationId: get_all_orders
      parameters:
      - name: activeOnly
        in: query
        required: false
        schema:
          type: string
          default: 'true'
      - name: lookbackTime
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/executions/order/{orderId}:
    get:
      tags:
      - Executions
      x-rpc-api: GetExecutionsByOrderId
      summary: Get Executions by Order ID (matches both current and original/initial order ID)
      description: '**RPC Function:** `GetExecutionsByOrderId`


        **Optional fields (from add-on):** `orderId`'
      operationId: get_executions_by_order_id
      parameters:
      - name: orderId
        in: path
        required: true
        schema:
          type: string
        description: Order ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/snapshot:
    get:
      tags:
      - Accounts
      x-rpc-api: GetAccountSummary
      summary: Get Accounts Summary
      description: '**RPC Function:** `GetAccountSummary`'
      operationId: summary
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/positions/flatten:
    post:
      tags:
      - Positions
      x-rpc-api: Flatten
      summary: Flatten All Positions in All Accounts
      description: '**RPC Function:** `Flatten`


        **Optional fields (from add-on):** `account`, `instrument`, `cancelOrders`, `strategyTag`, `strategyTagMode`, `force`'
      operationId: flatten_everything
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                account:
                  type: string
                cancelOrders:
                  type: boolean
                force:
                  type: boolean
                instrument:
                  type: string
                strategyTag:
                  type: string
                strategyTagMode:
                  type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}:
    get:
      tags:
      - Accounts
      x-rpc-api: GetAccount
      summary: Get Account
      description: '**RPC Function:** `GetAccount`


        **Optional fields (from add-on):** `account`'
      operationId: acct
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/orders/cancelall:
    post:
      tags:
      - Orders
      x-rpc-api: CancelAllOrders
      summary: Cancel All Orders in All Accounts
      description: '**RPC Function:** `CancelAllOrders`'
      operationId: cancel_all_orders
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/positions:
    get:
      tags:
      - Positions
      x-rpc-api: ListPositions
      summary: List Active Positions in Account
      description: '**RPC Function:** `ListPositions`


        **Optional fields (from add-on):** `account`'
      operationId: list_positions
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders:
    get:
      tags:
      - Orders
      x-rpc-api: ListOrders
      summary: List Active/Orders in Account
      description: '**RPC Function:** `ListOrders`


        **Optional fields (from add-on):** `account`, `lookbackTime`, `activeOnly`'
      operationId: list_orders
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: activeOnly
        in: query
        required: false
        schema:
          type: string
          default: 'true'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/strategies:
    get:
      tags:
      - Strategies
      x-rpc-api: ListStrategies
      summary: List Strategies
      description: '**RPC Function:** `ListStrategies`


        **Optional fields (from add-on):** `includeTerminal`'
      operationId: list_strats
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: includeTerminal
        in: query
        required: false
        schema:
          type: string
          default: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/strategies:
    get:
      tags:
      - Strategies
      x-rpc-api: ListAllStrategies
      summary: List All Strategies
      description: '**RPC Function:** `ListAllStrategies`


        **Optional fields (from add-on):** `includeTerminal`'
      operationId: list_all_strats
      parameters:
      - name: includeTerminal
        in: query
        required: false
        schema:
          type: string
          default: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/strategies/{id}:
    get:
      tags:
      - Strategies
      x-rpc-api: GetStrategy
      summary: Get Strategy
      description: '**RPC Function:** `GetStrategy`


        **Optional fields (from add-on):** `strategyId`'
      operationId: get_strat
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/strategies/{id}/close:
    post:
      tags:
      - Strategies
      x-rpc-api: CloseStrategy
      summary: Close Strategy
      description: '**RPC Function:** `CloseStrategy`


        **Optional fields (from add-on):** `strategyId`, `signalName`, `strategyTag`, `force`'
      operationId: close_strat
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/strategies/start:
    post:
      tags:
      - Strategies
      x-rpc-api: StartStrategy
      summary: Starts a NinjaScript Strategy
      description: '**RPC Function:** `StartStrategy`


        **Optional fields (from add-on):** `account`, `strategyClass`, `strategy_class`, `instrument`, `mode`, `periodType`,
        `period_type`, `period`, `parameters`'
      operationId: start_strat
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                instrument:
                  type: string
                mode:
                  type: string
                parameters:
                  type: object
                period:
                  type: string
                periodType:
                  type: string
                period_type:
                  type: string
                strategyClass:
                  type: string
                strategy_class:
                  type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/strategies/{id}/enable:
    post:
      tags:
      - Strategies
      x-rpc-api: EnableStrategy
      summary: Enable Strategy
      description: '**RPC Function:** `EnableStrategy`'
      operationId: enable_strat
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/strategies/{id}/disable:
    post:
      tags:
      - Strategies
      x-rpc-api: DisableStrategy
      summary: Disable Strategy
      description: '**RPC Function:** `DisableStrategy`'
      operationId: disable_strat
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/executions:
    get:
      tags:
      - Executions
      x-rpc-api: ListExecutions
      summary: Get Executions by Account
      description: '**RPC Function:** `ListExecutions`'
      operationId: list_executions
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: lookbackTime
        in: query
        required: false
        schema:
          type: string
          default: '320'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/positions/close:
    post:
      tags:
      - Positions
      x-rpc-api: ClosePosition
      summary: Close Position (account, instrument)
      description: '**RPC Function:** `ClosePosition`


        **Optional fields (from add-on):** `strategyTag`, `force`, `quantity`, `percent`'
      operationId: close_position
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                force:
                  type: boolean
                instrument:
                  type: string
                percent:
                  type: number
                quantity:
                  type: integer
                strategyTag:
                  type: string
              required:
              - instrument
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/positions/reverse:
    post:
      tags:
      - Positions
      x-rpc-api: Reverse
      summary: Reverse
      description: '**RPC Function:** `Reverse`


        **Optional fields (from add-on):** `strategyTag`, `force`'
      operationId: reverse
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                force:
                  type: boolean
                instrument:
                  type: string
                strategyTag:
                  type: string
              required:
              - instrument
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/positions/reverseposition:
    post:
      tags:
      - Positions
      x-rpc-api: ReversePosition
      summary: Reverse Position (account, instrument, action, orderType, quantity, timeInForce, limitPrice, stopPrice, ocoId,
        strategy)
      description: '**RPC Function:** `ReversePosition`


        **Optional fields (from add-on):** `quantity`, `account`, `instrument`, `strategyTag`, `force`'
      operationId: reverse_position
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                force:
                  type: boolean
                instrument:
                  type: string
                quantity:
                  type: integer
                strategyTag:
                  type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/positions/flatten:
    post:
      tags:
      - Positions
      x-rpc-api: Flatten
      summary: Flatten Positions in 1 account (account, instrument)
      description: '**RPC Function:** `Flatten`


        **Optional fields (from add-on):** `account`, `instrument`, `cancelOrders`, `strategyTag`, `strategyTagMode`, `force`'
      operationId: flatten_position
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cancelOrders:
                  type: boolean
                force:
                  type: boolean
                instrument:
                  type: string
                strategyTag:
                  type: string
                strategyTagMode:
                  type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/position:
    get:
      tags:
      - Accounts
      x-rpc-api: GetPosition
      summary: Get Position by Account + Instrument (instrument URL-encoded)
      description: '**RPC Function:** `GetPosition`


        **Optional fields (from add-on):** `account`, `instrument`'
      operationId: get_position
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: instrument
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/market/info:
    get:
      tags:
      - Market Data
      x-rpc-api: MarketInfo
      summary: Get Market Info
      description: '**RPC Function:** `MarketInfo`'
      operationId: get_market_info
      parameters:
      - name: instrument
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/market/quote:
    get:
      tags:
      - Market Data
      x-rpc-api: GetQuote
      summary: Get Quote
      description: '**RPC Function:** `GetQuote`


        **Optional fields (from add-on):** `showRollover`'
      operationId: get_quote
      parameters:
      - name: instrument
        in: query
        required: true
        schema:
          type: string
      - name: showRollover
        in: query
        required: false
        schema:
          type: string
          default: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/quote:
    get:
      tags:
      - Accounts
      x-rpc-api: GetQuote
      summary: Get Quote
      description: '**RPC Function:** `GetQuote`


        **Optional fields (from add-on):** `showRollover`'
      operationId: get_quote
      parameters:
      - name: instrument
        in: query
        required: true
        schema:
          type: string
      - name: showRollover
        in: query
        required: false
        schema:
          type: string
          default: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/market/bars:
    post:
      tags:
      - Market Data
      x-rpc-api: GetBars
      summary: Get historical bars
      description: '**RPC Function:** `GetBars`


        **Optional fields (from add-on):** `periodType`, `period`, `daysBack`, `from`, `to`, `limit`, `timeoutMs`, `mergePolicy`'
      operationId: bars
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                daysBack:
                  type: integer
                from:
                  type: string
                instrument:
                  type: string
                limit:
                  type: integer
                mergePolicy:
                  type: string
                period:
                  type: integer
                periodType:
                  type: string
                timeoutMs:
                  type: integer
                to:
                  type: string
              required:
              - instrument
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders/cancel:
    post:
      tags:
      - Orders
      x-rpc-api: CancelOrders
      summary: Cancel Orders by Account + Instrument
      description: '**RPC Function:** `CancelOrders`


        **Optional fields (from add-on):** `account`, `instrument`, `strategyTag`, `force`'
      operationId: cancel_orders
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                force:
                  type: boolean
                instrument:
                  type: string
                strategyTag:
                  type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders/place:
    post:
      tags:
      - Orders
      x-rpc-api: PlaceOrder
      summary: Place Order
      description: '**RPC Function:** `PlaceOrder`


        **Optional fields (from add-on):** `quantity`, `limitPrice`, `stopPrice`, `instrument`, `action`, `orderType`, `targetQuantity`,
        `maxResyncCorrection`, `ocoId`, `strategy`, `orderId`, `strategyTag`, `force`, `requireMarketPosition`, `maxPositions`,
        `smartOptions`, `_ssTrack`'
      operationId: place_order
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                _ssTrack:
                  type: string
                action:
                  type: string
                force:
                  type: boolean
                instrument:
                  type: string
                limitPrice:
                  type: number
                maxPositions:
                  type: integer
                maxResyncCorrection:
                  type: integer
                ocoId:
                  type: string
                orderId:
                  type: string
                orderType:
                  type: string
                quantity:
                  type: integer
                requireMarketPosition:
                  type: string
                smartOptions:
                  type: object
                stopPrice:
                  type: number
                strategy:
                  type: string
                strategyTag:
                  type: string
                targetQuantity:
                  type: integer
                timeInForce:
                  type: string
              required:
              - timeInForce
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders/flatplace:
    post:
      tags:
      - Orders
      x-rpc-api: FlatPlace
      summary: Flat Place Order
      description: '**RPC Function:** `FlatPlace`


        **Optional fields (from add-on):** `quantity`, `limitPrice`, `stopPrice`, `strategyTag`, `force`'
      operationId: flat_place_order
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                force:
                  type: boolean
                limitPrice:
                  type: number
                quantity:
                  type: integer
                stopPrice:
                  type: number
                strategyTag:
                  type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders/{id}/status:
    get:
      tags:
      - Orders
      x-rpc-api: GetOrderStatus
      summary: Get Order Status by ID
      description: '**RPC Function:** `GetOrderStatus`'
      operationId: get_order_status
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders/{id}/change:
    put:
      tags:
      - Orders
      x-rpc-api: Change
      summary: Change Order
      description: '**RPC Function:** `Change`


        **Optional fields (from add-on):** `quantity`, `limitPrice`, `stopPrice`, `strategyId`, `account`, `strategyTag`,
        `force`'
      operationId: change_order
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                force:
                  type: boolean
                limitPrice:
                  type: number
                orderId:
                  type: string
                quantity:
                  type: integer
                stopPrice:
                  type: number
                strategyId:
                  type: string
                strategyTag:
                  type: string
              required:
              - orderId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders/{id}/cancel:
    post:
      tags:
      - Orders
      x-rpc-api: Cancel
      summary: Cancel Order by ID
      description: '**RPC Function:** `Cancel`


        **Optional fields (from add-on):** `strategyId`, `account`, `strategyTag`, `force`'
      operationId: cancel_order
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders/cancel_and_bracket:
    post:
      tags:
      - Orders
      x-rpc-api: CancelAndBracket
      summary: Cancel existing orders and immediately place new OCO Bracket (TP/SL)
      description: "`action` is the direction of the position being protected, not the exit\n    direction. The add-on inverts\
        \ it: Buy/BuyToCover → Sell exits;\n    Sell/SellShort → BuyToCover exits. See post-cancel-and-bracket.mdx.\n\n  \
        \  {\n      \"api\": \"CancelAndBracket\",\n      \"args\": {\n        \"account\": \"Sim101\",\n        \"instrument\"\
        : \"ES 12-26\",\n        \"action\": \"Buy\",\n        \"quantity\": 1,\n        \"takeProfit\": 4550.00,\n      \
        \  \"stopLoss\": 4450.00,\n        \"ocoId\": \"Protect_Long_001\"\n      }\n    }\n\n**RPC Function:** `CancelAndBracket`\n\
        \n**Optional fields (from add-on):** `takeProfit`, `stopLoss`, `delayMs`, `strategyTag`, `force`, `ocoId`"
      operationId: cancel_and_bracket
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                delayMs:
                  type: integer
                force:
                  type: boolean
                instrument:
                  type: string
                ocoId:
                  type: string
                quantity:
                  type: integer
                stopLoss:
                  type: number
                strategyTag:
                  type: string
                takeProfit:
                  type: number
              required:
              - action
              - instrument
              - quantity
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders/{id}/replace:
    post:
      tags:
      - Orders
      x-rpc-api: CancelReplace
      summary: Cancel Replace Order
      description: '**RPC Function:** `CancelReplace`


        **Optional fields (from add-on):** `quantity`, `limitPrice`, `stopPrice`, `strategyTag`, `force`'
      operationId: cancel_replace_order
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                force:
                  type: boolean
                instrument:
                  type: string
                limitPrice:
                  type: number
                orderId:
                  type: string
                orderType:
                  type: string
                quantity:
                  type: integer
                stopPrice:
                  type: number
                strategyTag:
                  type: string
                timeInForce:
                  type: string
              required:
              - action
              - instrument
              - orderId
              - orderType
              - timeInForce
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders/{id}:
    get:
      tags:
      - Orders
      x-rpc-api: GetOrder
      summary: Get Order by ID
      description: '**RPC Function:** `GetOrder`


        **Optional fields (from add-on):** `orderId`'
      operationId: get_order
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/orders/{id}/lifecycle:
    get:
      tags:
      - Orders
      x-rpc-api: GetOrderLifecycle
      summary: Get Order Lifecycle (v1.13.2)
      description: "Returns the full lifecycle of one order: every state transition recorded\n    by the addon plus optional\
        \ fills from NT8's in-memory Executions. Use this\n    to reconcile orders end-to-end when WebSocket events are dropped\
        \ or arrive\n    out of order.\n\n    Available in CrossTrade XT Add-On v1.13.2 and later. Older addons will\n   \
        \ return an \"Unknown API command\" error.\n\n    Query string:\n      includeFills (bool, default true)  — merge\
        \ fills\n      includeRaw   (bool, default false) — include raw_json column\n      limit        (int,  default 200)\
        \   — cap rows returned (max 2000)\n\n**RPC Function:** `GetOrderLifecycle`\n\n**Optional fields (from add-on):**\
        \ `includeRaw`, `limit`"
      operationId: get_order_lifecycle
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/accounts/{account}/executions/{id}:
    get:
      tags:
      - Executions
      x-rpc-api: GetExecution
      summary: Get Execution by ID
      description: '**RPC Function:** `GetExecution`'
      operationId: get_execution
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "Sim101")
        example: Sim101
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Client (NinjaTrader add-on) not connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/status:
    get:
      tags:
      - Tradovate Status
      summary: 'Tradovate link status: identities, environments, token expiry'
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_status
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts:
    get:
      tags:
      - Tradovate Accounts
      summary: List linked Tradovate accounts
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_accounts
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/snapshot:
    get:
      tags:
      - Tradovate Accounts
      summary: 'Live snapshot of every account: balances, open positions with P&L, working orders'
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_snapshot
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}:
    get:
      tags:
      - Tradovate Accounts
      summary: Get one account with its cash-balance snapshot
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_account
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/positions:
    get:
      tags:
      - Tradovate Positions
      summary: All open positions across linked identities
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_positions
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/positions:
    get:
      tags:
      - Tradovate Positions
      summary: Fill-reconciled open positions for one account
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_account_positions
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/position:
    get:
      tags:
      - Tradovate Positions
      summary: Net position for one account and instrument (NT8 GetPosition parity)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_account_position
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      - name: instrument
        in: query
        required: true
        schema:
          type: string
        description: 'Instrument: continuous (''ES1!''), NT8 (''ES 12-26''), or Tradovate (''ESZ6'') form'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/orders:
    get:
      tags:
      - Tradovate Orders
      summary: Every order across linked identities (NT8 all-orders parity)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_all_orders
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders:
    get:
      tags:
      - Tradovate Orders
      summary: Working orders for one account
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_account_orders
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders/{id}:
    get:
      tags:
      - Tradovate Orders
      summary: Get one order by id
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_order_item
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Tradovate numeric order id or user-assigned orderId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders/{id}/status:
    get:
      tags:
      - Tradovate Orders
      summary: Slim order status read (NT8 order-status parity)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_order_status
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Tradovate numeric order id or user-assigned orderId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders/{id}/lifecycle:
    get:
      tags:
      - Tradovate Orders
      summary: 'Order audit trail: current version, commands, and command reports'
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_order_lifecycle
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Tradovate numeric order id or user-assigned orderId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/fills:
    get:
      tags:
      - Tradovate Fills
      summary: All fills across linked identities, one envelope per identity
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_fills
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/fills:
    get:
      tags:
      - Tradovate Fills
      summary: Fills for one account
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_account_fills
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/fills/order/{orderId}:
    get:
      tags:
      - Tradovate Fills
      summary: Fills for one order (NT8 executions-by-order parity)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_fills_by_order
      parameters:
      - name: orderId
        in: path
        required: true
        schema:
          type: string
        description: Tradovate numeric order id or user-assigned orderId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/fills/history:
    get:
      tags:
      - Tradovate Fills
      summary: Durable fill history from the journal's continuous Tradovate capture.
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_fills_history
      parameters:
      - name: from
        in: query
        required: true
        schema:
          type: string
        description: Inclusive lower bound, ISO-8601 date or datetime (UTC). Date-only values start at 00:00Z.
      - name: to
        in: query
        required: true
        schema:
          type: string
        description: Exclusive upper bound, ISO-8601 date or datetime (UTC). Date-only values cover the whole day.
      - name: environment
        in: query
        required: true
        schema:
          type: string
        description: 'Filter to one environment: ''demo'' or ''live'''
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 1000
          default: 500
        description: Maximum rows per page (1-1000, default 500)
      - name: account
        in: query
        required: true
        schema:
          type: string
        description: Filter to one account by display name
      - name: cursor
        in: query
        required: true
        schema:
          type: string
        description: Opaque pagination cursor from the previous page's nextCursor
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/watermarks:
    get:
      tags:
      - Tradovate Accounts
      summary: P&L high-water marks tracked by the Account Manager monitor engine
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_watermarks
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/cashbalances:
    get:
      tags:
      - Tradovate Balances
      summary: Cash-balance rows for every linked identity
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_cashbalances
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/marginsnapshots:
    get:
      tags:
      - Tradovate Balances
      summary: Margin snapshots for every linked identity
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_margins
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/contracts/find:
    get:
      tags:
      - Tradovate Reference
      summary: Find a contract by exact Tradovate symbol
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_contract_find
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
        description: Exact Tradovate contract symbol, e.g. 'ESZ6'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/contracts/suggest:
    get:
      tags:
      - Tradovate Reference
      summary: Contract autocomplete (resolves the active front month)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_contract_suggest
      parameters:
      - name: text
        in: query
        required: true
        schema:
          type: string
        description: Contract root or partial symbol to search
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 10
        description: Maximum suggestions to return (1-100)
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/exchanges:
    get:
      tags:
      - Tradovate Reference
      summary: Exchange reference list
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).'
      operationId: tv_exchanges
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders/place:
    post:
      tags:
      - Tradovate Orders
      x-tv-command: PLACE
      summary: 'Place an order: market/limit/stop types, OCO brackets, inline ATM multibracket'
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `PLACE` — runs through the shared webhook parser and dispatcher (validation, account management locks,
        trade copier fan-out).'
      operationId: tv_place
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                instrument: &id011
                  type: string
                  description: 'Instrument: continuous (''ES1!''), NT8 (''ES 12-26''), or Tradovate (''ESZ6'') form'
                action: &id012
                  type: string
                  description: buy | sell (long/short accepted)
                  enum:
                  - buy
                  - sell
                  - long
                  - short
                qty: &id001
                  type: integer
                  description: Number of contracts
                orderType: &id002
                  type: string
                  description: market | limit | stop | stoplimit | mit | trailingstop | trailingstoplimit
                  enum:
                  - market
                  - limit
                  - stop
                  - stoplimit
                  - mit
                  - trailingstop
                  - trailingstoplimit
                limitPrice: &id003
                  type: number
                  description: Limit price (limit / stoplimit / mit / trailingstoplimit)
                stopPrice: &id004
                  type: number
                  description: Stop trigger price (stop / stoplimit / trailing types)
                tif: &id005
                  type: string
                  description: day | gtc | ioc | fok | gtd
                  enum:
                  - day
                  - gtc
                  - ioc
                  - fok
                  - gtd
                takeProfit: &id022
                  type: number
                  description: Absolute price for a server-side OCO take-profit leg
                stopLoss: &id023
                  type: number
                  description: Absolute price for a server-side OCO stop-loss leg
                orderId: &id024
                  type: string
                  description: User-assigned order reference for later cancel/change
                text: &id006
                  type: string
                  description: Free-form note attached to the order (max 64 chars)
                  maxLength: 64
                flattenFirst:
                  type: boolean
                  description: Flatten + cancel on the instrument before entering
                requireMarketPosition: &id013
                  type: string
                  description: 'Gate: only act when current position is ''flat'' / ''long'' / ''short'''
                maxPositions: &id014
                  type: integer
                  description: Block entry when N positions already open
                cancelAfter: &id015
                  type: integer
                  description: Minutes (1-180) before an unfilled limit entry auto-cancels
                expireTime: &id007
                  type: string
                  description: ISO-8601 order expiry; required when tif=gtd
                maxShow: &id008
                  type: integer
                  description: Iceberg display quantity
                trailOffset: &id009
                  type: number
                  description: Native trailing-stop distance; required for trailing order types
                pegDifference: &id010
                  type: number
                  description: Alias of trailOffset
                syncStrategy: &id016
                  type: boolean
                  description: Enable Tradovate Strategy Sync for this entry command
                marketPosition: &id017
                  type: string
                  description: 'Remote strategy target side: flat, long, or short'
                prevMarketPosition: &id018
                  type: string
                  description: Remote strategy side before this signal
                outOfSync: &id019
                  type: string
                  description: 'Mismatch policy: wait, flatten, ignore, or resync'
                  enum:
                  - wait
                  - flatten
                  - ignore
                  - resync
                targetQuantity: &id020
                  type: integer
                  description: Exact signed target quantity for resync mode
                strategyExitBlock: &id021
                  type: boolean
                  description: Reject non-opening strategy transitions. Only honored when syncStrategy is enabled
                atmTargets: &id025
                  type: string
                  description: Tradovate-native ATM target offsets, e.g. '40,80' ticks or '10pt,20pt'
                atmStops: &id026
                  type: string
                  description: Tradovate-native ATM stop offsets (required with atm* fields)
                atmQtys: &id027
                  type: string
                  description: Tradovate-native contracts per tier; sums to qty, e.g. '1,1'
                atmTrail: &id028
                  type: string
                  description: Tradovate-native continuous trailing toggle when no trigger is supplied, e.g. 'false,true'
                atmTrailTrigger: &id029
                  type: string
                  description: 'CrossTrade-exclusive: profit distance that activates a trailing tier, e.g.
                    ''30'' or '',30''. Pair with atmTrailOffset; Day entries only'
                atmTrailOffset: &id030
                  type: string
                  description: 'CrossTrade-managed activation: native Tradovate trail distance after confirmed handoff. Pair
                    with atmTrailTrigger'
                atmBreakeven: &id031
                  type: integer
                  description: 'CrossTrade-exclusive: target tier whose fill moves surviving stops to breakeven; not a native
                    Tradovate AutoBracket field'
                atmBreakevenOffset: &id032
                  type: string
                  description: 'CrossTrade-exclusive: ticks/points past entry for the managed breakeven stop'
              additionalProperties: false
              required:
              - instrument
              - action
              - qty
              - orderType
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders/{id}/cancel:
    post:
      tags:
      - Tradovate Orders
      x-tv-command: CANCEL
      summary: Cancel one working order by id
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `CANCEL` — runs through the shared webhook parser and dispatcher (validation, account management locks,
        trade copier fan-out).'
      operationId: tv_cancel
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Tradovate numeric order id or user-assigned orderId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders/{id}/change:
    put:
      tags:
      - Tradovate Orders
      x-tv-command: CHANGE
      summary: Change a working order in place (PUT is canonical for NT8 parity; POST kept for backward compatibility)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `CHANGE` — runs through the shared webhook parser and dispatcher (validation, account management locks,
        trade copier fan-out).'
      operationId: tv_change
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Tradovate numeric order id or user-assigned orderId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                qty: *id001
                orderType: *id002
                limitPrice: *id003
                stopPrice: *id004
                tif: *id005
                text: *id006
                expireTime: *id007
                maxShow: *id008
                trailOffset: *id009
                pegDifference: *id010
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders/{id}/replace:
    post:
      tags:
      - Tradovate Orders
      x-tv-command: CANCELREPLACE
      summary: Cancel a working order and place a replacement in one command
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `CANCELREPLACE` — runs through the shared webhook parser and dispatcher (validation, account management
        locks, trade copier fan-out).'
      operationId: tv_replace
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Tradovate numeric order id or user-assigned orderId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                instrument: *id011
                action: *id012
                qty: *id001
                orderType: *id002
                limitPrice: *id003
                stopPrice: *id004
                tif: *id005
                text: *id006
                expireTime: *id007
                maxShow: *id008
                trailOffset: *id009
                pegDifference: *id010
                requireMarketPosition: *id013
                maxPositions: *id014
                cancelAfter: *id015
                syncStrategy: *id016
                marketPosition: *id017
                prevMarketPosition: *id018
                outOfSync: *id019
                targetQuantity: *id020
                strategyExitBlock: *id021
              additionalProperties: false
              required:
              - instrument
              - action
              - qty
              - orderType
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders/cancel:
    post:
      tags:
      - Tradovate Orders
      x-tv-command: CANCELORDERS
      summary: Cancel every working order on one account
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `CANCELORDERS` — runs through the shared webhook parser and dispatcher (validation, account management
        locks, trade copier fan-out).'
      operationId: tv_cancel_orders
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/orders/cancelall:
    post:
      tags:
      - Tradovate Orders
      x-tv-command: CANCELALLORDERS
      summary: Cancel every working order across all linked identities
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `CANCELALLORDERS` — runs through the shared webhook parser and dispatcher (validation, account management
        locks, trade copier fan-out).'
      operationId: tv_cancel_all
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders/cancel_and_bracket:
    post:
      tags:
      - Tradovate Orders
      x-tv-command: CANCELANDBRACKET
      summary: Cancel working orders on the instrument and attach a fresh OCO bracket (hyphen path = NT8-parity alias)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `CANCELANDBRACKET` — runs through the shared webhook parser and dispatcher (validation, account management
        locks, trade copier fan-out).'
      operationId: tv_cancel_and_bracket
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                instrument: *id011
                action: *id012
                qty: *id001
                takeProfit: *id022
                stopLoss: *id023
              additionalProperties: false
              required:
              - instrument
              - action
              - qty
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/orders/flatplace:
    post:
      tags:
      - Tradovate Orders
      x-tv-command: FLATPLACE
      summary: Flatten and cancel on the instrument, then place a fresh entry
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `FLATPLACE` — runs through the shared webhook parser and dispatcher (validation, account management locks,
        trade copier fan-out).'
      operationId: tv_flatplace
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                instrument: *id011
                action: *id012
                qty: *id001
                orderType: *id002
                limitPrice: *id003
                stopPrice: *id004
                tif: *id005
                takeProfit: *id022
                stopLoss: *id023
                orderId: *id024
                text: *id006
                requireMarketPosition: *id013
                maxPositions: *id014
                cancelAfter: *id015
                expireTime: *id007
                maxShow: *id008
                trailOffset: *id009
                pegDifference: *id010
                syncStrategy: *id016
                marketPosition: *id017
                prevMarketPosition: *id018
                outOfSync: *id019
                targetQuantity: *id020
                strategyExitBlock: *id021
                atmTargets: *id025
                atmStops: *id026
                atmQtys: *id027
                atmTrail: *id028
                atmTrailTrigger: *id029
                atmTrailOffset: *id030
                atmBreakeven: *id031
                atmBreakevenOffset: *id032
              additionalProperties: false
              required:
              - instrument
              - action
              - qty
              - orderType
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/positions/close:
    post:
      tags:
      - Tradovate Positions
      x-tv-command: CLOSEPOSITION
      summary: Close the position on one account and instrument (partial via qty/percent)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `CLOSEPOSITION` — runs through the shared webhook parser and dispatcher (validation, account management
        locks, trade copier fan-out).'
      operationId: tv_close_position
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                instrument: *id011
                qty:
                  type: integer
                  description: Contracts to close (partial close)
                percent:
                  type: number
                  description: Fraction of the position to close, 0-1; qty wins when both set
              additionalProperties: false
              required:
              - instrument
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/positions/flatten:
    post:
      tags:
      - Tradovate Positions
      x-tv-command: FLATTEN
      summary: Flatten positions on one account (optional instrument / side filters)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `FLATTEN` — runs through the shared webhook parser and dispatcher (validation, account management locks,
        trade copier fan-out).'
      operationId: tv_flatten_account
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                instrument: *id011
                marketPosition:
                  type: string
                  description: 'Only flatten this side: ''long'' or ''short'''
                  enum:
                  - long
                  - short
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/positions/flatten:
    post:
      tags:
      - Tradovate Positions
      x-tv-command: FLATTENEVERYTHING
      summary: Liquidate every position and cancel every working order
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `FLATTENEVERYTHING` — runs through the shared webhook parser and dispatcher (validation, account management
        locks, trade copier fan-out).'
      operationId: tv_flatten_everything
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/positions/reverse:
    post:
      tags:
      - Tradovate Positions
      x-tv-command: REVERSE
      summary: Reverse the live position (liquidate, then opposite entry at same size)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `REVERSE` — runs through the shared webhook parser and dispatcher (validation, account management locks,
        trade copier fan-out).'
      operationId: tv_reverse
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                instrument: *id011
              additionalProperties: false
              required:
              - instrument
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /v1/api/tv/accounts/{account}/positions/reverseposition:
    post:
      tags:
      - Tradovate Positions
      x-tv-command: REVERSEPOSITION
      summary: Flatten the position, then place the specified entry (explicit-size reverse)
      description: '**Tradovate:** requires a linked Tradovate account (no NinjaTrader add-on involved).


        **Command:** `REVERSEPOSITION` — runs through the shared webhook parser and dispatcher (validation, account management
        locks, trade copier fan-out).'
      operationId: tv_reverseposition
      parameters:
      - name: account
        in: path
        required: true
        schema:
          type: string
        description: Account name (e.g., "DEMO12345678")
        example: DEMO12345678
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                instrument: *id011
                action: *id012
                qty: *id001
                orderType: *id002
                limitPrice: *id003
                stopPrice: *id004
                tif: *id005
                takeProfit: *id022
                stopLoss: *id023
                orderId: *id024
                text: *id006
                requireMarketPosition: *id013
                maxPositions: *id014
                cancelAfter: *id015
                expireTime: *id007
                maxShow: *id008
                trailOffset: *id009
                pegDifference: *id010
                syncStrategy: *id016
                marketPosition: *id017
                prevMarketPosition: *id018
                outOfSync: *id019
                targetQuantity: *id020
                strategyExitBlock: *id021
                atmTargets: *id025
                atmStops: *id026
                atmQtys: *id027
                atmTrail: *id028
                atmTrailTrigger: *id029
                atmTrailOffset: *id030
                atmBreakeven: *id031
                atmBreakevenOffset: *id032
              additionalProperties: false
              required:
              - instrument
              - action
              - qty
              - orderType
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
        '400':
          description: Bad request or operation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (180 req/min per user)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No linked Tradovate account (tradovate_not_linked) or endpoint not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
  /ws/stream:
    get:
      tags:
      - WebSocket API
      summary: Streaming WebSocket endpoint
      description: "Real-time streaming WebSocket endpoint. Supports:\n\n- **RPC calls** to the NinjaTrader add-on (same functions\
        \ as REST API)\n- **Market data streaming** via instrument subscriptions\n- **PnL streaming** for real-time account\
        \ updates\n- **Event streaming**: order, execution, position, and connection events, each subscribed individually\n\
        - **Tradovate origin**: `\"origin\": \"tradovate\"` on subscribe / streamPnl, `Tv_*` names on rpc (no market data)\n\
        \n### Send: RPC Call\n```json\n{\n  \"action\": \"rpc\",\n  \"id\": \"my-request-1\",\n  \"api\": \"PlaceOrder\",\n\
        \  \"args\": {\n    \"account\": \"Sim101\",\n    \"instrument\": \"ES 12-26\",\n    \"action\": \"Buy\",\n    \"\
        orderType\": \"Market\",\n    \"quantity\": 1,\n    \"timeInForce\": \"Gtc\"\n  }\n}\n```\n\n### Send: Subscribe to\
        \ Market Data\n```json\n{\"action\": \"subscribe\", \"instruments\": [\"ES 12-26\", \"NQ 12-26\"]}\n```\n\n### Send:\
        \ Subscribe to Events\n```json\n{\"action\": \"subscribe\", \"events\": [\"orders\", \"executions\", \"positions\"\
        ]}\n```\n\n### Send: Stream PnL\n```json\n{\"action\": \"streamPnl\", \"enabled\": true, \"interval\": 1000}\n```\n\
        \n### Receive: Market Data\n```json\n{\"type\": \"marketData\", \"origin\": \"nt8\", \"seq\": 7, \"quotes\": [{\"\
        instrument\": \"ES 12-26\", \"last\": 5825.50, ...}]}\n```\n\n### Receive: Order Event\n```json\n{\"type\": \"orderUpdate\"\
        , \"origin\": \"nt8\", \"seq\": 8, \"epoch\": 1757260000123,\n \"account\": \"Sim101\", \"instrument\": \"ES 12-26\"\
        , \"order\": {\"id\": \"abc123\", \"orderState\": \"Working\", ...}}\n```\n\n### Receive: RPC Response\n```json\n\
        {\"id\": \"my-request-1\", \"data\": {\"orderId\": \"abc123\", \"success\": true}}\n```\n\nEvery pushed frame carries\
        \ `origin`, `seq`, and `epoch`; `dropped` appears when the server discarded frames for a slow reader.\nEvent delivery\
        \ is within ~3 s on add-on v1.12.0 to v1.13.12 and immediate on v1.13.13+.\nSingle session enforced: connecting from\
        \ a new client disconnects the previous one.\n"
      operationId: websocket_stream
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: Bearer token
      responses:
        '101':
          description: WebSocket upgrade successful
      security:
      - bearerAuth: []
  /v1/api/manage:
    get:
      operationId: index.get
      summary: Capability discovery for the Management API
      description: 'Reference: https://crosstrade.io/docs/api/management'
      externalDocs:
        url: https://crosstrade.io/docs/api/management
      tags:
      - 'Management: Discovery'
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
  /v1/api/manage/controls:
    get:
      operationId: controls.get
      summary: Read global controls
      description: 'Reference: https://crosstrade.io/docs/api/management/controls/get-controls'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/controls/get-controls
      tags:
      - 'Management: Controls'
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    $ref: '#/components/schemas/Controls'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    patch:
      operationId: controls.update
      summary: Update global controls
      description: 'Reference: https://crosstrade.io/docs/api/management/controls/patch-controls'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/controls/patch-controls
      tags:
      - 'Management: Controls'
      security:
      - bearerAuth: []
      parameters:
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Controls'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ControlsPatch'
            example:
              closingOnly: true
  /v1/api/manage/controls/kill-switch:
    put:
      operationId: controls.set_kill_switch
      summary: Turn the master kill switch on or off
      description: 'Reference: https://crosstrade.io/docs/api/management/controls/put-kill-switch'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/controls/put-kill-switch
      tags:
      - 'Management: Kill Switch'
      security:
      - bearerAuth: []
      parameters:
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Controls'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KillSwitchBody'
            example:
              enabled: true
  /v1/api/manage/news-lockout:
    get:
      operationId: news.get
      summary: Read the global news lockout
      description: 'Reference: https://crosstrade.io/docs/api/management/news-lockout/get-news-lockout'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/news-lockout/get-news-lockout
      tags:
      - 'Management: News Lockout'
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    $ref: '#/components/schemas/NewsLockout'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    patch:
      operationId: news.update
      summary: Turn the global news lockout on or off
      description: 'Reference: https://crosstrade.io/docs/api/management/news-lockout/patch-news-lockout'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/news-lockout/patch-news-lockout
      tags:
      - 'Management: News Lockout'
      security:
      - bearerAuth: []
      parameters:
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/NewsLockout'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewsLockoutPatch'
            example:
              enabled: true
  /v1/api/manage/nt8/connection-settings:
    get:
      operationId: connections.get
      summary: Read NT8 connection settings
      description: 'Reference: https://crosstrade.io/docs/api/management/connection-settings/get-connection-settings'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/connection-settings/get-connection-settings
      tags:
      - 'Management: NT8 Connection Settings'
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    $ref: '#/components/schemas/ConnectionSettings'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    patch:
      operationId: connections.update
      summary: Update NT8 connection settings
      description: 'Reference: https://crosstrade.io/docs/api/management/connection-settings/patch-connection-settings'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/connection-settings/patch-connection-settings
      tags:
      - 'Management: NT8 Connection Settings'
      security:
      - bearerAuth: []
      parameters:
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/ConnectionSettings'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionSettingsPatch'
            example:
              opposingPositionProtection:
                enabled: true
                relatedProducts: default
  /v1/api/manage/nt8/connections:
    get:
      operationId: nt8.connections.list
      summary: List live NinjaTrader connections
      description: "Requires Elite and an online add-on. Returns live status without provider credentials. refresh=true refreshes configured connection discovery. Supports If-None-Match.\n\nReference: https://crosstrade.io/docs/api/management/connections/list-connections"
      externalDocs: {url: 'https://crosstrade.io/docs/api/management/connections/list-connections'}
      tags: ['Management: NT8 Connections']
      security: [{bearerAuth: []}]
      parameters:
      - {name: refresh, in: query, required: false, schema: {default: false, title: Refresh, type: boolean}}
      - {name: If-None-Match, in: header, required: false, schema: {type: string}}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success: {const: true}
                  meta: {type: object}
                  data: {type: array, items: {$ref: '#/components/schemas/Nt8Connection'}}
        default:
          description: Error
          content:
            application/json:
              schema: {$ref: '#/components/schemas/ManagementError'}
        '304': {description: 'Unchanged live snapshot; no response body'}
  /v1/api/manage/nt8/connections/connect:
    post:
      operationId: nt8.connections.connect
      summary: Request a NinjaTrader connection
      description: "Requires Elite and an online add-on. Resolves name case-insensitively from your connection inventory. Success acknowledges the request, not final broker state; poll GET /v1/api/manage/nt8/connections. No offline queue or ETag. If-Match is rejected.\n\nReference: https://crosstrade.io/docs/api/management/connections/connect"
      externalDocs: {url: 'https://crosstrade.io/docs/api/management/connections/connect'}
      tags: ['Management: NT8 Connections']
      security: [{bearerAuth: []}]
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success: {const: true}
                  meta: {type: object}
                  changed: {type: boolean}
                  data: {$ref: '#/components/schemas/Nt8ConnectionAction'}
                  changedFields: {type: array, items: {type: string}}
                  delivery: {type: [object, 'null']}
                  warnings: {type: array, items: {type: object}}
        default:
          description: Error
          content:
            application/json:
              schema: {$ref: '#/components/schemas/ManagementError'}
      requestBody:
        required: true
        content:
          application/json:
            schema: {$ref: '#/components/schemas/Nt8ConnectionCommand'}
            example: {name: Rithmic}
  /v1/api/manage/nt8/connections/disconnect:
    post:
      operationId: nt8.connections.disconnect
      summary: Request a NinjaTrader disconnection
      description: "Requires Elite and an online add-on. Resolves name case-insensitively from your connection inventory. Success acknowledges the request, not final broker state; poll GET /v1/api/manage/nt8/connections. No offline queue or ETag. If-Match is rejected.\n\nReference: https://crosstrade.io/docs/api/management/connections/disconnect"
      externalDocs: {url: 'https://crosstrade.io/docs/api/management/connections/disconnect'}
      tags: ['Management: NT8 Connections']
      security: [{bearerAuth: []}]
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success: {const: true}
                  meta: {type: object}
                  changed: {type: boolean}
                  data: {$ref: '#/components/schemas/Nt8ConnectionAction'}
                  changedFields: {type: array, items: {type: string}}
                  delivery: {type: [object, 'null']}
                  warnings: {type: array, items: {type: object}}
        default:
          description: Error
          content:
            application/json:
              schema: {$ref: '#/components/schemas/ManagementError'}
      requestBody:
        required: true
        content:
          application/json:
            schema: {$ref: '#/components/schemas/Nt8ConnectionCommand'}
            example: {name: Rithmic}
  /v1/api/manage/nt8/monitors:
    get:
      operationId: nt8.monitors.list
      summary: List NT8 Account Manager monitors
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/list-monitors'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/list-monitors
      tags:
      - 'Management: NT8 Monitors'
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Nt8Monitor'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    post:
      operationId: nt8.monitors.create
      summary: Create an NT8 monitor
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/create-monitor'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/create-monitor
      tags:
      - 'Management: NT8 Monitors'
      security:
      - bearerAuth: []
      parameters:
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Nt8Monitor'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Nt8MonitorCreate'
            example:
              account: Sim101
              dailyLossLimit: 500
              dailyProfitTarget: 1000
              active: true
  /v1/api/manage/nt8/monitors/{account}:
    get:
      operationId: nt8.monitors.get
      summary: Get one NT8 monitor
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/get-monitor'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/get-monitor
      tags:
      - 'Management: NT8 Monitors'
      security:
      - bearerAuth: []
      parameters:
      - name: account
        in: path
        required: true
        description: Account name, URL-encoded once
        schema:
          type: string
        example: Sim101
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    $ref: '#/components/schemas/Nt8Monitor'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    patch:
      operationId: nt8.monitors.update
      summary: Update an NT8 monitor
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/update-monitor'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/update-monitor
      tags:
      - 'Management: NT8 Monitors'
      security:
      - bearerAuth: []
      parameters:
      - name: account
        in: path
        required: true
        description: Account name, URL-encoded once
        schema:
          type: string
        example: Sim101
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Nt8Monitor'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Nt8MonitorPatch'
            example:
              dailyLossLimit: 400
              autoFlattenTime: null
    delete:
      operationId: nt8.monitors.delete
      summary: Delete an NT8 monitor
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/delete-monitor'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/delete-monitor
      tags:
      - 'Management: NT8 Monitors'
      security:
      - bearerAuth: []
      parameters:
      - name: account
        in: path
        required: true
        description: Account name, URL-encoded once
        schema:
          type: string
        example: Sim101
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    type: object
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
  /v1/api/manage/nt8/monitors/{account}/restart:
    post:
      operationId: nt8.monitors.restart
      summary: Restart a stopped NT8 monitor
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/restart-monitor'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/restart-monitor
      tags:
      - 'Management: NT8 Monitors'
      security:
      - bearerAuth: []
      parameters:
      - name: account
        in: path
        required: true
        description: Account name, URL-encoded once
        schema:
          type: string
        example: Sim101
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Nt8Monitor'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmptyBody'
            example: {}
  /v1/api/manage/tradovate/monitors:
    get:
      operationId: tradovate.monitors.list
      summary: List Tradovate Account Manager monitors
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/list-monitors'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/list-monitors
      tags:
      - 'Management: Tradovate Monitors'
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TvMonitor'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    post:
      operationId: tradovate.monitors.create
      summary: Create a Tradovate monitor
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/create-monitor'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/create-monitor
      tags:
      - 'Management: Tradovate Monitors'
      security:
      - bearerAuth: []
      parameters:
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/TvMonitor'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TvMonitorCreate'
            example:
              account: DEMO12345678
              dailyLossLimit: 500
              dailyProfitTarget: 1000
              active: true
  /v1/api/manage/tradovate/monitors/{account}:
    get:
      operationId: tradovate.monitors.get
      summary: Get one Tradovate monitor
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/get-monitor'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/get-monitor
      tags:
      - 'Management: Tradovate Monitors'
      security:
      - bearerAuth: []
      parameters:
      - name: account
        in: path
        required: true
        description: Account name, URL-encoded once
        schema:
          type: string
        example: DEMO12345678
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    $ref: '#/components/schemas/TvMonitor'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    patch:
      operationId: tradovate.monitors.update
      summary: Update a Tradovate monitor
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/update-monitor'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/update-monitor
      tags:
      - 'Management: Tradovate Monitors'
      security:
      - bearerAuth: []
      parameters:
      - name: account
        in: path
        required: true
        description: Account name, URL-encoded once
        schema:
          type: string
        example: DEMO12345678
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/TvMonitor'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TvMonitorPatch'
            example:
              dailyLossLimit: 400
              autoFlattenTime: null
    delete:
      operationId: tradovate.monitors.delete
      summary: Delete a Tradovate monitor
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/delete-monitor'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/delete-monitor
      tags:
      - 'Management: Tradovate Monitors'
      security:
      - bearerAuth: []
      parameters:
      - name: account
        in: path
        required: true
        description: Account name, URL-encoded once
        schema:
          type: string
        example: DEMO12345678
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    type: object
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
  /v1/api/manage/tradovate/monitors/{account}/restart:
    post:
      operationId: tradovate.monitors.restart
      summary: Restart a stopped Tradovate monitor
      description: 'Reference: https://crosstrade.io/docs/api/management/monitors/restart-monitor'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/monitors/restart-monitor
      tags:
      - 'Management: Tradovate Monitors'
      security:
      - bearerAuth: []
      parameters:
      - name: account
        in: path
        required: true
        description: Account name, URL-encoded once
        schema:
          type: string
        example: DEMO12345678
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/TvMonitor'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmptyBody'
            example: {}
  /v1/api/manage/nt8/copiers:
    get:
      operationId: nt8.copiers.list
      summary: List NT8 trade copiers
      description: 'Reference: https://crosstrade.io/docs/api/management/copiers/list-copiers'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/copiers/list-copiers
      tags:
      - 'Management: NT8 Copiers'
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Nt8Copier'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    post:
      operationId: nt8.copiers.create
      summary: Create an NT8 trade copier
      description: 'Reference: https://crosstrade.io/docs/api/management/copiers/create-copier'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/copiers/create-copier
      tags:
      - 'Management: NT8 Copiers'
      security:
      - bearerAuth: []
      parameters:
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Nt8Copier'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Nt8CopierCreate'
            example:
              type: single
              leader: Sim101
              followers:
              - account: DemoAccount
              instruments:
              - ES
              - NQ
              active: true
  /v1/api/manage/nt8/copiers/{id}:
    get:
      operationId: nt8.copiers.get
      summary: Get one NT8 trade copier
      description: 'Reference: https://crosstrade.io/docs/api/management/copiers/get-copier'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/copiers/get-copier
      tags:
      - 'Management: NT8 Copiers'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: 4b1f0c9e2d7a4c55b1e0
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    $ref: '#/components/schemas/Nt8Copier'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    patch:
      operationId: nt8.copiers.update
      summary: Update an NT8 trade copier
      description: 'Reference: https://crosstrade.io/docs/api/management/copiers/update-copier'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/copiers/update-copier
      tags:
      - 'Management: NT8 Copiers'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: 4b1f0c9e2d7a4c55b1e0
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Nt8Copier'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Nt8CopierPatch'
            example:
              active: true
              sizing:
                maxQuantity: 3
    delete:
      operationId: nt8.copiers.delete
      summary: Delete an NT8 trade copier
      description: 'Reference: https://crosstrade.io/docs/api/management/copiers/delete-copier'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/copiers/delete-copier
      tags:
      - 'Management: NT8 Copiers'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: 4b1f0c9e2d7a4c55b1e0
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    type: object
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
  /v1/api/manage/tradovate/copiers:
    get:
      operationId: tradovate.copiers.list
      summary: List Tradovate trade copiers
      description: 'Reference: https://crosstrade.io/docs/api/management/copiers/list-copiers'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/copiers/list-copiers
      tags:
      - 'Management: Tradovate Copiers'
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TvCopier'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    post:
      operationId: tradovate.copiers.create
      summary: Create a Tradovate trade copier
      description: 'Reference: https://crosstrade.io/docs/api/management/copiers/create-copier'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/copiers/create-copier
      tags:
      - 'Management: Tradovate Copiers'
      security:
      - bearerAuth: []
      parameters:
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/TvCopier'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TvCopierCreate'
            example:
              type: single
              leader: DEMO12345678
              followers:
              - account: DEMO87654321
              instruments:
              - ES
              - NQ
              active: true
  /v1/api/manage/tradovate/copiers/{id}:
    get:
      operationId: tradovate.copiers.get
      summary: Get one Tradovate trade copier
      description: 'Reference: https://crosstrade.io/docs/api/management/copiers/get-copier'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/copiers/get-copier
      tags:
      - 'Management: Tradovate Copiers'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: 9c3e5a7b1d2f4e6a8b0c
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    $ref: '#/components/schemas/TvCopier'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    patch:
      operationId: tradovate.copiers.update
      summary: Update a Tradovate trade copier
      description: 'Reference: https://crosstrade.io/docs/api/management/copiers/update-copier'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/copiers/update-copier
      tags:
      - 'Management: Tradovate Copiers'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: 9c3e5a7b1d2f4e6a8b0c
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/TvCopier'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TvCopierPatch'
            example:
              active: true
              sizing:
                maxQuantity: 3
    delete:
      operationId: tradovate.copiers.delete
      summary: Delete a Tradovate trade copier
      description: 'Reference: https://crosstrade.io/docs/api/management/copiers/delete-copier'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/copiers/delete-copier
      tags:
      - 'Management: Tradovate Copiers'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: 9c3e5a7b1d2f4e6a8b0c
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    type: object
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
  /v1/api/manage/account-groups:
    get:
      operationId: groups.list
      summary: List webhook account groups
      description: 'Reference: https://crosstrade.io/docs/api/management/account-groups/list-account-groups'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/account-groups/list-account-groups
      tags:
      - 'Management: Account Groups'
      security:
      - bearerAuth: []
      parameters:
      - name: destination
        in: query
        required: false
        schema:
          anyOf:
          - enum:
            - nt8
            - tradovate
            type: string
          - type: 'null'
          default: null
          title: Destination
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Group'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    post:
      operationId: groups.create
      summary: Create an account group
      description: 'Reference: https://crosstrade.io/docs/api/management/account-groups/create-account-group'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/account-groups/create-account-group
      tags:
      - 'Management: Account Groups'
      security:
      - bearerAuth: []
      parameters:
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Group'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupCreate'
            example:
              name: Evals
              destination: nt8
              accounts:
              - PROP1234
              - PROP1235
  /v1/api/manage/account-groups/{id}:
    get:
      operationId: groups.get
      summary: Get one account group
      description: 'Reference: https://crosstrade.io/docs/api/management/account-groups/get-account-group'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/account-groups/get-account-group
      tags:
      - 'Management: Account Groups'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: acctgrp_Xy12ab34Cd56ef78
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    $ref: '#/components/schemas/Group'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    patch:
      operationId: groups.update
      summary: Update an account group
      description: 'Reference: https://crosstrade.io/docs/api/management/account-groups/update-account-group'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/account-groups/update-account-group
      tags:
      - 'Management: Account Groups'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: acctgrp_Xy12ab34Cd56ef78
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Group'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupPatch'
            example:
              accounts:
              - PROP1234
    delete:
      operationId: groups.delete
      summary: Delete an account group
      description: 'Reference: https://crosstrade.io/docs/api/management/account-groups/delete-account-group'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/account-groups/delete-account-group
      tags:
      - 'Management: Account Groups'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: acctgrp_Xy12ab34Cd56ef78
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    type: object
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
  /v1/api/manage/tradovate/atm-templates:
    get:
      operationId: atm.list
      summary: List Tradovate ATM templates
      description: 'Reference: https://crosstrade.io/docs/api/management/atm-templates/list-atm-templates'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/atm-templates/list-atm-templates
      tags:
      - 'Management: Tradovate ATM Templates'
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AtmTemplate'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    post:
      operationId: atm.create
      summary: Create a Tradovate ATM template
      description: 'Reference: https://crosstrade.io/docs/api/management/atm-templates/create-atm-template'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/atm-templates/create-atm-template
      tags:
      - 'Management: Tradovate ATM Templates'
      security:
      - bearerAuth: []
      parameters:
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/AtmTemplate'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AtmCreate'
            example:
              name: Scalp
              description: Two targets, trail the runner
              active: true
              config:
                targets: 20,40
                stops: 16,16
                quantities: 1,1
                trail: false,true
  /v1/api/manage/tradovate/atm-templates/{id}:
    get:
      operationId: atm.get
      summary: Get one Tradovate ATM template
      description: 'Reference: https://crosstrade.io/docs/api/management/atm-templates/get-atm-template'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/atm-templates/get-atm-template
      tags:
      - 'Management: Tradovate ATM Templates'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: tvatm_Qw12er34Ty56ui78
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    $ref: '#/components/schemas/AtmTemplate'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
    patch:
      operationId: atm.update
      summary: Update a Tradovate ATM template
      description: 'Reference: https://crosstrade.io/docs/api/management/atm-templates/update-atm-template'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/atm-templates/update-atm-template
      tags:
      - 'Management: Tradovate ATM Templates'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: tvatm_Qw12er34Ty56ui78
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/AtmTemplate'
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AtmPatch'
            example:
              config:
                targets: 24,48
    delete:
      operationId: atm.delete
      summary: Delete a Tradovate ATM template
      description: 'Reference: https://crosstrade.io/docs/api/management/atm-templates/delete-atm-template'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/atm-templates/delete-atm-template
      tags:
      - 'Management: Tradovate ATM Templates'
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: The id the API returned when the resource was created
        schema:
          type: string
        example: tvatm_Qw12er34Ty56ui78
      - name: If-Match
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  changed:
                    type: boolean
                  data:
                    type: object
                  changedFields:
                    type: array
                    items:
                      type: string
                  delivery:
                    type:
                    - object
                    - 'null'
                  warnings:
                    type: array
                    items:
                      type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
  /v1/api/manage/audit:
    get:
      operationId: audit.list
      summary: List Management API change history
      description: 'Reference: https://crosstrade.io/docs/api/management/audit/list-audit'
      externalDocs:
        url: https://crosstrade.io/docs/api/management/audit/list-audit
      tags:
      - 'Management: Audit'
      security:
      - bearerAuth: []
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          default: 50
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      - name: cursor
        in: query
        required: false
        schema:
          anyOf:
          - maxLength: 200
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Cursor
      - name: family
        in: query
        required: false
        schema:
          anyOf:
          - enum:
            - controls
            - kill_switch
            - news_lockout
            - nt8_connection_settings
            - nt8_connections
            - nt8_monitors
            - tradovate_monitors
            - nt8_copiers
            - tradovate_copiers
            - account_groups
            - tradovate_atm_templates
            type: string
          - type: 'null'
          default: null
          title: Family
      - name: resourceId
        in: query
        required: false
        schema:
          anyOf:
          - maxLength: 256
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Resourceid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                  meta:
                    type: object
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AuditEntry'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementError'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API bearer token from My Account. The trading API requires an active Pro subscription; the Management API
        (/v1/api/manage) requires Elite.
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
    ManagementError:
      type: object
      required:
      - success
      - error
      - detail
      - meta
      properties:
        success:
          const: false
        error:
          type: string
        detail:
          type: string
        fields:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              code:
                type: string
        retryAfter:
          type: integer
        policy:
          type: string
        meta:
          type: object
          properties:
            requestId:
              type: string
            etag:
              type: string
    TradingWindow:
      additionalProperties: false
      properties:
        days:
          items:
            enum:
            - sun
            - mon
            - tue
            - wed
            - thu
            - fri
            - sat
            type: string
          maxItems: 7
          title: Days
          type: array
        start:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5]\d$
            type: string
          - type: 'null'
          title: Start
        end:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5]\d$
            type: string
          - type: 'null'
          title: End
        closingOnlyAfter:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5]\d$
            type: string
          - type: 'null'
          title: Closingonlyafter
      required:
      - days
      - start
      - end
      - closingOnlyAfter
      title: TradingWindow
      type: object
    Controls:
      additionalProperties: false
      properties:
        killSwitch:
          title: Killswitch
          type: boolean
        closingOnly:
          title: Closingonly
          type: boolean
        tradingWindow:
          $ref: '#/components/schemas/TradingWindow'
        monitorLock:
          title: Monitorlock
          type: boolean
        enhancedClosingOnly:
          title: Enhancedclosingonly
          type: boolean
      required:
      - killSwitch
      - closingOnly
      - tradingWindow
      - monitorLock
      - enhancedClosingOnly
      title: Controls
      type: object
    TradingWindowPatch:
      additionalProperties: false
      properties:
        days:
          default: null
          items:
            enum:
            - sun
            - mon
            - tue
            - wed
            - thu
            - fri
            - sat
            type: string
          maxItems: 7
          title: Days
          type: array
        start:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5][05]$
            type: string
          - type: 'null'
          default: null
          title: Start
        end:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5][05]$
            type: string
          - type: 'null'
          default: null
          title: End
        closingOnlyAfter:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5][05]$
            type: string
          - type: 'null'
          default: null
          title: Closingonlyafter
      title: TradingWindowPatch
      type: object
    ControlsPatch:
      additionalProperties: false
      properties:
        closingOnly:
          default: null
          title: Closingonly
          type: boolean
        tradingWindow:
          $ref: '#/components/schemas/TradingWindowPatch'
          default: null
        monitorLock:
          default: null
          title: Monitorlock
          type: boolean
        enhancedClosingOnly:
          default: null
          title: Enhancedclosingonly
          type: boolean
      title: ControlsPatch
      type: object
    KillSwitchBody:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
      required:
      - enabled
      title: KillSwitchBody
      type: object
    NewsLockout:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
        impact:
          items:
            enum:
            - high
            - medium
            - low
            - holiday
            type: string
          title: Impact
          type: array
        currencies:
          items:
            pattern: ^[A-Z]{3}$
            type: string
          title: Currencies
          type: array
        preMinutes:
          maximum: 120
          minimum: 0
          title: Preminutes
          type: integer
        postMinutes:
          maximum: 120
          minimum: 0
          title: Postminutes
          type: integer
      required:
      - enabled
      - impact
      - currencies
      - preMinutes
      - postMinutes
      title: NewsLockout
      type: object
    NewsLockoutPatch:
      additionalProperties: false
      properties:
        enabled:
          default: null
          title: Enabled
          type: boolean
      title: NewsLockoutPatch
      type: object
    ConnectionToggle:
      additionalProperties: false
      properties:
        connection:
          maxLength: 128
          minLength: 1
          title: Connection
          type: string
        enabled:
          title: Enabled
          type: boolean
        timeoutSeconds:
          maximum: 3600
          minimum: 10
          title: Timeoutseconds
          type: integer
      required:
      - connection
      - enabled
      - timeoutSeconds
      title: ConnectionToggle
      type: object
    Flatten:
      additionalProperties: false
      properties:
        scope:
          enum:
          - none
          - all
          - strategy_accounts
          - specific
          title: Scope
          type: string
        accounts:
          items:
            type: string
          title: Accounts
          type: array
      required:
      - scope
      - accounts
      title: Flatten
      type: object
    Protection:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
        checkAllAccounts:
          title: Checkallaccounts
          type: boolean
        relatedProducts:
          items:
            items:
              type: string
            type: array
          title: Relatedproducts
          type: array
        relatedProductsSource:
          enum:
          - default
          - custom
          title: Relatedproductssource
          type: string
        groups:
          items:
            $ref: '#/components/schemas/ProtectionGroupView'
          title: Groups
          type: array
      required:
      - enabled
      - checkAllAccounts
      - relatedProducts
      - relatedProductsSource
      - groups
      title: Protection
      type: object
    ProtectionGroupView:
      additionalProperties: false
      properties:
        name:
          title: Name
          type: string
        accounts:
          items:
            type: string
          title: Accounts
          type: array
        relatedProducts:
          anyOf:
          - items:
              items:
                type: string
              type: array
            type: array
          - type: 'null'
          default: null
          title: Relatedproducts
      required:
      - name
      - accounts
      title: ProtectionGroupView
      type: object
    ReconnectActions:
      additionalProperties: false
      properties:
        restartStrategies:
          title: Restartstrategies
          type: boolean
        flatten:
          $ref: '#/components/schemas/Flatten'
      required:
      - restartStrategies
      - flatten
      title: ReconnectActions
      type: object
    Nt8Connection:
      additionalProperties: false
      properties:
        name: {title: Name, type: string}
        provider: {title: Provider, type: string}
        status: {title: Status, type: string}
        priceStatus: {title: Pricestatus, type: string}
        apiDisconnectIntent: {default: false, title: Apidisconnectintent, type: boolean}
        establishedAt: {anyOf: [{type: string}, {type: 'null'}], default: null, title: Establishedat}
        uptimeSeconds: {anyOf: [{minimum: 0, type: number}, {type: 'null'}], default: null, title: Uptimeseconds}
      required: [name, provider, status, priceStatus]
      title: Nt8Connection
      type: object
    Nt8ConnectionAction:
      additionalProperties: false
      properties:
        name: {title: Name, type: string}
        action: {enum: [connect, disconnect], title: Action, type: string}
        requestStatus: {const: acknowledged, title: Requeststatus, type: string}
      required: [name, action, requestStatus]
      title: Nt8ConnectionAction
      type: object
    Nt8ConnectionCommand:
      additionalProperties: false
      properties:
        name: {maxLength: 128, minLength: 1, title: Name, type: string}
      required: [name]
      title: Nt8ConnectionCommand
      type: object
    ConnectionSettings:
      additionalProperties: false
      properties:
        autoReconnect:
          items:
            $ref: '#/components/schemas/ConnectionToggle'
          title: Autoreconnect
          type: array
        dataWatchdog:
          items:
            $ref: '#/components/schemas/ConnectionToggle'
          title: Datawatchdog
          type: array
        reconnectActions:
          $ref: '#/components/schemas/ReconnectActions'
        opposingPositionProtection:
          $ref: '#/components/schemas/Protection'
      required:
      - autoReconnect
      - dataWatchdog
      - reconnectActions
      - opposingPositionProtection
      title: ConnectionSettings
      type: object
    FlattenPatch:
      additionalProperties: false
      properties:
        scope:
          default: null
          enum:
          - none
          - all
          - strategy_accounts
          - specific
          title: Scope
          type: string
        accounts:
          default: null
          items:
            maxLength: 256
            minLength: 1
            type: string
          maxItems: 200
          title: Accounts
          type: array
      title: FlattenPatch
      type: object
    ProtectionGroup:
      additionalProperties: false
      properties:
        name:
          maxLength: 64
          minLength: 1
          title: Name
          type: string
        accounts:
          items:
            maxLength: 256
            minLength: 1
            type: string
          maxItems: 200
          minItems: 1
          title: Accounts
          type: array
        relatedProducts:
          anyOf:
          - items:
              items:
                pattern: ^[A-Z0-9]{1,10}$
                type: string
              type: array
            maxItems: 200
            type: array
          - type: 'null'
          default: null
          title: Relatedproducts
      required:
      - name
      - accounts
      title: ProtectionGroup
      type: object
    ProtectionPatch:
      additionalProperties: false
      properties:
        enabled:
          default: null
          title: Enabled
          type: boolean
        checkAllAccounts:
          default: null
          title: Checkallaccounts
          type: boolean
        relatedProducts:
          anyOf:
          - const: default
            type: string
          - items:
              items:
                pattern: ^[A-Z0-9]{1,10}$
                type: string
              type: array
            maxItems: 200
            type: array
          default: null
          title: Relatedproducts
        groups:
          default: null
          items:
            $ref: '#/components/schemas/ProtectionGroup'
          maxItems: 50
          title: Groups
          type: array
      title: ProtectionPatch
      type: object
    ReconnectActionsPatch:
      additionalProperties: false
      properties:
        restartStrategies:
          default: null
          title: Restartstrategies
          type: boolean
        flatten:
          $ref: '#/components/schemas/FlattenPatch'
          default: null
      title: ReconnectActionsPatch
      type: object
    ConnectionSettingsPatch:
      additionalProperties: false
      properties:
        autoReconnect:
          default: null
          items:
            $ref: '#/components/schemas/ConnectionToggle'
          maxItems: 50
          title: Autoreconnect
          type: array
        dataWatchdog:
          default: null
          items:
            $ref: '#/components/schemas/ConnectionToggle'
          maxItems: 50
          title: Datawatchdog
          type: array
        reconnectActions:
          $ref: '#/components/schemas/ReconnectActionsPatch'
          default: null
        opposingPositionProtection:
          $ref: '#/components/schemas/ProtectionPatch'
          default: null
      title: ConnectionSettingsPatch
      type: object
    MinimumProfit:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
        trigger:
          maximum: 1000000000
          minimum: 0
          title: Trigger
          type: number
        threshold:
          maximum: 1000000000
          minimum: 0
          title: Threshold
          type: number
        flatten:
          title: Flatten
          type: boolean
        signals:
          enum:
          - allow
          - closing_only
          - block
          title: Signals
          type: string
      required:
      - enabled
      - trigger
      - threshold
      - flatten
      - signals
      title: MinimumProfit
      type: object
    NewsRule:
      additionalProperties: false
      properties:
        blockSignals:
          title: Blocksignals
          type: boolean
        flatten:
          title: Flatten
          type: boolean
      required:
      - blockSignals
      - flatten
      title: NewsRule
      type: object
    OnTrigger:
      additionalProperties: false
      properties:
        flatten:
          title: Flatten
          type: boolean
        signals:
          enum:
          - allow
          - closing_only
          - block
          title: Signals
          type: string
      required:
      - flatten
      - signals
      title: OnTrigger
      type: object
    Outlier:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
        sensitivity:
          enum:
          - low
          - medium
          - high
          title: Sensitivity
          type: string
      required:
      - enabled
      - sensitivity
      title: Outlier
      type: object
    TradingWindowItem:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
        start:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5]\d$
            type: string
          - type: 'null'
          title: Start
        end:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5]\d$
            type: string
          - type: 'null'
          title: End
        flattenAtEnd:
          title: Flattenatend
          type: boolean
      required:
      - enabled
      - start
      - end
      - flattenAtEnd
      title: TradingWindowItem
      type: object
    TrailingDrawdown:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
        basis:
          enum:
          - pnl
          - netliq
          title: Basis
          type: string
        amount:
          maximum: 1000000000
          minimum: 0
          title: Amount
          type: number
        unit:
          enum:
          - dollars
          - percent
          title: Unit
          type: string
        trigger:
          maximum: 1000000000
          minimum: 0
          title: Trigger
          type: number
        flatten:
          title: Flatten
          type: boolean
        signals:
          enum:
          - allow
          - closing_only
          - block
          title: Signals
          type: string
      required:
      - enabled
      - basis
      - amount
      - unit
      - trigger
      - flatten
      - signals
      title: TrailingDrawdown
      type: object
    Nt8Monitor:
      additionalProperties: false
      properties:
        account:
          title: Account
          type: string
        nickname:
          anyOf:
          - type: string
          - type: 'null'
          title: Nickname
        active:
          title: Active
          type: boolean
        state:
          enum:
          - active
          - paused
          - stopped
          - inactive
          title: State
          type: string
        stoppedReason:
          anyOf:
          - type: string
          - type: 'null'
          title: Stoppedreason
        includeUnrealized:
          title: Includeunrealized
          type: boolean
        dailyProfitTarget:
          minimum: 0
          title: Dailyprofittarget
          type: number
        dailyLossLimit:
          minimum: 0
          title: Dailylosslimit
          type: number
        onProfitTarget:
          $ref: '#/components/schemas/OnTrigger'
        onLossLimit:
          $ref: '#/components/schemas/OnTrigger'
        minimumProfit:
          $ref: '#/components/schemas/MinimumProfit'
        trailingDrawdown:
          $ref: '#/components/schemas/TrailingDrawdown'
        accountFloor:
          anyOf:
          - exclusiveMinimum: 0
            maximum: 1000000000
            type: number
          - type: 'null'
          title: Accountfloor
        autoFlattenTime:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5]\d$
            type: string
          - type: 'null'
          title: Autoflattentime
        tradingWindows:
          items:
            $ref: '#/components/schemas/TradingWindowItem'
          maxItems: 5
          title: Tradingwindows
          type: array
        newsLockout:
          $ref: '#/components/schemas/NewsRule'
        blockSignals:
          title: Blocksignals
          type: boolean
        closingOnly:
          title: Closingonly
          type: boolean
        switchesLocked:
          title: Switcheslocked
          type: boolean
        created:
          anyOf:
          - type: string
          - type: 'null'
          title: Created
        updated:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated
        pnlMode:
          enum:
          - standard
          - hybrid
          - unrealized
          title: Pnlmode
          type: string
        positionProfitTarget:
          minimum: 0
          title: Positionprofittarget
          type: number
        positionLossLimit:
          minimum: 0
          title: Positionlosslimit
          type: number
        includeCommissions:
          title: Includecommissions
          type: boolean
        cleanSessionProtection:
          title: Cleansessionprotection
          type: boolean
        outlierProtection:
          $ref: '#/components/schemas/Outlier'
      required:
      - account
      - nickname
      - active
      - state
      - stoppedReason
      - includeUnrealized
      - dailyProfitTarget
      - dailyLossLimit
      - onProfitTarget
      - onLossLimit
      - minimumProfit
      - trailingDrawdown
      - accountFloor
      - autoFlattenTime
      - tradingWindows
      - newsLockout
      - blockSignals
      - closingOnly
      - switchesLocked
      - created
      - updated
      - pnlMode
      - positionProfitTarget
      - positionLossLimit
      - includeCommissions
      - cleanSessionProtection
      - outlierProtection
      title: Nt8Monitor
      type: object
    MinimumProfitPatch:
      additionalProperties: false
      properties:
        enabled:
          default: null
          title: Enabled
          type: boolean
        trigger:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Trigger
          type: number
        threshold:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Threshold
          type: number
        flatten:
          default: null
          title: Flatten
          type: boolean
        signals:
          default: null
          enum:
          - allow
          - closing_only
          - block
          title: Signals
          type: string
      title: MinimumProfitPatch
      type: object
    NewsRulePatch:
      additionalProperties: false
      properties:
        blockSignals:
          default: null
          title: Blocksignals
          type: boolean
        flatten:
          default: null
          title: Flatten
          type: boolean
      title: NewsRulePatch
      type: object
    OnTriggerPatch:
      additionalProperties: false
      properties:
        flatten:
          default: null
          title: Flatten
          type: boolean
        signals:
          default: null
          enum:
          - allow
          - closing_only
          - block
          title: Signals
          type: string
      title: OnTriggerPatch
      type: object
    OutlierPatch:
      additionalProperties: false
      properties:
        enabled:
          default: null
          title: Enabled
          type: boolean
        sensitivity:
          default: null
          enum:
          - low
          - medium
          - high
          title: Sensitivity
          type: string
      title: OutlierPatch
      type: object
    TradingWindowInput:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
        start:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5][05]$
            type: string
          - type: 'null'
          title: Start
        end:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5][05]$
            type: string
          - type: 'null'
          title: End
        flattenAtEnd:
          title: Flattenatend
          type: boolean
      required:
      - enabled
      - start
      - end
      - flattenAtEnd
      title: TradingWindowInput
      type: object
    TrailingDrawdownPatch:
      additionalProperties: false
      properties:
        enabled:
          default: null
          title: Enabled
          type: boolean
        basis:
          default: null
          enum:
          - pnl
          - netliq
          title: Basis
          type: string
        amount:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Amount
          type: number
        unit:
          default: null
          enum:
          - dollars
          - percent
          title: Unit
          type: string
        trigger:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Trigger
          type: number
        flatten:
          default: null
          title: Flatten
          type: boolean
        signals:
          default: null
          enum:
          - allow
          - closing_only
          - block
          title: Signals
          type: string
      title: TrailingDrawdownPatch
      type: object
    Nt8MonitorCreate:
      additionalProperties: false
      properties:
        nickname:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Nickname
        active:
          default: null
          title: Active
          type: boolean
        includeUnrealized:
          default: null
          title: Includeunrealized
          type: boolean
        dailyProfitTarget:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Dailyprofittarget
          type: number
        dailyLossLimit:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Dailylosslimit
          type: number
        onProfitTarget:
          $ref: '#/components/schemas/OnTriggerPatch'
          default: null
        onLossLimit:
          $ref: '#/components/schemas/OnTriggerPatch'
          default: null
        minimumProfit:
          $ref: '#/components/schemas/MinimumProfitPatch'
          default: null
        trailingDrawdown:
          $ref: '#/components/schemas/TrailingDrawdownPatch'
          default: null
        accountFloor:
          anyOf:
          - exclusiveMinimum: 0
            maximum: 1000000000
            type: number
          - type: 'null'
          default: null
          title: Accountfloor
        autoFlattenTime:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5][05]$
            type: string
          - type: 'null'
          default: null
          title: Autoflattentime
        tradingWindows:
          default: null
          items:
            $ref: '#/components/schemas/TradingWindowInput'
          maxItems: 5
          title: Tradingwindows
          type: array
        newsLockout:
          $ref: '#/components/schemas/NewsRulePatch'
          default: null
        blockSignals:
          default: null
          title: Blocksignals
          type: boolean
        closingOnly:
          default: null
          title: Closingonly
          type: boolean
        switchesLocked:
          default: null
          title: Switcheslocked
          type: boolean
        pnlMode:
          default: null
          enum:
          - standard
          - hybrid
          - unrealized
          title: Pnlmode
          type: string
        positionProfitTarget:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Positionprofittarget
          type: number
        positionLossLimit:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Positionlosslimit
          type: number
        includeCommissions:
          default: null
          title: Includecommissions
          type: boolean
        cleanSessionProtection:
          default: null
          title: Cleansessionprotection
          type: boolean
        outlierProtection:
          $ref: '#/components/schemas/OutlierPatch'
          default: null
        account:
          maxLength: 256
          minLength: 1
          title: Account
          type: string
      required:
      - account
      title: Nt8MonitorCreate
      type: object
    Nt8MonitorPatch:
      additionalProperties: false
      properties:
        nickname:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Nickname
        active:
          default: null
          title: Active
          type: boolean
        includeUnrealized:
          default: null
          title: Includeunrealized
          type: boolean
        dailyProfitTarget:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Dailyprofittarget
          type: number
        dailyLossLimit:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Dailylosslimit
          type: number
        onProfitTarget:
          $ref: '#/components/schemas/OnTriggerPatch'
          default: null
        onLossLimit:
          $ref: '#/components/schemas/OnTriggerPatch'
          default: null
        minimumProfit:
          $ref: '#/components/schemas/MinimumProfitPatch'
          default: null
        trailingDrawdown:
          $ref: '#/components/schemas/TrailingDrawdownPatch'
          default: null
        accountFloor:
          anyOf:
          - exclusiveMinimum: 0
            maximum: 1000000000
            type: number
          - type: 'null'
          default: null
          title: Accountfloor
        autoFlattenTime:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5][05]$
            type: string
          - type: 'null'
          default: null
          title: Autoflattentime
        tradingWindows:
          default: null
          items:
            $ref: '#/components/schemas/TradingWindowInput'
          maxItems: 5
          title: Tradingwindows
          type: array
        newsLockout:
          $ref: '#/components/schemas/NewsRulePatch'
          default: null
        blockSignals:
          default: null
          title: Blocksignals
          type: boolean
        closingOnly:
          default: null
          title: Closingonly
          type: boolean
        switchesLocked:
          default: null
          title: Switcheslocked
          type: boolean
        pnlMode:
          default: null
          enum:
          - standard
          - hybrid
          - unrealized
          title: Pnlmode
          type: string
        positionProfitTarget:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Positionprofittarget
          type: number
        positionLossLimit:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Positionlosslimit
          type: number
        includeCommissions:
          default: null
          title: Includecommissions
          type: boolean
        cleanSessionProtection:
          default: null
          title: Cleansessionprotection
          type: boolean
        outlierProtection:
          $ref: '#/components/schemas/OutlierPatch'
          default: null
      title: Nt8MonitorPatch
      type: object
    EmptyBody:
      additionalProperties: false
      properties: {}
      title: EmptyBody
      type: object
    TvMonitor:
      additionalProperties: false
      properties:
        account:
          title: Account
          type: string
        nickname:
          anyOf:
          - type: string
          - type: 'null'
          title: Nickname
        active:
          title: Active
          type: boolean
        state:
          enum:
          - active
          - paused
          - stopped
          - inactive
          title: State
          type: string
        stoppedReason:
          anyOf:
          - type: string
          - type: 'null'
          title: Stoppedreason
        includeUnrealized:
          title: Includeunrealized
          type: boolean
        dailyProfitTarget:
          minimum: 0
          title: Dailyprofittarget
          type: number
        dailyLossLimit:
          minimum: 0
          title: Dailylosslimit
          type: number
        onProfitTarget:
          $ref: '#/components/schemas/OnTrigger'
        onLossLimit:
          $ref: '#/components/schemas/OnTrigger'
        minimumProfit:
          $ref: '#/components/schemas/MinimumProfit'
        trailingDrawdown:
          $ref: '#/components/schemas/TrailingDrawdown'
        accountFloor:
          anyOf:
          - exclusiveMinimum: 0
            maximum: 1000000000
            type: number
          - type: 'null'
          title: Accountfloor
        autoFlattenTime:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5]\d$
            type: string
          - type: 'null'
          title: Autoflattentime
        tradingWindows:
          items:
            $ref: '#/components/schemas/TradingWindowItem'
          maxItems: 5
          title: Tradingwindows
          type: array
        newsLockout:
          $ref: '#/components/schemas/NewsRule'
        blockSignals:
          title: Blocksignals
          type: boolean
        closingOnly:
          title: Closingonly
          type: boolean
        switchesLocked:
          title: Switcheslocked
          type: boolean
        created:
          anyOf:
          - type: string
          - type: 'null'
          title: Created
        updated:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated
        pnlMode:
          enum:
          - standard
          - unrealized
          title: Pnlmode
          type: string
        environment:
          anyOf:
          - enum:
            - demo
            - live
            type: string
          - type: 'null'
          title: Environment
      required:
      - account
      - nickname
      - active
      - state
      - stoppedReason
      - includeUnrealized
      - dailyProfitTarget
      - dailyLossLimit
      - onProfitTarget
      - onLossLimit
      - minimumProfit
      - trailingDrawdown
      - accountFloor
      - autoFlattenTime
      - tradingWindows
      - newsLockout
      - blockSignals
      - closingOnly
      - switchesLocked
      - created
      - updated
      - pnlMode
      - environment
      title: TvMonitor
      type: object
    TvMonitorCreate:
      additionalProperties: false
      properties:
        nickname:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Nickname
        active:
          default: null
          title: Active
          type: boolean
        includeUnrealized:
          default: null
          title: Includeunrealized
          type: boolean
        dailyProfitTarget:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Dailyprofittarget
          type: number
        dailyLossLimit:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Dailylosslimit
          type: number
        onProfitTarget:
          $ref: '#/components/schemas/OnTriggerPatch'
          default: null
        onLossLimit:
          $ref: '#/components/schemas/OnTriggerPatch'
          default: null
        minimumProfit:
          $ref: '#/components/schemas/MinimumProfitPatch'
          default: null
        trailingDrawdown:
          $ref: '#/components/schemas/TrailingDrawdownPatch'
          default: null
        accountFloor:
          anyOf:
          - exclusiveMinimum: 0
            maximum: 1000000000
            type: number
          - type: 'null'
          default: null
          title: Accountfloor
        autoFlattenTime:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5][05]$
            type: string
          - type: 'null'
          default: null
          title: Autoflattentime
        tradingWindows:
          default: null
          items:
            $ref: '#/components/schemas/TradingWindowInput'
          maxItems: 5
          title: Tradingwindows
          type: array
        newsLockout:
          $ref: '#/components/schemas/NewsRulePatch'
          default: null
        blockSignals:
          default: null
          title: Blocksignals
          type: boolean
        closingOnly:
          default: null
          title: Closingonly
          type: boolean
        switchesLocked:
          default: null
          title: Switcheslocked
          type: boolean
        pnlMode:
          default: null
          enum:
          - standard
          - unrealized
          title: Pnlmode
          type: string
        account:
          maxLength: 256
          minLength: 1
          title: Account
          type: string
      required:
      - account
      title: TvMonitorCreate
      type: object
    TvMonitorPatch:
      additionalProperties: false
      properties:
        nickname:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Nickname
        active:
          default: null
          title: Active
          type: boolean
        includeUnrealized:
          default: null
          title: Includeunrealized
          type: boolean
        dailyProfitTarget:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Dailyprofittarget
          type: number
        dailyLossLimit:
          default: null
          maximum: 1000000000
          minimum: 0
          title: Dailylosslimit
          type: number
        onProfitTarget:
          $ref: '#/components/schemas/OnTriggerPatch'
          default: null
        onLossLimit:
          $ref: '#/components/schemas/OnTriggerPatch'
          default: null
        minimumProfit:
          $ref: '#/components/schemas/MinimumProfitPatch'
          default: null
        trailingDrawdown:
          $ref: '#/components/schemas/TrailingDrawdownPatch'
          default: null
        accountFloor:
          anyOf:
          - exclusiveMinimum: 0
            maximum: 1000000000
            type: number
          - type: 'null'
          default: null
          title: Accountfloor
        autoFlattenTime:
          anyOf:
          - pattern: ^([01]\d|2[0-3]):[0-5][05]$
            type: string
          - type: 'null'
          default: null
          title: Autoflattentime
        tradingWindows:
          default: null
          items:
            $ref: '#/components/schemas/TradingWindowInput'
          maxItems: 5
          title: Tradingwindows
          type: array
        newsLockout:
          $ref: '#/components/schemas/NewsRulePatch'
          default: null
        blockSignals:
          default: null
          title: Blocksignals
          type: boolean
        closingOnly:
          default: null
          title: Closingonly
          type: boolean
        switchesLocked:
          default: null
          title: Switcheslocked
          type: boolean
        pnlMode:
          default: null
          enum:
          - standard
          - unrealized
          title: Pnlmode
          type: string
      title: TvMonitorPatch
      type: object
    FollowerOut:
      additionalProperties: false
      properties:
        account:
          title: Account
          type: string
        ratio:
          anyOf:
          - exclusiveMinimum: 0
            maximum: 1000
            type: number
          - type: 'null'
          default: null
          title: Ratio
        environment:
          anyOf:
          - enum:
            - demo
            - live
            type: string
          - type: 'null'
          default: null
          title: Environment
      required:
      - account
      title: FollowerOut
      type: object
    Nt8AutoSync:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
        intervalSeconds:
          title: Intervalseconds
          type: integer
      required:
      - enabled
      - intervalSeconds
      title: Nt8AutoSync
      type: object
    Sizing:
      additionalProperties: false
      properties:
        method:
          enum:
          - ratio
          - fixed
          title: Method
          type: string
        ratio:
          exclusiveMinimum: 0
          maximum: 1000
          title: Ratio
          type: number
        quantity:
          anyOf:
          - type: integer
          - type: 'null'
          title: Quantity
        maxQuantity:
          anyOf:
          - type: integer
          - type: 'null'
          title: Maxquantity
      required:
      - method
      - ratio
      - quantity
      - maxQuantity
      title: Sizing
      type: object
    SyncCorrection:
      additionalProperties: false
      properties:
        cooldownSeconds:
          title: Cooldownseconds
          type: integer
        maxAttempts:
          title: Maxattempts
          type: integer
      required:
      - cooldownSeconds
      - maxAttempts
      title: SyncCorrection
      type: object
    Nt8Copier:
      additionalProperties: false
      properties:
        id:
          title: Id
          type: string
        nickname:
          anyOf:
          - type: string
          - type: 'null'
          title: Nickname
        active:
          title: Active
          type: boolean
        leader:
          title: Leader
          type: string
        type:
          enum:
          - single
          - group
          title: Type
          type: string
        groupName:
          anyOf:
          - type: string
          - type: 'null'
          title: Groupname
        followers:
          items:
            $ref: '#/components/schemas/FollowerOut'
          title: Followers
          type: array
        sizing:
          $ref: '#/components/schemas/Sizing'
        inverse:
          title: Inverse
          type: boolean
        fillsOnly:
          title: Fillsonly
          type: boolean
        instruments:
          items:
            type: string
          title: Instruments
          type: array
        symbolReplacements:
          additionalProperties:
            type: string
          title: Symbolreplacements
          type: object
        stealth:
          title: Stealth
          type: boolean
        tandem:
          title: Tandem
          type: boolean
        syncCorrection:
          $ref: '#/components/schemas/SyncCorrection'
        created:
          anyOf:
          - type: string
          - type: 'null'
          title: Created
        updated:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated
        mode:
          enum:
          - order
          - execution
          title: Mode
          type: string
        autoSync:
          $ref: '#/components/schemas/Nt8AutoSync'
        reconnectDelayMs:
          title: Reconnectdelayms
          type: integer
        strategyTagMode:
          enum:
          - override
          - skip
          title: Strategytagmode
          type: string
      required:
      - id
      - nickname
      - active
      - leader
      - type
      - groupName
      - followers
      - sizing
      - inverse
      - fillsOnly
      - instruments
      - symbolReplacements
      - stealth
      - tandem
      - syncCorrection
      - created
      - updated
      - mode
      - autoSync
      - reconnectDelayMs
      - strategyTagMode
      title: Nt8Copier
      type: object
    Follower:
      additionalProperties: false
      properties:
        account:
          maxLength: 256
          minLength: 1
          title: Account
          type: string
        ratio:
          anyOf:
          - maximum: 10
            minimum: 0.25
            type: number
          - type: 'null'
          default: null
          title: Ratio
      required:
      - account
      title: Follower
      type: object
    Nt8AutoSyncPatch:
      additionalProperties: false
      properties:
        enabled:
          default: null
          title: Enabled
          type: boolean
        intervalSeconds:
          default: null
          maximum: 900
          minimum: 3
          title: Intervalseconds
          type: integer
      title: Nt8AutoSyncPatch
      type: object
    Nt8SizingPatch:
      additionalProperties: false
      properties:
        method:
          const: ratio
          default: null
          title: Method
          type: string
        ratio:
          default: null
          maximum: 10
          minimum: 0.25
          title: Ratio
          type: number
        maxQuantity:
          anyOf:
          - maximum: 10000
            minimum: 1
            type: integer
          - type: 'null'
          default: null
          title: Maxquantity
      title: Nt8SizingPatch
      type: object
    Nt8SyncCorrectionPatch:
      additionalProperties: false
      properties:
        cooldownSeconds:
          default: null
          maximum: 86400
          minimum: 60
          title: Cooldownseconds
          type: integer
        maxAttempts:
          default: null
          maximum: 10
          minimum: 1
          title: Maxattempts
          type: integer
      title: Nt8SyncCorrectionPatch
      type: object
    Nt8CopierCreate:
      additionalProperties: false
      properties:
        nickname:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Nickname
        active:
          default: null
          title: Active
          type: boolean
        type:
          enum:
          - single
          - group
          title: Type
          type: string
        leader:
          maxLength: 256
          minLength: 1
          title: Leader
          type: string
        groupName:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Groupname
        followers:
          items:
            $ref: '#/components/schemas/Follower'
          maxItems: 200
          minItems: 1
          title: Followers
          type: array
        inverse:
          default: null
          title: Inverse
          type: boolean
        fillsOnly:
          default: null
          title: Fillsonly
          type: boolean
        instruments:
          default: null
          items:
            pattern: ^(\*|[A-Z0-9]{1,10})$
            type: string
          maxItems: 200
          minItems: 1
          title: Instruments
          type: array
        symbolReplacements:
          default: null
          maxProperties: 200
          patternProperties:
            ^[A-Z0-9]{1,10}$:
              pattern: ^[A-Z0-9]{1,10}$
              type: string
          title: Symbolreplacements
          type: object
        stealth:
          default: null
          title: Stealth
          type: boolean
        tandem:
          default: null
          title: Tandem
          type: boolean
        mode:
          default: null
          enum:
          - order
          - execution
          title: Mode
          type: string
        sizing:
          $ref: '#/components/schemas/Nt8SizingPatch'
          default: null
        autoSync:
          $ref: '#/components/schemas/Nt8AutoSyncPatch'
          default: null
        syncCorrection:
          $ref: '#/components/schemas/Nt8SyncCorrectionPatch'
          default: null
        reconnectDelayMs:
          default: null
          maximum: 3600000
          minimum: 0
          title: Reconnectdelayms
          type: integer
        strategyTagMode:
          default: null
          enum:
          - override
          - skip
          title: Strategytagmode
          type: string
      required:
      - type
      - leader
      - followers
      title: Nt8CopierCreate
      type: object
    Nt8CopierPatch:
      additionalProperties: false
      properties:
        nickname:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Nickname
        active:
          default: null
          title: Active
          type: boolean
        type:
          default: null
          enum:
          - single
          - group
          title: Type
          type: string
        leader:
          default: null
          maxLength: 256
          minLength: 1
          title: Leader
          type: string
        groupName:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Groupname
        followers:
          default: null
          items:
            $ref: '#/components/schemas/Follower'
          maxItems: 200
          minItems: 1
          title: Followers
          type: array
        inverse:
          default: null
          title: Inverse
          type: boolean
        fillsOnly:
          default: null
          title: Fillsonly
          type: boolean
        instruments:
          default: null
          items:
            pattern: ^(\*|[A-Z0-9]{1,10})$
            type: string
          maxItems: 200
          minItems: 1
          title: Instruments
          type: array
        symbolReplacements:
          default: null
          maxProperties: 200
          patternProperties:
            ^[A-Z0-9]{1,10}$:
              pattern: ^[A-Z0-9]{1,10}$
              type: string
          title: Symbolreplacements
          type: object
        stealth:
          default: null
          title: Stealth
          type: boolean
        tandem:
          default: null
          title: Tandem
          type: boolean
        mode:
          default: null
          enum:
          - order
          - execution
          title: Mode
          type: string
        sizing:
          $ref: '#/components/schemas/Nt8SizingPatch'
          default: null
        autoSync:
          $ref: '#/components/schemas/Nt8AutoSyncPatch'
          default: null
        syncCorrection:
          $ref: '#/components/schemas/Nt8SyncCorrectionPatch'
          default: null
        reconnectDelayMs:
          default: null
          maximum: 3600000
          minimum: 0
          title: Reconnectdelayms
          type: integer
        strategyTagMode:
          default: null
          enum:
          - override
          - skip
          title: Strategytagmode
          type: string
      title: Nt8CopierPatch
      type: object
    TvAutoSync:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
      required:
      - enabled
      title: TvAutoSync
      type: object
    TvCopier:
      additionalProperties: false
      properties:
        id:
          title: Id
          type: string
        nickname:
          anyOf:
          - type: string
          - type: 'null'
          title: Nickname
        active:
          title: Active
          type: boolean
        leader:
          title: Leader
          type: string
        type:
          enum:
          - single
          - group
          title: Type
          type: string
        groupName:
          anyOf:
          - type: string
          - type: 'null'
          title: Groupname
        followers:
          items:
            $ref: '#/components/schemas/FollowerOut'
          title: Followers
          type: array
        sizing:
          $ref: '#/components/schemas/Sizing'
        inverse:
          title: Inverse
          type: boolean
        fillsOnly:
          title: Fillsonly
          type: boolean
        instruments:
          items:
            type: string
          title: Instruments
          type: array
        symbolReplacements:
          additionalProperties:
            type: string
          title: Symbolreplacements
          type: object
        stealth:
          title: Stealth
          type: boolean
        tandem:
          title: Tandem
          type: boolean
        syncCorrection:
          $ref: '#/components/schemas/SyncCorrection'
        created:
          anyOf:
          - type: string
          - type: 'null'
          title: Created
        updated:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated
        mode:
          enum:
          - signal
          - execution
          - order
          title: Mode
          type: string
        autoSync:
          $ref: '#/components/schemas/TvAutoSync'
      required:
      - id
      - nickname
      - active
      - leader
      - type
      - groupName
      - followers
      - sizing
      - inverse
      - fillsOnly
      - instruments
      - symbolReplacements
      - stealth
      - tandem
      - syncCorrection
      - created
      - updated
      - mode
      - autoSync
      title: TvCopier
      type: object
    TvAutoSyncPatch:
      additionalProperties: false
      properties:
        enabled:
          default: null
          title: Enabled
          type: boolean
      title: TvAutoSyncPatch
      type: object
    TvSizingPatch:
      additionalProperties: false
      properties:
        method:
          default: null
          enum:
          - ratio
          - fixed
          title: Method
          type: string
        ratio:
          default: null
          maximum: 10
          minimum: 0.25
          title: Ratio
          type: number
        quantity:
          anyOf:
          - maximum: 10000
            minimum: 1
            type: integer
          - type: 'null'
          default: null
          title: Quantity
        maxQuantity:
          anyOf:
          - maximum: 10000
            minimum: 1
            type: integer
          - type: 'null'
          default: null
          title: Maxquantity
      title: TvSizingPatch
      type: object
    TvSyncCorrectionPatch:
      additionalProperties: false
      properties:
        cooldownSeconds:
          default: null
          maximum: 86400
          minimum: 30
          title: Cooldownseconds
          type: integer
        maxAttempts:
          default: null
          maximum: 10
          minimum: 1
          title: Maxattempts
          type: integer
      title: TvSyncCorrectionPatch
      type: object
    TvCopierCreate:
      additionalProperties: false
      properties:
        nickname:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Nickname
        active:
          default: null
          title: Active
          type: boolean
        type:
          enum:
          - single
          - group
          title: Type
          type: string
        leader:
          maxLength: 256
          minLength: 1
          title: Leader
          type: string
        groupName:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Groupname
        followers:
          items:
            $ref: '#/components/schemas/Follower'
          maxItems: 200
          minItems: 1
          title: Followers
          type: array
        inverse:
          default: null
          title: Inverse
          type: boolean
        fillsOnly:
          default: null
          title: Fillsonly
          type: boolean
        instruments:
          default: null
          items:
            pattern: ^(\*|[A-Z0-9]{1,10})$
            type: string
          maxItems: 200
          minItems: 1
          title: Instruments
          type: array
        symbolReplacements:
          default: null
          maxProperties: 200
          patternProperties:
            ^[A-Z0-9]{1,10}$:
              pattern: ^[A-Z0-9]{1,10}$
              type: string
          title: Symbolreplacements
          type: object
        stealth:
          default: null
          title: Stealth
          type: boolean
        tandem:
          default: null
          title: Tandem
          type: boolean
        mode:
          default: null
          enum:
          - signal
          - execution
          - order
          title: Mode
          type: string
        sizing:
          $ref: '#/components/schemas/TvSizingPatch'
          default: null
        autoSync:
          $ref: '#/components/schemas/TvAutoSyncPatch'
          default: null
        syncCorrection:
          $ref: '#/components/schemas/TvSyncCorrectionPatch'
          default: null
      required:
      - type
      - leader
      - followers
      title: TvCopierCreate
      type: object
    TvCopierPatch:
      additionalProperties: false
      properties:
        nickname:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Nickname
        active:
          default: null
          title: Active
          type: boolean
        type:
          default: null
          enum:
          - single
          - group
          title: Type
          type: string
        leader:
          default: null
          maxLength: 256
          minLength: 1
          title: Leader
          type: string
        groupName:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Groupname
        followers:
          default: null
          items:
            $ref: '#/components/schemas/Follower'
          maxItems: 200
          minItems: 1
          title: Followers
          type: array
        inverse:
          default: null
          title: Inverse
          type: boolean
        fillsOnly:
          default: null
          title: Fillsonly
          type: boolean
        instruments:
          default: null
          items:
            pattern: ^(\*|[A-Z0-9]{1,10})$
            type: string
          maxItems: 200
          minItems: 1
          title: Instruments
          type: array
        symbolReplacements:
          default: null
          maxProperties: 200
          patternProperties:
            ^[A-Z0-9]{1,10}$:
              pattern: ^[A-Z0-9]{1,10}$
              type: string
          title: Symbolreplacements
          type: object
        stealth:
          default: null
          title: Stealth
          type: boolean
        tandem:
          default: null
          title: Tandem
          type: boolean
        mode:
          default: null
          enum:
          - signal
          - execution
          - order
          title: Mode
          type: string
        sizing:
          $ref: '#/components/schemas/TvSizingPatch'
          default: null
        autoSync:
          $ref: '#/components/schemas/TvAutoSyncPatch'
          default: null
        syncCorrection:
          $ref: '#/components/schemas/TvSyncCorrectionPatch'
          default: null
      title: TvCopierPatch
      type: object
    Group:
      additionalProperties: false
      properties:
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        destination:
          enum:
          - nt8
          - tradovate
          title: Destination
          type: string
        accounts:
          items:
            type: string
          title: Accounts
          type: array
        created:
          anyOf:
          - type: string
          - type: 'null'
          title: Created
        updated:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated
      required:
      - id
      - name
      - destination
      - accounts
      - created
      - updated
      title: Group
      type: object
    GroupCreate:
      additionalProperties: false
      properties:
        name:
          pattern: ^[A-Za-z0-9](?:[A-Za-z0-9 _.-]{0,62}[A-Za-z0-9_.-])?$
          title: Name
          type: string
        destination:
          enum:
          - nt8
          - tradovate
          title: Destination
          type: string
        accounts:
          items:
            maxLength: 256
            minLength: 1
            type: string
          maxItems: 100
          minItems: 1
          title: Accounts
          type: array
      required:
      - name
      - destination
      - accounts
      title: GroupCreate
      type: object
    GroupPatch:
      additionalProperties: false
      properties:
        name:
          default: null
          pattern: ^[A-Za-z0-9](?:[A-Za-z0-9 _.-]{0,62}[A-Za-z0-9_.-])?$
          title: Name
          type: string
        accounts:
          default: null
          items:
            maxLength: 256
            minLength: 1
            type: string
          maxItems: 100
          minItems: 1
          title: Accounts
          type: array
      title: GroupPatch
      type: object
    AtmConfig:
      additionalProperties: false
      properties:
        targets:
          anyOf:
          - type: string
          - type: 'null'
          title: Targets
        stops:
          anyOf:
          - type: string
          - type: 'null'
          title: Stops
        quantities:
          anyOf:
          - type: string
          - type: 'null'
          title: Quantities
        trail:
          anyOf:
          - type: string
          - type: 'null'
          title: Trail
        trailTrigger:
          anyOf:
          - type: string
          - type: 'null'
          title: Trailtrigger
        trailOffset:
          anyOf:
          - type: string
          - type: 'null'
          title: Trailoffset
        breakeven:
          anyOf:
          - type: string
          - type: 'null'
          title: Breakeven
        breakevenOffset:
          anyOf:
          - type: string
          - type: 'null'
          title: Breakevenoffset
      required:
      - targets
      - stops
      - quantities
      - trail
      - trailTrigger
      - trailOffset
      - breakeven
      - breakevenOffset
      title: AtmConfig
      type: object
    AtmTemplate:
      additionalProperties: false
      properties:
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        active:
          title: Active
          type: boolean
        config:
          $ref: '#/components/schemas/AtmConfig'
        created:
          anyOf:
          - type: string
          - type: 'null'
          title: Created
        updated:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated
      required:
      - id
      - name
      - description
      - active
      - config
      - created
      - updated
      title: AtmTemplate
      type: object
    AtmConfigPatch:
      additionalProperties: false
      properties:
        targets:
          anyOf:
          - maxLength: 200
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Targets
        stops:
          anyOf:
          - maxLength: 200
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Stops
        quantities:
          anyOf:
          - maxLength: 200
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Quantities
        trail:
          anyOf:
          - maxLength: 200
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Trail
        trailTrigger:
          anyOf:
          - maxLength: 200
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Trailtrigger
        trailOffset:
          anyOf:
          - maxLength: 200
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Trailoffset
        breakeven:
          anyOf:
          - maxLength: 200
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Breakeven
        breakevenOffset:
          anyOf:
          - maxLength: 200
            minLength: 1
            type: string
          - type: 'null'
          default: null
          title: Breakevenoffset
      title: AtmConfigPatch
      type: object
    AtmCreate:
      additionalProperties: false
      properties:
        name:
          pattern: ^[A-Za-z0-9](?:[A-Za-z0-9 _.-]{0,62}[A-Za-z0-9_.-])?$
          title: Name
          type: string
        description:
          anyOf:
          - maxLength: 500
            type: string
          - type: 'null'
          default: null
          title: Description
        active:
          default: null
          title: Active
          type: boolean
        config:
          $ref: '#/components/schemas/AtmConfigPatch'
      required:
      - name
      - config
      title: AtmCreate
      type: object
    AtmPatch:
      additionalProperties: false
      properties:
        name:
          default: null
          pattern: ^[A-Za-z0-9](?:[A-Za-z0-9 _.-]{0,62}[A-Za-z0-9_.-])?$
          title: Name
          type: string
        description:
          anyOf:
          - maxLength: 500
            type: string
          - type: 'null'
          default: null
          title: Description
        active:
          default: null
          title: Active
          type: boolean
        config:
          $ref: '#/components/schemas/AtmConfigPatch'
          default: null
      title: AtmPatch
      type: object
    AuditResource:
      additionalProperties: false
      properties:
        type:
          title: Type
          type: string
        broker:
          title: Broker
          type: string
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
      required:
      - type
      - broker
      - id
      title: AuditResource
      type: object
    AuditEntry:
      additionalProperties: false
      properties:
        id:
          title: Id
          type: string
        time:
          title: Time
          type: string
        requestId:
          title: Requestid
          type: string
        operation:
          title: Operation
          type: string
        action:
          title: Action
          type: string
        resource:
          $ref: '#/components/schemas/AuditResource'
        changes:
          items:
            additionalProperties: true
            type: object
          title: Changes
          type: array
      required:
      - id
      - time
      - requestId
      - operation
      - action
      - resource
      - changes
      title: AuditEntry
      type: object
tags:
- name: Accounts
  description: Account management and queries
- name: Positions
  description: Position management — list, close, flatten, reverse
- name: Orders
  description: Order placement, modification, and cancellation
- name: Strategies
  description: Strategy management
- name: Executions
  description: Execution history and queries
- name: Market Data
  description: Quotes, bars, subscriptions, and streaming
- name: WebSocket API
  description: Real-time streaming WebSocket API
- name: Tradovate Status
  description: Tradovate link status
- name: Tradovate Accounts
  description: Tradovate accounts, snapshots, and watermarks
- name: Tradovate Positions
  description: Tradovate positions — list, close, flatten, reverse
- name: Tradovate Orders
  description: Tradovate order placement, modification, and cancellation
- name: Tradovate Fills
  description: Tradovate fill history
- name: Tradovate Balances
  description: Tradovate cash balances and margin snapshots
- name: Tradovate Reference
  description: Tradovate contract and exchange reference data
- name: 'Management: Discovery'
  description: Which Management API areas this token can use, and its rate-limit budgets
- name: 'Management: Controls'
  description: 'Global controls: Closing Only, trading window, Monitor Lock'
- name: 'Management: Kill Switch'
  description: The master kill switch
- name: 'Management: News Lockout'
  description: Block opening signals around economic events
- name: 'Management: NT8 Connection Settings'
  description: Auto-reconnect, data watchdog, reconnect actions, opposing-position protection
- name: 'Management: NT8 Connections'
  description: Live NinjaTrader connection status, connect and disconnect; requires the add-on online
- name: 'Management: NT8 Monitors'
  description: NinjaTrader 8 Account Manager monitors
- name: 'Management: Tradovate Monitors'
  description: Tradovate Account Manager monitors
- name: 'Management: NT8 Copiers'
  description: NinjaTrader 8 trade copiers
- name: 'Management: Tradovate Copiers'
  description: Tradovate trade copiers
- name: 'Management: Account Groups'
  description: Webhook account groups
- name: 'Management: Tradovate ATM Templates'
  description: Tradovate ATM templates
- name: 'Management: Audit'
  description: Change history of every Management API write
