> ## Documentation Index
> Fetch the complete documentation index at: https://tetrafi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List the active workspace's Basic and Advanced orders in newest-first order.

> Lists Basic and Advanced orders using the same envelope as GET /orders/{orderId}. Requires orders_read on an API key, or ViewOrders/PlaceOrder on a session. Newest first by created time and id. A status filter is applied to stored order facts first and then to each order's canonical public status; a filtered page keeps reading until it holds limit items or the orders end, within a bounded scan. A page shorter than limit carries a nextCursor only when that scan reached its limit, and then says so with scanLimitReached: follow nextCursor until null. A cursor is bound to the caller, workspace and exact filters; a malformed, foreign or deleted anchor is INVALID_CURSOR.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/orders
openapi: 3.1.0
info:
  description: >-
    TetraFi is an API for institutional trading across on-chain and off-chain
    venues: discover assets, request quotes, place an order by quote id and read
    its status. API keys sign every request.


    Asset-pair quotes: every tagged union is tagged by `kind`; only the outcome
    of `/prices` rows and `sources[]` entries is tagged by `status`.
  title: TetraFi API
  version: 1.0.0-beta.1
servers:
  - url: https://api.tetrafi.io
security:
  - api_key: []
tags:
  - description: Request price quotes from multiple solvers for cross-chain transactions
    name: quotes
  - description: Submit, track, and manage cross-chain orders
    name: orders
  - description: Canonical trading pairs and aggregator metadata
    name: trading
  - description: >-
      Authentication — registration, login, SIWE, OAuth, sessions, login
      activity
    name: auth
  - description: Workspace CRUD, settings, members, and team management
    name: workspaces
  - description: >-
      Webhook management — CRUD, secret rotation, test delivery, delivery
      history
    name: webhooks
paths:
  /api/v1/orders:
    get:
      tags:
        - orders
      summary: >-
        List the active workspace's Basic and Advanced orders in newest-first
        order.
      description: >-
        Lists Basic and Advanced orders using the same envelope as GET
        /orders/{orderId}. Requires orders_read on an API key, or
        ViewOrders/PlaceOrder on a session. Newest first by created time and id.
        A status filter is applied to stored order facts first and then to each
        order's canonical public status; a filtered page keeps reading until it
        holds limit items or the orders end, within a bounded scan. A page
        shorter than limit carries a nextCursor only when that scan reached its
        limit, and then says so with scanLimitReached: follow nextCursor until
        null. A cursor is bound to the caller, workspace and exact filters; a
        malformed, foreign or deleted anchor is INVALID_CURSOR.
      operationId: list_orders
      parameters:
        - $ref: '#/components/parameters/WorkspaceId'
        - description: Number of matching items requested, 1–20; default 20.
          in: query
          name: limit
          required: false
          schema:
            format: int32
            minimum: 0
            type: integer
        - description: >-
            Opaque nextCursor from this caller, workspace and the identical
            filter set.
          in: query
          name: cursor
          required: false
          schema:
            type: string
        - description: Public lifecycle status, shared by Basic and Advanced orders.
          in: query
          name: status
          required: false
          schema:
            $ref: '#/components/schemas/PublicOrderStatus'
        - in: query
          name: kind
          required: false
          schema:
            $ref: '#/components/schemas/OrderListKind'
        - description: Created at or after this RFC 3339 instant, inclusive.
          in: query
          name: from
          required: false
          schema:
            format: date-time
            type: string
        - description: Created at or before this RFC 3339 instant, inclusive.
          in: query
          name: to
          required: false
          schema:
            format: date-time
            type: string
        - in: query
          name: sellAsset
          required: false
          schema:
            type: string
        - in: query
          name: buyAsset
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderListResponse'
          description: ''
          headers:
            x-ratelimit-limit:
              description: >-
                Sent only when the request's API key has its own
                requests-per-minute limit: that limit. Sessions, and keys
                without their own limit, never receive it.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-remaining:
              description: >-
                Requests left before this caller is limited: the per-address
                limit's when that limit counted the request, otherwise the API
                key's own remaining allowance. Absent when no finite limit
                counted the request.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-reset:
              description: >-
                Sent with x-ratelimit-limit, only when the request's API key has
                its own limit: whole seconds until that allowance is full again.
              schema:
                minimum: 0
                type: integer
            x-request-id:
              description: >-
                The request's id: the caller's valid `X-Request-Id`, or a
                generated UUID v4. Quote it when asking for support.
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: >-
            INVALID_REQUEST: an unknown parameter, or an unknown value of status
            or kind, with details.field naming the parameter. VALIDATION_ERROR:
            limit outside 1-20, from after to, or an unregistered Asset.
            INVALID_CURSOR
          headers:
            x-ratelimit-limit:
              description: >-
                Sent only when the request's API key has its own
                requests-per-minute limit: that limit. Sessions, and keys
                without their own limit, never receive it.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-remaining:
              description: >-
                Requests left before this caller is limited: the per-address
                limit's when that limit counted the request, otherwise the API
                key's own remaining allowance. Absent when no finite limit
                counted the request.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-reset:
              description: >-
                Sent with x-ratelimit-limit, only when the request's API key has
                its own limit: whole seconds until that allowance is full again.
              schema:
                minimum: 0
                type: integer
            x-request-id:
              description: >-
                The request's id: the caller's valid `X-Request-Id`, or a
                generated UUID v4. Quote it when asking for support.
              schema:
                type: string
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: ''
          headers:
            WWW-Authenticate:
              description: >-
                Sent when the request presented a bearer token and it was
                refused: `Bearer error="invalid_token"` (RFC 6750 section 3).
                Exchange a new token. A refused API key carries no challenge.
              schema:
                type: string
            x-ratelimit-limit:
              description: >-
                Sent only when the request's API key has its own
                requests-per-minute limit: that limit. Sessions, and keys
                without their own limit, never receive it.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-remaining:
              description: >-
                Requests left before this caller is limited: the per-address
                limit's when that limit counted the request, otherwise the API
                key's own remaining allowance. Absent when no finite limit
                counted the request.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-reset:
              description: >-
                Sent with x-ratelimit-limit, only when the request's API key has
                its own limit: whole seconds until that allowance is full again.
              schema:
                minimum: 0
                type: integer
            x-request-id:
              description: >-
                The request's id: the caller's valid `X-Request-Id`, or a
                generated UUID v4. Quote it when asking for support.
              schema:
                type: string
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: ''
          headers:
            x-ratelimit-limit:
              description: >-
                Sent only when the request's API key has its own
                requests-per-minute limit: that limit. Sessions, and keys
                without their own limit, never receive it.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-remaining:
              description: >-
                Requests left before this caller is limited: the per-address
                limit's when that limit counted the request, otherwise the API
                key's own remaining allowance. Absent when no finite limit
                counted the request.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-reset:
              description: >-
                Sent with x-ratelimit-limit, only when the request's API key has
                its own limit: whole seconds until that allowance is full again.
              schema:
                minimum: 0
                type: integer
            x-request-id:
              description: >-
                The request's id: the caller's valid `X-Request-Id`, or a
                generated UUID v4. Quote it when asking for support.
              schema:
                type: string
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: >-
            Too many requests. Wait the number of seconds in `Retry-After`
            before retrying.
          headers:
            Retry-After:
              description: >-
                Whole seconds to wait before retrying. Always sent on 429; sent
                on 503 when the wait is known. `details.retryAfter` carries the
                same wait as an ISO 8601 duration.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-limit:
              description: >-
                Sent only when the request's API key has its own
                requests-per-minute limit: that limit. Sessions, and keys
                without their own limit, never receive it.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-remaining:
              description: >-
                Requests left before this caller is limited: the per-address
                limit's when that limit counted the request, otherwise the API
                key's own remaining allowance. Absent when no finite limit
                counted the request.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-reset:
              description: >-
                Sent with x-ratelimit-limit, only when the request's API key has
                its own limit: whole seconds until that allowance is full again.
              schema:
                minimum: 0
                type: integer
            x-request-id:
              description: >-
                The request's id: the caller's valid `X-Request-Id`, or a
                generated UUID v4. Quote it when asking for support.
              schema:
                type: string
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Something went wrong on our side.
          headers:
            x-ratelimit-limit:
              description: >-
                Sent only when the request's API key has its own
                requests-per-minute limit: that limit. Sessions, and keys
                without their own limit, never receive it.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-remaining:
              description: >-
                Requests left before this caller is limited: the per-address
                limit's when that limit counted the request, otherwise the API
                key's own remaining allowance. Absent when no finite limit
                counted the request.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-reset:
              description: >-
                Sent with x-ratelimit-limit, only when the request's API key has
                its own limit: whole seconds until that allowance is full again.
              schema:
                minimum: 0
                type: integer
            x-request-id:
              description: >-
                The request's id: the caller's valid `X-Request-Id`, or a
                generated UUID v4. Quote it when asking for support.
              schema:
                type: string
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: ''
          headers:
            Retry-After:
              description: >-
                Whole seconds to wait before retrying. Always sent on 429; sent
                on 503 when the wait is known. `details.retryAfter` carries the
                same wait as an ISO 8601 duration.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-limit:
              description: >-
                Sent only when the request's API key has its own
                requests-per-minute limit: that limit. Sessions, and keys
                without their own limit, never receive it.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-remaining:
              description: >-
                Requests left before this caller is limited: the per-address
                limit's when that limit counted the request, otherwise the API
                key's own remaining allowance. Absent when no finite limit
                counted the request.
              schema:
                minimum: 0
                type: integer
            x-ratelimit-reset:
              description: >-
                Sent with x-ratelimit-limit, only when the request's API key has
                its own limit: whole seconds until that allowance is full again.
              schema:
                minimum: 0
                type: integer
            x-request-id:
              description: >-
                The request's id: the caller's valid `X-Request-Id`, or a
                generated UUID v4. Quote it when asking for support.
              schema:
                type: string
      security:
        - api_key: []
        - bearer_auth: []
components:
  parameters:
    WorkspaceId:
      description: >-
        The workspace the request acts in. An API key bound to a workspace
        implies it: omit the header, or send that same id (another id answers
        403 WORKSPACE_SCOPE_MISMATCH). A member session must send it (400
        MISSING_WORKSPACE without it).
      in: header
      name: X-Workspace-Id
      required: false
      schema:
        format: uuid
        type: string
  schemas:
    PublicOrderStatus:
      description: >-
        Open public lifecycle vocabulary shared by both order kinds. States may
        be

        skipped; act on `terminal`, not on a particular sequence.


        New values may be added; treat unknown values as other.
      enum:
        - pending
        - working
        - filled
        - settled
        - unfilled
        - cancelled
        - failed
        - refunded
        - reviewRequired
        - outcomeUnknown
        - refused
      type: string
      x-extensible-enum: true
    OrderListKind:
      description: Which native owner holds an order.
      enum:
        - basicTrade
        - advancedTrade
      type: string
    OrderListResponse:
      description: >-
        A page of the workspace's orders, newest first. A status filter keeps
        reading until the page

        has `limit` items or the orders end, within a bounded scan: a page
        shorter than `limit` with a

        `nextCursor` means that scan reached its limit (`scanLimitReached`),
        never that the orders ended.
      properties:
        items:
          items:
            $ref: '#/components/schemas/QuoteOrderResponse'
          type: array
        nextCursor:
          type:
            - string
            - 'null'
        scanLimitReached:
          description: >-
            True when a status-filtered page stopped at its scan limit before
            filling `limit`:

            more orders remain to examine, so follow `nextCursor`. False on
            every other page.
          type: boolean
      required:
        - items
        - scanLimitReached
      type: object
    ApiError:
      description: >-
        A refusal of an integrator operation. Codes are an open set: a client
        handles the codes it

        knows and falls back on the HTTP status for any other.
      properties:
        details:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ApiErrorDetails'
        docUrl:
          description: Stable documentation for this refusal code.
          type: string
        error:
          description: The machine-readable code, for example `QUOTE_EXPIRED`.
          type: string
        message:
          description: What happened, in words a person can read. Not for matching.
          type: string
        next:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/QuoteNextAction'
              description: >-
                The way forward, when there is one (for example `requote` on an
                expired quote).
        requestId:
          description: >-
            The request's id, the value the `X-Request-Id` response header
            carries. Quote it when

            asking for support.
          type:
            - string
            - 'null'
        retryable:
          description: >-
            Whether an unchanged request may succeed later, from the error
            catalogue.
          type: boolean
        timestamp:
          description: When the refusal was made, in Unix seconds.
          format: int64
          type: integer
      required:
        - error
        - docUrl
        - retryable
        - message
        - timestamp
      type: object
    QuoteOrderResponse:
      description: >-
        What `POST /orders {quoteId}` created, read from the owner that saves
        it: a

        protocol order in `orders`, or a workspace venue trade (fiat included)
        in the venue

        trade operations. Nothing is recorded twice.


        New values may be added; treat unknown values as other.
      oneOf:
        - allOf:
            - anyOf:
                - $ref: '#/components/schemas/ResolvedTradingSource'
                - not:
                    anyOf:
                      - required:
                          - tradingSource
                      - required:
                          - fundingModel
                      - required:
                          - settlement
                      - required:
                          - fundingAccount
                      - required:
                          - deliverTo
            - $ref: '#/components/schemas/OrderExecutionReport'
              description: What the order executed and what it cost.
            - properties:
                next:
                  oneOf:
                    - type: 'null'
                    - $ref: '#/components/schemas/QuoteNextAction'
                order:
                  $ref: '#/components/schemas/OrderResponse'
                orderId:
                  description: The identifier accepted by `GET /api/v1/orders/{orderId}`.
                  type: string
                quoteId:
                  type:
                    - string
                    - 'null'
                requestId:
                  type:
                    - string
                    - 'null'
                status:
                  $ref: '#/components/schemas/PublicOrderStatus'
                statusUrl:
                  description: >-
                    Where to read this order's status (`GET`). An API key needs
                    the `orders_read` scope;

                    placing the order needed only `orders_write`.
                  type: string
                terminal:
                  type: boolean
              required:
                - orderId
                - statusUrl
                - status
                - terminal
                - order
              type: object
            - properties:
                kind:
                  description: New values may be added; treat unknown values as other.
                  enum:
                    - advancedTrade
                  type: string
                  x-extensible-enum: true
              required:
                - kind
              type: object
        - allOf:
            - anyOf:
                - $ref: '#/components/schemas/ResolvedTradingSource'
                - not:
                    anyOf:
                      - required:
                          - tradingSource
                      - required:
                          - fundingModel
                      - required:
                          - settlement
                      - required:
                          - fundingAccount
                      - required:
                          - deliverTo
            - $ref: '#/components/schemas/OrderExecutionReport'
              description: What the order executed and what it cost.
            - properties:
                next:
                  oneOf:
                    - type: 'null'
                    - $ref: '#/components/schemas/QuoteNextAction'
                operation:
                  $ref: '#/components/schemas/VenueTradeOperation'
                orderId:
                  description: >-
                    The operation identifier accepted by `GET
                    /api/v1/orders/{orderId}`.
                  type: string
                quoteId:
                  type:
                    - string
                    - 'null'
                requestId:
                  type:
                    - string
                    - 'null'
                status:
                  $ref: '#/components/schemas/PublicOrderStatus'
                statusUrl:
                  description: >-
                    Where to read this order (`GET`), with the `orders_read`
                    API-key scope.
                  type: string
                terminal:
                  type: boolean
              required:
                - orderId
                - statusUrl
                - status
                - terminal
                - operation
              type: object
            - properties:
                kind:
                  description: New values may be added; treat unknown values as other.
                  enum:
                    - basicTrade
                  type: string
                  x-extensible-enum: true
              required:
                - kind
              type: object
      x-extensible-enum: true
    ApiErrorDetails:
      additionalProperties:
        description: >-
          Any further detail the code carries (for example `stepUpSubject`,
          `balanceShortfall`,

          `minimumAmount`), each named in camelCase.
      description: >-
        The code's detail. Each field is present only on the codes named beside
        it; other codes may

        carry further fields, named in camelCase, which a client may ignore.
      properties:
        capabilityBlockers:
          description: >-
            `CAPABILITY_BLOCKED` and the other capability refusals: what blocks
            the workspace.
          items:
            $ref: '#/components/schemas/CapabilityBlocker'
          type:
            - array
            - 'null'
        conflicts:
          description: '`REQUOTE_FIELDS_CONFLICT`: the fields that cannot go with `requote`.'
          items:
            type: string
          type:
            - array
            - 'null'
        field:
          description: '`INVALID_REQUEST` (out of range): the field.'
          type:
            - string
            - 'null'
        reason:
          description: >-
            A machine-readable reason token the refusing step gave.


            Known source reason tokens (not all apply to every status):
            `adapterPayloadSerializationFailed`,
            `basicVenueAccountsUnavailable`, `billingPaymentOverdue`,
            `walletNotOnChain`, `ccxtVenueRequiresCexLane`,
            `executionStageDisabled`, `jurisdictionUnproven`,
            `onboardedVenuesUnavailable`, `onchainAccountDefaultWalletRequired`,
            `onchainAccountDefaultWalletUnavailable`,
            `onchainAccountWalletRequired`, `onchainAssetDecimalsMismatch`,
            `onchainAssetIdentityMismatch`, `onchainAssetUnmapped`,
            `onchainAssetVariantFiltered`, `onchainWalletUnavailable`,
            `onchainCatalogueUnavailable`, `onchainDeliverToNotReceivingWallet`,
            `onchainDeliverToUnverified`, `onchainMarketsUnavailable`,
            `onchainMarketCatalogUnreadable`, `onchainMarketChainRequired`,
            `onchainMarketVariantRequired`, `onchainMarketTokenRequired`,
            `onchainSiteChainUnreadable`, `onchainWalletChainUnreadable`,
            `onchainWalletInactive`, `onchainWalletNotLinked`,
            `onchainWalletNotUsable`, `onchainWalletPickAmbiguous`,
            `onchainWalletWrongNetwork`, `signerLacksRight`,
            `signerUnavailable`, `signingGrantAmbiguous`, `signingGrantExpired`,
            `signingGrantRequired`, `signingGrantTokenNotKept`,
            `signingGrantTokenNotPayable`, `solverChainUnready`,
            `walletChainMismatch`, `walletNotUsableByYou`,
            `walletNotVerifiedForAce`, `walletNotWhitelisted`,
            `withdrawalChainUnsupported`, `accountFeeUnavailable`,
            `comparisonCostsUnavailable`, `connectionListingUnavailable`,
            `feeUnverified`, `noPool`, `noPrice`, `noSize`, `notFilled`,
            `notYetPublished`, `priceArithmetic`, `priceSourceNone`,
            `referenceMidUnavailable`, `settlementPrecisionUnavailable`,
            `accountSetupIncomplete`, `admissionUnavailable`,
            `advancedAccountEligibilityUnavailable`,
            `advancedAccountStateInconsistent`, `advancedConnectionDisabled`,
            `advancedConnectionNotConfigured`, `advancedConnectionPaused`,
            `advancedSettlementNeedsVerification`, `advancedModeDisabled`,
            `advancedNotAvailableForAccount`, `advancedNotEnabledForAccount`,
            `allowanceUnavailable`, `acrossCapacityExceeded`,
            `relayCapacityExceeded`, `acrossChainNotCarried`,
            `cctpChainNotCarried`, `relayChainNotCarried`,
            `apiKeyAdvancedWalletUnsupported`,
            `apiKeyOrganisationWalletScopeRequired`, `grantCapExceeded`,
            `amountAboveMaximum`, `amountBelowMinimum`, `amountUnreadable`,
            `amountsUnreadable`, `askFirst`, `authorityUnavailable`,
            `automationNeverAsks`, `availabilityUnreadable`,
            `backgroundNeverAsks`, `balanceUnreadable`, `defaultsUnavailable`,
            `walletHasNoAddress`, `walletUnavailable`, `bondAmountUnreadable`,
            `bondAssetUnreadable`, `catalogueUnavailable`, `chainFamilyUnknown`,
            `chainUnrecorded`, `clientSessionRequired`, `clockUnreadable`,
            `comingSoon`, `connectionChanged`, `connectionRevoked`,
            `corridorInvalid`, `credential`, `deadlineExceeded`,
            `defaultsLoading`, `deliverToCalldataUnsupported`,
            `deliverToTagUnsupported`, `deliverToNotPermitted`,
            `deliverToUnreadable`, `tradingPermissionRequired`,
            `directPatienceHarvest`, `economicallyInferior`,
            `exactAmountConflictsWithCard`, `exactAmountConflictsWithQuote`,
            `exactOutputDeliveryUnsupported`, `exactOutputEstimateUnavailable`,
            `exactRouteHypothesisUnavailable`, `expiredOnArrival`,
            `expiryUnknown`, `feeUnreadable`, `filteredOut`, `firmAskRefused`,
            `freshnessUnknown`, `fundingWindow`, `insufficientLiquidity`,
            `venueRelationship`, `venueRelationshipUnavailable`, `lpUnknown`,
            `mfaEnrolmentRequired`, `mfaRequired`, `minimumUnverified`,
            `mixedNetworks`, `netReceivedUnavailable`, `networkUnrecorded`,
            `noAddress`, `noCard`, `noFetcher`, `noInventory`, `noLaneForPair`,
            `noLegs`, `noOnChainCorridor`, `noPlannedVenue`, `noQuote`, `noRpc`,
            `notConnected`, `notEligible`, `notExecutable`,
            `orderPayloadMissing`, `outsideTopComposites`, `pairUnmapped`,
            `sellChainInvalid`, `permissionsUnreadable`,
            `placeOrderNotPermitted`, `prefundingMarkerUnreadable`,
            `prefundingRequired`, `indicative`, `priceOnRequest`,
            `priceOutOfRange`, `priceProtectionInvalid`, `pricingBookOnly`,
            `productNotQuoted`, `protocolChainMissing`,
            `providerFeeTreatmentUnknown`, `providerSiteUnrecorded`,
            `quoteIdUnissuable`, `quoteNotHeld`, `buyChainInvalid`,
            `buyAmountUnsupported`, `exactOutputDebitUnavailable`,
            `pairNotServed`, `receiveWalletNotServed`, `referenceMidUnreadable`,
            `referencePriceUnavailable`, `registryUnavailable`,
            `releaseRecheckUnavailable`, `requestUnbuildable`,
            `routeLegChainUnknown`, `routeLegUnnamed`, `routeLegUnplanned`,
            `routeUnavailable`, `secondFactorUnreadable`, `shortfallUnmeasured`,
            `shortfallUnreadable`, `singleChainVenue`, `siteChainUnreadable`,
            `sizeNotEligible`, `submitOrderBlocked`,
            `takerOnboardingIncomplete`, `tierNotQuoted`, `tradePaused`,
            `unsupportedNative`, `venueConnectionStorageUnavailable`,
            `venueDataStale`, `venueDeclined`, `venueNotConnected`,
            `venueNotEnabledForWorkspace`, `venueNotListed`,
            `venueTradeKeyUnavailable`, `venueTradeScopeRequired`,
            `venueTradeUnreadable`, `venueUnavailable`, `walletRefused`,
            `withdrawalFeeUnread`, `acrossRoutedViaCctp`,
            `apiKeyOrganisationWalletNotAllowlisted`,
            `balanceAvailabilityUnconfirmed`, `bankDestinationUnavailable`,
            `bebopJamKeyNotEnabled`, `bebopJamQuoteDeclined`,
            `bebopTokenUnavailable`, `relayCurrencyUnsupported`,
            `relaySwapImpactTooHigh`, `tetrafiSolverCallbackNotAuthorized`,
            `tradingLinkSnapshotChanged`, `tradingLinkSnapshotUnavailable`,
            `uniswapChainReadUnavailable`, `uniswapInsufficientDepth`,
            `uniswapQuoteUnreadable`, `uniswapUnwrapAboveDailyCap`,
            `uniswapUnwrapAboveTradeCap`, `uniswapRouteNotGranted`,
            `venueNotEnabled`, `askLimitReached`, `balanceMeaningUnconfirmed`,
            `bebopJamWalletUnsupported`, `bebopQuorumWalletTooSlow`,
            `bebopWalletQuorumUnreadable`, `connectionNotConfigured`,
            `deliveryAccountNetworkUnavailable`, `deliveryAccountUnavailable`,
            `destinationCannotSendOnChain`, `dexReferencePriceUnavailable`,
            `firmQuoteLimited`, `fundingAccountNetworkUnavailable`,
            `fundingAccountUnavailable`, `insufficientDepth`,
            `missingPermission`, `needsNativeGas`, `needsWallet`, `notPriced`,
            `payInTermsUnavailable`, `pilotTradeCapExceeded`,
            `platformFeeRateUnavailable`, `pricingBookPairUnserved`,
            `settlementDeclarationUnavailable`, `settlementNotAvailable`,
            `timedOut`, `timedOutBeforeSend`, `tradingSourceNetworkUnavailable`,
            `tradingSourceNotLinked`, `venueEnablementRechecking`,
            `venueEnablementUnavailable`, `venueListingTimedOut`,
            `venuePoliciesUnavailable`.


            New values may be added; treat unknown values as other.
          type:
            - string
            - 'null'
        remediation:
          description: A machine-readable recovery hint the refusing step gave.
          type:
            - string
            - 'null'
        retryAfter:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/IsoDuration'
              description: >-
                Every `429`, and a `503` that knows: when to try again, as an
                ISO 8601 duration. The

                `Retry-After` header carries the same wait in whole seconds.
        value:
          description: >-
            `UNKNOWN_ASSET`, `UNKNOWN_CHAIN`, `UNKNOWN_VENUE`, `INVALID_AMOUNT`:
            the value refused;

            `ASSET_NOT_ON_CHAIN`: the pinned chain the Asset is not on.
          type:
            - string
            - 'null'
      type: object
    QuoteNextAction:
      description: |-
        The one action the caller takes next; later legs run
        under the order.

        New values may be added; treat unknown values as other.
      discriminator:
        propertyName: kind
      oneOf:
        - description: '`POST /orders {quoteId}`.'
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - order
              type: string
              x-extensible-enum: true
          required:
            - kind
          type: object
        - description: >-
            `POST /orders/preflight`: the held terms may need an approval,
            allowance or

            receipt the server cannot confirm from memory. Its response carries
            the next step.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - preflight
              type: string
              x-extensible-enum: true
          required:
            - kind
          type: object
        - description: Send these transactions, then order.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - transact
              type: string
              x-extensible-enum: true
            transactions:
              items:
                $ref: '#/components/schemas/TakerTransaction'
              type: array
          required:
            - transactions
            - kind
          type: object
        - description: Sign this EIP-712 document, then order.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - sign
              type: string
              x-extensible-enum: true
            typedData: {}
          required:
            - typedData
            - kind
          type: object
        - description: >-
            Fund, then requote. `null` instructions when they could not be read;
            no order is

            accepted while short either way.
          properties:
            instructions:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/FundInstructions'
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - fund
              type: string
              x-extensible-enum: true
          required:
            - kind
          type: object
        - description: Ask the venue again, with these Binding slots filled.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - requote
              type: string
              x-extensible-enum: true
            needs:
              items:
                $ref: '#/components/schemas/RequoteNeed'
              type: array
          required:
            - needs
            - kind
          type: object
        - description: >-
            Search again: `POST /quotes` with a pair body. The quote is past its
            requote window,

            so `{requote: quoteId}` can no longer refresh it.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - search
              type: string
              x-extensible-enum: true
          required:
            - kind
          type: object
        - description: >-
            The venue outcome is being reconciled. Read this same order again
            after

            the given ISO 8601 duration; never submit a replacement order.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - wait
              type: string
              x-extensible-enum: true
            retryAfter:
              $ref: '#/components/schemas/IsoDuration'
          required:
            - retryAfter
            - kind
          type: object
        - description: Contact support with this non-secret order reference.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - contact
              type: string
              x-extensible-enum: true
            reference:
              type: string
          required:
            - reference
            - kind
          type: object
      x-extensible-enum: true
    ResolvedTradingSource:
      description: >-
        An indivisible quote/order source block. Its funding and settlement are
        venue-owned.
      properties:
        creditCheck:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CreditCheck'
              description: >-
                The credit decision the funding was derived from: point-in-time
                evidence, never a

                reservation or dispatch authority. Present exactly when
                `creditPortion` is.
        creditPortion:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CreditAmount'
              description: >-
                A `credit` trade's exact credit portion: the part of the debit,
                in the debit asset, that

                creates or increases a negative position (the rest is spent from
                positives). Present

                exactly when `fundingModel` is `credit`.
        creditReservation:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CreditReservation'
              description: >-
                The firm ask's combined cash and credit hold on a credit venue
                account, held

                until the quote expires or its order adopts it. Absent on
                indicative cards.
        deliverTo:
          $ref: '#/components/schemas/ResolvedDeliverTo'
        fundingAccount:
          $ref: '#/components/schemas/FundingAccount'
        fundingModel:
          $ref: '#/components/schemas/FundingModel'
        payIn:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PayInTerms'
        settlement:
          $ref: '#/components/schemas/QuotedSettlement'
          description: >-
            The venue's declared terms and, for delayed timing, the account
            schedule's window.
        tradingSource:
          $ref: '#/components/schemas/TradingSource'
      required:
        - tradingSource
        - fundingModel
        - settlement
        - fundingAccount
        - deliverTo
      type: object
    OrderExecutionReport:
      description: >-
        Flattened into both order kinds' envelopes: its keys are the envelope's
        own keys.
      properties:
        fees:
          description: >-
            The fees actually charged, as recorded: the venue's own fee report,
            bridge fees, network

            gas the order's wallet paid, and the platform fee. Never a quoted
            estimate. A fee whose

            amount was not reported or could not be read is left out rather than
            shown as 0, and its

            kind is listed in `unrecordedFees`.
          items:
            $ref: '#/components/schemas/OrderFee'
          type: array
        fills:
          description: >-
            Each confirmed fill, in execution order. Always present: empty
            before any fill is

            confirmed.
          items:
            $ref: '#/components/schemas/OrderFill'
          type: array
        quotedBuyAmount:
          description: >-
            The buy amount the executed quote said would land. Null when it is
            not known (for

            example before a venue order is dispatched).
          type:
            - string
            - 'null'
        settledBuyAmount:
          description: >-
            What actually landed, read from the fill or settlement evidence.
            Null until it is

            measured; never the quote carried forward and never 0 for unknown.
          type:
            - string
            - 'null'
        settlesBy:
          description: >-
            The latest time the order settles, or can no longer execute, under
            its recorded terms:

            the signed order's fill deadline, or, on a route, the latest fill
            deadline every leg

            commits to (Advanced); the last on-chain step's send-by time (an
            on-chain Basic swap).

            Null when no such term is recorded, for example a same-chain DEX
            swap, whose call

            carries no deadline.
          format: date-time
          type:
            - string
            - 'null'
        unrecordedFees:
          description: >-
            Every fee kind the order incurs whose actual charge is not recorded
            or could not be

            read: a venue fee taken inside the price without an amount, a bridge
            leg's fee, gas

            the order's wallet spent without a readable receipt, a platform fee
            billed off the

            order. Always present; empty only when every incurred charge is in
            `fees`. An absent

            kind with no `fees` line means nothing of that kind was charged.
            Open set: clients

            show an unknown kind generically.
          items:
            $ref: '#/components/schemas/OrderFeeKind'
          type: array
      required:
        - fills
        - quotedBuyAmount
        - settledBuyAmount
        - fees
        - unrecordedFees
        - settlesBy
      type: object
    OrderResponse:
      description: Response body for /api/v1/orders endpoint (order submission)
      properties:
        bondReservation:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/BondReservation'
              description: >-
                The hub bond reservation backing a bonded RFQ order: its
                lifecycle status and reserve amount. Absent for non-bonded
                orders.
        compliance:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderComplianceSection'
              description: >-
                The order's own compliance verdict and every check that ran,
                split

                on-chain / off-chain. Readable by whoever may read the order;
                workspace

                BI stays on the trade-detail endpoint. Absent when the
                compliance

                verdict could not be read for this response.
        continuationPlan:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ContinuationPlan'
              description: >-
                How each leg after the first runs and where its funds wait if it
                cannot. Absent

                for single-leg orders.
        createdAt:
          description: When the response was created
          format: date-time
          type: string
        custodySigningError:
          description: >-
            Why custody signing failed, readable by the user and operators, when

            `custodySigningStatus` is `failed` / `failed_unreachable`; absent
            otherwise.
          type:
            - string
            - 'null'
        custodySigningStatus:
          description: >-
            Custody-signing status for orders a custody provider signs
            (Fireblocks / BitGo /

            DFNS / Copper): `pending` (submitted to the provider, awaiting its
            signature),

            `signed`, `failed`, or `failed_unreachable` (the provider neither
            called back nor

            answered a status check in time). Absent for orders that are not
            custody-signed.
          type:
            - string
            - 'null'
        custodyVaultAddress:
          description: >-
            Custody vault that signed a backend-signed order
            (`orders.custody_vault_address`).
          type:
            - string
            - 'null'
        deliveredBuy:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/AssetAmountDisplay'
              description: >-
                What the settlement evidence says was ACTUALLY delivered, in the
                order's

                buy asset: its symbol, decimals, chain and `decimalAmount`, or
                `unresolved`.

                `route.buy` is what the quote promised; this is the delivery.
                Absent when

                nothing has been captured yet (the order has not settled). Never
                guessed

                from the quote: read `deliveredBuyProvenance` before rendering
                it.
        deliveredBuyProvenance:
          description: >-
            Where `deliveredBuy` came from: `"measured"` when it was read

            back from settlement evidence (a receipt-backed bridge delivery, a

            realized DEX output, a Circle-settled FX output, a deferred
            settlement's

            executed amount), `"quoted"` when a quote-time value was carried
            forward

            because nothing measured the delivery.


            This field is the whole point of the pair. The lifecycle falls back
            to

            the quoted output when no measurement exists, which makes "measured,

            zero slippage" and "never measured" byte-identical —
            `realizedSlippageBps`

            reads 0 for both and `deliveredBuy` repeats the quote. A client

            that renders a delivered amount without reading this is reporting a

            quote as a receipt.
          type:
            - string
            - 'null'
        directUserId:
          description: Broker-onboarded direct user this order was submitted for.
          type:
            - string
            - 'null'
        executionDeadlineAt:
          description: |-
            Deadline by which execution had to complete before the TTL watchdog
            marks the order expired (`orders.execution_deadline_at`).
          format: date-time
          type:
            - string
            - 'null'
        executionDeadlineKind:
          description: |-
            Why `executionDeadlineAt` exists: `enforced` (configured SLA) or the
            product default (`orders.execution_deadline_kind`).
          type:
            - string
            - 'null'
        failure:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderFailure'
              description: Structured failure details when status is failed.
        feeOutputs:
          description: >-
            The order's further signed outputs after `route.buy`, in order: the
            platform

            fee paid to its collector on an order that carries one. Each names
            its asset,

            chain and `decimalAmount`, or `unresolved`. Empty when the order has
            a single

            output.
          items:
            $ref: '#/components/schemas/AssetAmountDisplay'
          type: array
        feeUsd:
          description: Total fee paid by the user in USD (`orders.fee_usd`).
          format: double
          type:
            - number
            - 'null'
        fillTransaction:
          description: Fill transaction information
        filledAt:
          description: When the fill transaction was observed (`orders.filled_at`).
          format: date-time
          type:
            - string
            - 'null'
        legAttempts:
          additionalProperties:
            items:
              $ref: '#/components/schemas/LegAttempt'
            type: array
          description: >-
            Ended attempts per leg of a multi-leg route, keyed by leg index. The
            attempt in

            progress is the number of ended attempts plus one. Absent until a
            leg has ended

            an attempt.
          propertyNames:
            format: int32
            minimum: 0
            type: integer
          type:
            - object
            - 'null'
        legs:
          description: >-
            Uniform per-leg execution model for multi-leg route orders: one
            entry per

            step of the route, in execution order. Absent for single-leg escrow
            / deferred orders, whose

            `transactions[]` timeline is the whole story. Leg status is
            projected from

            the route cursor and can temporarily trail a mined transaction;
            correlate

            it with `transactions[]` and provider references before treating
            `pending`

            as evidence that execution did not occur.
          items:
            $ref: '#/components/schemas/OrderLegInfo'
          type:
            - array
            - 'null'
        lifecycleStatus:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLifecycleStatus'
              description: The same server-owned lifecycle status the trade list carries.
        linkedWalletId:
          description: Linked wallet used for settlement. Absent for older orders.
          type:
            - string
            - 'null'
        nextAction:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/NextAction'
              description: >-
                What this multi-leg order needs from its reader next: sign the
                next leg, accept a

                moved price, retry a leg that did not run, finish the trade, or
                nothing because it

                stopped or is under review. Absent when nothing is needed.
                Computed by the backend

                from the route's durable state; clients switch on `kind` and
                never infer it from

                `substatus`, which keeps its own meaning.
        nextActions:
          description: >-
            Follow-up signed actions the client must perform after submit (e.g.
            the

            Circle StableFX Permit2 funding signature). Empty for single-step
            orders.

            Terminal orders and consumed or expired composite permits expose no
            action.

            Clients must still submit the exact permit and retain it for
            idempotent retries.
          items:
            $ref: '#/components/schemas/PreflightNextAction'
          type: array
        nextActor:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/NextActor'
              description: >-
                Who must act next, including follow-up signatures visible only
                on the order read.
        orderId:
          description: The order ID
          type: string
        orderKind:
          description: >-
            Canonical, route-aware order kind for status/history + SDK clients

            (`cctp-v0` / `across-v4` / `relay-v0` / `fx-v0` / `composite-v0` /
            `escrow-v0` /

            `deferred` / …). Always present. Prefer this over `order_type`,
            which collapses

            routes to `generic-v0`.
          type: string
        orderType:
          description: Order type (e.g., "escrow-v0", "eip3009-v0", "resource-lock-v0")
          type: string
        pairQuoteId:
          description: >-
            The held pair-quote id (`q_…`) the order was placed by (`POST
            /orders {quoteId}`):

            the id Review and the quote card showed. `quoteId` above is the
            executable quote the

            order ran on, which can differ. Recorded server-side from the held
            quote, never from the

            request; absent for orders placed with a full quote body and for
            orders placed before

            it was recorded.
          type:
            - string
            - 'null'
        quoteId:
          description: Quote ID
          type:
            - string
            - 'null'
        realizedSlippageBps:
          description: >-
            Realized adverse slippage in basis points, computed at settlement as

            `10000 * (quoted_output - delivered_output) / quoted_output`.
            Negative

            means the delivery beat the quote.


            Deliberately NOT named `slippageBps`: this response already carries

            `slippageToleranceBps`, which is the tolerance the order was
            SUBMITTED

            with — a quote-time input, not an outcome. Two fields one word apart

            that mean "what I allowed" and "what I got" is how a caller ends up

            charting the limit as the result, so the outcome names itself.


            Only meaningful alongside `deliveredBuyProvenance == "measured"`; a

            `"quoted"` provenance makes this structurally 0.
          format: int32
          type:
            - integer
            - 'null'
        recipientAddress:
          description: >-
            Wallet that receives the output: the fill's recipient when known,
            else

            the signed intent / route preview receiver. A workspace-router proxy
            is

            reported as-is; it forwards to the taker at settlement.
          type:
            - string
            - 'null'
        reporting:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ReportingCoverage'
              description: >-
                Optional reporting guidance; never changes order execution
                status.
        route:
          $ref: '#/components/schemas/TradeRouteDisplay'
          description: >-
            What the order sells (`route.sell`) and buys (`route.buy`): the
            asset's

            symbol, name, decimals and chain, the base-unit amount and the
            amount

            scaled by those decimals (`decimalAmount`). These are the amounts
            the

            accepted quote committed; `deliveredBuy` reports delivery.


            When TetraFi cannot resolve a side, `decimalAmount` is absent and

            `unresolved` names why (`assetNotInRegistry`, `amountUnavailable`),
            so a

            client renders an explicit unresolved state and never scales base
            units

            itself.
        senderAddress:
          description: |-
            Wallet that funds the order: the signed intent's depositor (escrow /
            eip3009 message `sponsor` / `user` / `signer` / `from`), the route
            preview's input owner, or the StableFX taker. Absent when the order
            recorded none.
          type:
            - string
            - 'null'
        settledAt:
          description: When the order settled / finalized (`orders.settled_at`).
          format: date-time
          type:
            - string
            - 'null'
        settlement:
          $ref: '#/components/schemas/Settlement'
          description: Settlement information
        settlementSpeedMs:
          description: '`settled_at - created_at` in milliseconds, captured at settlement.'
          format: int64
          type:
            - integer
            - 'null'
        slippageToleranceBps:
          description: >-
            Client-selected slippage tolerance in basis points: the deferred/OTC
            submit

            tolerance, or for a multi-leg route the tolerance each continuation
            re-quote may

            absorb (the quote request's `intent.metadata.allowedSlippageBps`,
            default 30).
          format: double
          type:
            - number
            - 'null'
        status:
          $ref: '#/components/schemas/OrderStatus'
          description: >-
            Coarse current status of the order. Terminality is order-kind
            dependent:

            route and atomic venue orders normally complete at `settled`, while

            claim-based or deferred products may continue to `finalized`. Use

            `substatus` for the route/provider state and do not wait for
            `finalized`

            unconditionally.
        stuckSince:
          description: >-
            Last update of a nonterminal order that is stuck waiting on its
            counterparty.
          format: date-time
          type:
            - string
            - 'null'
        substatus:
          description: >-
            Finer-grained state within `status`, when one applies. Route orders
            surface the

            `routeStatus` (`bridging` / `arrived` / `manualReview` / …);
            escrow/deferred

            orders surface the fine wire states the coarse `status` hides
            (`postFilled` / …).
          type:
            - string
            - 'null'
        substatusCode:
          description: >-
            Machine-readable reason for the current `substatus`, when the client
            needs

            to choose a recovery action without parsing `substatusMessage`.
          type:
            - string
            - 'null'
        substatusMessage:
          description: >-
            Human-readable elaboration of `substatus` (e.g. a Circle StableFX
            status line).
          type:
            - string
            - 'null'
        terminal:
          description: >-
            Whether the order lifecycle is terminal and cannot advance any
            further.

            This is computed by the backend from the product-specific state
            machine;

            clients should poll this field instead of inferring terminality from
            the

            coarse `status` or `substatus` vocabulary.
          type: boolean
        timing:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderTiming'
              description: >-
                Descriptive stage estimates and server-observed clocks. Never an
                execution deadline.
        transactions:
          description: >-
            Best-effort transaction references for observed lifecycle stages,
            enriched at

            serve time with `label` + `explorerUrl` + `legIndex`. Projection can
            lag the

            chain/provider; absence is not proof that no transaction was
            submitted.
          items:
            $ref: '#/components/schemas/OrderTransactionInfo'
          type: array
        updatedAt:
          description: When the response was last updated
          format: date-time
          type: string
        venueRouteId:
          description: >-
            The venue route identity that fills the order, not the catalogue
            Venue id.

            Runtime solver identities and router/composite sentinels are
            retained verbatim.
          type:
            - string
            - 'null'
        viewer:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderViewer'
              description: >-
                Caller-relative ownership and records visibility, absent when
                membership is unknown.
        workspaceId:
          description: >-
            Workspace that placed this order. Absent for older orders and for
            orders placed

            with an API key.
          type:
            - string
            - 'null'
      required:
        - orderId
        - status
        - terminal
        - createdAt
        - updatedAt
        - orderType
        - settlement
      type: object
    VenueTradeOperation:
      description: >-
        A prepared or placed Basic venue trade. Track it by operationId and
        connectionId; executionStatus describes the trade and settlementStatus
        describes any subsequent money movement. initialReviewDisposition is the
        original planning verdict, not current approval. Only the documented
        fields are part of the integrator contract; undocumented fields may be
        sent and must be ignored.
      properties:
        bounds:
          $ref: '#/components/schemas/VenueTradeReviewBoundsDto'
        connectionId:
          format: uuid
          type: string
        createdAt:
          format: date-time
          type: string
        dispatch:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/VenueTradeDispatch'
        executionStatus:
          $ref: '#/components/schemas/VenueTradeExecutionStatus'
        executionTypeId:
          description: The execution type (compiled spec id), not the catalogue Venue.
          type: string
        initialReviewDisposition:
          $ref: '#/components/schemas/VenueQuoteReviewDisposition'
          description: >-
            The original planning verdict; current review/policy must be
            reassessed.
        label:
          type: string
        operationId:
          format: uuid
          type: string
        providerClientOrderId:
          description: >-
            The client order id TetraFi sent the venue, once a dispatch was
            claimed.
          type:
            - string
            - 'null'
        providerSite:
          type: string
        quoteExpiresAt:
          description: Present exactly when `quote_id` is.
          format: date-time
          type:
            - string
            - 'null'
        quoteId:
          description: >-
            The quote bound at preparation, only on deprecated quote-bound

            preparations. Absent on bounds-first ones; the executed quote is
            always

            `dispatch.confirmed_quote_id`.
          format: uuid
          type:
            - string
            - 'null'
        quoteRequestId:
          description: >-
            The quote request the trade was ordered from (`rq_…`), when it was
            ordered through

            the quote set.
          type:
            - string
            - 'null'
        requestKey:
          format: uuid
          type: string
        requestedDeadline:
          format: date-time
          type:
            - string
            - 'null'
        reviewRequestId:
          format: uuid
          type:
            - string
            - 'null'
        settlementStatus:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/VenueTradeSettlementStatus'
              description: >-
                The legs' settlement; `null` when the order has no legs. Always
                present.
        venueFilledAt:
          description: When the venue reports the fill happened, when it reported one.
          format: date-time
          type:
            - string
            - 'null'
        workspaceId:
          type: string
      required:
        - bounds
        - connectionId
        - createdAt
        - executionStatus
        - executionTypeId
        - initialReviewDisposition
        - label
        - operationId
        - providerSite
        - requestKey
        - workspaceId
      type: object
    CapabilityBlocker:
      description: One reason a capability is blocked, plus the step that unlocks it.
      properties:
        code:
          $ref: '#/components/schemas/CapabilityBlockerCode'
        currentlyDue:
          description: |-
            Requirement keys still due, such as `kyb_review`, `actor_kyc` or
            `permission:place_order`. Empty when nothing specific is due.
          items:
            type: string
          type: array
        estimate:
          $ref: '#/components/schemas/CapabilityUnlockEstimate'
        message:
          type: string
        unlockStep:
          $ref: '#/components/schemas/CapabilityUnlockStep'
          description: >-
            Stable key of the step that unlocks this blocker. The UI maps it to
            a

            route or dialog.
      required:
        - code
        - message
        - unlockStep
        - estimate
      type: object
    IsoDuration:
      description: An ISO 8601 duration, e.g. PT3S or PT2M.
      examples:
        - PT120S
      format: duration
      pattern: >-
        ^PT(?:[0-9]+H(?:[0-9]+M)?(?:[0-9]+(?:\.[0-9]{1,3})?S)?|[0-9]+M(?:[0-9]+(?:\.[0-9]{1,3})?S)?|[0-9]+(?:\.[0-9]{1,3})?S)$
      type: string
    TakerTransaction:
      description: One transaction the Taker sends itself (an approval included).
      properties:
        chain:
          $ref: '#/components/schemas/Caip2Chain'
        data:
          description: Hex calldata (`0x…`).
          type: string
        to:
          type: string
        value:
          description: Native value in base units, as a decimal string.
          type: string
      required:
        - chain
        - data
        - to
        - value
      type: object
    FundInstructions:
      description: >-
        What to fund and how. Bank funding carries only a privacy-safe summary
        and a

        non-bearer reference to the separately authorized reveal read.


        New values may be added; treat unknown values as other.
      discriminator:
        propertyName: kind
      oneOf:
        - properties:
            address:
              type: string
            asset:
              type: string
            chainRef:
              type: string
            expiresAt:
              format: date-time
              type: string
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - venueDeposit
              type: string
              x-extensible-enum: true
            memo:
              type:
                - string
                - 'null'
            networkCode:
              type: string
            networkConfirmed:
              description: >-
                False when the venue reports no network for this address:
                `networkCode`

                is empty and `chainRef` is the caller's selection, which the
                customer

                must confirm with the venue before sending.
              type: boolean
            observedAt:
              format: date-time
              type: string
            tokenContract:
              type: string
          required:
            - asset
            - chainRef
            - networkCode
            - networkConfirmed
            - address
            - tokenContract
            - observedAt
            - expiresAt
            - kind
          type: object
        - description: >-
            The only bank-deposit payload allowed in an asset-pair quote,
            request readback or

            copied durable/evidence body. It carries no receiving coordinates or
            payment memo.

            Fund, then explicitly requote; this summary never authorizes a
            transfer or order.
          properties:
            accountLast4:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/BankAccountSuffix'
                  description: >-
                    An already-qualified masked suffix, not external account
                    ownership proof.
            amount:
              $ref: '#/components/schemas/DecimalAmount'
            bankDisplayName:
              type:
                - string
                - 'null'
            expiresAt:
              description: >-
                UTC ISO instant, or null when expiry is UNKNOWN. Null never
                means no expiry.
              format: date-time
              type:
                - string
                - 'null'
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - bankDeposit
              type: string
              x-extensible-enum: true
            revealRef:
              $ref: '#/components/schemas/BankFundingRevealRef'
          required:
            - accountLast4
            - amount
            - bankDisplayName
            - expiresAt
            - kind
            - revealRef
          type: object
        - description: >-
            The quote's own bound pay wallet (an organisation wallet on a Basic
            on-chain

            venue account) holds less than the trade debits: send `amount` of
            `asset` to

            `address` on `chain`, then get a new price. `walletId` is the
            binding target the

            source's `topUp` fix names; `tokenContract` is the registry's
            deployment address

            of `asset` on `chain` (the zero address for the chain's native
            coin).
          properties:
            address:
              type: string
            amount:
              $ref: '#/components/schemas/DecimalAmount'
            asset:
              $ref: '#/components/schemas/AssetId'
            chain:
              $ref: '#/components/schemas/Caip2Chain'
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - walletTopUp
              type: string
              x-extensible-enum: true
            tokenContract:
              type: string
            walletId:
              type: string
          required:
            - walletId
            - address
            - chain
            - asset
            - tokenContract
            - amount
            - kind
          type: object
        - description: Native gas for a transaction the Taker sends itself.
          properties:
            amount:
              $ref: '#/components/schemas/DecimalAmount'
            asset:
              $ref: '#/components/schemas/AssetId'
            chain:
              $ref: '#/components/schemas/Caip2Chain'
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - nativeGas
              type: string
              x-extensible-enum: true
          required:
            - chain
            - amount
            - asset
            - kind
          type: object
        - description: >-
            A bank-funded venue account is short and deposit first isn't offered
            on it:

            its bank side declares no deposit instructions, or nothing that

            credits a declared deposit. The account is funded from its own
            funding details,

            then the quote is asked again. `amount` is the shortfall in
            `currency`;

            `connectionId` is the venue account to fund; `reason` is the venue's
            declared

            sentence for why ("Keyrock gives no deposit reference for bank
            transfers, so

            TetraFi can't tell your deposit apart"), product copy without a
            final period.
          properties:
            amount:
              $ref: '#/components/schemas/DecimalAmount'
            connectionId:
              type: string
            currency:
              type: string
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - depositFirstNotOffered
              type: string
              x-extensible-enum: true
            reason:
              type: string
          required:
            - connectionId
            - amount
            - currency
            - reason
            - kind
          type: object
      x-extensible-enum: true
    RequoteNeed:
      description: >-
        A Binding slot a requote needs filled. An empty `needs` means requote as
        is.


        New values may be added; treat unknown values as other.
      enum:
        - wallet:evm
        - wallet:solana
        - wallet:tron
        - account
        - bankAccount
        - deliverTo
      type: string
      x-extensible-enum: true
    CreditCheck:
      description: >-
        Point-in-time credit evidence, never a reservation or dispatch
        authority.
      properties:
        activeHolds:
          type: string
        available:
          type: string
        availableSigned:
          type: string
        checkedAt:
          format: date-time
          type: string
        creditPortion:
          $ref: '#/components/schemas/CreditAmount'
        decision:
          type: string
        effectiveLimit:
          type: string
        exposureDelta:
          type: string
        exposureReducing:
          type: boolean
        journalVersion:
          type:
            - string
            - 'null'
        localHeadroom:
          type: string
        lpAvailable:
          type: string
        maxAgeMs:
          format: int64
          minimum: 0
          type: integer
        observationAgeMs:
          format: int64
          minimum: 0
          type: integer
        observationId:
          format: uuid
          type: string
        overLimitBy:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CreditAmount'
        positionsBasis:
          description: >-
            Why the read vouches that an omitted asset holds zero; absent when
            no asset was omitted.
          type:
            - string
            - 'null'
        projectedUsed:
          type: string
        source:
          type: string
        termsVersion:
          format: int64
          type: integer
        used:
          type: string
        valuationMaxAgeMs:
          format: int64
          minimum: 0
          type: integer
        venueAccountId:
          format: uuid
          type: string
        zeroAssets:
          description: >-
            Assets the LP's positions read omitted and that this decision
            counted as zero.
          items:
            type: string
          type: array
      required:
        - decision
        - venueAccountId
        - observationId
        - termsVersion
        - checkedAt
        - maxAgeMs
        - valuationMaxAgeMs
        - observationAgeMs
        - lpAvailable
        - effectiveLimit
        - used
        - localHeadroom
        - activeHolds
        - available
        - availableSigned
        - projectedUsed
        - exposureDelta
        - creditPortion
        - exposureReducing
        - source
      type: object
    CreditAmount:
      properties:
        amount:
          type: string
        currency:
          type: string
        lineValue:
          type:
            - string
            - 'null'
      required:
        - amount
        - currency
      type: object
    CreditReservation:
      description: >-
        A firm ask's combined hold on a credit account: the positives the trade
        spends

        (debit-asset units) and the credit exposure it may add (line currency),
        admitted together

        under the account lock. Held until the quote expires or Confirm adopts
        it; an indicative

        card never carries one. Neither a dispatch authority nor a consent.
      properties:
        debitAsset:
          type: string
        expiresAt:
          description: 'When the unsent hold is released: the quote''s own expiry.'
          format: date-time
          type: string
        exposureAmount:
          description: >-
            The credit exposure the trade may add, in the line currency, rounded
            up.
          type: string
        exposureCurrency:
          type: string
        inputAmount:
          description: The trade's full debit, exact.
          type: string
        operationId:
          description: The prepared trade the ask was made for, when it was.
          format: uuid
          type:
            - string
            - 'null'
        positiveInputAmount:
          description: >-
            The part of the debit spent from positives, in the debit asset,
            rounded up.
          type: string
        reservationId:
          format: uuid
          type: string
        state:
          description: >-
            `reserved` while unsent; `released` once it expired, was adopted or
            was superseded.
          type: string
      required:
        - reservationId
        - debitAsset
        - inputAmount
        - positiveInputAmount
        - exposureAmount
        - exposureCurrency
        - expiresAt
        - state
      type: object
    ResolvedDeliverTo:
      description: >-
        A resolved destination includes observed presentation facts, unlike a
        request.


        New values may be added; treat unknown values as other.
      oneOf:
        - properties:
            accountKind:
              $ref: '#/components/schemas/FundingAccountKind'
            displayName:
              type: string
            financialAccountId:
              type: string
            isDefault:
              type: boolean
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - financialAccount
              type: string
              x-extensible-enum: true
            network:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/Caip2Chain'
          required:
            - financialAccountId
            - accountKind
            - displayName
            - isDefault
            - kind
          type: object
        - properties:
            address:
              type: string
            calldata:
              type:
                - string
                - 'null'
            chain:
              $ref: '#/components/schemas/Caip2Chain'
            destinationTag:
              type:
                - string
                - 'null'
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - address
              type: string
              x-extensible-enum: true
          required:
            - chain
            - address
            - kind
          type: object
      x-extensible-enum: true
    FundingAccount:
      description: >-
        What backs execution. A link id appears only when money moves through
        that link.
      properties:
        financialAccountId:
          type: string
        kind:
          $ref: '#/components/schemas/FundingAccountKind'
        linkId:
          format: uuid
          type:
            - string
            - 'null'
      required:
        - financialAccountId
        - kind
      type: object
    FundingModel:
      description: >-
        What backs execution. A venue declares `prefunded` or `payIn`; `credit`
        is derived per

        trade (never declared or chosen): the trade creates or increases a
        negative position on the

        venue account, and `creditPortion` names how much.


        New values may be added; treat unknown values as other.
      enum:
        - prefunded
        - payIn
        - credit
      type: string
      x-extensible-enum: true
    PayInTerms:
      properties:
        afterPayBy:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/AfterPayBy_String'
        payBy:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PayBy'
              description: >-
                `null` means the venue declares no deadline, not an inferred
                duration.
        settlementGrace:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SettlementGrace'
      type: object
    QuotedSettlement:
      allOf:
        - $ref: '#/components/schemas/SettlementTerms'
        - properties:
            window:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/SettlementWindowTerms'
          type: object
      description: >-
        A quote's, firm answer's and executed trade's settlement: the venue's
        declared terms and,

        for delayed timing only, the window. `{method, firstLeg?, timing,
        window?}` on the wire.
    TradingSource:
      description: >-
        The exact source selected for a quote, retained through execution and
        recovery.


        New values may be added; treat unknown values as other.
      oneOf:
        - properties:
            financialAccountId:
              type: string
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - venueAccount
              type: string
              x-extensible-enum: true
            venueEnablementId:
              type: string
          required:
            - venueEnablementId
            - financialAccountId
            - kind
          type: object
        - properties:
            financialAccountId:
              type: string
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - wallet
              type: string
              x-extensible-enum: true
            network:
              $ref: '#/components/schemas/Caip2Chain'
            venueEnablementId:
              type: string
          required:
            - venueEnablementId
            - financialAccountId
            - network
            - kind
          type: object
      x-extensible-enum: true
    OrderFee:
      description: One fee actually charged.
      properties:
        amount:
          description: Decimal amount in `asset`.
          type: string
        asset:
          type: string
        chain:
          description: The CAIP-2 chain the fee was paid on, for an on-chain charge.
          type:
            - string
            - 'null'
        includedInPrice:
          description: >-
            True when the venue took this fee inside its price: the fill amounts
            already reflect

            it, so it is not charged on top of them.
          type: boolean
        kind:
          $ref: '#/components/schemas/OrderFeeKind'
      required:
        - kind
        - amount
        - asset
        - includedInPrice
      type: object
    OrderFill:
      description: 'One confirmed fill: what it delivered, what it spent and where.'
      properties:
        amount:
          description: >-
            The buy Asset amount this fill delivered. Null when the fill is
            confirmed but nothing

            measured its delivery.
          type:
            - string
            - 'null'
        at:
          description: >-
            The recorded fill time: the venue's fill time or the time the fill
            transaction was

            observed. Null when no fill time was recorded.
          format: date-time
          type:
            - string
            - 'null'
        network:
          description: The CAIP-2 chain of `txHash`; absent off-chain.
          type:
            - string
            - 'null'
        price:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderFillPrice'
              description: >-
                The executed price in market convention (quote units per one
                base unit). Null when

                either amount is unknown.
        sellAmount:
          description: >-
            The sell Asset amount this fill spent. Null when it was not
            recorded.
          type:
            - string
            - 'null'
        txHash:
          description: The fill's or settlement's on-chain transaction; absent off-chain.
          type:
            - string
            - 'null'
        venue:
          $ref: '#/components/schemas/OrderFillVenue'
      required:
        - amount
        - sellAmount
        - price
        - venue
        - at
      type: object
    OrderFeeKind:
      description: |-
        What a fee paid for.

        New values may be added; treat unknown values as other.
      enum:
        - trading
        - relayer
        - forwarding
        - transfer
        - network
        - platform
      type: string
      x-extensible-enum: true
    BondReservation:
      description: The hub bond reservation backing a bonded RFQ order.
      properties:
        amount:
          description: |-
            Reserve amount in hub-asset BASE UNITS (decimal string). Convert for
            display with `decimals` — e.g. `"40000"` with `decimals: 6` is 0.04.
          type: string
        assetSymbol:
          description: |-
            Hub bond asset symbol (e.g. `USDC`). OMITTED when the order's marker
            predates the server-authoritative descriptor — never fabricated: a
            consumer must not render `amount` as a human quantity without it.
          type:
            - string
            - 'null'
        chainId:
          description: Hub chain id the bond is held on. OMITTED when unknown.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        decimals:
          description: >-
            Hub bond asset decimals. OMITTED (never defaulted to 0) when
            unknown.
          format: int32
          minimum: 0
          type:
            - integer
            - 'null'
        paidAmount:
          description: >-
            Hub-asset BASE UNITS the hub ACTUALLY transferred to the taker on a
            slash

            (`SolverSlashed.paid`). `amount` is what was RESERVED and is NOT the
            same

            number when the solver's bond had fallen below its reservations —
            the hub

            pays `min(reserved, bonded)`. Emitted ONLY with `status: slashed`,
            and only

            once the backend has decoded the slash; absent on legacy markers,
            where a

            consumer must stay amount-free rather than quoting `amount`.
          type:
            - string
            - 'null'
        reason:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/BondUnbondableReason'
              description: >-
                Why the order was never bond-eligible. Emitted ONLY with

                `status: notEligible`; omitted for every other status, so a
                consumer that

                predates this field sees a byte-identical payload on the paths
                it knows.
        status:
          $ref: '#/components/schemas/BondReservationStatus'
          description: Current reserve lifecycle status.
        txHash:
          description: >-
            The `reportTerminal` / `redispatchBound` tx hash, once the backend
            has

            driven a terminal attestation. Absent while `pending`/`reserved`.
          type:
            - string
            - 'null'
      required:
        - status
        - amount
      type: object
    OrderComplianceSection:
      description: >-
        The order's own compliance verdict and every check that ran for it,
        split into

        on-chain and off-chain checks.
      properties:
        attestation:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/AceAttestationProof'
        checks:
          description: Every check that ran, oldest first. Denying check first when denied.
          items:
            $ref: '#/components/schemas/OrderComplianceCheck'
          type: array
        corridor:
          description: '`"<origin chain id>-><destination chain id>"` when both are known.'
          type:
            - string
            - 'null'
        denial:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderComplianceDenialFact'
        denialReason:
          description: Why the order was denied, when it was.
          type:
            - string
            - 'null'
        evaluatedAt:
          description: When the gate evaluated the order (earliest recorded check).
          format: date-time
          type:
            - string
            - 'null'
        notionalUsd:
          format: double
          type:
            - number
            - 'null'
        onChainPolicy:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OnChainCoverage'
              description: >-
                Whether an on-chain ACE policy run covers this order's
                transactions; it

                always agrees with the workspace order-coverage audit.


                `null` and `noTxRecorded` are DIFFERENT facts: `null` means
                coverage could

                not be determined for this response, while `noTxRecorded` means
                the order

                declares no transaction at all. Never read `null` as a finding
                about the order.
        scope:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderComplianceScope'
        travelRule:
          $ref: '#/components/schemas/OrderTravelRuleStatus'
        verdict:
          $ref: '#/components/schemas/ComplianceVerdict'
        walletIdentity:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderWalletIdentity'
      required:
        - verdict
        - checks
        - travelRule
      type: object
    ContinuationPlan:
      description: >-
        How each leg of a multi-leg route runs. One entry per leg that follows
        another, plus

        leg 0 of an FX-first route, which waits for the taker's signature before
        anything moves.
      properties:
        legs:
          items:
            $ref: '#/components/schemas/ContinuationLegPlan'
          type: array
      required:
        - legs
      type: object
    AssetAmountDisplay:
      description: Raw and normalized amount for one asset side.
      properties:
        asset:
          $ref: '#/components/schemas/AssetDisplay'
        decimalAmount:
          type:
            - string
            - 'null'
        rawAmount:
          type:
            - string
            - 'null'
        unresolved:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/AmountUnresolved'
              description: Why `decimalAmount` is absent; absent whenever it is present.
      required:
        - asset
      type: object
    OrderFailure:
      description: Structured order failure details for programmatic polling clients.
      properties:
        code:
          description: Stable coarse code for client branching.
          type: string
        message:
          description: >-
            The code's fixed, user-safe sentence. Never the executor's own error
            text.
          type: string
        phase:
          $ref: '#/components/schemas/OrderFailurePhase'
          description: Lifecycle phase where the failure was observed.
        recoveryStopped:
          description: >-
            True when recovery has written this order off as permanently
            unrecoverable: it will

            not be retried. False while recovery may still resume it.
          type: boolean
      required:
        - phase
        - code
        - message
        - recoveryStopped
      type: object
    LegAttempt:
      description: >-
        One ended attempt at a leg.


        The attempt in progress is implicit: it is the number of ended attempts
        plus one.
      properties:
        acceptedReference:
          description: A re-price the taker accepted during this attempt, in base units.
          type:
            - string
            - 'null'
        attempt:
          format: int32
          minimum: 0
          type: integer
        chainId:
          description: The chain `txHash` lives on.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        endedAt:
          format: int64
          type: integer
        fundsAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/FundsLocation'
              description: Where the funds were when this attempt ended.
        linkedOrderId:
          description: >-
            A separate order that finished this trade from where this attempt
            left it.
          type:
            - string
            - 'null'
        outcome:
          $ref: '#/components/schemas/LegAttemptOutcome'
        reason:
          description: |-
            Stable machine code, e.g. `priceMovedBeyondBand`, `venueRefused`,
            `waitLimitReached`. Never prose.
          type:
            - string
            - 'null'
        txHash:
          type:
            - string
            - 'null'
      required:
        - attempt
        - endedAt
        - outcome
      type: object
    OrderLegInfo:
      description: One executed (or pending) route leg.
      properties:
        buy:
          $ref: '#/components/schemas/AssetAmountDisplay'
          description: >-
            What the leg quote ESTIMATED this leg would buy. Always the quote: a
            confirmed

            delivery is reported separately in `measuredBuy` rather than
            overwriting this,

            so the two facts stay distinguishable on the wire.
        counterparty:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/LegCounterparty'
              description: >-
                Per-leg counterparty compliance posture — WHO filled this leg
                and their

                regulatory standing. Absent on the generic `OrderResponse`;
                populated only

                on the admin company trade-detail. Lets a composite show "leg 1
                = KYB'd

                Solver X (Cayman Islands), leg 2 = CCTP protocol" instead of one
                collapsed

                counterparty.
        destChainId:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        etaSeconds:
          description: >-
            The route quote's per-leg ETA in seconds, when it carried one: the
            venue's

            estimate of this leg's own execution. For a CCTP leg it is the
            burn-to-mint

            upper bound of the chosen finality tier, set by the source chain
            (Fast ~20 s;

            Standard ~19 min from the L1-anchored chains). It never counts the
            time a

            parked route waits for its taker to sign the next leg.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        externalRefs:
          description: >-
            Off-chain provider references for the leg (Circle trade id, Across
            deposit id,

            Relay request id, …) — the identifiers a client uses to look the leg
            up on the

            provider's own status surface.
          items:
            $ref: '#/components/schemas/OrderLegExternalRef'
          type: array
        feeUsd:
          description: >-
            Concrete USD-denominated fee total for this leg. Absent when the
            route

            quote only carried spread/fee bps or a non-USD fee asset.
          format: double
          type:
            - number
            - 'null'
        index:
          description: 0-indexed position in the route's execution order.
          format: int32
          minimum: 0
          type: integer
        kind:
          description: >-
            Normalised leg mechanism: `cctp` | `across` | `relay` | `fx` |
            `solver`, or the

            raw `providerProduct` for a kind the backend does not special-case
            (clients must

            treat this as an open set and fall back to a generic presentation).
          type: string
        label:
          description: >-
            Human-friendly leg label, e.g. `"Circle CCTP Fast"` or `"CCTP: Base
            → Arc"`.
          type: string
        measuredBuy:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/AssetAmountDisplay'
              description: >-
                What this leg was OBSERVED to deliver, from the settlement
                receipt TetraFi

                recorded for this leg, in the leg's buy asset. Absent until that
                receipt has

                confirmed the leg, which a client must render as "not measured":
                never as

                zero, and never by silently showing `buy` in its place.


                This is the only place an INTERMEDIATE leg's real delivery
                appears. On a

                `StableFX -> CCTP` composite the FX leg settles a different
                asset on a

                different chain from the order's own output, so the order-level
                delivery

                cannot describe it.
        measuredBuySource:
          description: >-
            Which settlement receipt backed `measuredBuy`: `circleSettledOutput`

            | `cctpVerifiedOutput` | `relayVerifiedOutput` |
            `solverVerifiedOutput`

            | `nativeUniswapOutcome`. Carried so an operator can trace a per-leg
            number back

            to the observation that produced it instead of inferring it from the
            leg kind.
          type:
            - string
            - 'null'
        product:
          description: >-
            The venue product of a firm-RFQ leg: `lop` (Octarine limit order) |
            `rfq` (Bebop

            PMM RFQ) | `bopamm` (Bebop BopAMM). Read from the handoff persisted
            for the leg,

            so it is absent until the venue firmed it and on every non-RFQ leg.
            An open set:

            a client renders an unknown value generically.
          type:
            - string
            - 'null'
        provider:
          description: Venue / provider display name for the leg.
          type:
            - string
            - 'null'
        sell:
          $ref: '#/components/schemas/AssetAmountDisplay'
          description: >-
            What the leg sells: its asset, chain and `decimalAmount`, or
            `unresolved` when

            the backend cannot scale it.
        sourceChainId:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        status:
          description: >-
            Leg status: `pending` | `executing` | `done` | `failed` |
            `refunded`.
          type: string
        tradeLeg:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLegFacts'
              description: >-
                The money-movement facts of a hosted venue trade's leg: a

                payout or pay-in over a bank rail or a chain. Absent on route
                legs.
        transactions:
          description: >-
            The transactions this leg produced (a subset of the order's
            `transactions[]`,

            correlated by `leg_index`/chain), each already enriched with an
            explorer URL.
          items:
            $ref: '#/components/schemas/OrderTransactionInfo'
          type: array
        venueRouteId:
          description: >-
            The venue route identity that filled this leg, from the retained
            route quote's

            `legQuotes[].solverId`. A solver-LP leg carries a real solver id
            that

            resolves to a KYB'd LP workspace; a bridge leg carries a synthetic
            id

            (e.g. `"circle-cctp"`) with no LP workspace behind it. This is the
            handle

            the trade-detail builder uses to resolve per-leg counterparty
            compliance.
          type:
            - string
            - 'null'
      required:
        - index
        - kind
        - label
        - sell
        - buy
        - status
      type: object
    TradeLifecycleStatus:
      properties:
        bucket:
          $ref: '#/components/schemas/TradeLifecycleBucket'
          description: >-
            Which history bucket this lifecycle belongs to: decided by the same
            arm that

            chose `primary`, so a filter on it can never disagree with the
            label.
        execution:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLifecycleStep'
        flowKind:
          type: string
        isTerminal:
          type: boolean
        primary:
          $ref: '#/components/schemas/TradeLifecycleStep'
        rank:
          format: int32
          minimum: 0
          type: integer
        rawDeferredStatus:
          type:
            - string
            - 'null'
        rawStatus:
          type: string
        settlement:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLifecycleStep'
        withdrawal:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLifecycleStep'
      required:
        - flowKind
        - primary
        - bucket
        - isTerminal
        - rank
        - rawStatus
      type: object
    NextAction:
      description: >-
        What the order needs from its reader next. Absent when nothing is
        needed.


        Each variant is a distinct situation with a distinct remedy; none
        collapses onto

        another, and a state the backend cannot decide yields no action rather
        than a

        `signNextLeg` it cannot back.


        New values may be added; treat unknown values as other.
      oneOf:
        - description: The payout remains unsent with its venue-account hold retained.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - payoutFeeRose
              type: string
              x-extensible-enum: true
            legId:
              format: uuid
              type: string
          required:
            - legId
            - kind
          type: object
        - description: >-
            A bound wallet destination is no longer usable. Funds remain at the
            LP.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - provideDestination
              type: string
              x-extensible-enum: true
            legId:
              format: uuid
              type: string
            reason:
              type: string
          required:
            - legId
            - reason
            - kind
          type: object
        - description: >-
            The taker signs the next leg. `legIndex` 0 is an FX-first order that
            has not

            started: its funds are still in the taker's wallet.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - signNextLeg
              type: string
              x-extensible-enum: true
            legIndex:
              format: int32
              minimum: 0
              type: integer
          required:
            - legIndex
            - kind
          type: object
        - description: >-
            The fresh price moved past the tolerance. The taker may accept it
            once.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - priceMoved
              type: string
              x-extensible-enum: true
            offer:
              $ref: '#/components/schemas/ContinuationRepricingOffer'
          required:
            - offer
            - kind
          type: object
        - description: >-
            A leg did not run and the funds came back to the taker: sign it
            again, on the

            same order.
          properties:
            attempt:
              description: The attempt the retry starts (the ended attempts plus one).
              format: int32
              minimum: 0
              type: integer
            fundsAt:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/FundsLocation'
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - retryNextLeg
              type: string
              x-extensible-enum: true
            legIndex:
              format: int32
              minimum: 0
              type: integer
            reason:
              type: string
          required:
            - legIndex
            - attempt
            - reason
            - kind
          type: object
        - description: >-
            The route ended with the funds in the taker's wallet part-way, and
            no re-quote

            owner can resume it: finish the trade from there with a new order.
          properties:
            fundsAt:
              $ref: '#/components/schemas/FundsLocation'
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - finishTrade
              type: string
              x-extensible-enum: true
            reason:
              type: string
          required:
            - fundsAt
            - reason
            - kind
          type: object
        - description: The taker stopped waiting, or the wait reached its bound.
          properties:
            fundsAt:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/FundsLocation'
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - stopped
              type: string
              x-extensible-enum: true
            reason:
              $ref: '#/components/schemas/StopReason'
          required:
            - reason
            - kind
          type: object
        - description: An operator must review the order; the taker cannot act on it.
          properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - supportReview
              type: string
              x-extensible-enum: true
            reason:
              type: string
          required:
            - reason
            - kind
          type: object
      x-extensible-enum: true
    PreflightNextAction:
      properties:
        actor:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PreflightActionActor'
        after:
          items:
            $ref: '#/components/schemas/PreflightActionAfter'
          type: array
        chain:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ChainRefV1'
        chainId:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        details:
          description: >-
            Protocol wallet actions expose `effectiveFloor` as a decimal string
            in the

            output asset's base units: the signed execution's minimum output.
            Preflight

            refuses signing guidance when that bound cannot be read.
        frequency:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PreflightActionFrequency'
        purpose:
          $ref: '#/components/schemas/PreflightActionPurpose'
        sourceAuthorizationMessage:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PreflightSourceAuthorizationMessageV1'
              description: >-
                Exact byte message a non-EVM wallet must authorize. This is
                separate

                from `typedData` so clients never coerce an Ed25519 source
                permit into

                EIP-712 or sign an opaque value extracted from `details`.
        submitTo:
          type:
            - string
            - 'null'
        transaction:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PreflightChainTransactionV1'
        tx:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PreflightEvmTransaction'
        type:
          $ref: '#/components/schemas/PreflightActionType'
        typedData: {}
        walletAuthorization:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/WalletSigningPreparation'
              description: >-
                Owner-factor preparation for the explicitly selected signing
                wallet.

                This does not authorize signing or imply a reusable delegation
                grant.
      required:
        - type
        - purpose
      type: object
    NextActor:
      description: >-
        Who must act before the order can progress, shared by the order read and
        list.


        New values may be added; treat unknown values as other.
      enum:
        - taker
        - support
        - counterparty
        - none
      type: string
      x-extensible-enum: true
    ReportingCoverage:
      description: Advisory connection coverage. Never an order-admission decision.
      properties:
        legs:
          items:
            $ref: '#/components/schemas/ReportingLegCoverage'
          type: array
        transfers:
          items:
            $ref: '#/components/schemas/ReportingTransfer'
          type: array
      required:
        - legs
      type: object
    TradeRouteDisplay:
      description: The sold and bought sides of a trade for display read models.
      properties:
        buy:
          $ref: '#/components/schemas/AssetAmountDisplay'
          description: What the order buys.
        sell:
          $ref: '#/components/schemas/AssetAmountDisplay'
          description: What the order sells.
      required:
        - sell
        - buy
      type: object
    Settlement:
      description: |-
        Settlement information for an order

        Settlement structure that remains consistent across protocol versions.
      properties:
        data:
          description: Settlement-specific data
        type:
          $ref: '#/components/schemas/SettlementType'
          description: Settlement mechanism type
      required:
        - type
        - data
      type: object
    OrderStatus:
      description: >-
        Coarse public lifecycle status. Failure detail belongs only to
        `failure`.


        New values may be added; treat unknown values as other.
      enum:
        - created
        - pending
        - executing
        - executed
        - settled
        - settling
        - finalized
        - failed
        - refunded
      type: string
      x-extensible-enum: true
    OrderTiming:
      properties:
        observedAt:
          format: date-time
          type: string
        revision:
          type: string
        stages:
          items:
            $ref: '#/components/schemas/OrderStageTiming'
          type: array
      required:
        - observedAt
        - revision
        - stages
      type: object
    OrderTransactionInfo:
      description: >-
        A transaction in an order's timeline, for one lifecycle stage.


        `legIndex`, `label` and `explorerUrl` are optional: they tell a client
        which route

        leg the transaction belongs to, a human role label, and a ready-to-open
        explorer URL.
      properties:
        actor:
          $ref: '#/components/schemas/OrderTransactionActor'
        chainId:
          format: int64
          minimum: 0
          type: integer
        chainRole:
          $ref: '#/components/schemas/OrderTransactionChainRole'
        explorerUrl:
          description: >-
            Block-explorer URL for `hash` on `chainId` when TetraFi knows the
            chain's explorer;

            when absent, the client falls back to its own per-chain explorer
            list.
          type:
            - string
            - 'null'
        hash:
          type: string
        label:
          description: >-
            Human-friendly role label (e.g. "Bridge burn", "Fill", "Claim");
            when absent

            the client derives it from `stage`.
          type:
            - string
            - 'null'
        legIndex:
          description: 0-indexed route leg this tx belongs to (multi-leg routes only).
          format: int32
          minimum: 0
          type:
            - integer
            - 'null'
        stage:
          $ref: '#/components/schemas/OrderTransactionStage'
        status:
          $ref: '#/components/schemas/OrderTransactionStatus'
        timestamp:
          description: >-
            Unix seconds at which the platform OBSERVED this transaction: when
            TetraFi

            recorded it, never the block time.


            Absent when TetraFi does not know when the transaction happened. A
            client

            must render "time unknown" then, never substitute a time of its own
            (such as

            the order's `updatedAt`).
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
      required:
        - stage
        - hash
        - chainId
        - chainRole
        - actor
        - status
      type: object
    OrderViewer:
      description: >-
        Caller-relative context for an authenticated read of a workspace-tagged
        order.
      properties:
        recordsScope:
          $ref: '#/components/schemas/OrderRecordsScope'
        submittedByYou:
          description: >-
            The caller owns the linked wallet or is the order's recorded
            submitting user.
          type: boolean
      required:
        - submittedByYou
        - recordsScope
      type: object
    VenueTradeReviewBoundsDto:
      description: >-
        A venue trade's bounds on the wire, in the `POST /quotes` vocabulary:
        what the trade

        sells and buys. Exact decimal currency units.
      properties:
        buy:
          $ref: '#/components/schemas/TradeLeg'
          description: >-
            The Asset bought; `amount` is the least the trade delivers, net of
            fees deducted from it.
        buyAmount:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DecimalAmount'
              description: >-
                The exact amount bought, when the trader fixed what they
                receive.
        maximumFees:
          description: An absent asset is not permission to charge an unbounded fee in it.
          items:
            $ref: '#/components/schemas/VenueTradeFeeBoundDto'
          type: array
        sell:
          $ref: '#/components/schemas/TradeLeg'
          description: >-
            The Asset sold; `amount` is the most the trade spends, every fee
            charged in it included.
        sellAmount:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DecimalAmount'
              description: >-
                The exact amount sold, when the trader fixed what they sell. At
                most one of

                `sellAmount` and `buyAmount`; both are absent on an older trade
                that recorded neither.
      required:
        - sell
        - buy
        - maximumFees
      type: object
    VenueTradeDispatch:
      description: >-
        The claimed venue submission and its recorded result. venueOrderId is
        the venue's native order identifier. Amounts are decimal currency units
        in the trade's debit and receipt assets; absent amounts are unknown,
        never zero. Only the documented fields are part of the integrator
        contract; undocumented fields may be sent and must be ignored.
      properties:
        claimedAt:
          format: date-time
          type: string
        confirmationKey:
          format: uuid
          type: string
        confirmedQuoteId:
          format: uuid
          type: string
        inputSpent:
          type:
            - string
            - 'null'
        outcomeCode:
          description: Stable sanitized classification, never an upstream response body.
          type:
            - string
            - 'null'
        outputReceived:
          type:
            - string
            - 'null'
        quotedOutput:
          description: >-
            The confirmed quote's output, beside `outputReceived`: a fill below
            it but

            within the trade's minimum receipt is a normal fill (operator
            decision

            2026-10-22), shown as "Received … (quoted …; within your minimum
            …)".
          type:
            - string
            - 'null'
        updatedAt:
          format: date-time
          type: string
        venueOrderId:
          type:
            - string
            - 'null'
      required:
        - claimedAt
        - confirmationKey
        - confirmedQuoteId
        - updatedAt
      type: object
    VenueTradeExecutionStatus:
      description: >-
        A venue trade's execution status, in camelCase like the order `status`
        (`outcomeUnknown`).


        New values may be added; treat unknown values as other.
      enum:
        - notSubmitted
        - dispatching
        - outcomeUnknown
        - filled
        - unfilled
        - needsReview
      type: string
      x-extensible-enum: true
    VenueQuoteReviewDisposition:
      description: |-
        Initial policy verdict retained on a preparation.

        New values may be added; treat unknown values as other.
      enum:
        - review_required
        - review_not_required
      type: string
      x-extensible-enum: true
    VenueTradeSettlementStatus:
      description: >-
        Where the order's money movement stands. executionStatus describes the
        trade, not settlement; settled means every money-movement leg has
        settled.


        New values may be added; treat unknown values as other.
      enum:
        - inProgress
        - settled
        - endedUnsettled
      type: string
      x-extensible-enum: true
    CapabilityBlockerCode:
      description: |-
        Stable machine-readable blocker codes returned by the capability gate.

        New values may be added; treat unknown values as other.
      enum:
        - WORKSPACE_NOT_FOUND
        - WORKSPACE_NOT_ACTIVE
        - WORKSPACE_SUSPENDED
        - PARENT_WORKSPACE_INACTIVE
        - INSUFFICIENT_PERMISSION
        - WORKSPACE_TYPE_UNSUPPORTED
        - BASE_PROFILE_INCOMPLETE
        - BASE_PROFILE_UNREADABLE
        - KYB_NOT_VERIFIED
        - KYC_NOT_VERIFIED
        - SANCTIONS_FLAGGED
        - MEMBER_COMPLIANCE_FROZEN
        - MEMBER_COMPLIANCE_DENIED
        - SCREENING_PENDING
        - SCREENING_UNAVAILABLE
        - GEO_RESTRICTED
        - WALLET_NOT_VERIFIED
        - DIRECT_USER_NOT_FOUND
        - DIRECT_USER_SUSPENDED
        - DIRECT_USER_KYC_NOT_VERIFIED
        - INSUFFICIENT_SCOPE
        - TREASURY_DISABLED
        - NO_USABLE_CREDENTIAL
        - CROSS_OWNER_WRITE_DENIED
        - AGGREGATE_SCOPE_READ_ONLY
        - OWNER_SCOPE_REQUIRED
        - VENUE_OPERATION_UNSUPPORTED
        - TAKER_ONBOARDING_INCOMPLETE
        - TAKER_ADMISSION_UNAVAILABLE
      type: string
      x-extensible-enum: true
    CapabilityUnlockEstimate:
      description: >-
        Coarse time-to-unlock class. The UI owns the copy; figures are
        engineering

        estimates until the KYB queue and Sumsub webhooks supply measured
        values.


        New values may be added; treat unknown values as other.
      enum:
        - minutes
        - forms_then_review
        - admin_action
        - other_party
        - unknown
        - not_unlockable
      type: string
      x-extensible-enum: true
    CapabilityUnlockStep:
      description: |-
        Stable key for the step that unlocks a blocked capability. The backend
        names the step; the UI owns the step-to-route map. Never a UI route.

        New values may be added; treat unknown values as other.
      enum:
        - finish_onboarding
        - company_details
        - kyb_profile
        - kyc_dialog
        - link_wallet
        - ask_admin
        - contact_broker
        - manage_direct_users
        - manage_api_key
        - connect_custodian
        - switch_account_scope
        - contact_support
        - await_screening
        - none
      type: string
      x-extensible-enum: true
    Caip2Chain:
      description: >-
        A CAIP-2 chain id (`eip155:8453`, `solana:<genesis>`, `tron:shasta`),
        syntax-checked:

        a namespace of 3 to 8 lowercase letters, digits or `-`, and a reference
        of 1 to 32

        letters, digits, `-` or `_`. Compared exactly, as CAIP-2 references are
        case-sensitive.
      example: eip155:8453
      type: string
    BankAccountSuffix:
      description: >-
        An already-qualified masked account suffix of 1 to 4 ASCII
        letters/digits, not external account ownership proof. Never truncate a
        full account number.
      examples:
        - A1b2
      maxLength: 4
      minLength: 1
      pattern: ^[A-Za-z0-9]{1,4}$
      type: string
    DecimalAmount:
      description: >-
        A non-negative decimal string in Asset units (`"10000"`, `"9994.0"`):
        digits with an

        optional fraction, no sign, exponent or leading zero. Never a float and
        never base

        units. A request amount must also be positive (`INVALID_AMOUNT`); a fee
        or a

        known balance may be zero.
      example: '10000'
      type: string
    BankFundingRevealRef:
      description: >-
        Non-bearer lookup metadata for deposit instructions. Possession grants
        no authority. Each reveal requires current wallet-view authority and
        exact account membership; an API key additionally needs treasury_read.
        Missing and foreign accounts share a refusal. Quotes never fetch these
        instructions.
      properties:
        connectionId:
          description: >-
            The native held leg's exact connection id, never a
            first/sole-connection guess.
          type: string
        currency:
          type: string
        providerBankId:
          description: >-
            The provider's linked-bank id when required by that venue; otherwise
            unknown/null.
          type:
            - string
            - 'null'
      required:
        - connectionId
        - currency
        - providerBankId
      type: object
    AssetId:
      description: >-
        A registry Asset id (`USDC`, `USDe`). Matched case-insensitively against
        the catalogue,

        which answers it in the registry's own spelling.
      example: USDC
      type: string
    FundingAccountKind:
      description: New values may be added; treat unknown values as other.
      enum:
        - venueAccount
        - wallet
        - bankAccount
      type: string
      x-extensible-enum: true
    AfterPayBy_String:
      allOf:
        - $ref: '#/components/schemas/LateFunds'
        - properties:
            source:
              type: string
          required:
            - source
          type: object
      description: One family serves owned wire values and borrowed catalogue declarations.
    PayBy:
      properties:
        clock:
          $ref: '#/components/schemas/FundingClock'
        seconds:
          format: int32
          minimum: 0
          type: integer
      required:
        - seconds
        - clock
      type: object
    SettlementGrace:
      description: New values may be added; treat unknown values as other.
      oneOf:
        - properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - no_grace
              type: string
              x-extensible-enum: true
          required:
            - kind
          type: object
        - properties:
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - within
              type: string
              x-extensible-enum: true
            seconds:
              format: int32
              minimum: 0
              type: integer
          required:
            - seconds
            - kind
          type: object
      x-extensible-enum: true
    SettlementTerms:
      allOf:
        - $ref: '#/components/schemas/SettlementMethod'
        - properties:
            timing:
              $ref: '#/components/schemas/SettlementTiming'
          required:
            - timing
          type: object
      description: How and when the trade's assets move, as one flat set of fields.
    SettlementWindowTerms:
      description: >-
        The account schedule's window a delayed trade settles in, fixed when the
        quote was

        made and recorded unchanged on the executed trade. A `clock` window
        carries `settlesBy`,

        the occurrence's confirmed completion; an `onAgreement` window (an
        LP-issued statement with

        no completion term) carries none. A window whose completion is pending
        on any other

        schedule is never emitted.
      properties:
        assumedBoundary:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/AssumedWindowBoundary'
              description: >-
                Present when the window's boundary comes from an assumed
                schedule term rather than the

                LP's confirmation: every surface shows the window as assumed
                until the LP confirms it.
        cadence:
          $ref: '#/components/schemas/SettlementCadence'
        cutoffAt:
          format: date-time
          type:
            - string
            - 'null'
        paymentDeadlineAt:
          description: >-
            The occurrence's payment deadline from its schedule terms: what a
            credit trade's debt is

            paid by. Absent while the schedule has not confirmed it; never
            derived from `settlesBy`.
          format: date-time
          type:
            - string
            - 'null'
        scheduleId:
          type: string
        scheduleLabel:
          description: >-
            The published schedule version's display name (e.g. "EU"), so a
            quote card or Review

            names the window without a settlement read permission.
          type: string
        scheduleVersion:
          format: int64
          type: integer
        settlementBasis:
          $ref: '#/components/schemas/WindowSettlementBasis'
        settlesBy:
          format: date-time
          type:
            - string
            - 'null'
        snapshotAt:
          format: date-time
          type: string
        statementIssuer:
          description: >-
            The LP whose statement settles an `onAgreement` window ("Keyrock");
            absent on a clock window.
          type:
            - string
            - 'null'
        windowId:
          format: uuid
          type: string
      required:
        - windowId
        - scheduleId
        - scheduleVersion
        - scheduleLabel
        - cadence
        - snapshotAt
      type: object
    OrderFillPrice:
      description: 'An executed price: `amount` units of `quote` for one unit of `base`.'
      properties:
        amount:
          type: string
        base:
          type: string
        quote:
          type: string
      required:
        - amount
        - base
        - quote
      type: object
    OrderFillVenue:
      description: >-
        The venue that executed the fill, by the same id and name its quote
        carried.
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      type: object
    BondUnbondableReason:
      description: >-
        Why an order was never bond-ELIGIBLE: there is no EVM address the hub
        could pay

        compensation to (`crossVmCarrier`, `routerCloneBeneficiary`), or the
        solver's bond

        had no free capacity when the order opened (`insufficientFreeBond`).

        Present only when the bond status is `notEligible`.


        New values may be added; treat unknown values as other.
      enum:
        - crossVmCarrier
        - routerCloneBeneficiary
        - insufficientFreeBond
      type: string
      x-extensible-enum: true
    BondReservationStatus:
      description: |-
        Lifecycle status of a bonded RFQ order's hub reserve.

        New values may be added; treat unknown values as other.
      enum:
        - pending
        - reserved
        - released
        - slashed
        - unbonded
        - notEligible
        - expired
      type: string
      x-extensible-enum: true
    AceAttestationProof:
      description: |-
        ACE (Attested Compliance Engine) attestation reference: the on-chain
        record that the originator counterparty passed KYC at a given tier in
        a given jurisdiction, with the vendor payload hash bound into the
        attestation.
      properties:
        expiresAt:
          description: Attestation expiry.
          format: date-time
          type:
            - string
            - 'null'
        jurisdiction:
          description: ISO 3166-1 alpha-2 jurisdiction the attestation asserts.
          type:
            - string
            - 'null'
        onChainAttested:
          description: Whether the attestation is committed on-chain.
          type: boolean
        onChainTxHash:
          description: Transaction hash of the on-chain attestation commit.
          type:
            - string
            - 'null'
        tier:
          description: Attested compliance tier.
          format: int32
          type:
            - integer
            - 'null'
        vendorHash:
          description: Hex hash of the KYC vendor payload bound into the attestation.
          type:
            - string
            - 'null'
      required:
        - onChainAttested
      type: object
    OrderComplianceCheck:
      description: One compliance check that ran for the order.
      properties:
        chainId:
          description: Chain the check was evaluated against, when on-chain.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        contractAddress:
          description: Contract the check was evaluated against (policy engine, escrow).
          type:
            - string
            - 'null'
        details:
          description: One-line human summary recorded by the check.
          type:
            - string
            - 'null'
        enforced:
          description: >-
            Whether the recorded mode enforced this check; false for unrecorded
            modes is

            not a claim that the historical gate admitted its failures.
          type: boolean
        evidence:
          description: Structured evidence recorded by the check, secret-scrubbed.
        group:
          $ref: '#/components/schemas/ComplianceCheckGroup'
        groupReason:
          description: >-
            An explanation based only on this row's recorded applicability and
            outcome.
          type: string
        id:
          description: |-
            Stable check identifier (`pretrade_checks.check_name`), e.g.
            `originator_sanctions`, `ace_policy_check`, `wallet_identity`.
          type: string
        label:
          description: Human label derived from `id`.
          type: string
        latencyMs:
          format: int64
          type:
            - integer
            - 'null'
        layer:
          $ref: '#/components/schemas/ComplianceLayer'
        missingInput:
          description: >-
            The input that was missing: verified_notional_usd,
            eur_usd_reference_rate or workspace_compliance_policy.
          type:
            - string
            - 'null'
        reasonCode:
          description: >-
            Why a check could not be concluded: NOTIONAL_UNVERIFIED,
            REFERENCE_RATE_UNAVAILABLE or COMPLIANCE_POLICY_UNAVAILABLE, from
            its recorded evidence.
          type:
            - string
            - 'null'
        runMode:
          $ref: '#/components/schemas/ComplianceRunMode'
        runModeReason:
          description: >-
            Present only when a stored mode cannot be decoded; never a default
            mode.
          type:
            - string
            - 'null'
        source:
          description: >-
            Provider or engine that produced the verdict
            (`pretrade_checks.data_source`).
          type: string
        timestamp:
          format: date-time
          type: string
        txHash:
          description: Transaction that commits the evidence, when one exists.
          type:
            - string
            - 'null'
        verdict:
          $ref: '#/components/schemas/ComplianceCheckVerdict'
      required:
        - id
        - label
        - layer
        - verdict
        - source
        - timestamp
        - runMode
        - enforced
        - group
        - groupReason
      type: object
    OrderComplianceDenialFact:
      description: >-
        Typed denial metadata; withheld reasons require generic
        compliance-review copy.
      properties:
        code:
          type: string
        fields:
          items:
            type: string
          type: array
        remedy:
          $ref: '#/components/schemas/ComplianceRemedy'
        withheld:
          type: boolean
      required:
        - code
        - remedy
        - withheld
      type: object
    OnChainCoverage:
      description: |-
        On-chain (ACE policy run) coverage for one order.

        Evaluated in this order, so a POSITIVE observation always wins over an
        explanation: `PolicyRun` → `ProviderLedger` → `NoTxRecorded` →
        `LedgerBehind` → `NoPolicyRun`.

        New values may be added; treat unknown values as other.
      oneOf:
        - description: >-
            At least one recorded ACE policy run matches one of the order's

            declared transactions AND that run's gate is `enforced`: a policy

            actually evaluated the call.


            `runs` carries EVERY joined run, enforced or not, and `open_runs` /

            `unknown_runs` count the ones that are not evidence of screening.

            Those counts are redundant with `runs` on purpose: an `Open` run is
            a

            fail-open gate that must stay visible even when a sibling run on the

            same transaction covered the trade, and a reader that has to fold
            over

            `runs` to notice it is a reader that will not.
          properties:
            openRuns:
              format: int32
              minimum: 0
              type: integer
            runs:
              items:
                $ref: '#/components/schemas/PolicyRunRef'
              type: array
            state:
              description: New values may be added; treat unknown values as other.
              enum:
                - policyRun
              type: string
              x-extensible-enum: true
            unknownRuns:
              format: int32
              minimum: 0
              type: integer
          required:
            - runs
            - openRuns
            - unknownRuns
            - state
          type: object
        - description: >-
            Runs join the order's transactions, NONE is enforced, and at least
            one

            passed unchecked: the engine's policy chain for that

            `(target, selector)` was empty and the default allowed it.


            Deliberately NOT `policyRun`. `PolicyEngine.run` emits the

            same event whether a policy allowed the call or no policy existed at

            all, so collapsing this onto "a policy run exists" reports a
            fail-open

            gate as screened.
          properties:
            runs:
              items:
                $ref: '#/components/schemas/PolicyRunRef'
              type: array
            state:
              description: New values may be added; treat unknown values as other.
              enum:
                - policyRunOpen
              type: string
              x-extensible-enum: true
          required:
            - runs
            - state
          type: object
        - description: >-
            Runs join the order's transactions and NONE of their postures could
            be

            established. Neither evidence of screening nor of its absence.
          properties:
            runs:
              items:
                $ref: '#/components/schemas/PolicyRunRef'
              type: array
            state:
              description: New values may be added; treat unknown values as other.
              enum:
                - policyRunUnknown
              type: string
              x-extensible-enum: true
          required:
            - runs
            - state
          type: object
        - description: >-
            The order's venue is DECLARED by the contract registry as a deferred

            provider-ledger venue (the registry's own OTC path set: `venueType`

            `otc` / `cex_spot`, or a solver or venue id the registry classifies

            there). Such a venue settles on the provider's books and TetraFi

            broadcasts nothing on its behalf, so an absent policy run is correct

            by design rather than a gap.


            `declaredBy` records the declaration that decided it, so the claim

            is auditable.


            NOT the same thing as the catalogued scenario's `external_venue`

            sub-class, which describes a TetraFi-BROADCAST transaction landing
            on

            registry-declared third-party infrastructure (Circle's

            `tokenMessengerV2`, Across's `spokePool`, Circle's `fxEscrow`). The

            two are disjoint by construction — this one broadcasts nothing at

            all — and they are deliberately not given one shared label.


            Limit: the registry declares no property that separates a venue
            whose

            execution reaches a TetraFi contract (e.g. `octarine-rwa`, an
            `onchain`

            direct venue that executes through a TetraFi swap contract) from one

            whose execution does not (e.g. a `circle-cctp` taker burn straight
            to

            Circle's TokenMessengerV2). Those are reported as `noPolicyRun`.
          properties:
            declaredBy:
              type: string
            state:
              description: New values may be added; treat unknown values as other.
              enum:
                - providerLedger
              type: string
              x-extensible-enum: true
          required:
            - declaredBy
            - state
          type: object
        - description: |-
            The order declares no transaction hash in any of its own or its
            settlement's fields, so there is nothing to match.
          properties:
            state:
              description: New values may be added; treat unknown values as other.
              enum:
                - noTxRecorded
              type: string
              x-extensible-enum: true
          required:
            - state
          type: object
        - description: |-
            The order declares transactions, no event joins them, and the ACE
            event ledger is not current for at least one of the order's
            candidate chains — so the absence is inconclusive.
          properties:
            chains:
              items:
                $ref: '#/components/schemas/LedgerLagRef'
              type: array
            state:
              description: New values may be added; treat unknown values as other.
              enum:
                - ledgerBehind
              type: string
              x-extensible-enum: true
          required:
            - chains
            - state
          type: object
        - description: |-
            The order declares transactions, the ledger is current for every
            candidate chain, and no policy-run event exists. Provisional: the
            catalogued scenario's RPC probe sub-classifies each one.
          properties:
            state:
              description: New values may be added; treat unknown values as other.
              enum:
                - noPolicyRun
              type: string
              x-extensible-enum: true
            transactions:
              items:
                $ref: '#/components/schemas/OrderTxRef'
              type: array
          required:
            - transactions
            - state
          type: object
      x-extensible-enum: true
    OrderComplianceScope:
      description: >-
        Whether the caller may read the recorded compliance details for this
        order.


        New values may be added; treat unknown values as other.
      enum:
        - full
        - verdictOnly
      type: string
      x-extensible-enum: true
    OrderTravelRuleStatus:
      description: Travel-rule status snapshot for the order.
      properties:
        required:
          description: |-
            When applicability is undetermined, `false` is not a claim that the
            rule is unnecessary; clients must read `status`.
          type: boolean
        status:
          description: '`not_required` | `required` | `transmitted` | `not_recorded`.'
          type: string
        transmitted:
          type: boolean
      required:
        - status
        - required
        - transmitted
      type: object
    ComplianceVerdict:
      description: |-
        Aggregate verdict of the whole pre-trade evaluation for the order.

        New values may be added; treat unknown values as other.
      enum:
        - pass
        - fail
        - hold
        - pending
        - not_applicable
        - warned
      type: string
      x-extensible-enum: true
    OrderWalletIdentity:
      description: The wallet-identity binding proven at admission.
      properties:
        address:
          type: string
        chainFamily:
          description: >-
            `evm` | `solana` | `tron` | … as the linked-wallet registry records
            it.
          type:
            - string
            - 'null'
        linkedAt:
          format: date-time
          type:
            - string
            - 'null'
        method:
          description: '`siwe` | `siws` | `custody`.'
          type: string
      required:
        - address
        - method
      type: object
    ContinuationLegPlan:
      description: How one leg of a route runs and what happens if it cannot.
      properties:
        delegation:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ContinuationDelegation'
              description: >-
                A delegate grant covering this leg's signature (phase 3). `mode`
                stays

                `needsSignature`; the delegate is who provides that signature
                when it can.
        etaSeconds:
          description: Seconds until this leg can run, when the quote measured it.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        legIndex:
          format: int32
          minimum: 0
          type: integer
        minimumOutput:
          description: The lowest output the order accepts for this leg, in base units.
          type:
            - string
            - 'null'
        mode:
          $ref: '#/components/schemas/LegMode'
        onFailure:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/FundsLocation'
              description: >-
                Where the funds wait if this leg does not run. Absent for an
                atomic leg (nothing

                moves) and when the route does not record it.
        referenceOutput:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/AssetAmountDisplay'
              description: The output accepted at quote time for this leg.
        slippageBps:
          format: int32
          minimum: 0
          type: integer
      required:
        - legIndex
        - mode
        - slippageBps
      type: object
    AssetDisplay:
      description: Display identity for one token/asset.
      properties:
        address:
          type:
            - string
            - 'null'
        assetId:
          type: string
        chainId:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        chainRef:
          type:
            - string
            - 'null'
        decimals:
          format: int32
          minimum: 0
          type:
            - integer
            - 'null'
        name:
          type:
            - string
            - 'null'
        resolutionStatus:
          $ref: '#/components/schemas/AssetResolutionStatus'
        symbol:
          type: string
      required:
        - assetId
        - symbol
        - resolutionStatus
      type: object
    AmountUnresolved:
      description: >-
        Why a side carries no decimal amount. Present exactly when
        `decimalAmount`

        is absent, so an unresolved side is a named state and never a guessed or

        missing number.


        New values may be added; treat unknown values as other.
      enum:
        - assetNotInRegistry
        - amountUnavailable
      type: string
      x-extensible-enum: true
    OrderFailurePhase:
      description: |-
        Transaction phase of a public order failure.

        New values may be added; treat unknown values as other.
      enum:
        - prepare
        - fill
        - postFill
        - preClaim
        - claim
      type: string
      x-extensible-enum: true
    FundsLocation:
      description: >-
        Where a leg's funds are when the leg does not run.


        Tagged on `holder` so later holders (a venue-held balance, for example)
        are additive

        variants rather than a new vocabulary.


        New values may be added; treat unknown values as other.
      oneOf:
        - description: In the taker's own wallet, where they can sign with the funds again.
          properties:
            address:
              description: The wallet, when the order records it.
              type:
                - string
                - 'null'
            funds:
              $ref: '#/components/schemas/AssetAmountDisplay'
            holder:
              description: New values may be added; treat unknown values as other.
              enum:
                - yourWallet
              type: string
              x-extensible-enum: true
          required:
            - funds
            - holder
          type: object
        - description: >-
            In another wallet the route recorded as its recipient, such as the
            end user of a

            broker's order. The taker cannot re-sign with these funds.
          properties:
            address:
              type: string
            funds:
              $ref: '#/components/schemas/AssetAmountDisplay'
            holder:
              description: New values may be added; treat unknown values as other.
              enum:
                - recipientWallet
              type: string
              x-extensible-enum: true
          required:
            - funds
            - address
            - holder
          type: object
        - description: >-
            In a platform contract (a router, an arrival contract or an escrow),
            pending a

            release the platform or an operator performs.
          properties:
            contract:
              type:
                - string
                - 'null'
            funds:
              $ref: '#/components/schemas/AssetAmountDisplay'
            holder:
              description: New values may be added; treat unknown values as other.
              enum:
                - platform
              type: string
              x-extensible-enum: true
          required:
            - funds
            - holder
          type: object
        - description: >-
            In the route's own balance at a CEX venue, on the CEX ledger. Only
            this

            route's trade or its pre-signed payout spends it: the taker retries
            the trade from

            it on the same order, or stops and the payout withdraws it.
          properties:
            funds:
              $ref: '#/components/schemas/AssetAmountDisplay'
              description: The asset and its `available` amount, read from the ledger.
            holder:
              description: New values may be added; treat unknown values as other.
              enum:
                - yourVenueBalance
              type: string
              x-extensible-enum: true
            routeId:
              description: The ledger route the balance is scoped to, `bytes32` hex.
              type: string
            venueId:
              description: The venue's registry id.
              type: string
          required:
            - venueId
            - routeId
            - funds
            - holder
          type: object
        - description: >-
            The native owner accepted the move, but no holder has issued a
            qualified receipt.

            Reported transit is never a destination balance; references stay in
            Money's envelope.
          properties:
            funds:
              $ref: '#/components/schemas/AssetAmountDisplay'
              description: >-
                The asset and amount reported in transit, without a destination
                or native reference.
            holder:
              description: New values may be added; treat unknown values as other.
              enum:
                - inTransit
              type: string
              x-extensible-enum: true
          required:
            - funds
            - holder
          type: object
        - description: >-
            Fiat debited by the venue onto a bank rail, not yet confirmed
            received, including

            overdue or manual-review payouts. References stay in Money's
            evidence envelope.
          properties:
            funds:
              $ref: '#/components/schemas/AssetAmountDisplay'
              description: >-
                The asset and amount on the bank rail, without a destination or
                native reference.
            holder:
              description: New values may be added; treat unknown values as other.
              enum:
                - bankRail
              type: string
              x-extensible-enum: true
          required:
            - funds
            - holder
          type: object
        - description: >-
            In a treasury account the workspace controls that is not
            route-scoped: a custodian

            account or wallet, an organisation wallet, or an ordinary LP/venue
            account. The order's

            own signing wallet stays `yourWallet`; producers choose from the
            order record.
          properties:
            accountId:
              $ref: '#/components/schemas/InventoryAccountId'
              description: >-
                The opaque inventory id, never a native vault, connection or
                venue-account id.
            funds:
              $ref: '#/components/schemas/AssetAmountDisplay'
            holder:
              description: New values may be added; treat unknown values as other.
              enum:
                - account
              type: string
              x-extensible-enum: true
          required:
            - accountId
            - funds
            - holder
          type: object
      x-extensible-enum: true
    LegAttemptOutcome:
      description: |-
        How one attempt at a leg ended.

        New values may be added; treat unknown values as other.
      enum:
        - returnedToYou
        - recovered
        - stopped
        - settled
        - linkedOrder
      type: string
      x-extensible-enum: true
    LegCounterparty:
      description: A route leg's counterparty compliance posture (admin trade-detail only).
      properties:
        counterpartyType:
          description: >-
            `vasp` | `bilateral` | `protocol` | `solver` — the nature of this
            leg's filler.
          type: string
        jurisdiction:
          description: >-
            ISO-3166 alpha-2 home jurisdiction of the LP entity (KYB'd solver
            legs only).
          type:
            - string
            - 'null'
        kybStatus:
          description: KYB status of the LP workspace behind this leg (`approved` / … ).
          type:
            - string
            - 'null'
        licences:
          description: Regulatory licences the leg's LP holds.
          items:
            $ref: '#/components/schemas/LegLicence'
          type: array
        provenance:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/LpDataProvenance'
              description: >-
                Who supplied the LP entity's facts, when an entity profile backs
                this leg.

                A `platformCurated` venue (e.g. Circle) carries a raw
                `not_started` KYB row

                by design; this field is what distinguishes it from an
                unverified LP.
      required:
        - counterpartyType
      type: object
    OrderLegExternalRef:
      description: An off-chain provider reference for a leg.
      properties:
        kind:
          description: >-
            Reference kind, e.g. `circleTradeId` | `acrossDepositId` |
            `relayRequestId`.
          type: string
        url:
          description: A provider status URL for `value`, when one is known.
          type:
            - string
            - 'null'
        value:
          type: string
      required:
        - kind
        - value
      type: object
    TradeLegFacts:
      description: The leg facts an order read carries on `OrderLegInfo.tradeLeg`.
      properties:
        boundLapsesAt:
          description: >-
            Deposit first: the instant the consented bound stops

            authorizing the trade, 3× the deposit's expected arrival in the
            rail's

            business time. Absent on a leg without a deposit-first bound.
          format: date-time
          type:
            - string
            - 'null'
        confirmAgainReason:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLegConfirmAgainReason'
              description: >-
                Why a deposit-first pay-in in `price_beyond_bound` waits for a
                new consent.
        consentedPayoutFee:
          description: >-
            The exact fee bound recorded by Confirm, derived from immutable
            consent.
          type:
            - string
            - 'null'
        creditedAmount:
          description: The venue-credited amount that funded this pay-in, exact decimal.
          type:
            - string
            - 'null'
        currentPayoutFee:
          description: >-
            The qualified estimate observed when dispatch stopped for a fee
            rise.
          type:
            - string
            - 'null'
        declaredPayoutFee:
          description: >-
            Current qualified withdrawal estimate, returned by prepare in the
            receipt

            asset. An absent estimate never means a zero fee.
          type:
            - string
            - 'null'
        destination:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLegDestination'
        direction:
          $ref: '#/components/schemas/TradeLegDirection'
        expectedArrivalAt:
          format: date-time
          type:
            - string
            - 'null'
        expectedArrivalSource:
          description: '`provider` or `default`.'
          type:
            - string
            - 'null'
        finality:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLegFinality'
              description: >-
                Whether a settled payout can still be returned. Absent for an
                unsettled leg or a settled leg without a provider return watch.
        fundingDeadlineAt:
          format: date-time
          type:
            - string
            - 'null'
        fundingModel:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/FundingModel'
              description: >-
                A bank leg's funding model, fixed when it was planned. Absent on
                a

                chain leg.
        fundsReceivedAt:
          description: The venue's own credit time of that amount.
          format: date-time
          type:
            - string
            - 'null'
        holidaysApplied:
          type:
            - boolean
            - 'null'
        legId:
          format: uuid
          type: string
        outcomeCode:
          description: The named reason on a refused, cancelled or returned leg.
          type:
            - string
            - 'null'
        overdueAt:
          format: date-time
          type:
            - string
            - 'null'
        overdueSince:
          format: date-time
          type:
            - string
            - 'null'
        ownBankVerification:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OwnBankVerification'
              description: >-
                Independent bank evidence, never the venue-reported settlement
                state.
        payoutApproval:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLegPayoutApproval'
        payoutBreakdown:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLegPayoutBreakdown'
              description: >-
                A payout's amounts in its asset (operator 2026-10-22: every
                fee-bearing

                action shows what leaves the account, the fee and what arrives).
                Absent

                on a pay-in and on a payout with no consent yet.
        payoutBreakdownUnavailableReason:
          description: >-
            A payout whose fee/charging declaration could not be read. Never
            means no fee.
          type:
            - string
            - 'null'
        payoutHeldReason:
          description: >-
            The funding-stage refusal code holding this planned payout:
            FUNDING_STAGE_DISABLED, EXECUTION_STOPPED,
            PILOT_PAYOUT_CAP_EXCEEDED, PILOT_DAILY_CAP_EXCEEDED or
            EXECUTION_NOTIONAL_UNVALUED. The leg stays planned and is retried;
            absent when not held.
          type:
            - string
            - 'null'
        quotedExpectedArrivalAt:
          description: The confirmed quote's estimate for this exact bank rail and option.
          format: date-time
          type:
            - string
            - 'null'
        rail:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/FiatRail'
              description: >-
                A bank leg's rail (`eft`, `sepa`, ...), fixed when it was
                planned. Absent

                on a chain leg.
        railOption:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/FiatRailOptionKind'
              description: The rail option the bank leg uses (`standard` or `fast`).
        railReference:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PayoutRailReference'
              description: >-
                A genuine bank rail reference or named not-reported state;
                absent on non-bank-payout legs.
        recipientConfirmation:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PayoutRecipientConfirmation'
              description: >-
                The receiving workspace's assertion, never settlement or
                independent verification.
        returnWindowEndsAt:
          description: >-
            For a returnable leg whose rail documents a return window, midnight
            after its last day in the rail's clearing time zone. Absent when no
            window is documented; never estimated.
          format: date-time
          type:
            - string
            - 'null'
        returnedAfterSettlement:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLegReturnedAfterSettlement'
              description: >-
                A settled payout the provider later returned. The leg

                stays `settled` (its row is immutable); the PayoutReturned
                review item

                is the one fact, and resolving that review keeps this
                annotation.
        returnedTo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLegReturnedTo'
        reviewAt:
          format: date-time
          type:
            - string
            - 'null'
        reviewEnteredAt:
          format: date-time
          type:
            - string
            - 'null'
        reviewItemId:
          type:
            - string
            - 'null'
        reviewReason:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeLegReviewReason'
        settlementRail:
          $ref: '#/components/schemas/TradeLegRail'
        state:
          $ref: '#/components/schemas/TradeLegState'
        submittedAt:
          format: date-time
          type:
            - string
            - 'null'
        transactionHash:
          type:
            - string
            - 'null'
        venueReportedCredited:
          description: >-
            Only an explicit receiving-bank credit report from the venue;
            withdrawal completion is not credit.
          type:
            - boolean
            - 'null'
        venueWithdrawalId:
          description: >-
            A wallet payout's withdrawal as the venue recorded it, once sent:
            the

            venue's own withdrawal id and the chain transaction. Absent before
            the send and

            on a bank leg.
          type:
            - string
            - 'null'
      required:
        - legId
        - direction
        - settlementRail
        - state
      type: object
    TradeLifecycleBucket:
      description: |-
        The history bucket chosen by the server's lifecycle projection.

        New values may be added; treat unknown values as other.
      enum:
        - inProgress
        - completed
        - failed
        - refunded
        - unknown
      type: string
      x-extensible-enum: true
    TradeLifecycleStep:
      description: >-
        A compact backend-owned display status for personal trade/order
        surfaces.


        `orders.settlement_status` remains a coarse analytics bucket; UI should
        use

        this shape for user-facing execution/settlement state.
      properties:
        key:
          type: string
        label:
          type: string
        tone:
          type: string
      required:
        - key
        - label
        - tone
      type: object
    ContinuationRepricingOffer:
      description: >-
        The fresh price a continuation was refused at, left for the taker to
        accept once.


        Carried by the 409 `QUOTE_PRICE_MOVED` body. It binds one attempt of one
        leg and

        expires; accepting it rebaselines only that attempt.
      properties:
        acceptedAmount:
          description: >-
            The reference the order held the leg to (the price accepted at quote
            time, or a

            re-price accepted earlier in this attempt), in base units.
          type: string
        asset:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/AssetDisplay'
              description: The compared asset, when the order records it.
        attempt:
          description: >-
            The attempt this offer belongs to, numbered as in the order's
            `legAttempts`.
          format: int32
          minimum: 0
          type: integer
        boundAmount:
          description: >-
            The bound the fresh value had to meet: `acceptedAmount` widened by
            the tolerance.
          type: string
        compared:
          $ref: '#/components/schemas/RepricedSide'
        expiresAt:
          description: Unix seconds after which the offer can no longer be accepted.
          format: int64
          type: integer
        freshAmount:
          description: The fresh value the venue quoted, in base units.
          type: string
        legIndex:
          format: int32
          minimum: 0
          type: integer
        quoteRef:
          description: Identifies this offer. Accepting it must name this value.
          type: string
      required:
        - legIndex
        - attempt
        - compared
        - acceptedAmount
        - boundAmount
        - freshAmount
        - quoteRef
        - expiresAt
      type: object
    StopReason:
      description: |-
        Why a route stopped waiting on its taker.

        New values may be added; treat unknown values as other.
      enum:
        - waitLimitReached
        - stoppedByYou
        - continuationComplianceRefused
      type: string
      x-extensible-enum: true
    PreflightActionActor:
      description: New values may be added; treat unknown values as other.
      enum:
        - userWallet
        - tetrafiApi
      type: string
      x-extensible-enum: true
    PreflightActionAfter:
      description: New values may be added; treat unknown values as other.
      enum:
        - waitForTransactionMined
        - rerunPreflight
        - postOrder
      type: string
      x-extensible-enum: true
    ChainRefV1:
      description: >-
        Canonical, namespace-aware chain identity. EIP-155 references are
        canonical non-zero decimal strings; Solana references are stable cluster
        identifiers. Cosmos is accepted by the registry codec but is not a
        supported DEX execution namespace.
      properties:
        namespace:
          $ref: '#/components/schemas/CaipNamespace'
        reference:
          type: string
      required:
        - namespace
        - reference
      type: object
    PreflightActionFrequency:
      description: New values may be added; treat unknown values as other.
      enum:
        - perTrade
        - reusableSetup
      type: string
      x-extensible-enum: true
    PreflightActionPurpose:
      description: New values may be added; treat unknown values as other.
      enum:
        - tokenApproval
        - bridgeDeposit
        - wrapNative
        - programmableExecution
        - orderSignature
        - orderSubmit
        - walletLink
        - tradeLedgerAuthorization
        - lpFunding
      type: string
      x-extensible-enum: true
    PreflightSourceAuthorizationMessageV1:
      description: |-
        Exact source-permit message a wallet signs before an API relayer submits
        the corresponding source transaction.
      properties:
        deadline:
          format: int64
          minimum: 0
          type: integer
        encoding:
          $ref: '#/components/schemas/PreflightMessageEncoding'
        message:
          description: Canonical base64 bytes returned by the versioned protocol builder.
          type: string
        nonce:
          description: >-
            Canonical unsigned u64 decimal string. JSON numbers cannot preserve
            the

            full replay-nonce domain in JavaScript clients.
          type: string
        scheme:
          $ref: '#/components/schemas/PreflightSourceAuthorizationScheme'
        signer:
          description: Case-sensitive base58 wallet expected to sign the message.
          type: string
      required:
        - scheme
        - encoding
        - message
        - signer
        - nonce
        - deadline
      type: object
    PreflightChainTransactionV1:
      description: >-
        A transaction for the client to sign and send, tagged by its chain
        namespace

        so EVM and non-EVM transactions each carry their own fields.


        New values may be added; treat unknown values as other.
      oneOf:
        - properties:
            data:
              type: string
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - evm
              type: string
              x-extensible-enum: true
            to:
              type: string
            value:
              type: string
          required:
            - to
            - data
            - value
            - kind
          type: object
        - properties:
            feePayer:
              type: string
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - solana
              type: string
              x-extensible-enum: true
            lastValidBlockHeight:
              format: int64
              minimum: 0
              type: integer
            messageHash:
              type: string
            recentBlockhash:
              type: string
            requiredSigners:
              items:
                type: string
              type: array
            wireTransactionBase64:
              type: string
          required:
            - wireTransactionBase64
            - messageHash
            - recentBlockhash
            - lastValidBlockHeight
            - feePayer
            - requiredSigners
            - kind
          type: object
      x-extensible-enum: true
    PreflightEvmTransaction:
      properties:
        data:
          type: string
        to:
          type: string
        value:
          type: string
      required:
        - to
        - data
        - value
      type: object
    PreflightActionType:
      description: New values may be added; treat unknown values as other.
      enum:
        - authorizeWallet
        - evmTransaction
        - chainTransaction
        - signTypedData
        - signMessage
        - postOrder
        - linkWallet
        - fundLpAccount
      type: string
      x-extensible-enum: true
    WalletSigningPreparation:
      description: >-
        What the wallet's provider needs signed or approved for an exact digest
        TetraFi

        prepared. Hosted approval returns an original authorizationId for the
        owner to approve

        before order submission. Other providers use an operation-bound RPC
        factor

        in the existing execution.signing request fields.
      properties:
        authorizationId:
          description: >-
            Original hosted authorization retained by preflight. Submit owner
            proof

            there, then pass this identity to the existing order signing
            selection.
          type:
            - string
            - 'null'
        authorizationKind:
          $ref: '#/components/schemas/WalletAuthorizationKind'
        authorizationPayload:
          description: >-
            The exact activity to stamp, as the provider encodes it, or the
            provider's

            canonical payload.
        expiresAt:
          format: date-time
          type: string
        provider:
          $ref: '#/components/schemas/WalletInfraProvider'
        providerBody:
          description: >-
            Exact reviewed native bytes. Hosted approval retains these under its

            authorizationId; only an inline RPC factor copies them into
            providerBody.
          type:
            - string
            - 'null'
        requestExpiryMs:
          description: Copy unchanged into execution.signing.requestExpiryMs when present.
          format: int64
          type:
            - integer
            - 'null'
        signingDigest:
          type: string
        walletId:
          description: >-
            Stable TetraFi registry wallet identity, never a provider-native
            fallback.
          type: string
      required:
        - walletId
        - provider
        - authorizationKind
        - authorizationPayload
        - expiresAt
        - signingDigest
      type: object
    ReportingLegCoverage:
      properties:
        counterparty:
          $ref: '#/components/schemas/ReportingInstitutionCoverage'
        legId:
          type: string
        limitation:
          type:
            - string
            - 'null'
        provider:
          type: string
        reportingInstitution:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ReportingInstitutionCoverage'
              description: Customer companies do not need a separate reporting connection.
      required:
        - legId
        - provider
        - counterparty
      type: object
    ReportingTransfer:
      properties:
        createdAt:
          format: date-time
          type: string
        dataStatus:
          type: string
        escalatedAt:
          format: date-time
          type:
            - string
            - 'null'
        id:
          type: string
        lastError:
          type:
            - string
            - 'null'
        nextRetryAt:
          format: date-time
          type:
            - string
            - 'null'
        orderId:
          type: string
        piiSubmittedAt:
          format: date-time
          type:
            - string
            - 'null'
        providerCheckedAt:
          format: date-time
          type:
            - string
            - 'null'
        providerStatus:
          type:
            - string
            - 'null'
        providerTransferId:
          type:
            - string
            - 'null'
        receivingVaspDid:
          type:
            - string
            - 'null'
        reportingWorkspaceId:
          type:
            - string
            - 'null'
        sendingVaspDid:
          type:
            - string
            - 'null'
        state:
          description: >-
            The record's classification, the same one the daily summary counts:

            `pending | acknowledged | settled | recorded | attention |
            not_reported`.
          type: string
        transmissionStatus:
          type: string
        viewerRole:
          description: >-
            This workspace's part in the record, first match:

            `reporting | lp | counterparty | taker`; the order read may say
            `unknown`.
          type: string
      required:
        - state
        - viewerRole
        - id
        - orderId
        - transmissionStatus
        - dataStatus
        - createdAt
      type: object
    SettlementType:
      description: >-
        Settlement mechanism types


        Core settlement mechanisms that are stable across protocol versions.

        - `Escrow`: On-chain escrow-based atomic settlement (T+0).

        - `ResourceLock`: Resource lock-based atomic settlement (T+0).

        - `Deferred`: Off-chain bilateral settlement with LP settlement window
        (T+~8h).


        New values may be added; treat unknown values as other.
      enum:
        - escrow
        - resourceLock
        - deferred
      type: string
      x-extensible-enum: true
    OrderStageTiming:
      properties:
        clockState:
          description: pending | running | waitingForUser | stopped | unknown
          type: string
        context:
          type: string
        elapsedSeconds:
          description: >-
            Automated elapsed time at OrderTiming.observedAt; absent for
            incomplete history.
          format: double
          type:
            - number
            - 'null'
        endedAt:
          format: date-time
          type:
            - string
            - 'null'
        estimateKind:
          description: calculated | measured | rough | milestone | unavailable
          type: string
        expectedSeconds:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        key:
          description: >-
            Semantic identity, independent of translated labels and rail
            positions.
          type: string
        legIndex:
          format: int32
          minimum: 0
          type:
            - integer
            - 'null'
        operation:
          type: string
        startedAt:
          format: date-time
          type:
            - string
            - 'null'
        waitingSince:
          format: date-time
          type:
            - string
            - 'null'
      required:
        - key
        - operation
        - context
        - estimateKind
        - clockState
      type: object
    OrderTransactionActor:
      description: |-
        Actor that submitted a lifecycle transaction.

        New values may be added; treat unknown values as other.
      enum:
        - user
        - solver
        - system
      type: string
      x-extensible-enum: true
    OrderTransactionChainRole:
      description: |-
        Chain role for a lifecycle transaction.

        New values may be added; treat unknown values as other.
      enum:
        - origin
        - destination
        - junction
      type: string
      x-extensible-enum: true
    OrderTransactionStage:
      description: |-
        Order lifecycle stage that a transaction belongs to.

        New values may be added; treat unknown values as other.
      enum:
        - prepare
        - fill
        - post_fill
        - pre_claim
        - claim
        - bridging
        - arrived
        - refund
      type: string
      x-extensible-enum: true
    OrderTransactionStatus:
      description: |-
        Transaction status for an order lifecycle stage.

        New values may be added; treat unknown values as other.
      enum:
        - pending
        - executed
        - failed
      type: string
      x-extensible-enum: true
    OrderRecordsScope:
      description: >-
        Access to the order's workspace trade records, using the detail/timeline
        rule.


        New values may be added; treat unknown values as other.
      enum:
        - full
        - orderOnly
      type: string
      x-extensible-enum: true
    TradeLeg:
      description: >-
        One leg of a trade in the request's own vocabulary: the Asset sold or
        bought, its chain

        when the leg is on-chain, and an amount whose meaning the field naming
        the leg states.
      properties:
        amount:
          $ref: '#/components/schemas/DecimalAmount'
        asset:
          $ref: '#/components/schemas/AssetId'
        chain:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Caip2Chain'
              description: Absent for a leg held on a venue account (off-chain).
      required:
        - asset
        - amount
      type: object
    VenueTradeFeeBoundDto:
      properties:
        asset:
          type: string
        maximumAmount:
          type: string
      required:
        - asset
        - maximumAmount
      type: object
    LateFunds:
      description: New values may be added; treat unknown values as other.
      oneOf:
        - properties:
            action:
              description: New values may be added; treat unknown values as other.
              enum:
                - returned
              type: string
              x-extensible-enum: true
          required:
            - action
          type: object
        - properties:
            action:
              description: New values may be added; treat unknown values as other.
              enum:
                - re_priced
              type: string
              x-extensible-enum: true
            untilSeconds:
              format: int32
              minimum: 0
              type: integer
          required:
            - untilSeconds
            - action
          type: object
        - properties:
            action:
              description: New values may be added; treat unknown values as other.
              enum:
                - held
              type: string
              x-extensible-enum: true
          required:
            - action
          type: object
        - properties:
            action:
              description: New values may be added; treat unknown values as other.
              enum:
                - handled_by_support
              type: string
              x-extensible-enum: true
          required:
            - action
          type: object
      x-extensible-enum: true
    FundingClock:
      description: |-
        What a pay-by deadline measures. Explicit tokens retain persisted terms.

        New values may be added; treat unknown values as other.
      enum:
        - payment_started
        - funds_arrived
      type: string
      x-extensible-enum: true
    SettlementMethod:
      description: New values may be added; treat unknown values as other.
      oneOf:
        - properties:
            method:
              description: New values may be added; treat unknown values as other.
              enum:
                - venueLedger
              type: string
              x-extensible-enum: true
          required:
            - method
          type: object
        - properties:
            method:
              description: New values may be added; treat unknown values as other.
              enum:
                - dvp
              type: string
              x-extensible-enum: true
          required:
            - method
          type: object
        - properties:
            firstLeg:
              $ref: '#/components/schemas/FirstLeg'
            method:
              description: New values may be added; treat unknown values as other.
              enum:
                - fop
              type: string
              x-extensible-enum: true
          required:
            - firstLeg
            - method
          type: object
      x-extensible-enum: true
    SettlementTiming:
      description: New values may be added; treat unknown values as other.
      enum:
        - immediate
        - byDeadline
        - delayed
      type: string
      x-extensible-enum: true
    AssumedWindowBoundary:
      description: >-
        The assumption a window's boundary rests on: the zone whose calendar day
        (or local time)

        the boundary assumes, the decision that set it, and the LP whose answer
        replaces it.
      properties:
        lpName:
          type: string
        source:
          type: string
        timeZone:
          type: string
      required:
        - timeZone
        - source
        - lpName
      type: object
    SettlementCadence:
      description: >-
        How often a settlement schedule's windows occur (the schedule owns the
        terms).


        New values may be added; treat unknown values as other.
      oneOf:
        - properties:
            dayBasis:
              $ref: '#/components/schemas/DayBasis'
            everyHours:
              format: int32
              minimum: 0
              type:
                - integer
                - 'null'
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - intraday
              type: string
              x-extensible-enum: true
            localTimes:
              items:
                type: string
              type:
                - array
                - 'null'
          required:
            - dayBasis
            - kind
          type: object
        - properties:
            dayBasis:
              $ref: '#/components/schemas/DayBasis'
            days:
              format: int32
              minimum: 0
              type: integer
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - daily
              type: string
              x-extensible-enum: true
          required:
            - days
            - dayBasis
            - kind
          type: object
        - properties:
            dayBasis:
              $ref: '#/components/schemas/DayBasis'
            days:
              format: int32
              minimum: 0
              type: integer
            kind:
              description: New values may be added; treat unknown values as other.
              enum:
                - multiDay
              type: string
              x-extensible-enum: true
          required:
            - days
            - dayBasis
            - kind
          type: object
      x-extensible-enum: true
    WindowSettlementBasis:
      description: >-
        What completes a window's settlement. `clock`: the occurrence's
        confirmed completion time

        (`settlesBy`). `onAgreement`: the LP issues the window's statement and
        the trade settles

        once that statement is agreed (Keyrock), so the window states no clock
        time.


        New values may be added; treat unknown values as other.
      enum:
        - clock
        - onAgreement
      type: string
      x-extensible-enum: true
    ComplianceCheckGroup:
      description: |-
        Why a check belongs in a trade's applied, inapplicable or not-run group.

        New values may be added; treat unknown values as other.
      enum:
        - applied
        - not_applicable
        - not_run
      type: string
      x-extensible-enum: true
    ComplianceLayer:
      description: |-
        Where a compliance check was evaluated and where its evidence lives.

        New values may be added; treat unknown values as other.
      enum:
        - onChain
        - offChain
      type: string
      x-extensible-enum: true
    ComplianceRunMode:
      description: >-
        The mode recorded by this check, never reconstructed from today's
        policy.


        New values may be added; treat unknown values as other.
      enum:
        - enforce
        - warn
        - shadow
        - 'off'
        - unrecorded
        - unreadable
        - withheld
      type: string
      x-extensible-enum: true
    ComplianceCheckVerdict:
      description: |-
        Verdict of one check.

        New values may be added; treat unknown values as other.
      enum:
        - pass
        - fail
        - hold
        - skipped
        - not_applicable
        - warned
      type: string
      x-extensible-enum: true
    ComplianceRemedy:
      description: |-
        The step available to resolve a recorded order denial.

        New values may be added; treat unknown values as other.
      enum:
        - verifyIdentity
        - reverifyIdentityCountry
        - provideTravelRuleData
        - provideRequiredFields
        - waitForLimitReset
        - retryLater
        - none
        - complianceReview
      type: string
      x-extensible-enum: true
    PolicyRunRef:
      description: One on-chain ACE policy run observed for an order's transaction.
      properties:
        blockNumber:
          description: The block this run landed in, when known.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        blockTime:
          format: date-time
          type:
            - string
            - 'null'
        chainId:
          format: int64
          minimum: 0
          type: integer
        enforced:
          description: |-
            Whether the engine ENFORCED the policy (vs observe-only). Distinct
            from `gate`: this says whether the observation BLOCKED
            admission, that says whether any policy ran at all.
          type: boolean
        engineAddress:
          type: string
        gate:
          $ref: '#/components/schemas/AcePolicyGate'
          description: >-
            Whether a policy actually evaluated this call: `enforced` (with the

            number of policies that ran), `open` (no policy, the default allowed
            it)

            or `unknown`.
        selector:
          type: string
        targetAddress:
          type: string
        transactionHash:
          type: string
      required:
        - transactionHash
        - chainId
        - engineAddress
        - targetAddress
        - selector
        - enforced
        - gate
      type: object
    LedgerLagRef:
      description: |-
        How far the platform's ACE event listener for one chain trails that
        chain's head, the same position `/health.compliance.aceEventListeners`
        reports.

        `listenerPresent: false` means this chain has no listener at all, which
        is distinct from a present but lagging listener and is never reported as
        `lagBlocks: 0`.
      properties:
        chainId:
          format: int64
          minimum: 0
          type: integer
        cursorBlock:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        engineAddress:
          type:
            - string
            - 'null'
        headBlock:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        lagBlocks:
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        listenerPresent:
          type: boolean
        stale:
          type: boolean
      required:
        - chainId
        - listenerPresent
        - stale
      type: object
    OrderTxRef:
      description: >-
        A transaction an order declares, plus WHICH field declared it.


        `source` is load-bearing: a hash reached through

        `settlement.data.route.legs[1].transactionHash` is a different leg of
        the

        order from `orders.submit_tx_hash`, and a coverage gap on one says

        nothing about the other.
      properties:
        chainId:
          description: |-
            Chain declared alongside the hash, when the declaring object also
            declares one. Absent means the settlement did not say — NOT "chain
            zero" and not "same chain as the order".
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        source:
          description: >-
            Dotted path of the field that declared this hash, e.g.

            `orders.submit_tx_hash` or
            `settlement.data.directDexExecution.transactionHash`.
          type: string
        transactionHash:
          description: Lowercase `0x`-prefixed 32-byte hash.
          type: string
      required:
        - transactionHash
        - source
      type: object
    ContinuationDelegation:
      description: The delegate grant covering this leg, when one exists.
      properties:
        grantId:
          type: string
        refusal:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderGrantRefusal'
              description: >-
                The named refusal when `status` is `refused` (or the reason a
                non-usable grant cannot sign).
        status:
          $ref: '#/components/schemas/ContinuationDelegationStatus'
      required:
        - grantId
        - status
      type: object
    LegMode:
      description: |-
        How a leg after the first runs.

        New values may be added; treat unknown values as other.
      enum:
        - atomic
        - automatic
        - needsSignature
      type: string
      x-extensible-enum: true
    AssetResolutionStatus:
      description: |-
        Whether the backend resolved the asset to known display metadata.

        New values may be added; treat unknown values as other.
      enum:
        - resolved
        - unknown
      type: string
      x-extensible-enum: true
    InventoryAccountId:
      description: >-
        Opaque inventory account id. Never a native vault, connection or
        venue-account id.
      examples:
        - acct_0123456789abcdef0123456789abcdef
      pattern: ^acct_[0-9a-f]{32}$
      type: string
    LegLicence:
      description: A single regulatory licence held by a route leg's LP.
      properties:
        expiresAt:
          format: date-time
          type:
            - string
            - 'null'
        jurisdiction:
          type: string
        licenceType:
          type: string
        status:
          type: string
      required:
        - licenceType
        - jurisdiction
        - status
      type: object
    LpDataProvenance:
      description: |-
        Trust label for the entity facts on a row: who supplied them.

        Computed at read time: a KYB-approved entity is always `KybVerified`;
        otherwise the stored `entity_profiles.data_source` value wins
        (`platform_curated` for registry/ops-seeded facts, `self_declared` for
        LP-supplied profile edits).

        New values may be added; treat unknown values as other.
      enum:
        - kybVerified
        - platformCurated
        - selfDeclared
      type: string
      x-extensible-enum: true
    TradeLegConfirmAgainReason:
      description: >-
        Why a deposit-first pay-in needs a new consent: the fresh

        price missed the consented minimum receipt, or the bound lapsed before
        the

        deposit was credited.


        New values may be added; treat unknown values as other.
      enum:
        - priceBeyondBound
        - boundLapsed
      type: string
      x-extensible-enum: true
    TradeLegDestination:
      description: |-
        Where a payout leg delivers, by reference only: never bank or chain
        coordinates.
      properties:
        approvalId:
          description: The venue destination approval a wallet delivery goes through.
          format: uuid
          type:
            - string
            - 'null'
        kind:
          $ref: '#/components/schemas/TradeLegDestinationKind'
        ref:
          description: The wallet id or the Treasury Destination id.
          type: string
      required:
        - kind
        - ref
      type: object
    TradeLegDirection:
      description: >-
        Whether the leg brings money to the LP account before the trade, or
        takes

        the trade's output away from it.


        New values may be added; treat unknown values as other.
      enum:
        - pay_in
        - payout
      type: string
      x-extensible-enum: true
    TradeLegFinality:
      description: >-
        A settled payout's finality, from its return watch and any recorded
        payout-return review.


        New values may be added; treat unknown values as other.
      enum:
        - final
        - returnable
        - returnedAfterSettlement
      type: string
      x-extensible-enum: true
    OwnBankVerification:
      properties:
        credit:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OwnBankVerifiedCredit'
        lastGoodReadAt:
          format: date-time
          type:
            - string
            - 'null'
        matchedBy:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OwnBankVerificationMatchedBy'
        reason:
          type:
            - string
            - 'null'
        reviewItemId:
          type:
            - string
            - 'null'
        source:
          $ref: '#/components/schemas/OwnBankVerificationSource'
        state:
          $ref: '#/components/schemas/OwnBankVerificationState'
      required:
        - state
        - source
      type: object
    TradeLegPayoutApproval:
      description: >-
        Treasury's existing Run approval for a bank payout. No funds are
        reserved

        while this approval is pending; release rechecks balances and terms.
      properties:
        approvalRequestId:
          format: uuid
          type:
            - string
            - 'null'
        approvalsRequired:
          format: int32
          minimum: 0
          type: integer
        approverGroup:
          type:
            - string
            - 'null'
        approverGroupName:
          type:
            - string
            - 'null'
        approverNames:
          items:
            type: string
          type: array
        runId:
          format: uuid
          type:
            - string
            - 'null'
      required:
        - approvalsRequired
        - approverNames
      type: object
    TradeLegPayoutBreakdown:
      description: >-
        What a payout takes from the venue account, its fee and what arrives, as
        exact decimals in the leg's asset. The venue sends gross minus fee. With
        on-top charging the account loses gross and the bank receives the amount
        sent; with deducted charging the bank receives one fee less; when
        unverified, withdrawn is the maximum debit and receivedMin to
        receivedMax bounds the receipt.
      properties:
        basis:
          $ref: '#/components/schemas/TradeLegPayoutBreakdownBasis'
          description: The withdrawal record these amounts come from.
        charging:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/FiatFeeCharging'
              description: >-
                How the venue charges a bank payout's fee, as its rail declares
                it

                (`deducted`, `on_top`, `unverified`). Absent on a wallet payout,
                whose fee

                is Confirm's bound rather than a declared rail fee.
        fee:
          description: |-
            The most fee: a bank payout's declared payout fee (frozen by the
            withdrawal review once there is one), else Confirm's fee bound.
          type: string
        receivedMax:
          description: The most that arrives.
          type: string
        receivedMin:
          description: The least that arrives.
          type: string
        withdrawn:
          description: 'The most leaving the venue account: the confirmed trade''s output.'
          type: string
      required:
        - withdrawn
        - fee
        - receivedMin
        - receivedMax
        - basis
      type: object
    FiatRail:
      type: string
    FiatRailOptionKind:
      description: |-
        A way of using a rail. Every rail has a `standard` option; VALR's fast
        payout (Blitz over RTC) is the EFT rail's `fast` option.

        New values may be added; treat unknown values as other.
      enum:
        - standard
        - fast
      type: string
      x-extensible-enum: true
    PayoutRailReference:
      description: New values may be added; treat unknown values as other.
      oneOf:
        - properties:
            state:
              description: New values may be added; treat unknown values as other.
              enum:
                - not_reported_yet
              type: string
              x-extensible-enum: true
          required:
            - state
          type: object
        - properties:
            kind:
              $ref: '#/components/schemas/PayoutRailReferenceKind'
            state:
              description: New values may be added; treat unknown values as other.
              enum:
                - reported
              type: string
              x-extensible-enum: true
            value:
              type: string
          required:
            - kind
            - value
            - state
          type: object
      x-extensible-enum: true
    PayoutRecipientConfirmation:
      properties:
        confirmationId:
          format: uuid
          type: string
        confirmedAt:
          format: date-time
          type: string
        confirmedBy:
          description: '`user:<id>` or `key:<id>`; immutable authenticated identity.'
          type: string
        confirmedByName:
          description: A safe name captured at confirmation, never an email address.
          type: string
        legId:
          format: uuid
          type: string
      required:
        - confirmationId
        - legId
        - confirmedBy
        - confirmedByName
        - confirmedAt
      type: object
    TradeLegReturnedAfterSettlement:
      description: |-
        A return the provider reported after the payout
        leg settled, read from its entry-coupled PayoutReturned review item.
      properties:
        detectedAt:
          description: When TetraFi's own status read first saw the return.
          format: date-time
          type: string
        reviewItemId:
          description: The PayoutReturned review item support works the return from.
          type: string
      required:
        - reviewItemId
        - detectedAt
      type: object
    TradeLegReturnedTo:
      description: |-
        Where a returned leg's funds remain, according to its dispatch backend.

        New values may be added; treat unknown values as other.
      enum:
        - lpAccount
        - providerBalance
      type: string
      x-extensible-enum: true
    TradeLegReviewReason:
      description: |-
        The reason a leg requires review.

        New values may be added; treat unknown values as other.
      enum:
        - uncertain_send
        - ambiguous_event
        - expected_arrival_exceeded
        - provider_failed_after_send
        - trade_fill_requires_review
        - late_funds_held
        - late_funds_worse_rate
        - amount_mismatch
      type: string
      x-extensible-enum: true
    TradeLegRail:
      description: |-
        How the leg settles: a bank rail or a chain transfer.

        New values may be added; treat unknown values as other.
      enum:
        - bank
        - chain
      type: string
      x-extensible-enum: true
    TradeLegState:
      description: |-
        The leg's state. The last five are terminal.

        New values may be added; treat unknown values as other.
      enum:
        - planned
        - awaiting_funds
        - funds_received
        - price_beyond_bound
        - expired_unfunded
        - late_funds
        - awaiting_approval
        - dispatching
        - uncertain
        - in_transit
        - held_by_provider
        - refunding
        - manual_review
        - settled
        - returned
        - refunded
        - cancelled
        - refused
      type: string
      x-extensible-enum: true
    RepricedSide:
      description: >-
        Which side of a leg a re-price compares. A StableFX leg re-quotes to the
        exact output

        and bounds the INPUT it spends; RFQ and solver legs bound the OUTPUT
        they deliver.


        New values may be added; treat unknown values as other.
      enum:
        - input
        - output
      type: string
      x-extensible-enum: true
    CaipNamespace:
      description: |-
        CAIP namespace encoded in the EIP-7930 `chainType` field.

        New values may be added; treat unknown values as other.
      enum:
        - eip155
        - solana
        - cosmos
      type: string
      x-extensible-enum: true
    PreflightMessageEncoding:
      description: |-
        Encoding of the exact bytes presented to a non-EVM wallet.

        New values may be added; treat unknown values as other.
      enum:
        - base64
      type: string
      x-extensible-enum: true
    PreflightSourceAuthorizationScheme:
      description: |-
        Scheme carried by a typed non-EVM source-authorization action.

        New values may be added; treat unknown values as other.
      enum:
        - svmSourcePermit
        - svmOrder
      type: string
      x-extensible-enum: true
    WalletAuthorizationKind:
      description: New values may be added; treat unknown values as other.
      enum:
        - turnkeyOwnerProof
        - privyAuthorization
      type: string
      x-extensible-enum: true
    WalletInfraProvider:
      description: |-
        Wallet-infrastructure providers selectable by a workspace.

        New values may be added; treat unknown values as other.
      enum:
        - privy
        - turnkey
        - lit
      type: string
      x-extensible-enum: true
    ReportingInstitutionCoverage:
      properties:
        name:
          type: string
        status:
          $ref: '#/components/schemas/ReportingConnectionStatus'
        workspaceId:
          type:
            - string
            - 'null'
      required:
        - name
        - status
      type: object
    FirstLeg:
      description: New values may be added; treat unknown values as other.
      enum:
        - taker
        - maker
      type: string
      x-extensible-enum: true
    DayBasis:
      description: |-
        A settlement schedule's day basis.

        New values may be added; treat unknown values as other.
      enum:
        - calendarDays
        - businessDays
      type: string
      x-extensible-enum: true
    AcePolicyGate:
      description: >-
        How the ACE engine treated the call at the moment a policy run
        completed.


        `PolicyEngine.run` emits the SAME `PolicyRunComplete`, with the same

        fields, whether (a) the policy chain was EMPTY and the target default

        allowed, (b) a policy returned `Allowed`, or (c) every policy returned

        `Continue` and the default allowed. So the event proves the target was

        attached, `run` was called, and the call was not rejected — it does NOT

        prove that any policy evaluated anything. Without this field the three

        collapse onto one "a policy run exists" label, and a fail-open gate
        reads

        as screened.


        The vocabulary is deliberately the one the router provisioner already
        uses

        for the same question (`workspace_routers::onchain::AceEntryGate`),
        minus

        `Refused`: a refused call reverts and emits no `PolicyRunComplete`, so
        it

        is structurally impossible for a RECORDED run and is not representable

        here by construction.


        New values may be added; treat unknown values as other.
      oneOf:
        - description: >-
            This many policies ran ahead of an allowing default. Always > 0:
            zero

            policies is reported as `open`, which is a different fact.
          properties:
            gate:
              description: New values may be added; treat unknown values as other.
              enum:
                - enforced
              type: string
              x-extensible-enum: true
            policies:
              format: int32
              minimum: 0
              type: integer
          required:
            - policies
            - gate
          type: object
        - description: >-
            The engine's policy chain for this `(target, selector)` was EMPTY at

            the run's block and the run completed, so the default allowed it:
            the

            call passed UNCHECKED. Never counts as coverage.
          properties:
            gate:
              description: New values may be added; treat unknown values as other.
              enum:
                - open
              type: string
              x-extensible-enum: true
          required:
            - gate
          type: object
        - description: >-
            The posture could not be established. Its own class on purpose — it
            is

            neither evidence of screening nor evidence of its absence, and
            folding

            it either way states something the ledger does not know.
          properties:
            gate:
              description: New values may be added; treat unknown values as other.
              enum:
                - unknown
              type: string
              x-extensible-enum: true
            reason:
              type: string
          required:
            - reason
            - gate
          type: object
      x-extensible-enum: true
    OrderGrantRefusal:
      description: New values may be added; treat unknown values as other.
      enum:
        - GRANT_NOT_FOUND
        - GRANT_NOT_ACTIVE
        - GRANT_EXPIRED
        - GRANT_REVOKED
        - GRANT_USED
        - ORDER_MISMATCH
        - LEG_MISMATCH
        - ENVELOPE_CHAIN_MISMATCH
        - ENVELOPE_VERIFYING_CONTRACT_MISMATCH
        - ENVELOPE_PRIMARY_TYPE_MISMATCH
        - ENVELOPE_SPENDER_MISMATCH
        - ENVELOPE_TOKEN_MISMATCH
        - ENVELOPE_AMOUNT_EXCEEDED
        - ENVELOPE_RECIPIENT_MISMATCH
        - ENVELOPE_FUNDER_MISMATCH
        - ENVELOPE_DEADLINE_EXCEEDED
        - PROVIDER_REFUSED
        - PROVIDER_UNCERTAIN
      type: string
      x-extensible-enum: true
    ContinuationDelegationStatus:
      description: >-
        Where a delegate grant for this leg's signature stands. Absent when no
        order-scoped bounded delegate (a limited grant the owners approved)
        exists. This observation never grants authority or replaces the grant
        resource.


        New values may be added; treat unknown values as other.
      enum:
        - preparing
        - awaitingApproval
        - installing
        - installed
        - signing
        - signed
        - refused
        - expired
        - revoked
      type: string
      x-extensible-enum: true
    TradeLegDestinationKind:
      description: |-
        What a payout leg delivers to, in the binding's endpoint vocabulary.

        New values may be added; treat unknown values as other.
      enum:
        - wallet
        - bankDestination
      type: string
      x-extensible-enum: true
    OwnBankVerifiedCredit:
      properties:
        amount:
          description: Exact decimal text, never a floating-point approximation.
          type: string
        creditedAt:
          format: date-time
          type: string
        currency:
          type: string
        referenceMasked:
          type:
            - string
            - 'null'
      required:
        - amount
        - currency
        - creditedAt
      type: object
    OwnBankVerificationMatchedBy:
      description: New values may be added; treat unknown values as other.
      enum:
        - referenceAndAmount
        - amountAndWindow
      type: string
      x-extensible-enum: true
    OwnBankVerificationSource:
      description: New values may be added; treat unknown values as other.
      enum:
        - revolutBusiness
      type: string
      x-extensible-enum: true
    OwnBankVerificationState:
      description: New values may be added; treat unknown values as other.
      enum:
        - verified
        - notSeen
        - unavailable
        - disagreement
      type: string
      x-extensible-enum: true
    TradeLegPayoutBreakdownBasis:
      description: |-
        Which record a payout breakdown comes from.

        New values may be added; treat unknown values as other.
      enum:
        - consent
        - reviewed
      type: string
      x-extensible-enum: true
    FiatFeeCharging:
      description: >-
        How a scheduled bank fee is charged. unverified remains conservative
        until a real movement measures it; the recipient can only receive more
        than the quoted minimum.


        New values may be added; treat unknown values as other.
      enum:
        - deducted
        - on_top
        - unverified
      type: string
      x-extensible-enum: true
    PayoutRailReferenceKind:
      description: New values may be added; treat unknown values as other.
      enum:
        - swift_uetr
        - sepa_end_to_end_id
        - faster_payments_reference
        - bank_rail_reference
      type: string
      x-extensible-enum: true
    ReportingConnectionStatus:
      description: New values may be added; treat unknown values as other.
      enum:
        - connected
        - notConnected
        - unavailable
        - unknown
      type: string
      x-extensible-enum: true
  securitySchemes:
    api_key:
      description: >-
        Send the API key in `X-API-Key`.


        **Request signing.** A key with signing enabled (`POST
        /api/v1/workspaces/{workspaceId}/users/me/api-keys/{keyId}/signing`,
        which returns the signing secret once) must also sign every request:


        - `X-Timestamp`: the current Unix time in seconds, within 300 seconds of
        the server clock.

        - `X-Signature`: lower-case hex HMAC-SHA256 of the canonical string,
        keyed with the signing secret's 32 bytes (the secret is 64 hex
        characters; decode it first).


        The canonical string is four lines joined by `\n`, with no trailing
        newline: the `X-Timestamp` value, the upper-case method, the path with
        its query exactly as sent (`/api/v1/orders?limit=1`), and the lower-case
        hex SHA-256 of the exact body bytes (the SHA-256 of an empty body when
        there is none).


        A write's signature (POST, PUT, PATCH, DELETE) is accepted once: sending
        the same signed write again is refused, so a retry signs again. A read
        (GET, HEAD) changes nothing, so an identical signed read inside the
        window is admitted again and polling needs no nonce.


        A signing refusal is a 401 `AUTH_REQUIRED` whose `details.reason` names
        the cause: `SIGNATURE_REQUIRED` (a header is missing),
        `SIGNATURE_INVALID` (a malformed header or a wrong signature),
        `TIMESTAMP_OUT_OF_RANGE` or `SIGNATURE_REPLAYED`.
      in: header
      name: X-API-Key
      type: apiKey
      x-request-signing:
        algorithm: HMAC-SHA256
        canonicalRequest:
          - timestamp
          - method
          - pathWithQuery
          - bodySha256Hex
        canonicalSeparator: |+

        oneTimeMethods:
          - POST
          - PUT
          - PATCH
          - DELETE
        refusal:
          error: AUTH_REQUIRED
          reasons:
            - SIGNATURE_REQUIRED
            - SIGNATURE_INVALID
            - TIMESTAMP_OUT_OF_RANGE
            - SIGNATURE_REPLAYED
          status: 401
        secretEncoding: hex
        signatureEncoding: hex-lower
        signatureHeader: X-Signature
        timestampHeader: X-Timestamp
        timestampWindowSeconds: 300
    bearer_auth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.