openapi: 3.1.0
info:
  title: Vigo Trading Community API
  version: 0.2.0
paths:
  /v2/sim/accounts:
    get:
      tags:
      - simulator-v2
      summary: List Accounts
      operationId: list_accounts_v2_sim_accounts_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    post:
      tags:
      - simulator-v2
      summary: Create Account
      operationId: create_account_v2_sim_accounts_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/sim/accounts/{account_id}/portfolio:
    get:
      tags:
      - simulator-v2
      summary: Portfolio
      operationId: portfolio_v2_sim_accounts__account_id__portfolio_get
      security:
      - HTTPBearer: []
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/sim/accounts/{account_id}/orders:
    post:
      tags:
      - simulator-v2
      summary: Submit Order
      operationId: submit_order_v2_sim_accounts__account_id__orders_post
      security:
      - HTTPBearer: []
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - simulator-v2
      summary: List Orders
      operationId: list_orders_v2_sim_accounts__account_id__orders_get
      security:
      - HTTPBearer: []
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 100
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/sim/accounts/{account_id}/orders/process-queued:
    post:
      tags:
      - simulator-v2
      summary: Process Queued
      operationId: process_queued_v2_sim_accounts__account_id__orders_process_queued_post
      security:
      - HTTPBearer: []
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/sim/accounts/{account_id}/orders/{order_id}/cancel:
    post:
      tags:
      - simulator-v2
      summary: Cancel Order
      operationId: cancel_order_v2_sim_accounts__account_id__orders__order_id__cancel_post
      security:
      - HTTPBearer: []
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      - name: order_id
        in: path
        required: true
        schema:
          type: string
          title: Order Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/sim/accounts/{account_id}/logs:
    get:
      tags:
      - simulator-v2
      summary: Logs
      description: Order lifecycle + why each resting order rests + recent errors.
      operationId: logs_v2_sim_accounts__account_id__logs_get
      security:
      - HTTPBearer: []
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 200
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/sim/accounts/{account_id}/journal:
    get:
      tags:
      - simulator-v2
      summary: Journal
      operationId: journal_v2_sim_accounts__account_id__journal_get
      security:
      - HTTPBearer: []
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/sim/chain/{underlying}:
    get:
      tags:
      - simulator-v2
      summary: Chain
      operationId: chain_v2_sim_chain__underlying__get
      security:
      - HTTPBearer: []
      parameters:
      - name: underlying
        in: path
        required: true
        schema:
          type: string
          title: Underlying
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/sim/bars/{symbol}:
    get:
      tags:
      - simulator-v2
      summary: Bars
      operationId: bars_v2_sim_bars__symbol__get
      security:
      - HTTPBearer: []
      parameters:
      - name: symbol
        in: path
        required: true
        schema:
          type: string
          title: Symbol
      - name: range
        in: query
        required: false
        schema:
          type: string
          default: 1D
          title: Range
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/sim/scenarios:
    get:
      tags:
      - simulator-v2
      summary: Scenarios
      operationId: scenarios_v2_sim_scenarios_get
      security:
      - HTTPBearer: []
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          default: en
          title: Lang
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/sim/scenarios/{key}/run:
    post:
      tags:
      - simulator-v2
      summary: Run Scenario
      operationId: run_scenario_v2_sim_scenarios__key__run_post
      security:
      - HTTPBearer: []
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          title: Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/sim/payoff:
    post:
      tags:
      - simulator-v2
      summary: Payoff
      operationId: payoff_v2_sim_payoff_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/sim/analyze:
    post:
      tags:
      - simulator-v2
      summary: Analyze
      description: 'Full combo analysis (net, max gain/loss, break-evens, curve, Greeks,
        margin).

        Superset of /payoff; mirror of the in-browser engine''s analyzeCombo (SIM_V3
        §6).'
      operationId: analyze_v2_sim_analyze_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v1/learn/courses:
    get:
      tags:
      - learn
      summary: List Courses
      operationId: list_courses_v1_learn_courses_get
      parameters:
      - name: locale
        in: query
        required: false
        schema:
          type: string
          default: es
          title: Locale
      - name: level
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Level
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/learn/lessons/{lesson_key}:
    get:
      tags:
      - learn
      summary: Get Lesson
      operationId: get_lesson_v1_learn_lessons__lesson_key__get
      parameters:
      - name: lesson_key
        in: path
        required: true
        schema:
          type: string
          title: Lesson Key
      - name: locale
        in: query
        required: false
        schema:
          type: string
          default: es
          title: Locale
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/learn/glossary:
    get:
      tags:
      - learn
      summary: Glossary
      operationId: glossary_v1_learn_glossary_get
      parameters:
      - name: locale
        in: query
        required: false
        schema:
          type: string
          default: es
          title: Locale
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/learn/exams/{scope}/{ref}:
    get:
      tags:
      - learn
      summary: Get Exam
      operationId: get_exam_v1_learn_exams__scope___ref__get
      parameters:
      - name: scope
        in: path
        required: true
        schema:
          type: string
          title: Scope
      - name: ref
        in: path
        required: true
        schema:
          type: string
          title: Ref
      - name: locale
        in: query
        required: false
        schema:
          type: string
          default: es
          title: Locale
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/learn/questions/{bank}:
    get:
      tags:
      - learn
      summary: Get Questions
      description: 'Draw for an INLINE lesson quiz. Inline checks require all-correct
        (pass_pct 100).


        `exclude` is a comma-separated list of question ids the learner has already
        seen this

        session. A retry after failing prefers UNSEEN questions so the same items
        don''t come

        back with their answers already revealed. Only tops up with seen questions
        when the

        bank doesn''t have enough unseen ones left to fill a full draw.'
      operationId: get_questions_v1_learn_questions__bank__get
      parameters:
      - name: bank
        in: path
        required: true
        schema:
          type: string
          title: Bank
      - name: locale
        in: query
        required: false
        schema:
          type: string
          default: es
          title: Locale
      - name: count
        in: query
        required: false
        schema:
          type: integer
          default: 3
          title: Count
      - name: exclude
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Exclude
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/learn/grade:
    post:
      tags:
      - learn
      summary: Grade
      description: 'Grade a draw. Body: {drawToken, answers: [{id, value}]}. Answer
        keys stay server-side.


        Returns {perQuestion, scorePct, passed, passPct} — the shape the web client

        (QuizBlock, ExamRunner) consumes.'
      operationId: grade_v1_learn_grade_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v2/research/window:
    get:
      tags:
      - research
      summary: Window
      description: How much history there is to test against. The UI states this up
        front.
      operationId: window_v2_research_window_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /v2/research/sessions/{date}:
    get:
      tags:
      - research
      summary: Session Bars
      description: 'The real 5-minute index path for one session.


        This is the one payload in Research that is **not** modelled: these are the

        bars the index actually printed. A strategy''s strikes and marks are drawn

        over them, which is the whole point — you can see the day the rules met, and

        judge for yourself whether the modelled fill was plausible.


        It reads from the same cached window a backtest uses rather than fetching
        the

        single day, so opening a chart costs nothing upstream.'
      operationId: session_bars_v2_research_sessions__date__get
      security:
      - HTTPBearer: []
      parameters:
      - name: date
        in: path
        required: true
        schema:
          type: string
          title: Date
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/research/backtest:
    post:
      tags:
      - research
      summary: Run Backtest
      description: 'Start (or return) a backtest.


        Three shapes, distinguished by ``status``: ``done`` carries ``result``,

        ``running`` carries ``progress`` and a ``key`` to poll with, and ``absent``

        means nothing is computed and nothing was started — the answer to

        ``{"start": false}``, which is how a client asks whether a result exists

        without paying for one.'
      operationId: run_backtest_v2_research_backtest_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/research/backtest/{key}:
    get:
      tags:
      - research
      summary: Backtest Status
      description: 'Poll a running backtest. Finished ones are served from the result
        store.


        Deliberately not charged: polling is the cost of the answer already paid

        for, and billing it would push clients toward polling less often and showing

        a staler bar.'
      operationId: backtest_status_v2_research_backtest__key__get
      security:
      - HTTPBearer: []
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          title: Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/research/assistant:
    post:
      tags:
      - research
      summary: Assistant
      description: 'Turn a sentence into a validated strategy spec — nothing is run.


        The reply separates the fields the request actually stated from the ones that

        were assumed, and names anything asked for that this vocabulary cannot

        express. Nothing here executes: the spec still has to be sent to

        ``/backtest`` like any other, which keeps the assistant a translator rather

        than a second, quieter way to spend a caller''s credits.'
      operationId: assistant_v2_research_assistant_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/research/describe:
    post:
      tags:
      - research
      summary: Describe
      description: Validate a spec and echo its sentence — the builder's live preview.
      operationId: describe_v2_research_describe_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/research/strategies:
    get:
      tags:
      - research
      summary: List Strategies
      operationId: list_strategies_v2_research_strategies_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    post:
      tags:
      - research
      summary: Save Strategy
      operationId: save_strategy_v2_research_strategies_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/research/strategies/{strategy_id}:
    delete:
      tags:
      - research
      summary: Delete Strategy
      operationId: delete_strategy_v2_research_strategies__strategy_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: strategy_id
        in: path
        required: true
        schema:
          type: string
          title: Strategy Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/research/portfolios:
    get:
      tags:
      - research
      summary: List Portfolios
      operationId: list_portfolios_v2_research_portfolios_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    post:
      tags:
      - research
      summary: Save Portfolio
      operationId: save_portfolio_v2_research_portfolios_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/research/portfolios/{portfolio_id}:
    delete:
      tags:
      - research
      summary: Delete Portfolio
      operationId: delete_portfolio_v2_research_portfolios__portfolio_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: portfolio_id
        in: path
        required: true
        schema:
          type: string
          title: Portfolio Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/research/portfolios/{portfolio_id}/result:
    get:
      tags:
      - research
      summary: Portfolio Result
      operationId: portfolio_result_v2_research_portfolios__portfolio_id__result_get
      security:
      - HTTPBearer: []
      parameters:
      - name: portfolio_id
        in: path
        required: true
        schema:
          type: string
          title: Portfolio Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/practice/days:
    get:
      tags:
      - practice
      summary: Days
      description: Every session available to practice, newest first.
      operationId: days_v2_practice_days_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /v2/practice/sessions:
    get:
      tags:
      - practice
      summary: List Sessions
      operationId: list_sessions_v2_practice_sessions_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    post:
      tags:
      - practice
      summary: Start
      description: 'Open a practice session. Omit `date` for a random day.


        The clock is dropped in mid-morning rather than at the open: you cannot look

        at how the day ended and then trade it, which is the whole point.'
      operationId: start_v2_practice_sessions_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/practice/sessions/{session_id}:
    get:
      tags:
      - practice
      summary: Get Session
      operationId: get_session_v2_practice_sessions__session_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - practice
      summary: Delete Session
      operationId: delete_session_v2_practice_sessions__session_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/practice/sessions/{session_id}/orders:
    post:
      tags:
      - practice
      summary: Submit Order
      operationId: submit_order_v2_practice_sessions__session_id__orders_post
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/practice/sessions/{session_id}/seek:
    post:
      tags:
      - practice
      summary: Seek
      description: 'Move the clock. Forward advances; backward rewinds.


        Rewinding past an order does NOT delete it — the order still happened at its

        bar, and replaying the script reproduces it. `retry` drops everything after

        the new cursor, which is the "trade it differently" button.'
      operationId: seek_v2_practice_sessions__session_id__seek_post
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/practice/analyze:
    get:
      tags:
      - practice
      summary: Analyze
      description: 'How the user''s practice is actually going, across every session
        they ran.


        Only *finished* sessions count. A session abandoned at 11:00 with an open

        position has no result yet, and averaging it in would flatter the ones that

        were carried to the close.'
      operationId: analyze_v2_practice_analyze_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /v2/practice/fees:
    get:
      tags:
      - practice
      summary: Get Fee Schedule
      operationId: get_fee_schedule_v2_practice_fees_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    put:
      tags:
      - practice
      summary: Put Fee Schedule
      operationId: put_fee_schedule_v2_practice_fees_put
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/tokens:
    get:
      tags:
      - api-tokens
      summary: List Tokens
      operationId: list_tokens_v2_tokens_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    post:
      tags:
      - api-tokens
      summary: Create Token
      description: Mint a token. The plaintext is in this response and nowhere else,
        ever.
      operationId: create_token_v2_tokens_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v2/tokens/{token_id}:
    delete:
      tags:
      - api-tokens
      summary: Revoke Token
      operationId: revoke_token_v2_tokens__token_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
          title: Token Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/tokens/whoami:
    get:
      tags:
      - api-tokens
      - api-tokens
      summary: Whoami
      description: 'The first call to make from a script: proves the token works.'
      operationId: whoami_v2_tokens_whoami_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /health:
    get:
      summary: Health
      description: Liveness + dependency check for Compose healthcheck and monitoring.
      operationId: health_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: Response Health Health Get
  /:
    get:
      summary: Root
      operationId: root__get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: Response Root  Get
  /v2/version:
    get:
      summary: Version
      description: 'What is deployed, module by module — the same numbers the site
        shows.


        Public and uncharged: this is the endpoint you hit to find out whether the

        thing you are looking at is the thing that shipped, and putting a price or
        a

        token on that answer defeats it.'
      operationId: version_v2_version_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: Response Version V2 Version Get
  /v1/status:
    get:
      summary: Status
      description: Public, non-sensitive service status for the frontend.
      operationId: status_v1_status_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: Response Status V1 Status Get
  /v1/market/quotes:
    get:
      summary: Market Quotes
      operationId: market_quotes_v1_market_quotes_get
      parameters:
      - name: symbols
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Symbols
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: Response Market Quotes V1 Market Quotes Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/market/search:
    get:
      summary: Market Search
      operationId: market_search_v1_market_search_get
      parameters:
      - name: q
        in: query
        required: true
        schema:
          type: string
          title: Q
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 8
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: Response Market Search V1 Market Search Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/market/bars:
    get:
      summary: Market Bars
      operationId: market_bars_v1_market_bars_get
      parameters:
      - name: symbol
        in: query
        required: true
        schema:
          type: string
          title: Symbol
      - name: range
        in: query
        required: false
        schema:
          type: string
          default: 1D
          title: Range
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: Response Market Bars V1 Market Bars Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/market/stream/{symbol}:
    get:
      summary: Market Stream
      description: Recent 1-second bars (delayed) for a symbol — the continuous live-replay
        feed.
      operationId: market_stream_v1_market_stream__symbol__get
      parameters:
      - name: symbol
        in: path
        required: true
        schema:
          type: string
          title: Symbol
      - name: window
        in: query
        required: false
        schema:
          type: integer
          default: 90
          title: Window
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: Response Market Stream V1 Market Stream  Symbol  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
