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

# Place an order

> Places a buy-side or sell-side order. We currently support cash-based buy orders and unit-based sell orders only.



## OpenAPI

````yaml https://api.engine.usesophic.com/openapi.json post /accounts/{account_id}/orders
openapi: 3.1.0
info:
  title: Sophic Engine API
  version: 0.1.0
servers:
  - url: https://api.engine.usesophic.com/
security: []
paths:
  /accounts/{account_id}/orders:
    post:
      summary: Place an order
      description: >-
        Places a buy-side or sell-side order. We currently support cash-based
        buy orders and unit-based sell orders only.
      operationId: place_order_accounts__account_id__orders_post
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            title: Account Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaceOrderRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - HTTPBearer: []
components:
  schemas:
    PlaceOrderRequest:
      properties:
        instrument:
          type: string
          title: Instrument
          description: The ID of the instrument to buy or sell.
        order_type:
          allOf:
            - $ref: '#/components/schemas/OrderType'
          description: The order type. Only market orders are supported currently.
        side:
          allOf:
            - $ref: '#/components/schemas/OrderSide'
          description: The order side, buy or sell.
        cash_amount:
          anyOf:
            - anyOf:
                - type: number
                - type: string
              gt: 0
            - type: 'null'
          title: Cash Amount
          description: >-
            Required for buy orders. The amount to invest (before fees). Buy
            orders are cash-based (you specify how much to invest, not how many
            units to buy).
          examples:
            - '100.00'
            - '50.12'
        quantity:
          anyOf:
            - anyOf:
                - type: number
                - type: string
              gt: 0
            - type: 'null'
          title: Quantity
          description: >-
            Required for sell orders. The number of units to sell. Sell orders
            are unit-based (you specify how many units to sell, not how much
            cash to receive).
        automatic_rollover:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Automatic Rollover
          description: >-
            If true, the resulting position will be set to automatically
            rollover to a similar instrument upon maturity. Only applicable to
            buy orders on instruments with `supports_automatic_rollover` set to
            true.
          default: false
        quote:
          anyOf:
            - type: string
            - type: 'null'
          title: Quote
          description: >-
            ID of a previously issued ``OrderQuote``. Only applicable for FX
            (currency pair) orders — non-FX quotes are never persisted and
            providing this field for a non-FX order returns an error.
      type: object
      required:
        - instrument
        - order_type
        - side
      title: PlaceOrderRequest
    Order:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        account:
          anyOf:
            - type: string
            - type: 'null'
          title: Account
          description: >-
            The ID of the parent account. Orders placed by users always have a
            parent account. Orders placed by the system (e.g. for internal
            operations) do not.
        status:
          allOf:
            - $ref: '#/components/schemas/OrderStatus'
          description: The order status.
        order_type:
          allOf:
            - $ref: '#/components/schemas/OrderType'
          description: The order type (e.g. market, limit).
        purpose:
          allOf:
            - $ref: '#/components/schemas/OrderPurpose'
          description: The order purpose, set by us.
        position:
          anyOf:
            - type: string
            - type: 'null'
          title: Position
          description: >-
            The ID of the position this order is part of, if applicable. Note
            that the position is null before the order is executed.
        side:
          allOf:
            - $ref: '#/components/schemas/OrderSide'
          description: Buy or sell.
        instrument:
          oneOf:
            - $ref: '#/components/schemas/Bill'
            - $ref: '#/components/schemas/CurrencyPair'
            - $ref: '#/components/schemas/Bond'
            - $ref: '#/components/schemas/MoneyMarketFund'
            - $ref: '#/components/schemas/AMC'
            - $ref: '#/components/schemas/ETF'
          title: Instrument
          description: The instrument to buy or sell.
          discriminator:
            propertyName: instrument_type
            mapping:
              amc:
                $ref: '#/components/schemas/AMC'
              bill:
                $ref: '#/components/schemas/Bill'
              bond:
                $ref: '#/components/schemas/Bond'
              currency_pair:
                $ref: '#/components/schemas/CurrencyPair'
              etf:
                $ref: '#/components/schemas/ETF'
              money_market_fund:
                $ref: '#/components/schemas/MoneyMarketFund'
        cash_amount:
          anyOf:
            - type: string
            - type: 'null'
          title: Cash Amount
          description: >-
            The amount to invest (before fees). Buy orders are cash-based (you
            specify how much to invest, not how many units to buy).
        net_cash_amount:
          anyOf:
            - type: string
            - type: 'null'
          title: Net Cash Amount
          description: The amount to invest after fees. This is what gets traded.
        traded_quantity:
          type: string
          title: Traded Quantity
          description: The sum of unit quantities of all order executions so far.
        traded_notional:
          type: string
          title: Traded Notional
          description: The sum of notional values of all order executions so far.
        fees:
          type: string
          title: Fees
          description: The total fees for this order.
        quantity:
          anyOf:
            - type: string
            - type: 'null'
          title: Quantity
          description: >-
            The number of units to sell. Sell orders are unit-based (you specify
            how many units to sell, not how much cash to receive).
        currency:
          anyOf:
            - $ref: '#/components/schemas/Currency'
            - type: 'null'
          description: >-
            The order currency. For securities orders, this is the trading
            currency of the instrument. For FX orders, this is the base
            currency.
        automatic_rollover:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Automatic Rollover
          description: >-
            The customer's request for automatic rollover. Only has a value for
            buy orders in relevant instruments.
        cancelled_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Cancelled Reason
          description: The reason for cancelling the order, if cancelled.
        filled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Filled At
          description: >-
            The fill timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format).
        settled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Settled At
          description: >-
            The settlement timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format).
        cancelled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cancelled At
          description: >-
            The cancellation timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format).
        quote:
          anyOf:
            - type: string
            - type: 'null'
          title: Quote
          description: >-
            Reference to the ``OrderQuote`` that produced this order, if any.
            Optional for all orders. When set on an FX order, the executing rate
            is locked to the quote; when omitted, the order trades at the live
            market rate.
        trades:
          items:
            $ref: '#/components/schemas/OrderTrade'
          type: array
          title: Trades
          description: All trades executed to fill this order.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was created.
        modified_at:
          type: string
          format: date-time
          title: Modified At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was last modified.
      type: object
      required:
        - created_at
        - modified_at
        - id
        - status
        - order_type
        - purpose
        - side
        - instrument
        - traded_quantity
        - traded_notional
        - fees
        - trades
      title: Order
    Error:
      properties:
        detail:
          type: string
          title: Detail
          description: A human-readable description of the error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
        docs:
          title: Docs
          description: A URL to documentation about this error code.
          x-remove-null-from-type-union: true
          type: string
        context:
          title: Context
          description: An optional object for adding extra context to the error.
          x-remove-null-from-type-union: true
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
          type: object
        params:
          title: Params
          description: An optional list of params that failed validation.
          x-remove-null-from-type-union: true
          items:
            $ref: '#/components/schemas/InvalidParam'
          type: array
      type: object
      required:
        - detail
        - code
      title: Error
    OrderType:
      type: string
      const: market
      title: OrderType
      description: Enumerates the supported order types.
      properties: {}
    OrderSide:
      type: string
      enum:
        - buy
        - sell
      title: OrderSide
      properties: {}
    OrderStatus:
      type: string
      enum:
        - held
        - placed
        - pending
        - executing
        - filled
        - settled
        - cancelled
      title: OrderStatus
      properties: {}
    OrderPurpose:
      type: string
      enum:
        - user_request
        - rollover
        - square_off
        - backfill
      title: OrderPurpose
      properties: {}
    Bill:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        name:
          type: string
          title: Name
          description: The name of the instrument.
        symbol:
          type: string
          title: Symbol
          description: >-
            A unique, secondary, identifier representing the instrument in
            financial markets (e.g. ISIN or currency pair). For example,
            'US5949181045' for the Apple Inc. stock and 'EUR/USD' for the
            EUR/USD currency pair. 
        instrument_type:
          const: bill
          title: Instrument Type
          description: The type of instrument.
        trading_status:
          allOf:
            - $ref: '#/components/schemas/InstrumentTradingStatus'
          description: The trading status of the instrument.
        rollout_stage:
          anyOf:
            - $ref: '#/components/schemas/InstrumentRolloutStage'
            - type: 'null'
          description: >-
            The rollout stage of the instrument. GA instruments are visible to
            every user; BETA instruments are visible only to pilot users.
        trading_increment:
          type: string
          title: Trading Increment
          description: >-
            The trading increment refers to the smallest quantity or value of a
            financial instrument that can be traded. This means orders must be
            executed in multiples of this increment.
        decimal_precision:
          type: integer
          title: Decimal Precision
          description: >-
            The number of decimal places for this instrument's trading
            increment.
        pro_traders_only:
          type: boolean
          title: Pro Traders Only
          description: >-
            Flag indicating if this instrument is only available to professional
            (incl. elective) investors under MiFID II.
        price_type:
          allOf:
            - $ref: '#/components/schemas/PriceType'
          description: The type of price for this instrument.
        isin:
          type: string
          title: Isin
          description: International Securities Identification Number.
        ticker:
          anyOf:
            - type: string
            - type: 'null'
          title: Ticker
          description: The ticker symbol of the security.
        issuer:
          type: string
          title: Issuer
          description: The name of the instrument issuer.
        issuer_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuer Country
          description: >-
            The country code (in [ISO 3166-1
            alpha-2](https://www.iso.org/iso-3166-country-codes.html) format) of
            the instrument issuer.
        minimum_trading_quantity:
          type: string
          title: Minimum Trading Quantity
          description: >-
            The minimum trading quantity allowed for the given financial
            instrument.
        trading_currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          description: The instrument's trading currency.
        initial_issue_date:
          type: string
          format: date
          title: Initial Issue Date
          description: >-
            The initial issue date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument.
        enforce_trading_rules:
          type: boolean
          title: Enforce Trading Rules
        minimum_initial_cash_investment:
          type: string
          title: Minimum Initial Cash Investment
        required_cash_increment:
          type: integer
          title: Required Cash Increment
        maturity_date:
          type: string
          format: date
          title: Maturity Date
          description: The maturity date of the instrument.
        days_to_maturity:
          type: integer
          title: Days To Maturity
          description: The number of days until the instrument matures.
        supports_automatic_rollover:
          type: boolean
          title: Supports Automatic Rollover
          description: >-
            Flag indicating whether account positions in this instrument can be
            configured to automatically rollover upon maturity.
        issuer_credit_rating:
          type: string
          title: Issuer Credit Rating
          description: Credit rating from a credit agency e.g AA.
        initial_auction_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Initial Auction Date
          description: >-
            The initial auction date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument.
        latest_auction_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Latest Auction Date
          description: >-
            The latest auction date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument (in case of tap issues).
        latest_issue_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Latest Issue Date
          description: >-
            The latest issue date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument (in case of tap issues).
        par_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Par Value
          description: >-
            Nominal denomination per unit against which the price is quoted, as
            reported by the venue. Varies by market convention: many Euro MTNs
            quote 1.00, US Treasuries typically 100, and US corporates often 100
            or 1000. Stored for reference only.
      type: object
      required:
        - id
        - name
        - symbol
        - instrument_type
        - trading_status
        - rollout_stage
        - trading_increment
        - decimal_precision
        - pro_traders_only
        - price_type
        - isin
        - issuer_country
        - minimum_trading_quantity
        - trading_currency
        - initial_issue_date
        - enforce_trading_rules
        - minimum_initial_cash_investment
        - required_cash_increment
        - maturity_date
        - days_to_maturity
        - supports_automatic_rollover
        - issuer_credit_rating
        - initial_auction_date
        - latest_auction_date
        - latest_issue_date
        - par_value
      title: Bill
    CurrencyPair:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        name:
          type: string
          title: Name
          description: The name of the instrument.
        symbol:
          type: string
          title: Symbol
          description: >-
            A unique, secondary, identifier representing the instrument in
            financial markets (e.g. ISIN or currency pair). For example,
            'US5949181045' for the Apple Inc. stock and 'EUR/USD' for the
            EUR/USD currency pair. 
        instrument_type:
          const: currency_pair
          title: Instrument Type
          description: The type of instrument.
        trading_status:
          allOf:
            - $ref: '#/components/schemas/InstrumentTradingStatus'
          description: The trading status of the instrument.
        rollout_stage:
          anyOf:
            - $ref: '#/components/schemas/InstrumentRolloutStage'
            - type: 'null'
          description: >-
            The rollout stage of the instrument. GA instruments are visible to
            every user; BETA instruments are visible only to pilot users.
        trading_increment:
          type: string
          title: Trading Increment
          description: >-
            The trading increment refers to the smallest quantity or value of a
            financial instrument that can be traded. This means orders must be
            executed in multiples of this increment.
        decimal_precision:
          type: integer
          title: Decimal Precision
          description: >-
            The number of decimal places for this instrument's trading
            increment.
        pro_traders_only:
          type: boolean
          title: Pro Traders Only
          description: >-
            Flag indicating if this instrument is only available to professional
            (incl. elective) investors under MiFID II.
        price_type:
          allOf:
            - $ref: '#/components/schemas/PriceType'
          description: The type of price for this instrument.
        base_currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          description: >-
            The base currency of the currency pair. For example, in EUR/USD, EUR
            is the base currency. When placing FX orders, you are always trading
            the base currency.
        quote_currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          description: >-
            The quote currency of the currency pair. For example, in EUR/USD,
            USD is the quote currency.
      type: object
      required:
        - id
        - name
        - symbol
        - instrument_type
        - trading_status
        - rollout_stage
        - trading_increment
        - decimal_precision
        - pro_traders_only
        - price_type
        - base_currency
        - quote_currency
      title: CurrencyPair
    Bond:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        name:
          type: string
          title: Name
          description: The name of the instrument.
        symbol:
          type: string
          title: Symbol
          description: >-
            A unique, secondary, identifier representing the instrument in
            financial markets (e.g. ISIN or currency pair). For example,
            'US5949181045' for the Apple Inc. stock and 'EUR/USD' for the
            EUR/USD currency pair. 
        instrument_type:
          const: bond
          title: Instrument Type
          description: The type of instrument.
        trading_status:
          allOf:
            - $ref: '#/components/schemas/InstrumentTradingStatus'
          description: The trading status of the instrument.
        rollout_stage:
          anyOf:
            - $ref: '#/components/schemas/InstrumentRolloutStage'
            - type: 'null'
          description: >-
            The rollout stage of the instrument. GA instruments are visible to
            every user; BETA instruments are visible only to pilot users.
        trading_increment:
          type: string
          title: Trading Increment
          description: >-
            The trading increment refers to the smallest quantity or value of a
            financial instrument that can be traded. This means orders must be
            executed in multiples of this increment.
        decimal_precision:
          type: integer
          title: Decimal Precision
          description: >-
            The number of decimal places for this instrument's trading
            increment.
        pro_traders_only:
          type: boolean
          title: Pro Traders Only
          description: >-
            Flag indicating if this instrument is only available to professional
            (incl. elective) investors under MiFID II.
        price_type:
          allOf:
            - $ref: '#/components/schemas/PriceType'
          description: The type of price for this instrument.
        isin:
          type: string
          title: Isin
          description: International Securities Identification Number.
        ticker:
          anyOf:
            - type: string
            - type: 'null'
          title: Ticker
          description: The ticker symbol of the security.
        issuer:
          type: string
          title: Issuer
          description: The name of the instrument issuer.
        issuer_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuer Country
          description: >-
            The country code (in [ISO 3166-1
            alpha-2](https://www.iso.org/iso-3166-country-codes.html) format) of
            the instrument issuer.
        minimum_trading_quantity:
          type: string
          title: Minimum Trading Quantity
          description: >-
            The minimum trading quantity allowed for the given financial
            instrument.
        trading_currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          description: The instrument's trading currency.
        initial_issue_date:
          type: string
          format: date
          title: Initial Issue Date
          description: >-
            The initial issue date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument.
        enforce_trading_rules:
          type: boolean
          title: Enforce Trading Rules
        minimum_initial_cash_investment:
          type: string
          title: Minimum Initial Cash Investment
        required_cash_increment:
          type: integer
          title: Required Cash Increment
        maturity_date:
          type: string
          format: date
          title: Maturity Date
          description: The maturity date of the instrument.
        days_to_maturity:
          type: integer
          title: Days To Maturity
          description: The number of days until the instrument matures.
        supports_automatic_rollover:
          type: boolean
          title: Supports Automatic Rollover
          description: >-
            Flag indicating whether account positions in this instrument can be
            configured to automatically rollover upon maturity.
        issuer_credit_rating:
          type: string
          title: Issuer Credit Rating
          description: Credit rating from a credit agency e.g AA.
        initial_auction_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Initial Auction Date
          description: >-
            The initial auction date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument.
        latest_auction_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Latest Auction Date
          description: >-
            The latest auction date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument (in case of tap issues).
        latest_issue_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Latest Issue Date
          description: >-
            The latest issue date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument (in case of tap issues).
        par_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Par Value
          description: >-
            Nominal denomination per unit against which the price is quoted, as
            reported by the venue. Varies by market convention: many Euro MTNs
            quote 1.00, US Treasuries typically 100, and US corporates often 100
            or 1000. Stored for reference only.
        coupon_type:
          allOf:
            - $ref: '#/components/schemas/BondCouponType'
          description: The type of coupon payment (e.g., fixed, floating, zero-coupon).
        coupon_frequency:
          anyOf:
            - $ref: '#/components/schemas/BondCouponFrequency'
            - type: 'null'
          description: >-
            The frequency of coupon payments (e.g., annual, semi-annual,
            quarterly).
        coupon:
          type: string
          title: Coupon
          description: The coupon rate of the bond.
        first_coupon_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: First Coupon Date
          description: >-
            The date of the first scheduled coupon payment. Present when the
            bond has an irregular first coupon period; otherwise the schedule is
            derived from the issue date and coupon frequency.
        next_coupon_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Next Coupon Date
          description: >-
            The next scheduled coupon payment date as of today, computed from
            the schedule anchor (`first_coupon_date` if set, otherwise the issue
            date) and `coupon_frequency`. Null for zero-coupon bonds and for
            bonds whose final coupon has already been paid.
        day_count_convention:
          anyOf:
            - $ref: '#/components/schemas/DayCountConvention'
            - type: 'null'
          description: >-
            Day count convention used by the venue / pricing provider to compute
            accrued interest. Sophic stores this as metadata only; accrued
            interest is not computed in-house. Null for zero-coupon bonds — they
            don't accrue.
        upcoming_coupon_amount_per_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Upcoming Coupon Amount Per Unit
          description: >-
            The cash amount per one unit of held face quantity for the next
            coupon, derived from the schedule. Null for zero-coupon bonds and
            for bonds whose final coupon has already been paid.
      type: object
      required:
        - id
        - name
        - symbol
        - instrument_type
        - trading_status
        - rollout_stage
        - trading_increment
        - decimal_precision
        - pro_traders_only
        - price_type
        - isin
        - issuer_country
        - minimum_trading_quantity
        - trading_currency
        - initial_issue_date
        - enforce_trading_rules
        - minimum_initial_cash_investment
        - required_cash_increment
        - maturity_date
        - days_to_maturity
        - supports_automatic_rollover
        - issuer_credit_rating
        - initial_auction_date
        - latest_auction_date
        - latest_issue_date
        - par_value
        - coupon_type
        - coupon_frequency
        - coupon
      title: Bond
    MoneyMarketFund:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        name:
          type: string
          title: Name
          description: The name of the instrument.
        symbol:
          type: string
          title: Symbol
          description: >-
            A unique, secondary, identifier representing the instrument in
            financial markets (e.g. ISIN or currency pair). For example,
            'US5949181045' for the Apple Inc. stock and 'EUR/USD' for the
            EUR/USD currency pair. 
        instrument_type:
          const: money_market_fund
          title: Instrument Type
          description: The type of instrument.
        trading_status:
          allOf:
            - $ref: '#/components/schemas/InstrumentTradingStatus'
          description: The trading status of the instrument.
        rollout_stage:
          anyOf:
            - $ref: '#/components/schemas/InstrumentRolloutStage'
            - type: 'null'
          description: >-
            The rollout stage of the instrument. GA instruments are visible to
            every user; BETA instruments are visible only to pilot users.
        trading_increment:
          type: string
          title: Trading Increment
          description: >-
            The trading increment refers to the smallest quantity or value of a
            financial instrument that can be traded. This means orders must be
            executed in multiples of this increment.
        decimal_precision:
          type: integer
          title: Decimal Precision
          description: >-
            The number of decimal places for this instrument's trading
            increment.
        pro_traders_only:
          type: boolean
          title: Pro Traders Only
          description: >-
            Flag indicating if this instrument is only available to professional
            (incl. elective) investors under MiFID II.
        price_type:
          allOf:
            - $ref: '#/components/schemas/PriceType'
          description: The type of price for this instrument.
        isin:
          type: string
          title: Isin
          description: International Securities Identification Number.
        ticker:
          anyOf:
            - type: string
            - type: 'null'
          title: Ticker
          description: The ticker symbol of the security.
        issuer:
          type: string
          title: Issuer
          description: The name of the instrument issuer.
        issuer_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuer Country
          description: >-
            The country code (in [ISO 3166-1
            alpha-2](https://www.iso.org/iso-3166-country-codes.html) format) of
            the instrument issuer.
        minimum_trading_quantity:
          type: string
          title: Minimum Trading Quantity
          description: >-
            The minimum trading quantity allowed for the given financial
            instrument.
        trading_currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          description: The instrument's trading currency.
        initial_issue_date:
          type: string
          format: date
          title: Initial Issue Date
          description: >-
            The initial issue date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument.
        enforce_trading_rules:
          type: boolean
          title: Enforce Trading Rules
        minimum_initial_cash_investment:
          type: string
          title: Minimum Initial Cash Investment
        required_cash_increment:
          type: integer
          title: Required Cash Increment
        issuer_credit_rating:
          type: string
          title: Issuer Credit Rating
          description: Credit rating from a credit agency e.g AA.
        dealing_deadline:
          type: string
          format: time
          title: Dealing Deadline
          description: The dealing deadline time for orders.
        dealing_deadline_time_and_day:
          type: string
          title: Dealing Deadline Time And Day
          description: The dealing deadline formatted with time and date.
        fund_management_company:
          type: string
          title: Fund Management Company
          description: The fund management company.
        investment_objective:
          type: string
          title: Investment Objective
          description: The investment objective of the fund.
        is_passed_dealing_deadline:
          type: boolean
          title: Is Passed Dealing Deadline
          description: >-
            Flag indicating whether the the dealing deadline has passed for
            today.
        benchmark:
          anyOf:
            - type: string
            - type: 'null'
          title: Benchmark
          description: >-
            The benchmark (often a market index) used to evaluate the fund's
            performance.
        fund_ongoing_charges:
          type: string
          title: Fund Ongoing Charges
          description: The ongoing charges for the fund.
        is_qualifying_mmf:
          type: boolean
          title: Is Qualifying Mmf
          description: >-
            Flag indicating whether this is a Qualifying Money Market Fund
            (QMMF). QMMFs hold mainly short-term, low-risk financial assets,
            aiming to maintain a stable value.
      type: object
      required:
        - id
        - name
        - symbol
        - instrument_type
        - trading_status
        - rollout_stage
        - trading_increment
        - decimal_precision
        - pro_traders_only
        - price_type
        - isin
        - issuer_country
        - minimum_trading_quantity
        - trading_currency
        - initial_issue_date
        - enforce_trading_rules
        - minimum_initial_cash_investment
        - required_cash_increment
        - issuer_credit_rating
        - dealing_deadline
        - dealing_deadline_time_and_day
        - fund_management_company
        - investment_objective
        - is_passed_dealing_deadline
        - benchmark
        - fund_ongoing_charges
        - is_qualifying_mmf
      title: MoneyMarketFund
    AMC:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        name:
          type: string
          title: Name
          description: The name of the instrument.
        symbol:
          type: string
          title: Symbol
          description: >-
            A unique, secondary, identifier representing the instrument in
            financial markets (e.g. ISIN or currency pair). For example,
            'US5949181045' for the Apple Inc. stock and 'EUR/USD' for the
            EUR/USD currency pair. 
        instrument_type:
          const: amc
          title: Instrument Type
          description: The type of instrument.
        trading_status:
          allOf:
            - $ref: '#/components/schemas/InstrumentTradingStatus'
          description: The trading status of the instrument.
        rollout_stage:
          anyOf:
            - $ref: '#/components/schemas/InstrumentRolloutStage'
            - type: 'null'
          description: >-
            The rollout stage of the instrument. GA instruments are visible to
            every user; BETA instruments are visible only to pilot users.
        trading_increment:
          type: string
          title: Trading Increment
          description: >-
            The trading increment refers to the smallest quantity or value of a
            financial instrument that can be traded. This means orders must be
            executed in multiples of this increment.
        decimal_precision:
          type: integer
          title: Decimal Precision
          description: >-
            The number of decimal places for this instrument's trading
            increment.
        pro_traders_only:
          type: boolean
          title: Pro Traders Only
          description: >-
            Flag indicating if this instrument is only available to professional
            (incl. elective) investors under MiFID II.
        price_type:
          allOf:
            - $ref: '#/components/schemas/PriceType'
          description: The type of price for this instrument.
        isin:
          type: string
          title: Isin
          description: International Securities Identification Number.
        ticker:
          anyOf:
            - type: string
            - type: 'null'
          title: Ticker
          description: The ticker symbol of the security.
        issuer:
          type: string
          title: Issuer
          description: The name of the instrument issuer.
        issuer_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuer Country
          description: >-
            The country code (in [ISO 3166-1
            alpha-2](https://www.iso.org/iso-3166-country-codes.html) format) of
            the instrument issuer.
        minimum_trading_quantity:
          type: string
          title: Minimum Trading Quantity
          description: >-
            The minimum trading quantity allowed for the given financial
            instrument.
        trading_currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          description: The instrument's trading currency.
        initial_issue_date:
          type: string
          format: date
          title: Initial Issue Date
          description: >-
            The initial issue date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument.
        enforce_trading_rules:
          type: boolean
          title: Enforce Trading Rules
        minimum_initial_cash_investment:
          type: string
          title: Minimum Initial Cash Investment
        required_cash_increment:
          type: integer
          title: Required Cash Increment
        issuer_credit_rating:
          type: string
          title: Issuer Credit Rating
          description: Credit rating from a credit agency e.g AA.
        dealing_deadline:
          type: string
          format: time
          title: Dealing Deadline
          description: The dealing deadline time for orders.
        dealing_deadline_time_and_day:
          type: string
          title: Dealing Deadline Time And Day
          description: The dealing deadline formatted with time and date.
        is_passed_dealing_deadline:
          type: boolean
          title: Is Passed Dealing Deadline
          description: >-
            True if the current time has passed the dealing deadline on a
            business day.
        strategy:
          anyOf:
            - type: string
            - type: 'null'
          title: Strategy
          description: The investment strategy of the AMC.
        risk_profile:
          anyOf:
            - type: string
            - type: 'null'
          title: Risk Profile
          description: The risk profile of the AMC.
        portfolio_manager:
          anyOf:
            - type: string
            - type: 'null'
          title: Portfolio Manager
          description: The portfolio manager of the AMC.
        share_class:
          anyOf:
            - type: string
            - type: 'null'
          title: Share Class
          description: The share class of the AMC.
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
          description: The provider of the AMC instrument (e.g. UBS).
      type: object
      required:
        - id
        - name
        - symbol
        - instrument_type
        - trading_status
        - rollout_stage
        - trading_increment
        - decimal_precision
        - pro_traders_only
        - price_type
        - isin
        - issuer_country
        - minimum_trading_quantity
        - trading_currency
        - initial_issue_date
        - enforce_trading_rules
        - minimum_initial_cash_investment
        - required_cash_increment
        - issuer_credit_rating
        - dealing_deadline
        - dealing_deadline_time_and_day
        - is_passed_dealing_deadline
        - strategy
        - risk_profile
        - portfolio_manager
        - share_class
        - provider
      title: AMC
    ETF:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        name:
          type: string
          title: Name
          description: The name of the instrument.
        symbol:
          type: string
          title: Symbol
          description: >-
            A unique, secondary, identifier representing the instrument in
            financial markets (e.g. ISIN or currency pair). For example,
            'US5949181045' for the Apple Inc. stock and 'EUR/USD' for the
            EUR/USD currency pair. 
        instrument_type:
          const: etf
          title: Instrument Type
          description: The type of instrument.
        trading_status:
          allOf:
            - $ref: '#/components/schemas/InstrumentTradingStatus'
          description: The trading status of the instrument.
        rollout_stage:
          anyOf:
            - $ref: '#/components/schemas/InstrumentRolloutStage'
            - type: 'null'
          description: >-
            The rollout stage of the instrument. GA instruments are visible to
            every user; BETA instruments are visible only to pilot users.
        trading_increment:
          type: string
          title: Trading Increment
          description: >-
            The trading increment refers to the smallest quantity or value of a
            financial instrument that can be traded. This means orders must be
            executed in multiples of this increment.
        decimal_precision:
          type: integer
          title: Decimal Precision
          description: >-
            The number of decimal places for this instrument's trading
            increment.
        pro_traders_only:
          type: boolean
          title: Pro Traders Only
          description: >-
            Flag indicating if this instrument is only available to professional
            (incl. elective) investors under MiFID II.
        price_type:
          allOf:
            - $ref: '#/components/schemas/PriceType'
          description: The type of price for this instrument.
        isin:
          type: string
          title: Isin
          description: International Securities Identification Number.
        ticker:
          anyOf:
            - type: string
            - type: 'null'
          title: Ticker
          description: The ticker symbol of the security.
        issuer:
          type: string
          title: Issuer
          description: The name of the instrument issuer.
        issuer_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuer Country
          description: >-
            The country code (in [ISO 3166-1
            alpha-2](https://www.iso.org/iso-3166-country-codes.html) format) of
            the instrument issuer.
        minimum_trading_quantity:
          type: string
          title: Minimum Trading Quantity
          description: >-
            The minimum trading quantity allowed for the given financial
            instrument.
        trading_currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          description: The instrument's trading currency.
        initial_issue_date:
          type: string
          format: date
          title: Initial Issue Date
          description: >-
            The initial issue date ([ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)) of
            the instrument.
        enforce_trading_rules:
          type: boolean
          title: Enforce Trading Rules
        minimum_initial_cash_investment:
          type: string
          title: Minimum Initial Cash Investment
        required_cash_increment:
          type: integer
          title: Required Cash Increment
        fund_provider:
          type: string
          title: Fund Provider
          description: The provider of the ETF.
        fund_domicile:
          type: string
          title: Fund Domicile
          description: The domicile of the ETF.
        tracking_index:
          type: string
          title: Tracking Index
          description: The index that the ETF tracks.
        expense_ratio:
          type: string
          title: Expense Ratio
          description: The expense ratio of the ETF.
        replication_method:
          type: string
          title: Replication Method
          description: The method of replication of the ETF.
        distribution_policy:
          type: string
          title: Distribution Policy
          description: The distribution policy of the ETF.
        exchange_mic:
          type: string
          title: Exchange Mic
          description: The exchange mic of the ETF.
      type: object
      required:
        - id
        - name
        - symbol
        - instrument_type
        - trading_status
        - rollout_stage
        - trading_increment
        - decimal_precision
        - pro_traders_only
        - price_type
        - isin
        - issuer_country
        - minimum_trading_quantity
        - trading_currency
        - initial_issue_date
        - enforce_trading_rules
        - minimum_initial_cash_investment
        - required_cash_increment
        - fund_provider
        - fund_domicile
        - tracking_index
        - expense_ratio
        - replication_method
        - distribution_policy
        - exchange_mic
      title: ETF
    Currency:
      type: string
      enum:
        - EUR
        - USD
        - GBP
      title: Currency
      properties: {}
    OrderTrade:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        price:
          type: string
          title: Price
        quantity:
          type: string
          title: Quantity
        quantity_currency:
          anyOf:
            - $ref: '#/components/schemas/Currency'
            - type: 'null'
        notional:
          type: string
          title: Notional
        notional_currency:
          $ref: '#/components/schemas/Currency'
        accrued_interest:
          anyOf:
            - type: string
            - type: 'null'
          title: Accrued Interest
          description: >-
            Accrued interest portion of the (dirty) notional for fixed income
            trades. Sourced from FIX AccruedInterestAmt (tag 159) when the venue
            provides it. Clients can derive the clean notional as notional -
            accrued_interest.
        side:
          $ref: '#/components/schemas/OrderSide'
        status:
          $ref: '#/components/schemas/OrderTradeStatus'
        position:
          anyOf:
            - type: string
            - type: 'null'
          title: Position
        account:
          anyOf:
            - type: string
            - type: 'null'
          title: Account
        order:
          type: string
          title: Order
        counterparty:
          anyOf:
            - type: string
            - type: 'null'
          title: Counterparty
        instrument:
          oneOf:
            - $ref: '#/components/schemas/Bill'
            - $ref: '#/components/schemas/CurrencyPair'
            - $ref: '#/components/schemas/Bond'
            - $ref: '#/components/schemas/MoneyMarketFund'
            - $ref: '#/components/schemas/AMC'
            - $ref: '#/components/schemas/ETF'
          title: Instrument
          discriminator:
            propertyName: instrument_type
            mapping:
              amc:
                $ref: '#/components/schemas/AMC'
              bill:
                $ref: '#/components/schemas/Bill'
              bond:
                $ref: '#/components/schemas/Bond'
              currency_pair:
                $ref: '#/components/schemas/CurrencyPair'
              etf:
                $ref: '#/components/schemas/ETF'
              money_market_fund:
                $ref: '#/components/schemas/MoneyMarketFund'
        ytm:
          anyOf:
            - type: string
            - type: 'null'
          title: Ytm
        trading_venue:
          anyOf:
            - type: string
            - type: 'null'
          title: Trading Venue
        tvtic:
          anyOf:
            - type: string
            - type: 'null'
          title: Tvtic
        execution_reference:
          type: string
          title: Execution Reference
        execution_broker:
          type: string
          title: Execution Broker
        execution_audit_trail:
          anyOf:
            - type: string
            - type: 'null'
          title: Execution Audit Trail
        settlement_batch_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Settlement Batch Id
        is_reportable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Reportable
        settlement_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Settlement Date
        executed_at:
          type: string
          format: date-time
          title: Executed At
        settled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Settled At
        meta:
          anyOf:
            - type: object
            - type: 'null'
          title: Meta
        created_at:
          type: string
          format: date-time
          title: Created At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was created.
        modified_at:
          type: string
          format: date-time
          title: Modified At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was last modified.
      type: object
      required:
        - created_at
        - modified_at
        - id
        - price
        - quantity
        - quantity_currency
        - notional
        - notional_currency
        - side
        - status
        - position
        - account
        - order
        - counterparty
        - instrument
        - ytm
        - trading_venue
        - tvtic
        - execution_reference
        - execution_broker
        - execution_audit_trail
        - settlement_batch_id
        - is_reportable
        - settlement_date
        - executed_at
        - settled_at
        - meta
      title: OrderTrade
    InvalidParam:
      properties:
        path:
          items:
            anyOf:
              - type: integer
              - type: string
          type: array
          title: Path
          description: Path to the field name (or index if a list) that errored.
        detail:
          type: string
          title: Detail
          description: Human-readable detail for error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
      type: object
      required:
        - path
        - detail
        - code
      title: InvalidParam
    InstrumentTradingStatus:
      type: string
      enum:
        - buy_sell
        - buy_only
        - sell_only
        - not_trading
      title: InstrumentTradingStatus
      properties: {}
    InstrumentRolloutStage:
      type: string
      enum:
        - ga
        - beta
      title: InstrumentRolloutStage
      properties: {}
    PriceType:
      type: string
      enum:
        - percent
        - money
      title: PriceType
      properties: {}
    BondCouponType:
      type: string
      enum:
        - fixed_coupon
        - floating_coupon
        - zero_coupon
        - stepped_coupon
        - deferred_coupon
        - pay_in_kind_coupon
        - indexed_coupon
        - credit_linked_coupon
      title: BondCouponType
      properties: {}
    BondCouponFrequency:
      type: string
      enum:
        - annual
        - semi_annual
        - quarterly
        - monthly
        - biennial
      title: BondCouponFrequency
      properties: {}
    DayCountConvention:
      type: string
      enum:
        - '30_360'
        - actual_360
        - actual_365_fixed
        - actual_actual
      title: DayCountConvention
      properties: {}
    OrderTradeStatus:
      type: string
      enum:
        - executed
        - settled
      title: OrderTradeStatus
      properties: {}
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````