> ## 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.

# Create price trigger swap

> Submits a new price trigger swap. The swap remains in `active` status until its `when` condition is met or it is cancelled.

When the condition fires, the configured `trade` is executed. On successful execution the swap transitions to `completed` and a `price_trigger_swap.executed` webhook is delivered; the realized `trade.fees` and `trade.rate` are then populated on the swap. If the trade fails, a `price_trigger_swap.execution_failed` webhook is delivered and the swap may be retried; once retries are exhausted the swap is moved to `cancelled` with `reason: "system"`.

Use `POST /v1/accounts/{account_id}/price-trigger-swaps/{price_trigger_swap_id}/cancel` to cancel an `active` swap, and `GET /v1/accounts/{account_id}/price-trigger-swaps/{price_trigger_swap_id}` to poll for status.



## OpenAPI

````yaml /api-reference/openapi_v3_pws.json post /v1/accounts/{account_id}/price-trigger-swaps
openapi: 3.1.0
info:
  title: Payward Services API
  description: >-
    The Payward Services (PWS) public API.


    PWS exposes Swaps (institutional FX-style trading), Conversions (rule-driven
    and one-shot fiat ↔ crypto value movement), retail-style Quotes and Price
    Trigger Swaps, end-user Users / Verifications, Funds (deposits, withdrawals,
    addresses, transactions), Portfolio, Earn, Reports, Webhooks, and Ramp
    (hosted fiat-to-crypto on-ramp checkout).


    All requests must be authenticated. All monetary values are decimal strings;
    all timestamps are ISO 8601 UTC. List endpoints are cursor-paginated. Errors
    follow a uniform shape (see `*ErrorResponse` schemas).
  version: v1
  contact:
    name: Payward Services API Support
    url: https://docs.payward.com
    email: api-support@payward.com
servers:
  - url: https://api.services.payward.com
    description: Production
security:
  - ApiKey: []
    ApiNonce: []
    ApiSign: []
tags:
  - name: Users
    description: >-
      Users and headless-user onboarding flows that the partner manages.


      - **Create User** provisions a user with full identity verification fields
      collected up front.

      - **Create Headless User** provisions a lightweight user when your
      licensing agreement allows you to manage KYC data outside Payward.

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

      - **Update User** updates user profile fields and may re-trigger
      verification.


      Use the returned user `id` for calls that require the user's identifier.
  - name: Assets
    description: >-
      Catalog of assets available on the platform with retail-display metadata
      (logos, market data, descriptions).
  - name: Conversions
    description: >-
      Rule-driven and one-shot fiat ↔ crypto value movement, including
      conversion rules, deposits, and whitelisted wallets.
  - name: Earn
    description: >-
      Manage auto-earn preferences and retrieve allocation and reward
      information.
  - name: Funds
    description: >-
      Deposits, withdrawals, addresses, methods, and the consolidated
      funding-transactions ledger.
  - name: Portfolio
    description: End-user portfolio summary, history, and transaction views.
  - name: Price Trigger Swaps
    description: Limit-style orders that execute when a configured price trigger is met.
  - name: On-chain Swaps
    description: >-
      Wallet-funded onchain quote trading for xStock and USDC pairs. On-chain
      quotes settle on-chain through the Payward on-chain proxy contract.
  - name: Ramp
    description: >-
      Hosted fiat-to-crypto on-ramp checkout: country / fiat / payment-method /
      cryptocurrency-asset discovery, transaction limits and prospective quotes,
      and the hosted checkout URL.
  - name: Reports
    description: Settlement and reconciliation reports for the partner.
  - name: Swaps
    description: >-
      Direct partner-to-Payward swap quotes and executions (institutional
      FX-style trading).
  - name: Verifications
    description: Identity verification (KYC) submission and status for end users.
  - name: Webhooks
    description: Manage webhook subscriptions for asynchronous event delivery.
paths:
  /v1/accounts/{account_id}/price-trigger-swaps:
    post:
      tags:
        - Price Trigger Swaps
      summary: Create price trigger swap
      description: >-
        Submits a new price trigger swap. The swap remains in `active` status
        until its `when` condition is met or it is cancelled.


        When the condition fires, the configured `trade` is executed. On
        successful execution the swap transitions to `completed` and a
        `price_trigger_swap.executed` webhook is delivered; the realized
        `trade.fees` and `trade.rate` are then populated on the swap. If the
        trade fails, a `price_trigger_swap.execution_failed` webhook is
        delivered and the swap may be retried; once retries are exhausted the
        swap is moved to `cancelled` with `reason: "system"`.


        Use `POST
        /v1/accounts/{account_id}/price-trigger-swaps/{price_trigger_swap_id}/cancel`
        to cancel an `active` swap, and `GET
        /v1/accounts/{account_id}/price-trigger-swaps/{price_trigger_swap_id}`
        to poll for status.
      operationId: createPriceTriggerSwap
      parameters:
        - $ref: '#/components/parameters/AccountIdPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Request to create a new price trigger swap.
              properties:
                trade:
                  $ref: '#/components/schemas/PriceTriggerSwapTradeRequest'
                when:
                  $ref: '#/components/schemas/PriceTriggerSwapCondition'
              required:
                - trade
                - when
            examples:
              buy-btc-under-50k:
                summary: Spend 100 USD on BTC if BTC drops to 50,000 USD or below
                value:
                  external_reference: buy-dip-btc-001
                  trade:
                    from:
                      symbol: USD
                      type: fiat
                      amount: '100.00'
                    to:
                      symbol: BTC
                      type: crypto
                    fee:
                      bps: 50
                  when:
                    base:
                      symbol: BTC
                      type: crypto
                    quote:
                      symbol: USD
                      type: fiat
                    drops_to: '50000.00'
              sell-btc-at-80k:
                summary: Sell 0.1 BTC for USD if BTC rises to 80,000 USD or above
                value:
                  external_reference: take-profit-btc-80k
                  trade:
                    from:
                      symbol: BTC
                      type: crypto
                      amount: '0.1'
                    to:
                      symbol: USD
                      type: fiat
                    fee:
                      bps: 50
                  when:
                    base:
                      symbol: BTC
                      type: crypto
                    quote:
                      symbol: USD
                      type: fiat
                    rises_to: '80000.00'
              receive-eth-at-2k:
                summary: Receive exactly 0.5 ETH if ETH drops to 2,000 USD or below
                value:
                  external_reference: top-up-eth-2k
                  trade:
                    from:
                      symbol: USD
                      type: fiat
                    to:
                      symbol: ETH
                      type: crypto
                      amount: '0.5'
                    fee:
                      bps: 50
                  when:
                    base:
                      symbol: ETH
                      type: crypto
                    quote:
                      symbol: USD
                      type: fiat
                    drops_to: '2000.00'
      responses:
        '201':
          description: >-
            Swap created. The `Location` header points at the new swap resource.
            The response body returns only the new swap's `id`; fetch `GET
            /v1/accounts/{account_id}/price-trigger-swaps/{price_trigger_swap_id}`
            for the full resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        description: >-
                          Unique identifier for the newly created price trigger
                          swap (prefixed with `swap_`).
                        type: string
                        example: swap_01J0M7C0Z9F8YX3GQH8E
                    required:
                      - id
              examples:
                buy-btc-under-50k:
                  summary: Order created and waiting for the price trigger
                  value:
                    data:
                      id: swap_01J0M7C0Z9F8YX3GQH8E
          headers:
            Location:
              description: >-
                Path of the newly created swap, e.g.
                `/v1/accounts/{account_id}/price-trigger-swaps/swap_01J0M7C0Z9F8YX3GQH8E`.
                Identical to `GET
                /v1/accounts/{account_id}/price-trigger-swaps/{price_trigger_swap_id}`
                with the returned `data.id`.
              schema:
                type: string
                format: uri-reference
                example: >-
                  /v1/accounts/W4BE9868GY65TB6523/price-trigger-swaps/swap_01J0M7C0Z9F8YX3GQH8E
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponse'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PriceTriggerSwapTargetPriceAlreadyAvailableErrorResponse
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalErrorResponse'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableErrorResponse'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '504':
          description: Deadline exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeadlineExceededErrorResponse'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
      security:
        - ApiKey: []
          ApiNonce: []
          ApiSign: []
      x-codeSamples:
        - lang: bash
          label: curl
          source: >-
            curl -X POST
            "https://api.services.payward.com/v1/accounts/W4BE9868GY65TB6523/price-trigger-swaps"
            \
              -H "API-Key: $PWS_API_KEY" \
              -H "API-Nonce: $PWS_API_NONCE" \
              -H "API-Sign: $PWS_API_SIGN" \
              -H "Content-Type: application/json" \
              -d '{
                "name": "Buy 100 USD of BTC under 50k",
                "trade": {
                  "from": { "symbol": "USD", "type": "fiat", "amount": "100.00" },
                  "to": { "symbol": "BTC", "type": "crypto" },
                  "fee": { "bps": 50 }
                },
                "when": {
                  "base": { "symbol": "BTC", "type": "crypto" },
                  "quote": { "symbol": "USD", "type": "fiat" },
                  "drops_to": "50000.00"
                }
              }'
components:
  parameters:
    AccountIdPath:
      in: path
      name: account_id
      required: true
      description: >-
        ID of the account the request applies to. This refers to one of the
        accounts held by the user the request is acting on behalf of (typically
        the user's main account, but any of the user's accounts is accepted).
        Routes the request to that specific account container.
      schema:
        $ref: '#/components/schemas/AccountId'
      example: W4BE9868GY65TB6523
  schemas:
    PriceTriggerSwapTradeRequest:
      description: >-
        The trade to execute when the order's `when` condition fires.


        `from` and `to` use the same `AssetAmount` shape as a swap quote — a
        price trigger swap is, in effect, a swap quote that waits for a price
        condition before executing. Exactly one of `from.amount` or `to.amount`
        must be provided to indicate which side of the trade is fixed; the other
        side's amount is determined at execution time. Setting both amounts or
        omitting both is rejected with a 400 Bad Request.


        `fee` is the partner's configured fee, applied on top of the underlying
        execution price when the trade fires. Request-only — not echoed in
        response payloads.
      type: object
      properties:
        from:
          description: Source asset and amount for the trade.
          allOf:
            - $ref: '#/components/schemas/AssetAmount'
        to:
          description: Destination asset and amount for the trade.
          allOf:
            - $ref: '#/components/schemas/AssetAmount'
        fee:
          $ref: '#/components/schemas/PartnerFee'
      required:
        - from
        - to
    PriceTriggerSwapCondition:
      description: >-
        The condition under which the order's `trade` fires.


        Watches the price of the `base`/`quote` asset pair and fires when the
        live price reaches the threshold. Specify exactly one of `drops_to` or
        `rises_to`:


        - `drops_to`: fires when the price falls to or below the value (e.g.
        "buy on dip").

        - `rises_to`: fires when the price rises to or above the value (e.g.
        "take profit").
      type: object
      properties:
        base:
          description: Base asset of the pair to monitor.
          allOf:
            - $ref: '#/components/schemas/AssetRef'
        quote:
          description: Quote asset of the pair to monitor.
          allOf:
            - $ref: '#/components/schemas/AssetRef'
        drops_to:
          description: >-
            Fire when the price reaches this value or below. Decimal string.
            Mutually exclusive with `rises_to`.
          type: string
          pattern: ^-?[0-9]+(\.[0-9]+)?$
          minLength: 1
          maxLength: 64
          example: '50000.00'
        rises_to:
          description: >-
            Fire when the price reaches this value or above. Decimal string.
            Mutually exclusive with `drops_to`.
          type: string
          pattern: ^-?[0-9]+(\.[0-9]+)?$
          minLength: 1
          maxLength: 64
          example: '80000.00'
      required:
        - base
        - quote
      oneOf:
        - type: object
          required:
            - drops_to
          not:
            required:
              - rises_to
        - type: object
          required:
            - rises_to
          not:
            required:
              - drops_to
    ValidationErrorResponse:
      description: The request was rejected because the client supplied invalid input.
      type: object
      properties:
        error:
          description: Error details.
          type: object
          properties:
            type:
              type: string
            status:
              type: integer
              format: int32
              enum:
                - 400
            instance:
              type: string
            code:
              type: string
              enum:
                - bad_request
            doc_url:
              type: string
              format: uri
            causes:
              type: array
              items:
                $ref: '#/components/schemas/ValidationCause'
          required:
            - type
            - status
            - instance
            - code
      required:
        - error
    UnauthenticatedErrorResponse:
      description: Authentication credentials were missing or invalid.
      type: object
      properties:
        error:
          description: Error details.
          type: object
          properties:
            type:
              type: string
            status:
              type: integer
              format: int32
              enum:
                - 401
            instance:
              type: string
            code:
              type: string
              enum:
                - unauthenticated
            doc_url:
              type: string
              format: uri
            causes:
              type: array
              items:
                type: object
                additionalProperties: true
          required:
            - type
            - status
            - instance
            - code
      required:
        - error
    ForbiddenErrorResponse:
      description: The caller is authenticated but is not allowed to perform this action.
      type: object
      properties:
        error:
          description: Error details.
          type: object
          properties:
            type:
              type: string
            status:
              type: integer
              format: int32
              enum:
                - 403
            instance:
              type: string
            code:
              type: string
              enum:
                - forbidden
            doc_url:
              type: string
              format: uri
            causes:
              type: array
              items:
                type: object
                additionalProperties: true
          required:
            - type
            - status
            - instance
            - code
      required:
        - error
    PriceTriggerSwapTargetPriceAlreadyAvailableErrorResponse:
      description: >-
        The requested target price is already available outside the accepted
        tolerance, so the price trigger swap would trigger immediately.
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - price_trigger_swap_error
            status:
              type: integer
              format: uint16
              enum:
                - 412
            instance:
              type: string
            code:
              type: string
              enum:
                - price_trigger_swap_target_price_already_available
            doc_url:
              type:
                - string
                - 'null'
          required:
            - type
            - status
            - instance
            - code
      required:
        - error
    RateLimitErrorResponse:
      description: The request rate limit was exceeded.
      type: object
      properties:
        error:
          description: Error details.
          type: object
          properties:
            type:
              type: string
            status:
              type: integer
              format: int32
              enum:
                - 429
            instance:
              type: string
            code:
              type: string
              enum:
                - resource_exhausted
            doc_url:
              type: string
              format: uri
            causes:
              type: array
              items:
                type: object
                additionalProperties: true
          required:
            - type
            - status
            - instance
            - code
      required:
        - error
    InternalErrorResponse:
      description: An internal server error occurred.
      type: object
      properties:
        error:
          description: Error details.
          type: object
          properties:
            type:
              type: string
            status:
              type: integer
              format: int32
              enum:
                - 500
            instance:
              type: string
            code:
              type: string
              enum:
                - internal
            doc_url:
              type: string
              format: uri
            causes:
              type: array
              items:
                type: object
                additionalProperties: true
          required:
            - type
            - status
            - instance
            - code
      required:
        - error
    ServiceUnavailableErrorResponse:
      description: The service is temporarily unavailable.
      type: object
      properties:
        error:
          description: Error details.
          type: object
          properties:
            type:
              type: string
            status:
              type: integer
              format: int32
              enum:
                - 503
            instance:
              type: string
            code:
              type: string
              enum:
                - unavailable
            doc_url:
              type: string
              format: uri
            causes:
              type: array
              items:
                type: object
                additionalProperties: true
          required:
            - type
            - status
            - instance
            - code
      required:
        - error
    DeadlineExceededErrorResponse:
      description: The upstream request deadline was exceeded.
      type: object
      properties:
        error:
          description: Error details.
          type: object
          properties:
            type:
              type: string
            status:
              type: integer
              format: int32
              enum:
                - 504
            instance:
              type: string
            code:
              type: string
              enum:
                - deadline_exceeded
            doc_url:
              type: string
              format: uri
            causes:
              type: array
              items:
                type: object
                additionalProperties: true
          required:
            - type
            - status
            - instance
            - code
      required:
        - error
    AccountId:
      type: string
      description: Canonical identifier for an account in the Payward public API.
      minLength: 14
      maxLength: 42
    AssetAmount:
      description: An asset and an amount denominated in that asset.
      type: object
      properties:
        symbol:
          description: Asset ticker symbol (e.g. "BTC", "USD", "TSLAx").
          type: string
        type:
          description: Classification of the asset.
          type: string
          enum:
            - fiat
            - crypto
            - stablecoin
            - xstock
        amount:
          description: Decimal amount as a string to preserve precision.
          type: string
          format: decimal128
      required:
        - symbol
        - type
    PartnerFee:
      description: >-
        Partner-configured fee applied on top of the underlying execution price.
        Request-only — never returned in response payloads.
      type: object
      properties:
        bps:
          description: Fee in basis points (1 bps = 0.01%).
          type: integer
          minimum: 0
          maximum: 10000
          example: 50
      required:
        - bps
    AssetRef:
      description: Reference to an asset by its ticker symbol and classification.
      type: object
      properties:
        symbol:
          description: Asset ticker symbol (e.g. "BTC", "USD", "TSLAx").
          type: string
        type:
          description: Classification of the asset.
          type: string
          enum:
            - fiat
            - crypto
            - stablecoin
            - equity
            - xstock
      required:
        - symbol
        - type
    ValidationCause:
      description: One failed field-level validation rule.
      type: object
      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
      required:
        - field
        - message
  headers:
    RequestId:
      description: >-
        Unique identifier for tracing this request across services. Include in
        support tickets.
      schema:
        type: string
        format: uuid
        example: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
    RateLimitLimit:
      description: Total requests allowed in the current window.
      schema:
        type: integer
        example: 1000
    RateLimitRemaining:
      description: Requests remaining in the current window.
      schema:
        type: integer
        example: 955
    RateLimitReset:
      description: Unix timestamp (seconds) when the rate-limit window resets.
      schema:
        type: integer
        format: int64
        example: 1713182400
    StrictTransportSecurity:
      description: >-
        Enforces HTTPS for the configured period. Always `max-age=63072000;
        includeSubDomains; preload`.
      schema:
        type: string
        example: max-age=63072000; includeSubDomains; preload
    XContentTypeOptions:
      description: Disables MIME sniffing. Always `nosniff`.
      schema:
        type: string
        enum:
          - nosniff
        example: nosniff
    ContentSecurityPolicy:
      description: >-
        Prevents embedding and resource loading. Always `default-src 'none';
        frame-ancestors 'none'`.
      schema:
        type: string
        example: default-src 'none'; frame-ancestors 'none'
    CacheControl:
      description: Prevents caching of sensitive financial data. Always `no-store`.
      schema:
        type: string
        enum:
          - no-store
        example: no-store
    RetryAfter:
      description: Seconds the client should wait before retrying.
      schema:
        type: integer
        example: 30
  securitySchemes:
    ApiKey:
      type: apiKey
      name: API-Key
      in: header
      description: Your public API key. Identifies the partner making the request.
    ApiNonce:
      type: apiKey
      name: API-Nonce
      in: header
      description: Monotonically increasing nonce included in the request signature.
    ApiSign:
      type: apiKey
      name: API-Sign
      in: header
      description: HMAC signature over the request, computed with your private key.

````