openapi: 3.0.1
info:
  title: Orders API
  description: "This API allows web clients to stage FX spot, FX forward, NDF, NDS\
    \ and FX option orders in\nthe TradingScreen order management system, query existing\
    \ orders and executions and cancel orders that have gone to market.\n\nVersion\
    \ 2 of the order management API contains a number of improvements designed to\
    \ improve the client experience.\n\nWe have improved our error messaging format.\
    \ If an error occurs when entering an order, the JSON response will\ncontain the\
    \ original message plus a list of error objects as a sub-element.\nThis allows\
    \ users to see all of the errors encountered while processing the message.\n\n\
    Executions can now be queried from the TradingScreen Order Manager (TSOM), and\
    \ are also available on queried orders.\n\nAll post requests that accept lists\
    \ of objects now support a correlation id field, so that an order in a request\n\
    can be linked back to a specific object in the response.\nThis is only valid for\
    \ the duration of the request, all subsequent queries should use the unique id\
    \ generated by TradingScreen.\n\nFX Orders of all types are supported - Spot,\
    \ Forward, Non-deliverable Forwards, Swaps, Non-Deliverable Swaps.\n\nMulti-leg\
    \ strategies such as FX future spreads are supported.\n\nNB: this swagger doc\
    \ is for documentation purposes only - hitting execute will return 'failed to\
    \ fetch'.\nHowever this will display the curl request which you can try out for\
    \ yourself."
  contact:
    name: support
    url: https://www.bidfx.com/apis
    email: support@bidfx.com
  version: "2.0"
servers:
- url: https://api.ld.bidfx.biz:443
  description: London UAT REST
- url: https://api.ty.bidfx.biz:443
  description: Tokyo UAT REST
- url: https://api.sg.bidfx.com:443
  description: Singapore Production REST
- url: https://api.ty.bidfx.com:443
  description: Tokyo Production REST
- url: https://api.ld.bidfx.com:443
  description: London Production REST
- url: https://api.ny.bidfx.com:443
  description: New York Production REST
paths:
  /:
    get:
      operationId: health
      responses:
        default:
          description: default response
          content:
            '*/*': {}
  /{default}:
    get:
      operationId: get
      responses:
        default:
          description: default response
          content:
            '*/*': {}
    put:
      operationId: putMultiPart
      responses:
        default:
          description: default response
          content:
            '*/*': {}
    post:
      operationId: post
      requestBody:
        content:
          '*/*':
            schema:
              type: string
      responses:
        default:
          description: default response
          content:
            '*/*': {}
    delete:
      operationId: delete
      requestBody:
        content:
          '*/*':
            schema:
              type: string
      responses:
        default:
          description: default response
          content:
            '*/*': {}
    options:
      operationId: option
      responses:
        default:
          description: default response
          content:
            '*/*': {}
    patch:
      operationId: patch
      requestBody:
        content:
          '*/*':
            schema:
              type: string
      responses:
        default:
          description: default response
          content:
            '*/*': {}
  /api/om/heartbeat:
    get:
      summary: Heartbeat
      description: Returns a 200 OK Response when the service is up.  Used to keep
        alive a connection by calling every x seconds
      operationId: getHeartBeat
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: Service is OK
  /api/om/v3/algo:
    get:
      tags:
      - Algo
      - FX
      summary: Query bank algos
      description: Query bank algos for user
      operationId: queryBankAlgos
      parameters:
      - name: executing_broker
        in: query
        description: An executing broker to query on
        required: true
        schema:
          type: string
      - name: name
        in: query
        schema:
          type: string
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: List of bank algos
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BankAlgo'
        "400":
          description: Cannot query unlimited bank algos; supply 'branch_id'
      security:
      - basicAuth: []
  /api/om/v2/execution:
    get:
      tags:
      - Order
      - FX
      summary: Query Executions
      description: Query Executions on an Order
      operationId: queryExecutions
      parameters:
      - name: order_ts_id
        in: query
        description: An existing order id to query on
        required: true
        schema:
          type: string
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: List of Executions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Execution'
        "400":
          description: Cannot query unlimited orders; supply 'order_ts_id'
      security:
      - basicAuth: []
  /api/fx-dates/v1/fx-date:
    get:
      tags:
      - FX
      summary: FX Settlement and Fixing Dates
      description: "This API allows web clients to query FX settlement and fixing\
        \ dates for particular FX deal types and tenors. If tenors are provided they\
        \ will be echoed in the response, otherwise if a settlement date matches a\
        \ particular tenor for a given trading day, this will be returned. If no tenor\
        \ matches, the tenor value(s) will be 'BD' aka. a broken-date tenor."
      operationId: getFxDateDataWithUrl
      parameters:
      - name: ccy_pair
        in: query
        description: "The FX currency pair, e.g. EURUSD"
        schema:
          type: string
      - name: deal_type
        in: query
        description: The Deal Type
        schema:
          type: string
          enum:
          - SPOT
          - FWD
          - SWAP
          - NDF
          - NDS
          - DEAL_OUTRIGHT
          - SWAP_OUTRIGHT
          - WILDCARD
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: "Settlement Date information in the form Map<String, String>"
          content:
            application/json:
              schema:
                type: string
                example:
                  settlement_date: 2019-05-20
      security:
      - basicAuth: []
  /api/om/v2/order/acknowledgement:
    post:
      tags:
      - Order
      summary: Acknowledge a Compliance Limit Breach
      description: Acknowledge a Compliance Limit Breach. The POST body is a single
        InstructionAcknowledgement object.
      operationId: acknowledgeOrderInstruction
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: true
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      - name: include_competitive_rates
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderInstructionAcknowledgement'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: The order that is N/Acked by this instruction
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  anyOf:
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/PortfolioOrder'
        "400":
          description: Invalid Acknowledgment Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderInstructionAcknowledgement'
      security:
      - basicAuth: []
  /api/om/v2/order:
    get:
      tags:
      - Order
      summary: Query orders
      description: "Query order ids or client order id for the branch associated with\
        \ the REST client username. For large or all order queries, refer to the paged\
        \ order query."
      operationId: queryOrders
      parameters:
      - name: order_ts_id
        in: query
        description: The order ID to query
        schema:
          type: array
          items:
            type: string
      - name: include_executions
        in: query
        description: True to include executions
        schema:
          type: boolean
          default: true
      - name: include_instructions
        in: query
        description: True to include instructions
        schema:
          type: boolean
          default: false
      - name: include_historical_orders
        in: query
        description: True to include historical orders
        schema:
          type: boolean
          default: false
      - name: include_competitive_rates
        in: query
        description: True to include competitive rates
        schema:
          type: boolean
          default: false
      - name: client_order_id
        in: query
        description: The client order id to query
        schema:
          type: array
          items:
            type: string
      - name: filter_field
        in: query
        description: The name of a field on which to filter results
        schema:
          type: string
      - name: filter_value
        in: query
        description: Only orders whose filter_field field has a value of exactly filter_value
          are returned
        schema:
          type: string
      - name: filter_min
        in: query
        description: Only orders whose filter_field field have a value greater than
          filter_min are returned
        schema:
          type: string
      - name: filter_max
        in: query
        description: Only orders whose filter_field field have a value less that filter_max
          are returned
        schema:
          type: string
      - name: timeout
        in: query
        description: Request timeout in milliseconds
        schema:
          type: integer
          format: int64
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: true
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: An empty List of orders
          content:
            application/json:
              schema:
                minItems: 0
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
              example: []
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: A List or orders matching the query
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "400":
          description: An ErrorBuilder detailing the request failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - basicAuth: []
    post:
      tags:
      - Order
      summary: Stage a list of orders on the branch associated with the REST client
        username
      description: |-
        Stage a list of orders on the branch associated with the REST client username. The POST body is a list of Order objects.
        Stage Orders with Allocations
        Stage a list of orders on the branch associated with the REST client username. The POST body is a list of Order objects. An Allocation object is specified as a sub-element.

        Stage Orders with Algo Parameters
        Stage a list of orders on the branch associated with the REST client username. The POST body is a list of Order objects. An OrderAlgo object is specified as a sub-element.

        Stage Cryptocurrency Orders
        Stage a list of orders on the branch associated with the REST client username. The POST body is a list of Order objects.

        Stage Portfolio Orders
        Stage a list of portfolio orders on the branch associated with the REST client username. The POST body is a list of Order objects.
      operationId: stageOrders
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: true
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      - name: allow_partial_success
        in: query
        description: "If true, if multiple orders are sent in the POST request, and\
          \ if one or more fails validation the entire set will not be rejected. \
          \ The successful orders will be processed."
        schema:
          type: boolean
          default: false
      requestBody:
        description: List of Order objects
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                anyOf:
                - $ref: '#/components/schemas/PortfolioOrder'
                - $ref: '#/components/schemas/ATDLAlgoFxOrder'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: List of Staged Orders
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "202":
          description: "List of Staged Orders.  The orders are accepted because they\
            \ require further processing, either by external brokers acknowledging\
            \ an auto submit, or the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "206":
          description: "List of Staged Orders.  Not all the orders in the request\
            \ could be staged, the failed orders are returned with the Error block\
            \ set."
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "400":
          description: Invalid Order parameters
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
      security:
      - basicAuth: []
  /api/om/v2/order/paged:
    get:
      tags:
      - Order
      summary: Paged order query
      description: "Query all orders (or by order_ts_id/client_order_id) for the branch\
        \ associated with the REST client username. This request responds with orders\
        \ in a streaming fashion (Transfer-Encoding: chunked) and is the preferred\
        \ method for querying large quantities of orders."
      operationId: queryAllOrdersPaged
      parameters:
      - name: order_ts_id
        in: query
        description: The order ID to query
        schema:
          type: array
          items:
            type: string
      - name: include_executions
        in: query
        description: True to include executions
        schema:
          type: boolean
          default: true
      - name: include_instructions
        in: query
        description: True to include instructions
        schema:
          type: boolean
          default: false
      - name: include_historical_orders
        in: query
        description: True to include historical orders
        schema:
          type: boolean
          default: false
      - name: include_competitive_rates
        in: query
        description: True to include competitive rates
        schema:
          type: boolean
          default: false
      - name: client_order_id
        in: query
        description: The client order id to query
        schema:
          type: array
          items:
            type: string
      - name: filter_field
        in: query
        description: The name of a field on which to filter results
        schema:
          type: string
      - name: filter_value
        in: query
        description: Only orders whose filter_field field has a value of exactly filter_value
          are returned
        schema:
          type: string
      - name: filter_min
        in: query
        description: Only orders whose filter_field field have a value greater than
          filter_min are returned
        schema:
          type: string
      - name: filter_max
        in: query
        description: Only orders whose filter_field field have a value less that filter_max
          are returned
        schema:
          type: string
      - name: timeout
        in: query
        description: Request timeout in milliseconds
        schema:
          type: integer
          format: int64
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: An empty List of orders
          content:
            application/json:
              schema:
                minItems: 0
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
              example: []
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: A List of orders matching the query
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "400":
          description: An ErrorBuilder detailing the request failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - basicAuth: []
  /api/om/v2/order/amend:
    post:
      tags:
      - Order
      summary: Amend any security order
      description: Amend any security order. The POST body is a single AmendInstruction
        object.
      operationId: amendOrder
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: true
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        description: The AmendInstruction
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/PortfolioOrderAmendInstruction'
              - $ref: '#/components/schemas/FxOrderAmendInstruction'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: Details of the amended order
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "202":
          description: "Details of the amended order.  The orders are accepted because\
            \ they require further processing, either by external brokers acknowledging\
            \ an auto submit, or the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "400":
          description: Invalid Amend Instruction
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/PortfolioOrderAmendInstruction'
                - $ref: '#/components/schemas/FxOrderAmendInstruction'
      security:
      - basicAuth: []
  /api/om/v2/order/cancel:
    post:
      tags:
      - Order
      summary: Cancel an order that has gone to market
      description: Cancel an order that has gone to market. The POST body is a single
        CancelInstruction object.
      operationId: cancelOrder
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: true
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        description: The CancelInstruction
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/PortfolioOrderCancelInstruction'
              - $ref: '#/components/schemas/FxOrderCancelInstruction'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: Details of the cancelled order
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "202":
          description: "Details of the amended order.  The orders are accepted because\
            \ they require further processing, by the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "400":
          description: Invalid Cancel Instruction
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/PortfolioOrderCancelInstruction'
                - $ref: '#/components/schemas/FxOrderCancelInstruction'
      security:
      - basicAuth: []
  /api/om/v2/order/submit:
    post:
      tags:
      - Order
      summary: Submit an order to market
      description: Submit an order to market. The POST body is a single SubmitInstruction
        object.
      operationId: submitOrder
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: true
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        description: The SubmitInstruction
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/PortfolioOrderSubmitInstruction'
              - $ref: '#/components/schemas/FxOrderSubmitInstruction'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: Details of the submitted order
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "202":
          description: "Details of the amended order.  The orders are accepted because\
            \ they require further processing, either by external brokers acknowledging\
            \ the submit, or the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "400":
          description: Invalid Submit Instruction
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/PortfolioOrderSubmitInstruction'
                - $ref: '#/components/schemas/FxOrderSubmitInstruction'
      security:
      - basicAuth: []
  /api/om/v2/order/slice:
    post:
      tags:
      - Order
      summary: Slice an order
      description: Slice an order. The POST body is a single SliceInstruction object.
      operationId: sliceOrder
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: true
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        description: The SliceInstruction
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SliceOrderInstruction'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: Details of the sliced order
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "202":
          description: Details of the amended order.  The orders are accepted because
            they require further processing by the client acknowledging a violation
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  anyOf:
                  - $ref: '#/components/schemas/PortfolioOrder'
                  - $ref: '#/components/schemas/ATDLAlgoFxOrder'
                  - $ref: '#/components/schemas/WaveOrder'
        "400":
          description: Invalid Slice Instruction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SliceOrderInstruction'
      security:
      - basicAuth: []
  /api/om/v2/algo:
    get:
      tags:
      - Order
      - FX
      summary: Query Algo Strategies
      description: "Collections of algo strategies are defined by TradingScreen support\
        \ staff, and are selected by executing broker, client branch, username and\
        \ asset class. Each collection contains a set of strategies, which are selected\
        \ by name. Each strategy defines a set of parameters of various types, either\
        \ required or optional. This endpoint allows the client to query collections\
        \ of algo strategies and their parameters."
      operationId: queryAlgoStrategies
      parameters:
      - name: asset_class
        in: query
        schema:
          type: string
          enum:
          - EQUITY
          - FUTURE
          - OPTION
          - FX
          - FIXED_INCOME
          - CRYPTO
          - PORTFOLIO
          - CDS
          - IRS
          - STRATEGY
          - WARRANT
          - INDEX
      - name: executing_broker
        in: query
        schema:
          type: string
      - name: geographic_region
        in: query
        schema:
          type: string
          enum:
          - APAC
          - EUROPE
          - MEA
          - NORTH_AMERICA
          - SOUTH_AMERICA
      - name: name
        in: query
        schema:
          type: string
      - name: strategy_type
        in: query
        schema:
          type: string
          enum:
          - PAIRS
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: List of strategies matching the query parameters
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Algo'
        "400":
          description: Invalid Request Paramenters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - basicAuth: []
  /api/om/v2/fx:
    get:
      tags:
      - Order
      - FX
      summary: Query orders
      description: "Query order ids or client order id for the branch associated with\
        \ the REST client username. For large or all order queries, refer to the paged\
        \ order query."
      operationId: queryFxOrders
      parameters:
      - name: order_ts_id
        in: query
        description: The order ID to query
        schema:
          type: array
          items:
            type: string
      - name: include_executions
        in: query
        description: True to include executions
        schema:
          type: boolean
          default: true
      - name: include_instructions
        in: query
        description: True to include instructions
        schema:
          type: boolean
          default: false
      - name: include_historical_orders
        in: query
        description: True to include historical orders
        schema:
          type: boolean
          default: false
      - name: include_competitive_rates
        in: query
        description: True to include competitive rates
        schema:
          type: boolean
          default: false
      - name: client_order_id
        in: query
        description: The client order id to query
        schema:
          type: array
          items:
            type: string
      - name: filter_field
        in: query
        description: The name of a field on which to filter results
        schema:
          type: string
      - name: filter_value
        in: query
        description: Only orders whose filter_field field has a value of exactly filter_value
          are returned
        schema:
          type: string
      - name: filter_min
        in: query
        description: Only orders whose filter_field field have a value greater than
          filter_min are returned
        schema:
          type: string
      - name: filter_max
        in: query
        description: Only orders whose filter_field field have a value less that filter_max
          are returned
        schema:
          type: string
      - name: timeout
        in: query
        description: Request timeout in milliseconds
        schema:
          type: integer
          format: int64
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: true
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: An empty List of FX orders
          content:
            application/json:
              schema:
                minItems: 0
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
              example: []
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: A List of FX orders matching the query
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
        "400":
          description: An ErrorBuilder detailing the request failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - basicAuth: []
    post:
      tags:
      - Order
      - FX
      summary: Stage FX Orders
      description: Stage a list of FX orders on the branch associated with the REST
        client username
      operationId: stageOrders_1
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: false
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        description: List of FX Orders
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ATDLAlgoFxOrder'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: FX Orders Staged
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
        "202":
          description: "FX Orders Staged.  The orders are accepted because they require\
            \ further processing, either by external brokers acknowledging the submit,\
            \ or the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
        "400":
          description: Invalid Staging Request
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
      security:
      - basicAuth: []
  /api/om/v2/fx/paged:
    get:
      tags:
      - Order
      - FX
      summary: Paged FX Order query
      description: "Query all FX orders (or by order_ts_id/client_order_id) for the\
        \ branch associated with the REST client username. This request responds with\
        \ orders in a streaming fashion (Transfer-Encoding: chunked) and is the preferred\
        \ method for querying large quantities of FX orders."
      operationId: queryFxOrdersPaged
      parameters:
      - name: order_ts_id
        in: query
        description: The order ID to query
        schema:
          type: array
          items:
            type: string
      - name: include_executions
        in: query
        description: True to include executions
        schema:
          type: boolean
          default: true
      - name: include_instructions
        in: query
        description: True to include instructions
        schema:
          type: boolean
          default: false
      - name: include_historical_orders
        in: query
        description: True to include historical orders
        schema:
          type: boolean
          default: false
      - name: include_competitive_rates
        in: query
        description: True to include competitive rates
        schema:
          type: boolean
          default: false
      - name: client_order_id
        in: query
        description: The client order id to query
        schema:
          type: array
          items:
            type: string
      - name: filter_field
        in: query
        description: The name of a field on which to filter results
        schema:
          type: string
      - name: filter_value
        in: query
        description: Only orders whose filter_field field has a value of exactly filter_value
          are returned
        schema:
          type: string
      - name: filter_min
        in: query
        description: Only orders whose filter_field field have a value greater than
          filter_min are returned
        schema:
          type: string
      - name: filter_max
        in: query
        description: Only orders whose filter_field field have a value less that filter_max
          are returned
        schema:
          type: string
      - name: timeout
        in: query
        description: Request timeout in milliseconds
        schema:
          type: integer
          format: int64
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: An empty List of FX orders
          content:
            application/json:
              schema:
                minItems: 0
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
              example: []
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: A List of FX orders matching the query
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
        "400":
          description: An ErrorBuilder detailing the request failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - basicAuth: []
  /api/om/v2/fx/amend:
    post:
      tags:
      - Order
      - FX
      summary: Amend FX Orders
      description: Amend an FX order. The POST body is a single FxAmendInstruction
        object
      operationId: amendFxOrder
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: false
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        description: Amend Instruction
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FxOrderAmendInstruction'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: FX Order Amended
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
        "202":
          description: "FX Orders Staged.  The orders are accepted because they require\
            \ further processing, by the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
        "400":
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FxOrderAmendInstruction'
      security:
      - basicAuth: []
  /api/om/v2/fx/cancel:
    post:
      tags:
      - Order
      - FX
      summary: Cancel an FX Order
      description: Cancel an FX order that has gone to market. The POST body is a
        single CancelInstruction object
      operationId: cancelFxOrder
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: false
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        description: Cancel Instruction
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FxOrderCancelInstruction'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: FX Order Amended
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
        "202":
          description: "FX Orders Staged.  The orders are accepted because they require\
            \ further processing, by the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
        "400":
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FxOrderCancelInstruction'
      security:
      - basicAuth: []
  /api/om/v2/fx/submit:
    post:
      tags:
      - Order
      - FX
      summary: Submit an order to market
      description: Submit an order to market. The POST body is a single SubmitInstruction
        object.
      operationId: submitFxOrder
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: false
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FxOrderSubmitInstruction'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: Order Submitted
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
        "202":
          description: "FX Orders Staged.  The orders are accepted because they require\
            \ further processing, either by external brokers acknowledging the submit,\
            \ or the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ATDLAlgoFxOrder'
        "400":
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FxOrderSubmitInstruction'
      security:
      - basicAuth: []
  /api/om/v3/fx:
    get:
      tags:
      - Order
      - FX
      summary: Query orders
      description: "Query order ids or client order id for the branch associated with\
        \ the REST client username. For large or all order queries, refer to the paged\
        \ order query."
      operationId: queryFxOrders_1
      parameters:
      - name: order_ts_id
        in: query
        description: The order ID to query
        schema:
          type: array
          items:
            type: string
      - name: include_executions
        in: query
        description: True to include executions
        schema:
          type: boolean
          default: true
      - name: include_instructions
        in: query
        description: True to include instructions
        schema:
          type: boolean
          default: false
      - name: include_historical_orders
        in: query
        description: True to include historical orders
        schema:
          type: boolean
          default: false
      - name: include_competitive_rates
        in: query
        description: True to include competitive rates
        schema:
          type: boolean
          default: false
      - name: client_order_id
        in: query
        description: The client order id to query
        schema:
          type: array
          items:
            type: string
      - name: filter_field
        in: query
        description: The name of a field on which to filter results
        schema:
          type: string
      - name: filter_value
        in: query
        description: Only orders whose filter_field field has a value of exactly filter_value
          are returned
        schema:
          type: string
      - name: filter_min
        in: query
        description: Only orders whose filter_field field have a value greater than
          filter_min are returned
        schema:
          type: string
      - name: filter_max
        in: query
        description: Only orders whose filter_field field have a value less that filter_max
          are returned
        schema:
          type: string
      - name: timeout
        in: query
        description: Request timeout in milliseconds
        schema:
          type: integer
          format: int64
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: true
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: An empty List of FX orders
          content:
            application/json:
              schema:
                minItems: 0
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
              example: []
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: A List of FX orders matching the query
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
        "400":
          description: An ErrorBuilder detailing the request failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - basicAuth: []
    post:
      tags:
      - Order
      - FX
      summary: Stage FX Orders
      description: Stage a list of FX orders on the branch associated with the REST
        client username
      operationId: stageOrders_2
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: false
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        description: List of FX Orders
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BADLAlgoFxOrder'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: FX Orders Staged
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
        "202":
          description: "FX Orders Staged.  The orders are accepted because they require\
            \ further processing, either by external brokers acknowledging the submit,\
            \ or the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
        "400":
          description: Invalid Staging Request
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
      security:
      - basicAuth: []
  /api/om/v3/fx/paged:
    get:
      tags:
      - Order
      - FX
      summary: Paged FX Order query
      description: "Query all FX orders (or by order_ts_id/client_order_id) for the\
        \ branch associated with the REST client username. This request responds with\
        \ orders in a streaming fashion (Transfer-Encoding: chunked) and is the preferred\
        \ method for querying large quantities of FX orders."
      operationId: queryFxOrdersPaged_1
      parameters:
      - name: order_ts_id
        in: query
        description: The order ID to query
        schema:
          type: array
          items:
            type: string
      - name: include_executions
        in: query
        description: True to include executions
        schema:
          type: boolean
          default: true
      - name: include_instructions
        in: query
        description: True to include instructions
        schema:
          type: boolean
          default: false
      - name: include_historical_orders
        in: query
        description: True to include historical orders
        schema:
          type: boolean
          default: false
      - name: include_competitive_rates
        in: query
        description: True to include competitive rates
        schema:
          type: boolean
          default: false
      - name: client_order_id
        in: query
        description: The client order id to query
        schema:
          type: array
          items:
            type: string
      - name: filter_field
        in: query
        description: The name of a field on which to filter results
        schema:
          type: string
      - name: filter_value
        in: query
        description: Only orders whose filter_field field has a value of exactly filter_value
          are returned
        schema:
          type: string
      - name: filter_min
        in: query
        description: Only orders whose filter_field field have a value greater than
          filter_min are returned
        schema:
          type: string
      - name: filter_max
        in: query
        description: Only orders whose filter_field field have a value less that filter_max
          are returned
        schema:
          type: string
      - name: timeout
        in: query
        description: Request timeout in milliseconds
        schema:
          type: integer
          format: int64
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: An empty List of FX orders
          content:
            application/json:
              schema:
                minItems: 0
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
              example: []
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "200":
          description: A List of FX orders matching the query
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
        "400":
          description: An ErrorBuilder detailing the request failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - basicAuth: []
  /api/om/v3/fx/cancel:
    post:
      tags:
      - Order
      - FX
      summary: Cancel an FX Order
      description: Cancel an FX order that has gone to market. The POST body is a
        single CancelInstruction object
      operationId: cancelFxOrder_1
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: false
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        description: Cancel Instruction
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FxOrderCancelInstruction'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: FX Order Amended
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
        "202":
          description: "FX Orders Staged.  The orders are accepted because they require\
            \ further processing, by the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
        "400":
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FxOrderCancelInstruction'
      security:
      - basicAuth: []
  /api/om/v3/fx/submit:
    post:
      tags:
      - Order
      - FX
      summary: Submit an order to market
      description: Submit an order to market. The POST body is a single SubmitInstruction
        object.
      operationId: submitFxOrder_1
      parameters:
      - name: aggregate
        in: query
        description: "If true, child orders will be shown as sub elements of the parent\
          \ order."
        schema:
          type: boolean
          default: false
      - name: aggregate_execution
        in: query
        description: "If true, and aggregate is also set, all executions of parent\
          \ and child orders will be shown at the parent level"
        schema:
          type: boolean
          default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FxOrderSubmitInstruction'
      responses:
        "401":
          description: Credentials are required to access this endpoint
        "403":
          description: User does not have the required permissions to access this
            resource
        "404":
          description: "Could not find the requested resource, ensure the path is\
            \ correct"
        "405":
          description: The request method is not supported on this resource
        "406":
          description: The request does not support the media type that the server
            is producing; check the "Accept" header in the request is valid
        "414":
          description: The request URL is too long
        "415":
          description: The endpoint does not support the media type that was sent;
            check the "Content-Type" header in the request is valid
        "500":
          description: An error occurred while processing the request
        "201":
          description: Order Submitted
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
        "202":
          description: "FX Orders Staged.  The orders are accepted because they require\
            \ further processing, either by external brokers acknowledging the submit,\
            \ or the client acknowledging a violation"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BADLAlgoFxOrder'
        "400":
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FxOrderSubmitInstruction'
      security:
      - basicAuth: []
  /application.wadl:
    get:
      operationId: getWadl
      responses:
        default:
          description: default response
          content:
            application/vnd.sun.wadl+xml: {}
            application/xml: {}
  /application.wadl/{path}:
    get:
      operationId: getExternalGrammar
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            application/xml: {}
components:
  schemas:
    AlgoParameter:
      type: object
      properties:
        description:
          type: string
          description: Description of this parameter
          readOnly: true
          example: Duration of the order
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        name:
          type: string
          description: Name of this parameter (expected on stage order requests)
          readOnly: true
          example: TimeInForce
        required:
          type: boolean
          description: True if this parameter is required
          readOnly: true
        type:
          type: string
          description: Type of this parameter
          readOnly: true
          enum:
          - AMOUNT
          - BOOLEAN
          - CHARACTER
          - CURRENCY
          - DURATION
          - FLOAT
          - INTEGER
          - MARKET_DATE
          - MULTIPLE_CHAR
          - MULTIPLE_STRING
          - PERCENTAGE
          - PRICE
          - PRICE_OFFSET
          - QUANTITY
          - STRING
          - TZ_TIME_ONLY
          - TZ_DATE_TIME
          - UTC_DATE_ONLY
          - UTC_TIME_ONLY
          - UTC_DATE_TIME
          - ENUMERATED
          - NONE
        values:
          type: array
          description: Choices for enumerated parameter values
          items:
            $ref: '#/components/schemas/AlgoValue'
      description: Parameter descriptions
      readOnly: true
    AlgoValue:
      type: object
      properties:
        description:
          type: string
          description: Description of this value
          readOnly: true
          example: Valid until end of current week
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        value:
          type: string
          description: Wire value (sent to broker)
          readOnly: true
          example: DAY
      description: Choices for enumerated parameter values
    BankAlgo:
      type: object
      properties:
        algo_parameters:
          type: array
          description: Algo Parameter descriptions
          readOnly: true
          items:
            $ref: '#/components/schemas/AlgoParameter'
        asset_classes:
          type: array
          description: "Asset classes for which this algo is applicable, unless empty"
          readOnly: true
          example: FX
          items:
            type: string
            description: "Asset classes for which this algo is applicable, unless\
              \ empty"
            readOnly: true
            example: FX
            enum:
            - EQUITY
            - FUTURE
            - OPTION
            - FX
            - FIXED_INCOME
            - CRYPTO
            - PORTFOLIO
            - CDS
            - IRS
            - STRATEGY
            - WARRANT
            - INDEX
        custom_parameters:
          type: array
          description: Custom Parameter descriptions
          readOnly: true
          items:
            $ref: '#/components/schemas/AlgoParameter'
        deal_types:
          type: array
          description: "Deal types for which this algo is applicable, unless empty"
          readOnly: true
          example: "SPOT, FWD"
          items:
            type: string
            description: "Deal types for which this algo is applicable, unless empty"
            readOnly: true
            example: "SPOT, FWD"
            enum:
            - SPOT
            - FWD
            - SWAP
            - NDF
            - NDS
            - DEAL_OUTRIGHT
            - SWAP_OUTRIGHT
            - WILDCARD
        description:
          type: string
          description: Description of this algo
          readOnly: true
          example: FX Limit Strategy
        global_markets:
          type: array
          description: "Global markets for which this algo is applicable, unless empty"
          readOnly: true
          items:
            type: string
            description: "Global markets for which this algo is applicable, unless\
              \ empty"
            readOnly: true
            enum:
            - APAC
            - EUROPE
            - MEA
            - NORTH_AMERICA
            - SOUTH_AMERICA
        name:
          type: string
          description: Name of this algo (expected on stage order requests)
          readOnly: true
        order_parameters:
          type: array
          description: Order Parameter descriptions
          readOnly: true
          items:
            $ref: '#/components/schemas/AlgoParameter'
        order_types:
          type: array
          description: "Order types for which this algo is applicable, unless empty"
          readOnly: true
          items:
            type: string
            description: "Order types for which this algo is applicable, unless empty"
            readOnly: true
        time_types:
          type: array
          description: "Time in force types for which this algo is applicable, unless\
            \ empty"
          readOnly: true
          example: "DAY, GTC, GTD"
          items:
            type: string
            description: "Time in force types for which this algo is applicable, unless\
              \ empty"
            readOnly: true
            example: "DAY, GTC, GTD"
        venue_codes:
          type: array
          description: "Venue codes for which this algo is applicable, unless empty"
          readOnly: true
          example: "GBX, LME"
          items:
            type: string
            description: "Venue codes for which this algo is applicable, unless empty"
            readOnly: true
            example: "GBX, LME"
    Error:
      type: object
      properties:
        field:
          type: string
          description: The field the error applies to
          readOnly: true
        message:
          type: string
          description: Error message
          readOnly: true
        value:
          type: object
          description: The value in the field the error applies to
          readOnly: true
    Execution:
      type: object
      properties:
        accrued_interest:
          type: number
          description: Accrued Interest
          readOnly: true
        all_in_price:
          type: number
          description: All In Price
          readOnly: true
        broker_id:
          type: string
          description: The unique ID for this execution as assigned by the executing
            broker.
          readOnly: true
        broker_lei:
          type: string
          description: A 20 character string identifying the broker entity.
          readOnly: true
        contra_amount:
          type: number
          description: Contra Amount
          readOnly: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        eti:
          type: string
          description: The electronic trading interface (varies from client to client).
          readOnly: true
        executed_by_systematic_internaliser:
          type: boolean
          description: Mifid II field
          readOnly: true
        executed_quantity:
          type: number
          description: The quantity executed by the broker in this individual execution.
          readOnly: true
        executed_time:
          type: string
          description: The exchange timestamp of the execution report
          format: date-time
          readOnly: true
        executed_value:
          type: number
          description: The value of the quantity executed.
          readOnly: true
        executing_broker:
          type: string
          description: Executing Broker
          readOnly: true
        executing_broker_name:
          type: string
          description: Executing Broker name
          readOnly: true
        far_all_in_price:
          type: number
          description: Far Leg All In Price
          readOnly: true
        far_contra_amount:
          type: number
          description: Far Leg Contra Amount
          readOnly: true
        far_price:
          type: number
          description: Far Leg price
          readOnly: true
        far_quantity:
          type: number
          description: The Far Leg executed quantity
          readOnly: true
        far_value:
          type: number
          description: The Far Leg executed value
          readOnly: true
        last_capacity_type:
          type: string
          description: Broker Capacity Type
          readOnly: true
          enum:
          - Agent
          - CrossAsAgent
          - CrossAsPrincipal
          - Principal
          - RisklessPrincipal
        last_liquidity_type:
          type: string
          description: Indicator to identify whether this fill was a result of a liquidity
            provider providing or liquidity taker taking the liquidity.
          readOnly: true
          enum:
          - ADDED
          - REMOVED
          - ROUTED_OUT
          - AUCTION
          - CONDITIONAL_CONTINUOUS
          - CONDITIONAL_AUCTION
        last_market:
          type: string
          description: Broker specified execution venue
          readOnly: true
        order_ts_id:
          type: string
          description: Uniquely identifies the order.
          readOnly: true
        partitionId:
          type: integer
          format: int32
        price:
          type: number
          description: The executed price.
          readOnly: true
        price_basis:
          type: string
          description: Price basis of the execution
          readOnly: true
          enum:
          - PERCENT_PAR
          - PER_UNIT
          - FIXED_AMOUNT
          - DISCOUNT
          - PREMIUM
          - SPREAD
          - YIELD
          - UP_FRONT_POINTS
        protocol:
          type: string
          description: The Protocol the order was staged via.
          readOnly: true
          enum:
          - VOICE
          - A2A
          - RFQ
          - RFS
          - VENUE
          - AIOI
          - PROCESS
          - CROSS_TRADE
          - OTHER
        quantity:
          type: number
          description: The executed quantity.
          readOnly: true
        roll_convention:
          type: string
          description: The roll convention of the OTC product as defined by the Broker
        settlement_date:
          type: string
          description: Settlement Date
          format: date
          readOnly: true
        side:
          type: string
          description: The execution side
          readOnly: true
          enum:
          - BUY
          - SELL
        spread:
          type: number
          description: The Spread
          readOnly: true
        state:
          type: string
          description: The state of the execution
          readOnly: true
          enum:
          - ACTIVE
          - CANCELLED
        stub_period_type:
          type: string
          description: The stub period type of the OTC product as defined by the Broker.
        trade_date:
          type: string
          description: Trade Date
          format: date
          readOnly: true
        ts_id:
          type: string
          description: Uniquely identifies the execution.
          readOnly: true
        upfront_payment:
          type: number
          description: Any upfront payment associated with this executon.
          readOnly: true
        uuid:
          type: number
          description: Uniquely identifies the execution.
          readOnly: true
        value:
          type: number
          description: The total executed value
          readOnly: true
        yield:
          type: number
          description: The yield.
          readOnly: true
      description: Executions on the order (returned on the response).
      readOnly: true
    ATDLAlgoFxOrder:
      required:
      - asset_class
      - ccy_pair
      - deal_type
      - dealt_ccy
      - order_type
      - quantity
      - side
      - tenor
      type: object
      allOf:
      - $ref: '#/components/schemas/OrderObject'
      - type: object
        properties:
          all_in_price:
            type: number
            description: All in Price
          asset_class:
            type: string
            description: "The asset class of the order, FX"
            enum:
            - EQUITY
            - FUTURE
            - OPTION
            - FX
            - FIXED_INCOME
            - CRYPTO
            - PORTFOLIO
            - CDS
            - IRS
            - STRATEGY
            - WARRANT
            - INDEX
          benchmark:
            $ref: '#/components/schemas/FxBenchmarkDetails'
          best_value:
            type: boolean
          ccy_pair:
            type: string
            description: The currency pair to be traded
          deal_type:
            type: string
            description: The deal type to be traded (FWD can also be provided as FORWARD
              or OUTRIGHT)
            enum:
            - SPOT
            - FWD
            - SWAP
            - NDF
            - NDS
            - DEAL_OUTRIGHT
            - SWAP_OUTRIGHT
            - WILDCARD
          dealt_ccy:
            type: string
            description: The dealt currency (must match the base or term from the
              currency pair)
          far_all_in_price:
            type: number
          far_dealt_ccy:
            type: string
            description: The far leg dealt currency (must match the dealt_ccy)
          far_executed_quantity:
            type: number
          far_fixing_date:
            type: string
            description: The far leg fixing date as "YYYY-MM-DD" (recommended but
              will be computed from far tenor if missing)
            format: date
          far_forward_points:
            type: number
          far_isin:
            type: string
          far_quantity:
            type: number
            description: The far leg dealt quantity
            writeOnly: true
          far_settlement_date:
            type: string
            description: The far leg settlement date as "YYYY-MM-DD" (recommended
              but will be computed from non "BD" far tenor if missing)
            format: date
          far_side:
            type: string
            description: "The side of the far leg of the order (\"BUY\", \"SELL\"\
              ). Must be the opposite side of the near leg."
            enum:
            - BUY
            - SELL
            - BUY_PROTECTION
            - SELL_PROTECTION
          far_tenor:
            type: string
            description: "The far leg tenor (\"SPOT\", \"1M\", \"2M\", \"1Y\", \"\
              2Y\", \"BD\")"
            enum:
            - TOD
            - TOM
            - SPOT
            - SPOT_NEXT
            - 1W
            - 2W
            - 3W
            - 1M
            - 2M
            - 3M
            - 4M
            - 5M
            - 6M
            - 7M
            - 8M
            - 9M
            - 10M
            - 11M
            - 1Y
            - 2Y
            - 3Y
            - IMMH
            - IMMM
            - IMMU
            - IMMZ
            - BD
          fixing_date:
            type: string
            description: The fixing date as "YYYY-MM-DD" (recommended but will be
              computed from tenor if missing)
            format: date
          forward_points:
            type: number
          fx_algo:
            $ref: '#/components/schemas/V2FxAlgoDetails'
          isin:
            type: string
          matched_principal:
            type: boolean
            description: "Where the facilitator of the trade takes no risk, only matching\
              \ counterparties."
          regulated_venue:
            type: string
            description: "The regulated venue for the order, e.g. UK, EU, US."
          security_financing_transaction:
            type: boolean
            description: Transactions that fall within the scope of activity for securities
              financing.
          settlement_date:
            type: string
            description: The settlement date as "YYYY-MM-DD" (recommended but will
              be computed from non "BD" tenor if missing)
            format: date
          shaped_order_id:
            type: string
            description: The ID assigned by the shaping server if this order was the
              result of merging multiple staged orders together. Can be used to reference
              the order within the BidFX shaping server REST API.
          side:
            type: string
            description: "The side of the order (\"BUY\", \"SELL\")"
            enum:
            - BUY
            - SELL
            - BUY_PROTECTION
            - SELL_PROTECTION
          spot_rate:
            type: number
          swap:
            type: boolean
          swap_isin:
            type: string
          swap_points:
            type: number
          tenor:
            type: string
            description: "The tenor of the order (\"SPOT\", \"1M\", \"2M\", \"1Y\"\
              , \"2Y\", \"BD\")"
            enum:
            - TOD
            - TOM
            - SPOT
            - SPOT_NEXT
            - 1W
            - 2W
            - 3W
            - 1M
            - 2M
            - 3M
            - 4M
            - 5M
            - 6M
            - 7M
            - 8M
            - 9M
            - 10M
            - 11M
            - 1Y
            - 2Y
            - 3Y
            - IMMH
            - IMMM
            - IMMU
            - IMMZ
            - BD
          ticket_shortcut_code:
            type: string
            description: The short code of the ticket shortcut
          unexecuted_quantity:
            type: number
            description: The unexecuted quantity
            readOnly: true
          upInstructionBuilder:
            $ref: '#/components/schemas/InstructionBuilderOrderFxOrderObject'
    Allocation:
      type: object
      properties:
        allocation_type:
          type: string
          description: The type of allocation
          enum:
          - PreTrade
          - PostTrade
        auto_allocate:
          type: boolean
          description: Auto Allocation
        entries:
          type: array
          description: An AllocationEntry object
          items:
            $ref: '#/components/schemas/AllocationEntry'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        template_name:
          type: string
          description: The allocation template name.
          readOnly: true
      description: "An Allocation object, defining pre-trade allocation quantities\
        \ per account. Allocation object definition is below. Cannot be defined as\
        \ well as allocation_template."
    AllocationEntry:
      required:
      - clearing_account
      - clearing_broker
      type: object
      properties:
        aggregation_level_1:
          type: string
          description: Grouping reference assigned to the order
        aggregation_level_2:
          type: string
          description: Grouping reference assigned to the order
        aggregation_level_3:
          type: string
          description: Grouping reference assigned to the order
        alloc_priority:
          type: integer
          description: Allocation priority for this entry.
          format: int32
        alloc_ratio:
          type: number
          description: "The allocation ratio for this entry. For example two allocations\
            \ may have a ratio of 1:1, 2:1, 8:4:2 etc. Must be supplied if an explicit\
            \ quantity is not supplied."
        clearing_account:
          type: string
          description: The clearing account to allocate to. This is an account display
            name setup in the TS system.
        clearing_broker:
          type: string
          description: The clearing broker to allocate to. This is a broker short
            name setup in the TS system.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        far_quantity:
          type: number
          description: The allocation quantity of the far leg of an FX swap.
        min_alloc_qty:
          type: number
          description: The minimum allocated quantity.
        min_trade_lot:
          type: number
          description: The minimum number of lots for this.
        ordinal:
          type: integer
          description: Defines a logical ordering for the allocations. Used for viewing
            in TradeSmart EMS.
          format: int32
        quantity:
          type: number
          description: The quantity to allocate. Must be supplied if an allocation
            ratio is not supplied.
        side:
          type: string
          description: The side of the Alloctaion entry
          enum:
          - BUY
          - SELL
      description: An AllocationEntry object
    BADLAlgoFxOrder:
      required:
      - asset_class
      - ccy_pair
      - deal_type
      - dealt_ccy
      - order_type
      - quantity
      - side
      - tenor
      type: object
      properties:
        account:
          type: string
          description: The executing account.
        aggregation_level_1:
          type: string
          description: Reference assigned to the order.
        aggregation_level_2:
          type: string
          description: Reference assigned to the order.
        aggregation_level_3:
          type: string
          description: Reference assigned to the order.
        algo:
          $ref: '#/components/schemas/V3FxAlgoDetails'
        all_in_price:
          type: number
          description: All in Price
        allocation_data:
          $ref: '#/components/schemas/Allocation'
        allocation_template:
          type: string
          description: "The allocation template name. Cannot be defined as well as\
            \ allocation_data. Either account or allocation template is required;\
            \ if both are supplied, the account will be replaced with the one from\
            \ the template."
          writeOnly: true
        alternate_owner:
          type: string
          description: The alternative owner of the order
        asset_class:
          type: string
          description: "The asset class of the order, FX"
          enum:
          - EQUITY
          - FUTURE
          - OPTION
          - FX
          - FIXED_INCOME
          - CRYPTO
          - PORTFOLIO
          - CDS
          - IRS
          - STRATEGY
          - WARRANT
          - INDEX
        average_executed_price:
          type: number
          description: The average executed price
          readOnly: true
        benchmark:
          $ref: '#/components/schemas/FxBenchmarkDetails'
        best_value:
          type: boolean
        broker_order_id:
          type: string
          description: The unique ID of the order as assigned by the executing broker.
          readOnly: true
        cancel_response_time:
          type: string
          description: "The time the order cancel operation was acknowledged by the\
            \ broker. Note that orders can be resubmitted to other brokers after cancellation,\
            \ this field will only contain the time pertaining to the last processed\
            \ cancel."
          format: date-time
          readOnly: true
        cancel_time:
          type: string
          description: "The time the order cancel operation was received. Note that\
            \ orders can be resubmitted to other brokers after cancellation, this\
            \ field will only contain the time pertaining to the last cancel instruction."
          format: date-time
          readOnly: true
        capture_date:
          type: string
          description: "The capture date.  Only valid to be set on \"order_instruction\"\
            \ : \"TRADE_ENTRY\" requests"
          format: date-time
        ccy_pair:
          type: string
          description: The currency pair to be traded
        children:
          type: array
          description: Child Orders
          items:
            $ref: '#/components/schemas/OrderObject'
        classification:
          type: string
          enum:
          - "NULL"
          - DMA
          - NOE
          - MANUAL
          - QUOTED
          - BROKER_ROUTED
          - CLIENT_ROUTED
          - BROKER_VIEW
          - ALLEGED
          - SYNTHETIC
          - CLIENT_ROUTED_DMA
          - CLIENT_ROUTED_MANUAL
          - BROKER_ROUTED_NOE
          - BROKER_VIEW_DMA
          - BROKER_VIEW_NOE
          - BROKER_VIEW_CLIENT_ROUTED
          - BROKER_VIEW_MANUAL
          - BROKER_VIEW_SYNTHETIC
        client_lei:
          type: string
          description: A 20 character string identifying the entity that issued the
            trade or made the investment decision
        client_order_id:
          type: string
          description: Client defined Order Id
        competitive_rates:
          type: array
          description: "Competitive rates for the Order. For RFQ orders: if provided, price is also required."
          items:
            $ref: '#/components/schemas/ReferencePrice'
        correlation_id:
          type: string
          description: Use to correlate order requests and responses (returned on
            the response).
        creation_date:
          type: string
          description: The order creation date
        custom_fields:
          type: object
          additionalProperties:
            type: string
            description: Custom fields that can be supplied to TS.  This is by agreement.
          description: Custom fields that can be supplied to TS.  This is by agreement.
        deal_type:
          type: string
          description: The deal type to be traded (FWD can also be provided as FORWARD
            or OUTRIGHT)
          enum:
          - SPOT
          - FWD
          - SWAP
          - NDF
          - NDS
          - DEAL_OUTRIGHT
          - SWAP_OUTRIGHT
          - WILDCARD
        dealt_ccy:
          type: string
          description: The dealt currency (must match the base or term from the currency
            pair)
        description:
          type: string
          description: The description field
        disable_instrument_lookup:
          type: boolean
          description: "Sets the order endpoint up to bypass instrument validation,\
            \ instead deferring it to downstream systems.  Setting this field to true\
            \ implies that the instrument, instrument_type and venue_code have to\
            \ be set.  The venue_code must be the exchange (or OTC).  If one of these\
            \ parameters is missing or incorrect the entire trade will be rejected.\
            \  Invalid on Strategy order types."
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        excluded_executing_brokers:
          type: array
          description: Do not send order to executing brokers in this array. Mutually
            exclusive with 'included_executing_brokers'.
          items:
            type: string
            description: Do not send order to executing brokers in this array. Mutually
              exclusive with 'included_executing_brokers'.
        executed_quantity:
          type: number
          description: The executed quantity
          readOnly: true
        executed_value:
          type: number
          description: The executed value
          readOnly: true
        executing_broker:
          type: string
          description: The executing broker.
        executing_broker_name:
          type: string
          description: The name of the executing broker
        executions:
          type: array
          description: Executions on the order (returned on the response).
          readOnly: true
          items:
            $ref: '#/components/schemas/Execution'
        expiry_date:
          type: string
          description: The GTD expiry date. The input is treated as UTC.
          format: date
        far_all_in_price:
          type: number
        far_dealt_ccy:
          type: string
          description: The far leg dealt currency (must match the dealt_ccy)
        far_executed_quantity:
          type: number
        far_fixing_date:
          type: string
          description: The far leg fixing date as "YYYY-MM-DD" (recommended but will
            be computed from far tenor if missing)
          format: date
        far_forward_points:
          type: number
        far_isin:
          type: string
        far_quantity:
          type: number
          description: The far leg dealt quantity
          writeOnly: true
        far_settlement_date:
          type: string
          description: The far leg settlement date as "YYYY-MM-DD" (recommended but
            will be computed from non "BD" far tenor if missing)
          format: date
        far_side:
          type: string
          description: "The side of the far leg of the order (\"BUY\", \"SELL\").\
            \ Must be the opposite side of the near leg."
          enum:
          - BUY
          - SELL
          - BUY_PROTECTION
          - SELL_PROTECTION
        far_tenor:
          type: string
          description: "The far leg tenor (\"SPOT\", \"1M\", \"2M\", \"1Y\", \"2Y\"\
            , \"BD\")"
          enum:
          - TOD
          - TOM
          - SPOT
          - SPOT_NEXT
          - 1W
          - 2W
          - 3W
          - 1M
          - 2M
          - 3M
          - 4M
          - 5M
          - 6M
          - 7M
          - 8M
          - 9M
          - 10M
          - 11M
          - 1Y
          - 2Y
          - 3Y
          - IMMH
          - IMMM
          - IMMU
          - IMMZ
          - BD
        fixing_date:
          type: string
          description: The fixing date as "YYYY-MM-DD" (recommended but will be computed
            from tenor if missing)
          format: date
        forward_points:
          type: number
        fully_executed:
          type: boolean
          description: True if the order is fully executed
          readOnly: true
        handling_comment:
          type: string
          description: The handling comment.
        handling_type:
          type: string
          description: "The handling type (\"MANUAL\", \"AUTOMATIC\"). For \"RFQ\": price is required when competitive_rates is present."
          enum:
          - MANUAL
          - AUTOMATIC
          - TRADE_REPORT
          - COLOR_BOOK
          - EITHER
          - RFS
          - RFQ
          - RESTING
          - INSTRUMENT_DEFINITION
          - TURBO
          - IOI
          - ALLOCATION
        included_executing_brokers:
          type: array
          description: Can only send order to executing brokers in this array. Mutually
            exclusive with 'excluded_executing_brokers'.
          items:
            type: string
            description: Can only send order to executing brokers in this array. Mutually
              exclusive with 'excluded_executing_brokers'.
        instructions:
          type: array
          description: Instructions on the order (returned on the response).
          readOnly: true
          items:
            $ref: '#/components/schemas/InstructionBuilder'
        internal_comment:
          type: string
          description: Comment for internal use. (Comments column in Tradesmart)
        ioi_id:
          type: string
          description: The IOI Id against which the order has to be submitted
        isin:
          type: string
        leg_index:
          type: integer
          description: The index of this order in the legs array
          format: int64
        leg_ratio:
          type: number
          description: The leg ratio for strategy legs
        limit_violations:
          type: array
          description: List of limit violation objects detailing the compliance limits
            that this order has breached along with their status.
          readOnly: true
          items:
            $ref: '#/components/schemas/LimitViolation'
        line_handler_order_id:
          type: string
        matched_principal:
          type: boolean
          description: "Where the facilitator of the trade takes no risk, only matching\
            \ counterparties."
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        order_instruction:
          type: string
          description: "The instruction behaviour for the order (\"REGISTER\", \"\
            SUBMIT, \"TRADE_ENTRY\"). Defaults to \"REGISTER\" if not provided. If\
            \ submitting directly to market a trade entitlement check will be enforced."
          writeOnly: true
          enum:
          - REGISTER
          - SUBMIT
          - TRADE_ENTRY
        order_manager_state:
          type: string
          enum:
          - ACCEPTED
          - ACTIVE
          - ALLEGED
          - ALLOCATED
          - AMENDING
          - BOOKED
          - BROKEN
          - CANCELING
          - CANCELLED
          - DEACTIVATED
          - DEFERRED
          - DELETED
          - DONE
          - EXECUTED
          - EXPIRED
          - PARTIALLY_ALLOCATED
          - PARTIALLY_BOOKED
          - PENDING_ACCEPTANCE
          - PENDING_ALLOCATION
          - PENDING_AUTHORIZATION
          - PENDING_CANCELATION
          - REGISTERED
          - REJECTED
          - SETTLED
          - SUBMITTING
          - TRADING_COMPLETE
          - UNALLOCATED
          - WORKING
          - MANAGED
        order_ts_id:
          type: string
          description: Uniquely identifies the order.
          readOnly: true
        order_type:
          type: string
          description: The type of the order.
        orders_in_error:
          type: array
          items:
            $ref: '#/components/schemas/OrderObject'
        owner:
          type: string
          description: The owner of the order (set from the REST client login).
        parent_order_ts_id:
          type: string
          description: Uniquely identifies the parent order.
          readOnly: true
        partition_id:
          type: integer
          format: int32
        price:
          type: number
          description: "The price of the order (when price type is \"LIMIT\"). For RFQ orders: required when competitive_rates is provided."
        price_offset:
          type: number
          description: "An offset from from the current price, used when defining\
            \ a trailing stop (for example)."
        quantity:
          type: number
          description: The quantity of the order (in number of shares or contracts).
        reference1:
          type: string
          description: An STP reference (varies from client to client).
        reference2:
          type: string
          description: An STP reference (varies from client to client).
        regulated_venue:
          type: string
          description: "The regulated venue for the order, i.e. NONE, UK_MTF, EU_MTF."
        security_financing_transaction:
          type: boolean
          description: Transactions that fall within the scope of activity for securities
            financing.
        settlement_date:
          type: string
          description: The settlement date as "YYYY-MM-DD" (recommended but will be
            computed from non "BD" tenor if missing)
          format: date
        shaped_order_id:
          type: string
          description: The ID assigned by the shaping server if this order was the
            result of merging multiple staged orders together. Can be used to reference
            the order within the BidFX shaping server REST API.
        side:
          type: string
          description: "The side of the order (\"BUY\", \"SELL\")"
          enum:
          - BUY
          - SELL
          - BUY_PROTECTION
          - SELL_PROTECTION
        solicitation_type:
          type: string
          description: The solicitation type of the order
          enum:
          - DISCRETIONARY
          - SOLICITATED
          - UNSOLICITATED
        source_id:
          type: string
          description: The order originator
        source_intent:
          type: string
          description: The intended trading / execution stategy by the order originator.
        spot_rate:
          type: number
        start_date:
          type: string
          description: The GTD start date. The input is treated as UTC.
          format: date
        state:
          type: string
          description: "The state of the order (\"REGISTERED\", \"ACTIVE\", \"WORKING\"\
            )."
          readOnly: true
          enum:
          - ACCEPTED
          - ACTIVE
          - ALLEGED
          - ALLOCATED
          - AMENDING
          - BOOKED
          - BROKEN
          - CANCELING
          - CANCELLED
          - DEACTIVATED
          - DEFERRED
          - DELETED
          - DONE
          - EXECUTED
          - EXPIRED
          - PARTIALLY_ALLOCATED
          - PARTIALLY_BOOKED
          - PENDING_ACCEPTANCE
          - PENDING_ALLOCATION
          - PENDING_AUTHORIZATION
          - PENDING_CANCELATION
          - REGISTERED
          - REJECTED
          - SETTLED
          - SUBMITTING
          - TRADING_COMPLETE
          - UNALLOCATED
          - WORKING
          - MANAGED
        strategyTSIdsForClone:
          type: array
          writeOnly: true
          items:
            type: string
        strategy_parent_order_ts_id:
          type: string
          description: The strategy parent order ID.
        submit_response_time:
          type: string
          description: "The time the order submit operation was acknowledged by the\
            \ broker. Note that orders can be resubmitted to other brokers after cancellation,\
            \ this field will only contain the time pertaining to the last processed\
            \ submission. Note that accepted and rejected submissions will populate\
            \ this field."
          format: date-time
          readOnly: true
        submit_time:
          type: string
          description: "The time the order submit operation was initiated inside the\
            \ TS EMS. Note that orders can be resubmitted to other brokers after cancellation,\
            \ this field will only contain the time pertaining to the last processed\
            \ submission. Note that accepted and rejected submissions will populate\
            \ this field."
          format: date-time
          readOnly: true
        swap:
          type: boolean
        swap_isin:
          type: string
        swap_points:
          type: number
        tenor:
          type: string
          description: "The tenor of the order (\"SPOT\", \"1M\", \"2M\", \"1Y\",\
            \ \"2Y\", \"BD\")"
          enum:
          - TOD
          - TOM
          - SPOT
          - SPOT_NEXT
          - 1W
          - 2W
          - 3W
          - 1M
          - 2M
          - 3M
          - 4M
          - 5M
          - 6M
          - 7M
          - 8M
          - 9M
          - 10M
          - 11M
          - 1Y
          - 2Y
          - 3Y
          - IMMH
          - IMMM
          - IMMU
          - IMMZ
          - BD
        tep:
          type: number
          description: Target execution price. Can only be specified is TEP type is
            "MANUAL" or not specified.
        tep_type:
          type: string
          description: "Target execution price type. (\"MANUAL\", \"OPEN\", \"CLOSE\"\
            , \"REGISTRATION_PRICE\", \"REGISTRATION_VWAP\", \"REGISTRATION_LAST\"\
            ) If this field is omitted and TEP is specified, a value of MANUAL will\
            \ be inferred."
          enum:
          - MANUAL
          - OPEN
          - CLOSE
          - REGISTRATION_PRICE
          - REGISTRATION_LAST
          - REGISTRATION_VWAP
        ticket_shortcut_code:
          type: string
          description: The short code of the ticket shortcut
        time_in_force_type:
          type: string
          description: "The time in force (\"DAY\", \"GOOD_TILL_CANCEL\", \"GOOD_TILL_DATE\"\
            )."
          enum:
          - DAY
          - GOOD_TILL_CANCEL
          - GOOD_TILL_DATE
          - GOOD_TILL_TIME
          - GOOD_TILL_WEEK
          - GOOD_TILL_DURATION
          - GOOD_TILL_CROSS
          - CLOSE
        trigger_price:
          type: number
          description: The trigger price for stop orders
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            , )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
        unexecuted_quantity:
          type: number
          description: The unexecuted quantity
          readOnly: true
        upInstructionBuilder:
          $ref: '#/components/schemas/InstructionBuilderOrderFxOrderObject'
        uuid:
          type: number
          description: Uniquely identifies the order.
          readOnly: true
        venue_duration:
          type: integer
          description: Duration in milliseconds till when placement will be valid
          format: int32
        version:
          type: integer
          description: The version of the order
          format: int32
    FxAlgoDetailsBuilder:
      required:
      - name
      - stop_pips
      type: object
      properties:
        name:
          type: object
          additionalProperties:
            type: string
            description: The algo parameters
          description: The algo parameters
        stop_pips:
          type: number
          description: The algo stop price in pips
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    FxBenchmarkDetails:
      required:
      - code
      - fixing_date
      type: object
      properties:
        code:
          type: string
          description: The identifying code of the benchmark
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        fixing_city:
          type: string
        fixing_date:
          type: string
          description: The date on which the trade fixing rate will be published
        fixing_time:
          type: string
        provider_code:
          type: string
    FxOrderBuilder:
      required:
      - asset_class
      - ccy_pair
      - deal_type
      - dealt_ccy
      - order_type
      - quantity
      - side
      - tenor
      type: object
      allOf:
      - $ref: '#/components/schemas/OrderObject'
      - type: object
        properties:
          fxAlgoDetails:
            $ref: '#/components/schemas/FxAlgoDetailsBuilder'
          swap:
            type: boolean
          upInstructionBuilder:
            $ref: '#/components/schemas/InstructionBuilderOrderFxOrderObject'
          far_side:
            type: string
            description: "The side of the far leg of the order (\"BUY\", \"SELL\"\
              ). Must be the opposite side of the near leg."
            enum:
            - BUY
            - SELL
            - BUY_PROTECTION
            - SELL_PROTECTION
          side:
            type: string
            description: "The side of the order (\"BUY\", \"SELL\")"
            enum:
            - BUY
            - SELL
            - BUY_PROTECTION
            - SELL_PROTECTION
          benchmark:
            $ref: '#/components/schemas/FxBenchmarkDetails'
          ticket_shortcut_code:
            type: string
            description: The short code of the ticket shortcut
          far_tenor:
            type: string
            description: "The far leg tenor (\"SPOT\", \"1M\", \"2M\", \"1Y\", \"\
              2Y\", \"BD\")"
            enum:
            - TOD
            - TOM
            - SPOT
            - SPOT_NEXT
            - 1W
            - 2W
            - 3W
            - 1M
            - 2M
            - 3M
            - 4M
            - 5M
            - 6M
            - 7M
            - 8M
            - 9M
            - 10M
            - 11M
            - 1Y
            - 2Y
            - 3Y
            - IMMH
            - IMMM
            - IMMU
            - IMMZ
            - BD
          deal_type:
            type: string
            description: The deal type to be traded (FWD can also be provided as FORWARD
              or OUTRIGHT)
            enum:
            - SPOT
            - FWD
            - SWAP
            - NDF
            - NDS
            - DEAL_OUTRIGHT
            - SWAP_OUTRIGHT
            - WILDCARD
          far_settlement_date:
            type: string
            description: The far leg settlement date as "YYYY-MM-DD" (recommended
              but will be computed from non "BD" far tenor if missing)
            format: date
          settlement_date:
            type: string
            description: The settlement date as "YYYY-MM-DD" (recommended but will
              be computed from non "BD" tenor if missing)
            format: date
          all_in_price:
            type: number
            description: All in Price
          far_all_in_price:
            type: number
          far_quantity:
            type: number
            description: The far leg dealt quantity
            writeOnly: true
          spot_rate:
            type: number
          forward_points:
            type: number
          swap_points:
            type: number
          fixing_date:
            type: string
            description: The fixing date as "YYYY-MM-DD" (recommended but will be
              computed from tenor if missing)
            format: date
          tenor:
            type: string
            description: "The tenor of the order (\"SPOT\", \"1M\", \"2M\", \"1Y\"\
              , \"2Y\", \"BD\")"
            enum:
            - TOD
            - TOM
            - SPOT
            - SPOT_NEXT
            - 1W
            - 2W
            - 3W
            - 1M
            - 2M
            - 3M
            - 4M
            - 5M
            - 6M
            - 7M
            - 8M
            - 9M
            - 10M
            - 11M
            - 1Y
            - 2Y
            - 3Y
            - IMMH
            - IMMM
            - IMMU
            - IMMZ
            - BD
          asset_class:
            type: string
            description: "The asset class of the order, FX"
            enum:
            - EQUITY
            - FUTURE
            - OPTION
            - FX
            - FIXED_INCOME
            - CRYPTO
            - PORTFOLIO
            - CDS
            - IRS
            - STRATEGY
            - WARRANT
            - INDEX
          swap_isin:
            type: string
          regulated_venue:
            type: string
            description: "The regulated venue for the order, i.e. NONE, UK_MTF, EU_MTF."
          matched_principal:
            type: boolean
            description: "Where the facilitator of the trade takes no risk, only matching\
              \ counterparties."
          security_financing_transaction:
            type: boolean
            description: Transactions that fall within the scope of activity for securities
              financing.
          best_value:
            type: boolean
          ccy_pair:
            type: string
            description: The currency pair to be traded
          dealt_ccy:
            type: string
            description: The dealt currency (must match the base or term from the
              currency pair)
          far_dealt_ccy:
            type: string
            description: The far leg dealt currency (must match the dealt_ccy)
          far_executed_quantity:
            type: number
          far_fixing_date:
            type: string
            description: The far leg fixing date as "YYYY-MM-DD" (recommended but
              will be computed from far tenor if missing)
            format: date
          far_forward_points:
            type: number
          far_isin:
            type: string
          isin:
            type: string
          shaped_order_id:
            type: string
            description: The ID assigned by the shaping server if this order was the
              result of merging multiple staged orders together. Can be used to reference
              the order within the BidFX shaping server REST API.
          unexecuted_quantity:
            type: number
            description: The unexecuted quantity
            readOnly: true
    FxReferencePrice:
      type: object
      properties:
        ask:
          type: number
        ask_all_in:
          type: number
        ask_forward_points:
          type: number
        ask_price_status:
          type: string
        ask_rank:
          type: integer
          format: int32
        ask_size:
          type: number
        ask_spot_rate:
          type: number
        ask_time:
          type: integer
          format: int64
        ask_time_of_receipt:
          type: integer
          format: int64
        ask_trade_eligible:
          type: boolean
        bid:
          type: number
        bid_all_in:
          type: number
        bid_forward_points:
          type: number
        bid_price_status:
          type: string
        bid_rank:
          type: integer
          format: int32
        bid_size:
          type: number
        bid_spot_rate:
          type: number
        bid_time:
          type: integer
          format: int64
        bid_time_of_receipt:
          type: integer
          format: int64
        bid_trade_eligible:
          type: boolean
        dealer_id:
          type: string
        end_mid:
          type: number
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        external_id:
          type: string
        far_ask_all_in:
          type: number
        far_ask_forward_points:
          type: number
        far_ask_size:
          type: number
        far_bid_all_in:
          type: number
        far_bid_forward_points:
          type: number
        far_bid_size:
          type: number
        forward_points:
          type: number
        internal_dealer_id:
          type: string
        mid:
          type: number
        net_term:
          type: number
        net_term_versus_best:
          type: number
        spot_rate:
          type: number
        swap_points:
          type: number
        trade_eligible:
          type: boolean
    InstructionBuilder:
      required:
      - order_ts_id
      type: object
      properties:
        partitionId:
          type: integer
          format: int32
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      description: Instructions on the order (returned on the response).
      readOnly: true
    InstructionBuilderOrderFxOrderObject:
      required:
      - order_ts_id
      type: object
      properties:
        partitionId:
          type: integer
          format: int32
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    InstructionBuilderOrderObjectObject:
      required:
      - order_ts_id
      type: object
      properties:
        partitionId:
          type: integer
          format: int32
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    InstructionBuilderOrderPortfolioOrderObject:
      required:
      - order_ts_id
      type: object
      properties:
        partitionId:
          type: integer
          format: int32
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    InstructionBuilderOrderWaveObject:
      required:
      - order_ts_id
      type: object
      properties:
        partitionId:
          type: integer
          format: int32
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    LimitViolation:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        handling_comment:
          type: string
          description: The handling comment
          readOnly: true
        instruction_ts_id:
          type: string
          description: "The id of the instruction (amend, cancel or submit operation)\
            \ that triggered the limit violation. Required to acknowledge the limit."
          readOnly: true
        limit_ts_id:
          type: string
          description: The unique identifier of the limit that caused the breach so
            it can be cross-referenced by TS Support.
          readOnly: true
        order_ts_id:
          type: string
          description: Uniquely identifies the order. Also required to acknowledge
            the limit.
          readOnly: true
        reason:
          type: string
          description: The reason for the limit violation.
          readOnly: true
        status:
          type: string
          description: The status of the limit violation.
          readOnly: true
          enum:
          - ACCEPTED
          - REJECTED
          - PENDING_APPROVAL
        ts_id:
          type: string
          description: The unique ID assigned for this limit violation.
          readOnly: true
      description: "A limit violation is created and attached to the order whenever\
        \ a compliance rule is breached. \nThere are soft breaches and hard breaches.\n\
        Soft breaches have to be manually acknowledged by a TradeSmart user (or via\
        \ REST API.) \nHard breaches result in an outright rejection."
      readOnly: true
    OrderAlgo:
      required:
      - name
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        internal:
          type: boolean
          description: TradingScreen provided algo
        name:
          type: string
          description: Algo name
        parameters:
          type: array
          items:
            type: object
            additionalProperties:
              type: object
              description: Array of map of parameter name to value
              example: "{'\"EndTime\": \"2019-02-06T18:30:00.075\"'}"
            description: Array of map of parameter name to value
            example: "{'\"EndTime\": \"2019-02-06T18:30:00.075\"'}"
        strategy_type:
          type: string
          description: The bespoke broker strategy to use
          enum:
          - PAIRS
      description: "Collections of algos are defined by TradingScreen support staff,\
        \ and are selected by executing broker, client branch, username and asset\
        \ class. Each collection contains a set of algos, which are selected by name.\
        \ Each algo defines a set of parameters of various types, either required\
        \ or optional. Algos can be queried via the /api/om/v2/algo endpoint.\n\n\
        Note that parameter names are camel case like \"StartTime\" (not snake case\
        \ like \"start_time\") because these field names are defined in the ATDL resource\
        \ files provided by the brokers.\n\nNote that parameter values can be any\
        \ type (e.g. string, integer, decimal, date/time etc)"
    OrderObject:
      required:
      - asset_class
      - order_type
      - quantity
      - side
      type: object
      properties:
        strategyTSIdsForClone:
          type: array
          writeOnly: true
          items:
            type: string
        upInstructionBuilder:
          $ref: '#/components/schemas/InstructionBuilderOrderObjectObject'
        excluded_executing_brokers:
          type: array
          description: Do not send order to executing brokers in this array. Mutually
            exclusive with 'included_executing_brokers'.
          items:
            type: string
            description: Do not send order to executing brokers in this array. Mutually
              exclusive with 'included_executing_brokers'.
        included_executing_brokers:
          type: array
          description: Can only send order to executing brokers in this array. Mutually
            exclusive with 'excluded_executing_brokers'.
          items:
            type: string
            description: Can only send order to executing brokers in this array. Mutually
              exclusive with 'excluded_executing_brokers'.
        allocation_data:
          $ref: '#/components/schemas/Allocation'
        algo:
          $ref: '#/components/schemas/OrderAlgo'
        allocation_template:
          type: string
          description: "The allocation template name. Cannot be defined as well as\
            \ allocation_data. Either account or allocation template is required;\
            \ if both are supplied, the account will be replaced with the one from\
            \ the template."
          writeOnly: true
        competitive_rates:
          type: array
          description: "Competitive rates for the Order. For RFQ orders: if provided, price is also required."
          items:
            $ref: '#/components/schemas/ReferencePrice'
        correlation_id:
          type: string
          description: Use to correlate order requests and responses (returned on
            the response).
        order_instruction:
          type: string
          description: "The instruction behaviour for the order (\"REGISTER\", \"\
            SUBMIT, \"TRADE_ENTRY\"). Defaults to \"REGISTER\" if not provided. If\
            \ submitting directly to market a trade entitlement check will be enforced."
          writeOnly: true
          enum:
          - REGISTER
          - SUBMIT
          - TRADE_ENTRY
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        leg_index:
          type: integer
          description: The index of this order in the legs array
          format: int64
        disable_instrument_lookup:
          type: boolean
          description: "Sets the order endpoint up to bypass instrument validation,\
            \ instead deferring it to downstream systems.  Setting this field to true\
            \ implies that the instrument, instrument_type and venue_code have to\
            \ be set.  The venue_code must be the exchange (or OTC).  If one of these\
            \ parameters is missing or incorrect the entire trade will be rejected.\
            \  Invalid on Strategy order types."
        order_type:
          type: string
          description: The type of the order.
          enum:
          - MARKET
          - MARKET_OPEN
          - MARKET_CLOSE
          - MARKET_ON_CASH_CLOSE
          - LIMIT
          - LIMIT_OPEN
          - LIMIT_CLOSE
          - FUNARI
          - FILL_OR_KILL_LIMIT
          - FILL_OR_KILL_MARKET
          - QUOTED
          - SPREAD_LIMIT
          - STOP
          - STOP_BID
          - STOP_ASK
          - STOP_LIMIT
          - LIMIT_AUCTION_ONLY
          - MARKET_AUCTION_ONLY
          - MARKET_IF_TOUCHED
          - TAKE
          - TAKE_LIMIT
          - CALL
          - DISCRECTIONARY
          - PEG_LAST
          - PEG_MID
          - PEG_MARKET
          - PEG_PRIMARY
          - ALL_OR_NONE
          - AT_BEST
          - IMMEDIATE_OR_CANCEL_LIMIT
          - IMMEDIATE_OR_CANCEL_MARKET
          - EXECUTE_AND_ELIMINATE
          - DTC
          - DTK
          - ELO
          - SLO
          - FOKEL
          - FOKSL
          - PROBE
          - PROBE_POST
          - SWEEP
          - SWEEP_POST_ALL
          - SWEEP_POST
          - SWEEP_POST_DIRECTED
          - SWEEP_POST_HIDDEN
          - MARKET_POST
          - MARKET_WITH_LIMIT
          - MIDPOINT
          - MARKET_LIMIT_MARKET
          - MARKET_WITH_LEFTOVER_AS_LIMIT
          - NATIVE_ORDER_CANCELS_ORDER
          - BID_OFFER
          - MIDPOINT_WITH_LIMIT
          - TRAILING_STOP
          - TRAILING_STOP_LIMIT
          - IMBALANCE_ONLY
        time_in_force_type:
          type: string
          description: "The time in force (\"DAY\", \"GOOD_TILL_CANCEL\", \"GOOD_TILL_DATE\"\
            )."
          enum:
          - DAY
          - GOOD_TILL_CANCEL
          - GOOD_TILL_DATE
          - GOOD_TILL_TIME
          - GOOD_TILL_WEEK
          - GOOD_TILL_DURATION
          - GOOD_TILL_CROSS
          - CLOSE
        executing_broker_name:
          type: string
          description: The name of the executing broker
        version:
          type: integer
          description: The version of the order
          format: int32
        state:
          type: string
          description: "The state of the order (\"REGISTERED\", \"ACTIVE\", \"WORKING\"\
            )."
          readOnly: true
          enum:
          - ACCEPTED
          - ACTIVE
          - ALLEGED
          - ALLOCATED
          - AMENDING
          - BOOKED
          - BROKEN
          - CANCELING
          - CANCELLED
          - DEACTIVATED
          - DEFERRED
          - DELETED
          - DONE
          - EXECUTED
          - EXPIRED
          - PARTIALLY_ALLOCATED
          - PARTIALLY_BOOKED
          - PENDING_ACCEPTANCE
          - PENDING_ALLOCATION
          - PENDING_AUTHORIZATION
          - PENDING_CANCELATION
          - REGISTERED
          - REJECTED
          - SETTLED
          - SUBMITTING
          - TRADING_COMPLETE
          - UNALLOCATED
          - WORKING
          - MANAGED
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            , )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
        owner:
          type: string
          description: The owner of the order (set from the REST client login).
        reference1:
          type: string
          description: An STP reference (varies from client to client).
        description:
          type: string
          description: The description field
        strategy_parent_order_ts_id:
          type: string
          description: The strategy parent order ID.
        order_ts_id:
          type: string
          description: Uniquely identifies the order.
          readOnly: true
        executing_broker:
          type: string
          description: The executing broker.
        classification:
          type: string
          enum:
          - "NULL"
          - DMA
          - NOE
          - MANUAL
          - QUOTED
          - BROKER_ROUTED
          - CLIENT_ROUTED
          - BROKER_VIEW
          - ALLEGED
          - SYNTHETIC
          - CLIENT_ROUTED_DMA
          - CLIENT_ROUTED_MANUAL
          - BROKER_ROUTED_NOE
          - BROKER_VIEW_DMA
          - BROKER_VIEW_NOE
          - BROKER_VIEW_CLIENT_ROUTED
          - BROKER_VIEW_MANUAL
          - BROKER_VIEW_SYNTHETIC
        partition_id:
          type: integer
          format: int32
        creation_date:
          type: string
          description: The order creation date
        price:
          type: number
          description: "The price of the order (when price type is \"LIMIT\"). For RFQ orders: required when competitive_rates is provided."
        quantity:
          type: number
          description: The quantity of the order (in number of shares or contracts).
        side:
          type: string
          description: "The side of the order (\"BUY\", \"SELL\")."
          enum:
          - BUY
          - SELL
        executed_quantity:
          type: number
          description: The executed quantity
          readOnly: true
        executed_value:
          type: number
          description: The executed value
          readOnly: true
        account:
          type: string
          description: The executing account.
        aggregation_level_1:
          type: string
          description: Reference assigned to the order.
        aggregation_level_2:
          type: string
          description: Reference assigned to the order.
        aggregation_level_3:
          type: string
          description: Reference assigned to the order.
        alternate_owner:
          type: string
          description: The alternative owner of the order
        average_executed_price:
          type: number
          description: The average executed price
          readOnly: true
        broker_order_id:
          type: string
          description: The unique ID of the order as assigned by the executing broker.
          readOnly: true
        cancel_response_time:
          type: string
          description: "The time the order cancel operation was acknowledged by the\
            \ broker. Note that orders can be resubmitted to other brokers after cancellation,\
            \ this field will only contain the time pertaining to the last processed\
            \ cancel."
          format: date-time
          readOnly: true
        cancel_time:
          type: string
          description: "The time the order cancel operation was received. Note that\
            \ orders can be resubmitted to other brokers after cancellation, this\
            \ field will only contain the time pertaining to the last cancel instruction."
          format: date-time
          readOnly: true
        capture_date:
          type: string
          description: "The capture date.  Only valid to be set on \"order_instruction\"\
            \ : \"TRADE_ENTRY\" requests"
          format: date-time
        client_lei:
          type: string
          description: A 20 character string identifying the entity that issued the
            trade or made the investment decision
        client_order_id:
          type: string
          description: Client defined Order Id
        custom_fields:
          type: object
          additionalProperties:
            type: string
            description: Custom fields that can be supplied to TS.  This is by agreement.
          description: Custom fields that can be supplied to TS.  This is by agreement.
        fully_executed:
          type: boolean
          description: True if the order is fully executed
          readOnly: true
        executions:
          type: array
          description: Executions on the order (returned on the response).
          readOnly: true
          items:
            $ref: '#/components/schemas/Execution'
        expiry_date:
          type: string
          description: The GTD expiry date. The input is treated as a local market
            date according to the instrument specified. The return value will be a
            UTC adjusted timestamp of midnight in exchange local time.
          format: date
        start_date:
          type: string
          description: The GTD start date. The input is treated as a local market
            date according to the instrument specified. The return value will be a
            UTC adjusted timestamp of midnight in exchange local time.
          format: date
        handling_comment:
          type: string
          description: The handling comment.
        handling_type:
          type: string
          description: "The handling type (\"MANUAL\", \"AUTOMATIC\"). For \"RFQ\": price is required when competitive_rates is present."
          enum:
          - MANUAL
          - AUTOMATIC
          - TRADE_REPORT
          - COLOR_BOOK
          - EITHER
          - RFS
          - RFQ
          - RESTING
          - INSTRUMENT_DEFINITION
          - TURBO
          - IOI
          - ALLOCATION
        ioi_id:
          type: string
          description: The IOI Id against which the order has to be submitted
        instructions:
          type: array
          description: Instructions on the order (returned on the response).
          readOnly: true
          items:
            $ref: '#/components/schemas/InstructionBuilder'
        internal_comment:
          type: string
          description: Comment for internal use. (Comments column in Tradesmart)
        leg_ratio:
          type: number
          description: The leg ratio for strategy legs
        limit_violations:
          type: array
          description: List of limit violation objects detailing the compliance limits
            that this order has breached along with their status.
          readOnly: true
          items:
            $ref: '#/components/schemas/LimitViolation'
        line_handler_order_id:
          type: string
        order_manager_state:
          type: string
          enum:
          - ACCEPTED
          - ACTIVE
          - ALLEGED
          - ALLOCATED
          - AMENDING
          - BOOKED
          - BROKEN
          - CANCELING
          - CANCELLED
          - DEACTIVATED
          - DEFERRED
          - DELETED
          - DONE
          - EXECUTED
          - EXPIRED
          - PARTIALLY_ALLOCATED
          - PARTIALLY_BOOKED
          - PENDING_ACCEPTANCE
          - PENDING_ALLOCATION
          - PENDING_AUTHORIZATION
          - PENDING_CANCELATION
          - REGISTERED
          - REJECTED
          - SETTLED
          - SUBMITTING
          - TRADING_COMPLETE
          - UNALLOCATED
          - WORKING
          - MANAGED
        parent_order_ts_id:
          type: string
          description: Uniquely identifies the parent order.
          readOnly: true
        price_offset:
          type: number
          description: "An offset from from the current price, used when defining\
            \ a trailing stop (for example)."
        reference2:
          type: string
          description: An STP reference (varies from client to client).
        solicitation_type:
          type: string
          description: The solicitation type of the order
          enum:
          - DISCRETIONARY
          - SOLICITATED
          - UNSOLICITATED
        source_id:
          type: string
          description: The order originator
        source_intent:
          type: string
          description: The intended trading / execution stategy by the order originator.
        submit_response_time:
          type: string
          description: "The time the order submit operation was acknowledged by the\
            \ broker. Note that orders can be resubmitted to other brokers after cancellation,\
            \ this field will only contain the time pertaining to the last processed\
            \ submission. Note that accepted and rejected submissions will populate\
            \ this field."
          format: date-time
          readOnly: true
        submit_time:
          type: string
          description: "The time the order submit operation was initiated inside the\
            \ TS EMS. Note that orders can be resubmitted to other brokers after cancellation,\
            \ this field will only contain the time pertaining to the last processed\
            \ submission. Note that accepted and rejected submissions will populate\
            \ this field."
          format: date-time
          readOnly: true
        tep:
          type: number
          description: Target execution price. Can only be specified is TEP type is
            "MANUAL" or not specified.
        tep_type:
          type: string
          description: "Target execution price type. (\"MANUAL\", \"OPEN\", \"CLOSE\"\
            , \"REGISTRATION_PRICE\", \"REGISTRATION_VWAP\", \"REGISTRATION_LAST\"\
            ) If this field is omitted and TEP is specified, a value of MANUAL will\
            \ be inferred."
          enum:
          - MANUAL
          - OPEN
          - CLOSE
          - REGISTRATION_PRICE
          - REGISTRATION_LAST
          - REGISTRATION_VWAP
        trigger_price:
          type: number
          description: The trigger price for stop orders
        uuid:
          type: number
          description: Uniquely identifies the order.
          readOnly: true
        venue_duration:
          type: integer
          description: Duration in milliseconds till when placement will be valid
          format: int32
        orders_in_error:
          type: array
          items:
            $ref: '#/components/schemas/OrderObject'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        asset_class:
          type: string
      description: Child Orders
      discriminator:
        propertyName: asset_class
    PortfolioOrder:
      required:
      - asset_class
      - order_type
      - quantity
      - side
      type: object
      allOf:
      - $ref: '#/components/schemas/OrderObject'
      - type: object
        properties:
          account:
            type: string
          allow_partial_baskets:
            type: boolean
            description: "Sets the order endpoint up to create a basket even when\
              \ some legs fail validation checks.  Setting this field to true will\
              \ result in some baskets being created without all the specified legs,\
              \ the legs that could not be added to the basket will be returned in\
              \ the leg_error collection.  This flag is incompatible with the disable_instrument_lookup\
              \ flag."
            writeOnly: true
          asset_class:
            type: string
            enum:
            - EQUITY
            - FUTURE
            - OPTION
            - FX
            - FIXED_INCOME
            - CRYPTO
            - PORTFOLIO
            - CDS
            - IRS
            - STRATEGY
            - WARRANT
            - INDEX
          disable_instrument_lookup:
            type: boolean
            description: "Sets the order endpoint up to bypass instrument validation,\
              \ instead deferring it to downstream systems.  Setting this field to\
              \ true implies that the instrument, instrument_type and venue_code have\
              \ to be set on all child legs.  The venue_code must be the exchange\
              \ (or OTC).  This flag only has to be set at the parent level, and will\
              \ cascade down to the underlying orders.  If one of these parameters\
              \ is missing or incorrect the entire trade will be rejected."
          legs:
            type: array
            description: "For a grouped order, such as a derivatives strategy or portfolio,\
              \ the list of constituent legs of the parent order"
            items:
              $ref: '#/components/schemas/OrderObject'
          name:
            type: string
            description: The portfolio name
          upInstructionBuilder:
            $ref: '#/components/schemas/InstructionBuilderOrderPortfolioOrderObject'
    ReferencePrice:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        external_id:
          type: string
      description: Competitive rates for the Order
      anyOf:
      - $ref: '#/components/schemas/FxReferencePrice'
    V2FxAlgoDetails:
      required:
      - name
      - stop_pips
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        name:
          type: integer
          description: The algo urgency (aggressiveness)
          format: int32
        stop_pips:
          type: number
          description: The algo stop price in pips
    V3FxAlgoDetails:
      required:
      - name
      - stop_pips
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        name:
          type: integer
          description: The algo urgency (aggressiveness)
          format: int32
        stop_pips:
          type: number
          description: The algo stop price in pips
      description: "An OrderAlgo object, defining algo strategy name and parameters."
    WaveOrder:
      required:
      - asset_class
      - order_type
      - quantity
      - side
      type: object
      allOf:
      - $ref: '#/components/schemas/OrderObject'
      - type: object
        properties:
          asset_class:
            type: string
            enum:
            - EQUITY
            - FUTURE
            - OPTION
            - FX
            - FIXED_INCOME
            - CRYPTO
            - PORTFOLIO
            - CDS
            - IRS
            - STRATEGY
            - WARRANT
            - INDEX
          name:
            type: string
            description: The portfolio name
          portfolio_order_ts_id:
            type: string
          upInstructionBuilder:
            $ref: '#/components/schemas/InstructionBuilderOrderWaveObject'
    OrderInstructionAcknowledgement:
      required:
      - accept
      - instruction_ts_id
      - order_ts_id
      type: object
      properties:
        accept:
          type: boolean
          description: Whether or not to accept the breach. Acknowledging a limit
            breach with this flag will allow the order submission process to continue
            and it will be released to market
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        instruction_ts_id:
          type: string
          description: "The unique instruction ID of the operation which caused the\
            \ associated order to breach the limit, for example, a submission to market\
            \ or an amend operation"
        order_ts_id:
          type: string
          description: The unique order id of the order which breached the compliance
            limit
        partitionId:
          type: integer
          format: int32
        reason:
          type: string
          description: "The reason for the limit violation reject, sent to TradeSmart"
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
    PortfolioOrderAmendInstruction:
      required:
      - order_ts_id
      type: object
      properties:
        account:
          type: string
          description: The account to book the order to.
        aggregation_level_1:
          type: string
          description: Grouping reference assigned to the order
        aggregation_level_2:
          type: string
          description: Grouping reference assigned to the order
        aggregation_level_3:
          type: string
          description: Grouping reference assigned to the order
        algo:
          $ref: '#/components/schemas/OrderAlgo'
        allocation_data:
          $ref: '#/components/schemas/Allocation'
        allocation_template:
          type: string
          description: "The allocation template name. Cannot be defined as well as\
            \ allocation_data. Either account or allocation template is required;\
            \ if both are supplied, the account will be replaced with the one from\
            \ the template"
        alternate_owner:
          type: string
          description: The alternative owner of the order
        currency:
          type: string
          description: The currency.
        custom_fields:
          type: object
          additionalProperties:
            type: string
            description: "Custom fields that can be supplied to TS by agreement. \
              \ NOTE: Only those fields being amended need to be included, to remove\
              \ a custom field supply it with an empty string.  You cannot remove\
              \ ALL custom fields from an order once one is set, however you can replace\
              \ custom fields by setting the one to remove to an empty string and\
              \ adding a new field with a value"
          description: "Custom fields that can be supplied to TS by agreement.  NOTE:\
            \ Only those fields being amended need to be included, to remove a custom\
            \ field supply it with an empty string.  You cannot remove ALL custom\
            \ fields from an order once one is set, however you can replace custom\
            \ fields by setting the one to remove to an empty string and adding a\
            \ new field with a value"
        description:
          type: string
        done:
          type: boolean
          description: Should the order be set to a DONE state?
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        executing_broker:
          type: string
          description: The executing broker.
        expiry_date:
          type: string
        handling_comment:
          type: string
          description: The handling comment.
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        internal_comment:
          type: string
          description: Comment for internal use. (Comments column in Tradesmart)
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        name:
          type: string
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        orderFields:
          $ref: '#/components/schemas/PortfolioOrder'
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        order_type:
          type: string
          description: "The type of the order (\"LIMIT\", \"MARKET\", \"QUOTED\",\
            \ \"IMBALANCE_ONLY\")."
          enum:
          - MARKET
          - MARKET_OPEN
          - MARKET_CLOSE
          - MARKET_ON_CASH_CLOSE
          - LIMIT
          - LIMIT_OPEN
          - LIMIT_CLOSE
          - FUNARI
          - FILL_OR_KILL_LIMIT
          - FILL_OR_KILL_MARKET
          - QUOTED
          - SPREAD_LIMIT
          - STOP
          - STOP_BID
          - STOP_ASK
          - STOP_LIMIT
          - LIMIT_AUCTION_ONLY
          - MARKET_AUCTION_ONLY
          - MARKET_IF_TOUCHED
          - TAKE
          - TAKE_LIMIT
          - CALL
          - DISCRECTIONARY
          - PEG_LAST
          - PEG_MID
          - PEG_MARKET
          - PEG_PRIMARY
          - ALL_OR_NONE
          - AT_BEST
          - IMMEDIATE_OR_CANCEL_LIMIT
          - IMMEDIATE_OR_CANCEL_MARKET
          - EXECUTE_AND_ELIMINATE
          - DTC
          - DTK
          - ELO
          - SLO
          - FOKEL
          - FOKSL
          - PROBE
          - PROBE_POST
          - SWEEP
          - SWEEP_POST_ALL
          - SWEEP_POST
          - SWEEP_POST_DIRECTED
          - SWEEP_POST_HIDDEN
          - MARKET_POST
          - MARKET_WITH_LIMIT
          - MIDPOINT
          - MARKET_LIMIT_MARKET
          - MARKET_WITH_LEFTOVER_AS_LIMIT
          - NATIVE_ORDER_CANCELS_ORDER
          - BID_OFFER
          - MIDPOINT_WITH_LIMIT
          - TRAILING_STOP
          - TRAILING_STOP_LIMIT
          - IMBALANCE_ONLY
        owner:
          type: string
          description: The owner of the order (set from the REST client login).
        partitionId:
          type: integer
          format: int32
        price:
          type: number
          description: The price of the order (when price type is "LIMIT").
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        reference1:
          type: string
          description: Client specified reference id 1
        reference2:
          type: string
          description: Client specified reference id 2
        short_type:
          type: string
          description: "The short type of the order (\"COMPLY\", \"COVER\", \"EXEMPT\"\
            , \"UNDISCLOSED\")."
          enum:
          - COMPLY
          - EXEMPT
          - COVER
          - UNDISCLOSED
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        time_in_force_type:
          type: string
          enum:
          - DAY
          - GOOD_TILL_CANCEL
          - GOOD_TILL_DATE
          - GOOD_TILL_TIME
          - GOOD_TILL_WEEK
          - GOOD_TILL_DURATION
          - GOOD_TILL_CROSS
          - CLOSE
        trigger_price:
          type: number
          description: The trigger price for stop orders
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
    FxOrderAmendInstruction:
      required:
      - order_ts_id
      - quantity
      type: object
      properties:
        account:
          type: string
          description: The account to book the order to.
        aggregation_level_1:
          type: string
          description: Grouping reference assigned to the order
        aggregation_level_2:
          type: string
          description: Grouping reference assigned to the order
        aggregation_level_3:
          type: string
          description: Grouping reference assigned to the order
        algo:
          $ref: '#/components/schemas/OrderAlgo'
        allocation_data:
          $ref: '#/components/schemas/Allocation'
        allocation_template:
          type: string
          description: "The allocation template name. Cannot be defined as well as\
            \ allocation_data. Either account or allocation template is required;\
            \ if both are supplied, the account will be replaced with the one from\
            \ the template"
        alternate_owner:
          type: string
          description: The alternative owner of the order
        currency:
          type: string
          description: The currency.
        custom_fields:
          type: object
          additionalProperties:
            type: string
            description: "Custom fields that can be supplied to TS by agreement. \
              \ NOTE: Only those fields being amended need to be included, to remove\
              \ a custom field supply it with an empty string.  You cannot remove\
              \ ALL custom fields from an order once one is set, however you can replace\
              \ custom fields by setting the one to remove to an empty string and\
              \ adding a new field with a value"
          description: "Custom fields that can be supplied to TS by agreement.  NOTE:\
            \ Only those fields being amended need to be included, to remove a custom\
            \ field supply it with an empty string.  You cannot remove ALL custom\
            \ fields from an order once one is set, however you can replace custom\
            \ fields by setting the one to remove to an empty string and adding a\
            \ new field with a value"
        done:
          type: boolean
          description: Should the order be set to a DONE state?
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        executing_broker:
          type: string
          description: The executing broker.
        expiry_date:
          type: string
        far_quantity:
          type: number
          description: The allocation quantity of the far leg of an FX swap
          writeOnly: true
        handling_comment:
          type: string
          description: The handling comment.
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        internal_comment:
          type: string
          description: Comment for internal use. (Comments column in Tradesmart)
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        matched_principal:
          type: boolean
          description: "Where the facilitator of the trade takes no risk, only matching\
            \ counterparties."
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        orderFields:
          $ref: '#/components/schemas/FxOrderBuilder'
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        order_type:
          type: string
          description: "The type of the order (\"LIMIT\", \"MARKET\", \"QUOTED\",\
            \ \"IMBALANCE_ONLY\")."
          enum:
          - MARKET
          - MARKET_OPEN
          - MARKET_CLOSE
          - MARKET_ON_CASH_CLOSE
          - LIMIT
          - LIMIT_OPEN
          - LIMIT_CLOSE
          - FUNARI
          - FILL_OR_KILL_LIMIT
          - FILL_OR_KILL_MARKET
          - QUOTED
          - SPREAD_LIMIT
          - STOP
          - STOP_BID
          - STOP_ASK
          - STOP_LIMIT
          - LIMIT_AUCTION_ONLY
          - MARKET_AUCTION_ONLY
          - MARKET_IF_TOUCHED
          - TAKE
          - TAKE_LIMIT
          - CALL
          - DISCRECTIONARY
          - PEG_LAST
          - PEG_MID
          - PEG_MARKET
          - PEG_PRIMARY
          - ALL_OR_NONE
          - AT_BEST
          - IMMEDIATE_OR_CANCEL_LIMIT
          - IMMEDIATE_OR_CANCEL_MARKET
          - EXECUTE_AND_ELIMINATE
          - DTC
          - DTK
          - ELO
          - SLO
          - FOKEL
          - FOKSL
          - PROBE
          - PROBE_POST
          - SWEEP
          - SWEEP_POST_ALL
          - SWEEP_POST
          - SWEEP_POST_DIRECTED
          - SWEEP_POST_HIDDEN
          - MARKET_POST
          - MARKET_WITH_LIMIT
          - MIDPOINT
          - MARKET_LIMIT_MARKET
          - MARKET_WITH_LEFTOVER_AS_LIMIT
          - NATIVE_ORDER_CANCELS_ORDER
          - BID_OFFER
          - MIDPOINT_WITH_LIMIT
          - TRAILING_STOP
          - TRAILING_STOP_LIMIT
          - IMBALANCE_ONLY
        owner:
          type: string
          description: The owner of the order (set from the REST client login).
        partitionId:
          type: integer
          format: int32
        price:
          type: number
          description: The price of the order (when price type is "LIMIT").
        quantity:
          type: number
          description: The quantity of the order (in number of shares or contracts).
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        reference1:
          type: string
          description: Client specified reference id 1
        reference2:
          type: string
          description: Client specified reference id 2
        regulated_venue:
          type: string
          description: "The regulated venue for the order, i.e. NONE, UK_MTF, EU_MTF."
        security_financing_transaction:
          type: boolean
          description: Transactions that fall within the scope of activity for securities
            financing.
        short_type:
          type: string
          description: "The short type of the order (\"COMPLY\", \"COVER\", \"EXEMPT\"\
            , \"UNDISCLOSED\")."
          enum:
          - COMPLY
          - EXEMPT
          - COVER
          - UNDISCLOSED
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        strategy_parent_order_ts_id:
          type: string
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        time_in_force_type:
          type: string
          enum:
          - DAY
          - GOOD_TILL_CANCEL
          - GOOD_TILL_DATE
          - GOOD_TILL_TIME
          - GOOD_TILL_WEEK
          - GOOD_TILL_DURATION
          - GOOD_TILL_CROSS
          - CLOSE
        trigger_price:
          type: number
          description: The trigger price for stop orders
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
    PortfolioOrderCancelInstruction:
      required:
      - order_ts_id
      type: object
      properties:
        done:
          type: boolean
          description: A flag to indicate that the order should be set to done (non-tradeable)
            state after cancellation. Equivalent to the 'Stop' functionality in TradeSmart
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        partitionId:
          type: integer
          format: int32
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
    FxOrderCancelInstruction:
      required:
      - order_ts_id
      type: object
      properties:
        done:
          type: boolean
          description: A flag to indicate that the order should be set to done (non-tradeable)
            state after cancellation. Equivalent to the 'Stop' functionality in TradeSmart
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        partitionId:
          type: integer
          format: int32
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
    PortfolioOrderSubmitInstruction:
      required:
      - order_ts_id
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        partitionId:
          type: integer
          format: int32
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
    FxOrderSubmitInstruction:
      required:
      - order_ts_id
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        partitionId:
          type: integer
          format: int32
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
    SliceOrderInstruction:
      required:
      - order_ts_id
      type: object
      properties:
        partitionId:
          type: integer
          format: int32
        manual_accept:
          type: boolean
          description: "A flag to indicate the operation must be accepted manually\
            \ via the owning trader in TradeSmart. In the case of sliced orders, the\
            \ children must be adjusted before the parent amend can be accepted"
        on_behalf_of:
          type: string
          description: "The manual activation behaviour for the order submitter (\"\
            SELF\", \"OWNER\", \"ALTERNATE_OWNER\"). Defaults to \"SELF\" if not provided."
          writeOnly: true
          enum:
          - SELF
          - OWNER
          - ALTERNATE_OWNER
          - NEW_OWNER
          - NEW_ALTERNATE_OWNER
        order_instruction:
          type: string
          description: "The instruction behaviour for the order (\"REGISTER\", \"\
            SUBMIT, \"TRADE_ENTRY\"). Defaults to \"REGISTER\" if not provided. If\
            \ submitting directly to market a trade entitlement check will be enforced,\
            \ and the parent order requires a valid executing_broker and account"
          writeOnly: true
          enum:
          - REGISTER
          - SUBMIT
          - TRADE_ENTRY
        price:
          type: number
          description: The price of the order (when price type is "LIMIT").  Only
            required when the child slice should have a different price than the parent.
        type:
          type: string
          description: "Type of the item (\"AMEND\", \"CANCEL\", \"SLICE\", \"SUBMIT\"\
            \ )"
          enum:
          - ACKNOWLEDGEMENT
          - AMEND
          - CANCEL
          - ORDER
          - SLICE
          - SUBMIT
          - PRODUCT
        quantity:
          type: number
          description: Quantity to slice
        reason:
          type: string
          description: An arbitrary reason as to why the order is being amended. Populated
            with a default value if not provided
        state:
          type: string
          description: The state of the instruction
          readOnly: true
          enum:
          - REGISTERED
          - SUBMITTING_INTERNAL
          - SUBMITTING_EXTERNAL
          - ACCEPTED
          - REJECTED
          - RETRACTED
          - BROKEN
          - PENDING_PRICING
          - PENDING_BROKER_SELECTION
        order_ts_id:
          type: string
          description: The unique order id of the order to apply this instruction
            to
        instruction_ts_id:
          type: string
          description: The id of the instruction.
          readOnly: true
        submitter:
          type: string
          description: Submitter of the order as per on_behalf_of
          readOnly: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    Algo:
      type: object
      properties:
        asset_classes:
          type: array
          description: "Asset classes for which this algo is applicable, unless empty"
          readOnly: true
          example: FX
          items:
            type: string
            description: "Asset classes for which this algo is applicable, unless\
              \ empty"
            readOnly: true
            example: FX
            enum:
            - EQUITY
            - FUTURE
            - OPTION
            - FX
            - FIXED_INCOME
            - CRYPTO
            - PORTFOLIO
            - CDS
            - IRS
            - STRATEGY
            - WARRANT
            - INDEX
        deal_types:
          type: array
          description: "Deal types for which this algo is applicable, unless empty"
          readOnly: true
          example: "SPOT, FWD"
          items:
            type: string
            description: "Deal types for which this algo is applicable, unless empty"
            readOnly: true
            example: "SPOT, FWD"
            enum:
            - SPOT
            - FWD
            - SWAP
            - NDF
            - NDS
            - DEAL_OUTRIGHT
            - SWAP_OUTRIGHT
            - WILDCARD
        description:
          type: string
          description: Description of this algo
          readOnly: true
          example: FX Limit Strategy
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        global_markets:
          type: array
          description: "Global markets for which this algo is applicable, unless empty"
          readOnly: true
          items:
            type: string
            description: "Global markets for which this algo is applicable, unless\
              \ empty"
            readOnly: true
            enum:
            - APAC
            - EUROPE
            - MEA
            - NORTH_AMERICA
            - SOUTH_AMERICA
        include_venue_codes:
          type: boolean
          description: Flag describing venue_codes as either a whitelist (true) or
            blacklist (false)
        name:
          type: string
          description: Name of this algo (expected on stage order requests)
          readOnly: true
        order_types:
          type: array
          description: "Order types for which this algo is applicable, unless empty"
          readOnly: true
          items:
            type: string
            description: "Order types for which this algo is applicable, unless empty"
            readOnly: true
        parameters:
          type: array
          description: Parameter descriptions
          readOnly: true
          items:
            $ref: '#/components/schemas/AlgoParameter'
        time_types:
          type: array
          description: "Time in force types for which this algo is applicable, unless\
            \ empty"
          readOnly: true
          example: "DAY, GTC, GTD"
          items:
            type: string
            description: "Time in force types for which this algo is applicable, unless\
              \ empty"
            readOnly: true
            example: "DAY, GTC, GTD"
        venue_codes:
          type: array
          description: "Venue codes for which this algo is applicable, unless empty"
          readOnly: true
          example: "GBX, LME"
          items:
            type: string
            description: "Venue codes for which this algo is applicable, unless empty"
            readOnly: true
            example: "GBX, LME"
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
