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

# Get order

> Get an order for a specific account.



## OpenAPI

````yaml https://d2588n1sy4m36o.cloudfront.net/uat/merged/openapi.json?mintlify-view=derivatives get /v1/accounts/{account_id}/orders/{order_id}
openapi: 3.1.0
info:
  title: PWS Public API
  version: '1'
  description: >-
    Integrate with Payward Services to onboard users, manage accounts and funds,
    trade assets, and receive event notifications.
  contact:
    name: Payward Services
servers:
  - url: https://api.sandbox.services.payward.com
security: []
tags:
  - name: Assets
    description: List the assets PWS is willing to swap.
    x-displayName: Assets
  - name: Conversions
    description: >-
      Rule-driven and on-demand fiat ↔ crypto value movement, including
      conversion rules and deposits.
    x-displayName: Conversions
  - name: Auto Earn
    description: >-
      Manage Auto Earn preferences and retrieve allocation and reward
      information.
    x-displayName: Auto Earn
  - name: Bonded Earn
    description: >-
      Allocate funds to and deallocate funds from bonded earn strategies, review
      allocations, and track request status.
    x-displayName: Bonded Earn
  - name: Funding
    description: >-
      Discover deposit and withdrawal options, manage deposit addresses, and
      move funds between accounts.
    x-displayName: Funding
  - name: Derivatives transfers
    description: >-
      Move funds between an account's spot balance and the same owner's futures
      balance.
    x-displayName: Derivatives transfers
  - name: Portfolio
    description: 'Inspect a customer''s portfolio: balances, valuations, and transactions.'
    x-displayName: Portfolio
  - name: Ramp
    description: >-
      Support Ramp flows with discovery, quotes, limits, and hosted checkout
      experiences.
    x-displayName: Ramp
  - name: Reports
    description: Settlement and reconciliation reports for the partner.
    x-displayName: Reports
  - name: Market data stream
    description: Live market data for derivatives instruments.
    x-displayName: Market data stream
  - name: Derivatives instruments
    description: Discover instruments available for trading by asset type.
    x-displayName: Derivatives instruments
  - name: Derivatives tickers
    x-group: Derivatives market data
    description: Read market-data snapshots for supported trading instruments.
    x-displayName: Derivatives tickers
  - name: Derivatives order books
    x-group: Derivatives market data
    description: Read level-two market depth for supported trading instruments.
    x-displayName: Derivatives order books
  - name: Derivatives OHLC
    x-group: Derivatives market data
    description: Read historical candlestick market data for supported trading instruments.
    x-displayName: Derivatives OHLC
  - name: Derivatives orders
    description: Submit and inspect orders by asset type.
    x-displayName: Derivatives orders
  - name: Derivatives trades
    description: Inspect executions by asset type.
    x-displayName: Derivatives trades
  - name: Derivatives leverage
    description: Read and update per-instrument leverage preferences for trading accounts.
    x-displayName: Derivatives leverage
  - name: Swaps
    description: Account-funded quotes that lock a price until they expire or are executed.
    x-displayName: Swaps
  - name: Onchain quotes
    description: Wallet-funded quotes that return the data needed to settle onchain.
    x-displayName: Onchain quotes
  - name: Price trigger swaps
    description: Swaps that wait for a target price before submitting a trade.
    x-displayName: Price trigger swaps
  - name: Travel Rule verifications
    description: Travel Rule address ownership verification flows.
    x-displayName: Travel Rule verifications
  - name: Users
    description: >-
      User onboarding and status flows that the partner manages.


      - **Create User** provisions an account-owned user from an external
      reference and optional email.

      - **Get User** retrieves the user's profile, verification status, and
      required actions.


      Use the returned user `id` for calls that require the user's identifier.
    x-displayName: Users
  - name: Verifications
    description: Identity verification (KYC) submission and status for end users.
    x-displayName: Verifications
  - name: Webhooks
    description: >-
      Register HTTPS destinations to receive event deliveries, rotate signing
      secrets, and inspect, update, or delete existing subscriptions. Each
      subscription is owned by the authenticated partner; deliveries are signed
      with HMAC-SHA256 and retried on transient failures.


      In webhook payloads, `account_id` and `user_id` are in groups of four
      characters, with a space between the groups. For example, `WCQY T95Y CUL2
      A7NX`. The REST APIs send the same identifier without spaces, for example
      `WCQYT95YCUL2A7NX`. Remove the spaces before you compare a webhook
      identifier with a REST identifier.


      Amounts in webhook payloads are decimal strings, in the ledger precision
      of the asset. Compare amounts as decimal numbers, not as strings.
    x-displayName: Webhooks
paths:
  /v1/accounts/{account_id}/orders/{order_id}:
    servers:
      - url: https://api.sandbox.services.payward.com
    parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/TradingOrders_OrderId'
    get:
      tags:
        - Derivatives orders
      summary: Get order
      description: Get an order for a specific account.
      operationId: getOrder
      responses:
        '200':
          description: The requested order.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/TradingOrders_Order'
              examples:
                us-derivatives:
                  value:
                    data:
                      asset_type: perpetual
                      id: FOPCDC6-PQIPJ-JLEIRY
                      symbol: PBTCUCZ0.BTNL
                      side: buy
                      type: limit
                      status: closed
                      quantity: '2'
                      filled_quantity: '2'
                      limit_price: '66290'
                      notional: '1325.8'
                      fee: '2.10'
                      time_in_force: gtc
                      created_at: '2026-08-03T10:00:00Z'
                      updated_at: '2026-08-03T10:00:02Z'
                      close_reason: Order closed
                      average_execution_price: '66290'
                      closed_at: '2026-08-03T10:00:02Z'
                international-eea-derivatives:
                  value:
                    data:
                      asset_type: perpetual
                      id: 04da4904-1936-55a2-b66d-921ae04b183c
                      client_order_id: 550e8400-e29b-41d4-a716-446655440000
                      symbol: PF_XBTUSD
                      side: sell
                      type: stop_loss
                      status: cancelled
                      quantity: '0.01'
                      filled_quantity: '0'
                      trigger_price: '70000'
                      fee: '0'
                      time_in_force: gtc
                      created_at: '2026-09-01T10:43:45.547Z'
                      updated_at: '2026-09-01T10:44:45.547Z'
                      close_reason: 'Order cancelled: cancelled by user'
                      closed_at: '2026-09-01T10:44:45.547Z'
                      reduce_only: true
                      post_only: false
                international-eea-derivatives-filled:
                  value:
                    data:
                      asset_type: perpetual
                      id: a304ab5b-a8c5-480d-b362-ff15618c16dd
                      client_order_id: 2c720eb1-dd03-4ae9-8703-e8db904e520a
                      symbol: PF_XBTUSD
                      side: sell
                      type: market
                      status: closed
                      quantity: '0.0001'
                      filled_quantity: '0.0001'
                      notional: '8.2803'
                      fee: '0.0018630675'
                      created_at: '2026-10-19T10:08:21.075Z'
                      updated_at: '2026-10-19T10:08:21.075Z'
                      close_reason: Order filled
                      average_execution_price: '82803'
                      closed_at: '2026-10-19T10:08:21.075Z'
                      reduce_only: false
                      post_only: false
        '400':
          description: The account or order identifier is invalid.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
              examples:
                gateway-validation-failed:
                  value:
                    error:
                      type: service_error
                      status: 400
                      instance: 4bf92f3577b34da6a3ce929d0e0e4736
                      code: gateway
                invalid-order-id:
                  value:
                    error:
                      type: derivatives_error
                      status: 400
                      instance: 4bf92f3577b34da6a3ce929d0e0e4736
                      code: bad_request
                      causes:
                        - field: order_id
                          message: The order identifier is invalid.
        '401':
          description: Authentication failed.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
              examples:
                authentication-failed:
                  $ref: '#/components/examples/spot-derivatives-unauthenticated'
                gateway-authentication-failed:
                  $ref: >-
                    #/components/examples/spot-derivatives-gateway-unauthenticated
        '403':
          description: The caller is not allowed to perform this operation.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
              examples:
                access-denied:
                  $ref: '#/components/examples/spot-derivatives-forbidden'
                gateway-access-denied:
                  $ref: '#/components/examples/spot-derivatives-gateway-forbidden'
        '404':
          description: No order with this identifier exists in the selected account.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradingOrders_OrderNotFoundError'
              examples:
                us-order-not-found:
                  value:
                    error:
                      type: derivatives_error
                      status: 404
                      instance: 4bf92f3577b34da6a3ce929d0e0e4736
                      code: order_not_found
                      causes:
                        - field: order_id
                          message: >-
                            No order with this identifier exists in the selected
                            account.
                international-eea-order-not-found:
                  value:
                    error:
                      type: derivatives_error
                      status: 404
                      instance: 4bf92f3577b34da6a3ce929d0e0e4736
                      code: order_not_found
        '429':
          description: The request was rate limited.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceExhaustedError'
              examples:
                rate-limit-exceeded:
                  $ref: '#/components/examples/spot-derivatives-resource-exhausted'
        '500':
          description: An unexpected server-side error occurred.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
              examples:
                internal-error:
                  $ref: '#/components/examples/spot-derivatives-internal'
        '503':
          description: The requested capability is temporarily unavailable.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnavailableError'
              examples:
                service-unavailable:
                  $ref: '#/components/examples/spot-derivatives-unavailable'
        '504':
          description: The request deadline elapsed.
          headers:
            X-Trace-Id:
              $ref: '#/components/headers/TraceId'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeadlineExceededError'
              examples:
                request-deadline-exceeded:
                  $ref: '#/components/examples/spot-derivatives-deadline-exceeded'
      security:
        - ApiKey: []
          ApiSign: []
          ApiTimestamp: []
      x-codeSamples:
        - lang: bash
          label: US offering
          source: |
            curl --request GET \
              --url 'https://api.sandbox.services.payward.com/v1/accounts/WVSD33HRMGSZUBM7/orders/FOPCDC6-PQIPJ-JLEIRY' \
              --header "API-Key: $PWS_API_KEY" \
              --header "API-Timestamp: $PWS_API_TIMESTAMP" \
              --header "API-Sign: $PWS_API_SIGN"
        - lang: bash
          label: International/EEA offering
          source: |
            curl --request GET \
              --url 'https://api.sandbox.services.payward.com/v1/accounts/WVSD33HRMGSZUBM7/orders/04da4904-1936-55a2-b66d-921ae04b183c' \
              --header "API-Key: $PWS_API_KEY" \
              --header "API-Timestamp: $PWS_API_TIMESTAMP" \
              --header "API-Sign: $PWS_API_SIGN"
components:
  parameters:
    AccountId:
      name: account_id
      in: path
      required: true
      example: WVSD33HRMGSZUBM7
      schema:
        $ref: '#/components/schemas/AccountId'
    TradingOrders_OrderId:
      name: order_id
      in: path
      description: Server-issued order identifier.
      required: true
      example: FOPCDC6-PQIPJ-JLEIRY
      schema:
        type: string
        minLength: 1
        maxLength: 64
        example: FOPCDC6-PQIPJ-JLEIRY
  headers:
    TraceId:
      description: Trace identifier for the request. Include it when contacting support.
      schema:
        type: string
        example: 4bf92f3577b34da6a3ce929d0e0e4736
    StrictTransportSecurity:
      description: Enforces HTTPS for the duration specified by `max-age`.
      schema:
        type: string
        example: max-age=31536000; includeSubDomains; preload
    CacheControl:
      description: Prevents caching of sensitive financial data. Always `no-store`.
      schema:
        type: string
        enum:
          - no-store
        example: no-store
  schemas:
    TradingOrders_Order:
      description: >-
        An order and its current execution status.


        `reduce_only` and `post_only` are omitted when their values are
        unavailable.
      type: object
      required:
        - asset_type
        - id
        - symbol
        - side
        - type
        - status
        - filled_quantity
        - created_at
        - updated_at
      properties:
        asset_type:
          $ref: '#/components/schemas/TradingOrders_AssetType'
          example: perpetual
        id:
          description: Server-issued order identifier.
          type: string
          example: FOPCDC6-PQIPJ-JLEIRY
        client_order_id:
          description: >-
            **Available for the International/EEA offering.**


            Partner-provided order reference, shared by all fills. Omitted when
            unavailable.
          type: string
          minLength: 1
          maxLength: 64
          example: 550e8400-e29b-41d4-a716-446655440000
        symbol:
          description: Instrument symbol.
          type: string
          example: PBTCUCZ0.BTNL
        side:
          $ref: '#/components/schemas/TradingOrders_OrderSide'
          example: buy
        type:
          $ref: '#/components/schemas/TradingOrders_OrderType'
          example: limit
        status:
          $ref: '#/components/schemas/TradingOrders_OrderStatus'
          example: closed
        quantity:
          description: >-
            Order quantity, in contracts. The US offering uses whole numbers.
            Omitted when the quantity is determined at trigger activation.
          type: string
          example: '2'
        filled_quantity:
          description: Quantity executed so far, in the same units as `quantity`.
          type: string
          example: '2'
        limit_price:
          $ref: '#/components/schemas/Price'
          description: Limit price, when applicable. Omitted for market orders.
          example: '66290'
        trigger_price:
          $ref: '#/components/schemas/Price'
          description: Trigger price, when applicable.
          example: '65000'
        notional:
          description: >-
            Total value executed so far for the order, in the instrument's quote
            asset and excluding fees. For partially filled orders, includes only
            the filled quantity.


            The calculation includes the instrument's `contract_size`, which
            specifies how much of the base asset each contract represents. For
            example, 2 contracts of 0.01 BTC each, filled at USD 80,000 per BTC,
            have a notional value of USD 1,600.


            **US offering:** Historical orders use the current contract size.


            Omitted when unavailable.
          type: string
          minLength: 1
          maxLength: 256
          pattern: ^[0-9]+(\.[0-9]+)?$
          example: '1325.8'
        fee:
          description: >-
            Total fees across all fills of the order so far, in the instrument's
            quote asset. Excludes funding payments. A negative value is a
            rebate. Omitted when unavailable.
          type: string
          example: '2.10'
        time_in_force:
          $ref: '#/components/schemas/TradingOrders_TimeInForce'
          description: >-
            Execution and duration policy. For the International/EEA offering,
            non-market orders return `gtc`; market orders omit this field.
          example: gtc
        created_at:
          description: Time the order was created.
          type: string
          format: date-time
          example: '2026-08-03T10:00:00Z'
        updated_at:
          description: Time the order was last updated.
          type: string
          format: date-time
          example: '2026-08-03T10:00:02Z'
        expire_time:
          description: |-
            **Available only for the US offering.**

            Scheduled expiry time for a `gtd` order, when available.
          type: string
          format: date-time
          example: '2027-06-30T16:00:00Z'
        close_reason:
          description: >-
            Explanation of why the order was closed. Returned when an order is
            filled, canceled, expires, is rejected, or trigger activation fails.
            Omitted while the order is active.
          type: string
          example: Order closed
        average_execution_price:
          $ref: '#/components/schemas/Price'
          description: >-
            Volume-weighted average execution price of the filled quantity,
            excluding fees. Omitted when nothing has filled or the price is
            unavailable.
          example: '66290'
        closed_at:
          description: >-
            Order closing time. Omitted while the order is active or when
            unavailable.
          type: string
          format: date-time
          example: '2026-08-03T10:00:02Z'
        reduce_only:
          $ref: '#/components/schemas/TradingOrders_OrderReduceOnly'
        post_only:
          $ref: '#/components/schemas/TradingOrders_OrderPostOnly'
    BadRequestError:
      title: Bad Request
      description: Request validation failed or the request could not be processed.
      oneOf:
        - title: Bad Request
          allOf:
            - $ref: '#/components/schemas/PwsValidationErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsValidationError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        status:
                          type: integer
                          format: int32
                          const: 400
                        code:
                          type: string
                          enum:
                            - bad_request
        - title: Gateway
          description: >-
            Gateway-level validation failure returned before the request reaches
            the service.
          allOf:
            - $ref: '#/components/schemas/PwsValidationErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsValidationError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        type:
                          type: string
                          const: service_error
                        status:
                          type: integer
                          format: int32
                          const: 400
                        code:
                          type: string
                          const: gateway
    UnauthenticatedError:
      title: Unauthenticated
      description: Authentication credentials are missing, invalid, or not accepted.
      oneOf:
        - title: Unauthenticated
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        status:
                          type: integer
                          format: int32
                          const: 401
                        code:
                          type: string
                          enum:
                            - unauthenticated
        - title: Gateway
          description: Authentication failure returned by the API gateway.
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        type:
                          type: string
                          const: service_error
                        status:
                          type: integer
                          format: int32
                          const: 401
                        code:
                          type: string
                          const: gateway
    ForbiddenError:
      title: Forbidden
      description: The caller is not allowed to perform this operation.
      oneOf:
        - title: Forbidden
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        status:
                          type: integer
                          format: int32
                          const: 403
                        code:
                          type: string
                          enum:
                            - forbidden
        - title: Gateway
          description: Authorization failure returned by the API gateway.
          allOf:
            - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
            - type: object
              required:
                - error
              properties:
                error:
                  allOf:
                    - $ref: '#/components/schemas/PwsGeneralError'
                    - type: object
                      required:
                        - status
                        - code
                      properties:
                        type:
                          type: string
                          const: service_error
                        status:
                          type: integer
                          format: int32
                          const: 403
                        code:
                          type: string
                          const: gateway
    TradingOrders_OrderNotFoundError:
      title: Order not found
      description: No order with the supplied identifier exists in the selected account.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 404
                    code:
                      type: string
                      enum:
                        - order_not_found
    ResourceExhaustedError:
      description: The request was rate limited or a resource quota was exhausted.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 429
                    code:
                      type: string
                      enum:
                        - resource_exhausted
    InternalError:
      description: An unexpected server-side error occurred.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 500
                    code:
                      type: string
                      enum:
                        - internal
    UnavailableError:
      description: The service is temporarily unavailable.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 503
                    code:
                      type: string
                      enum:
                        - unavailable
    DeadlineExceededError:
      description: The request deadline was exceeded before a response could be produced.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      const: 504
                    code:
                      type: string
                      enum:
                        - deadline_exceeded
    AccountId:
      description: Globally unique public identifier for an account.
      type: string
      minLength: 14
      maxLength: 42
    TradingOrders_AssetType:
      description: Classification of the trading instrument.
      type: string
      enum:
        - perpetual
    TradingOrders_OrderSide:
      description: Direction of the order.
      type: string
      enum:
        - buy
        - sell
    TradingOrders_OrderType:
      description: Order type.
      type: string
      enum:
        - market
        - limit
        - stop_loss
        - take_profit
        - liquidation
        - unknown
    TradingOrders_OrderStatus:
      description: >-
        Current order status. A `closed` order is not necessarily fully filled;
        compare `filled_quantity` with `quantity`. A `cancelled` order may have
        been partially filled.
      type: string
      enum:
        - pending
        - open
        - pending_cancel
        - cancelled
        - expired
        - closed
    Price:
      description: >-
        Price of one unit of an asset or instrument in the applicable quote
        units.
      type: string
      minLength: 1
      maxLength: 64
      pattern: ^[0-9]+(\.[0-9]+)?$
    TradingOrders_TimeInForce:
      description: Execution and duration policy returned for an order.
      type: string
      enum:
        - gtc
        - gtd
        - ioc
        - fok
        - day
        - day_extended
        - unknown
    TradingOrders_OrderReduceOnly:
      description: >-
        **Available only for the International/EEA offering.**


        Whether execution is restricted to reducing an existing position. When
        enabled, the order cannot open or increase a position.


        An order larger than the open position may be accepted with a reduced
        quantity. The excess quantity will not execute or open a position in the
        opposite direction.
      type: boolean
      example: true
    TradingOrders_OrderPostOnly:
      description: >-
        **Available only for the International/EEA offering.**


        Whether the order is restricted to adding liquidity. When enabled, the
        order is rejected at submission if it would execute immediately.
      type: boolean
      example: true
    PwsValidationErrorEnvelope:
      description: Error envelope for request validation failures.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/PwsValidationError'
          description: Validation error details.
    PwsValidationError:
      description: Standard PWS API error object for request validation failures.
      type: object
      required:
        - type
        - status
        - instance
        - code
      properties:
        type:
          description: Machine-readable error class.
          type: string
        status:
          description: HTTP status code returned for this error.
          type: integer
          format: int32
        instance:
          description: Request identifier for this specific error occurrence.
          type: string
        code:
          description: Stable machine-readable error code.
          type: string
        doc_url:
          description: Optional link to documentation for this error.
          type: string
          format: uri
        causes:
          description: Validation failures that contributed to the error.
          type: array
          items:
            $ref: '#/components/schemas/PwsErrorCause'
    PwsGeneralErrorEnvelope:
      description: Error envelope for operational or domain failures.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/PwsGeneralError'
          description: General error details.
    PwsGeneralError:
      description: Standard PWS API error object for non-validation failures.
      allOf:
        - $ref: '#/components/schemas/PwsErrorBase'
        - type: object
          properties:
            causes:
              description: Additional error details, when present.
              type: array
              items:
                type: object
                additionalProperties: true
    PwsErrorCause:
      description: A single request validation failure.
      type: object
      required:
        - field
        - message
      properties:
        field:
          description: Dot-notation path to the offending request field.
          type: string
        message:
          description: Human-readable explanation of the failed validation rule.
          type: string
    PwsErrorBase:
      description: Common fields present on every PWS API error object.
      type: object
      required:
        - type
        - status
        - instance
        - code
      properties:
        type:
          description: Machine-readable error class.
          type: string
        status:
          description: HTTP status code returned for this error.
          type: integer
          format: int32
        instance:
          description: Request identifier for this specific error occurrence.
          type: string
        code:
          description: Stable machine-readable error code.
          type: string
        doc_url:
          description: Optional link to documentation for this error.
          type: string
          format: uri
  examples:
    spot-derivatives-unauthenticated:
      summary: Authentication required
      value:
        error:
          type: derivatives_error
          status: 401
          instance: 4bf92f3577b34da6a3ce929d0e0e4736
          code: unauthenticated
    spot-derivatives-gateway-unauthenticated:
      summary: Gateway authentication failed
      value:
        error:
          type: service_error
          status: 401
          instance: 4bf92f3577b34da6a3ce929d0e0e4736
          code: gateway
    spot-derivatives-forbidden:
      summary: Access denied
      value:
        error:
          type: derivatives_error
          status: 403
          instance: 4bf92f3577b34da6a3ce929d0e0e4736
          code: forbidden
    spot-derivatives-gateway-forbidden:
      summary: Gateway access denied
      value:
        error:
          type: service_error
          status: 403
          instance: 4bf92f3577b34da6a3ce929d0e0e4736
          code: gateway
    spot-derivatives-resource-exhausted:
      summary: Rate limit exceeded
      value:
        error:
          type: derivatives_error
          status: 429
          instance: 4bf92f3577b34da6a3ce929d0e0e4736
          code: resource_exhausted
    spot-derivatives-internal:
      summary: Internal service error
      value:
        error:
          type: derivatives_error
          status: 500
          instance: 4bf92f3577b34da6a3ce929d0e0e4736
          code: internal
    spot-derivatives-unavailable:
      summary: Service unavailable
      value:
        error:
          type: derivatives_error
          status: 503
          instance: 4bf92f3577b34da6a3ce929d0e0e4736
          code: unavailable
    spot-derivatives-deadline-exceeded:
      summary: Request deadline exceeded
      value:
        error:
          type: derivatives_error
          status: 504
          instance: 4bf92f3577b34da6a3ce929d0e0e4736
          code: deadline_exceeded
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: API-Key
      description: Your public API key. Identifies the partner making the request.
    ApiSign:
      type: apiKey
      in: header
      name: API-Sign
      description: HMAC signature over the request, computed with your API secret.
    ApiTimestamp:
      type: apiKey
      in: header
      name: API-Timestamp
      description: >-
        Time the request was signed, as Unix milliseconds. Included in the
        request signature. Requests signed too far from the server's time are
        rejected.

````