{
  "openapi": "3.1.0",
  "info": {
    "title": "Edel Markets API",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "/",
      "description": "Current API origin"
    }
  ],
  "paths": {
    "/v2/perps/markets": {
      "get": {
        "operationId": "v2FetchMarketsPerps",
        "summary": "Fetch markets (perps)",
        "description": "Returns the market catalogue in the unified market format. The quote spellings USD, USDC, USDCx and USD.E display as USDCx, whatever the case. Legacy quote spellings still resolve. Settlement assets, market ids and native quoteId values stay unchanged; ambiguous symbols are omitted.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchMarkets"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2MarketsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/markets/{symbol}/stats": {
      "get": {
        "operationId": "v2FetchTickerAndFundingRatePerps",
        "summary": "Fetch a ticker and funding rate (perps)",
        "description": "For a perpetual symbol, returns the compatible Ticker and FundingRate fields. A spot symbol returns trade and book statistics, including measured base and quote volume. Its required markPrice and indexPrice placeholders are null and it has no funding rate.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchTicker",
          "fetchFundingRate"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [],
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2MarketStatsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/tickers": {
      "get": {
        "operationId": "v2FetchTickersPerps",
        "summary": "Fetch tickers (perps)",
        "description": "Returns the ticker of every tradable market in unified Tickers vocabulary, keyed by symbol, or of the named symbols only. A ticker carries the last, mark and index prices, the trailing 24-hour open, high, low, change, percentage and quote volume in the settlement asset, and the best bid and ask with their sizes, null on an empty side. For swaps, baseVolume is null because quote notional cannot determine it exactly. Spot tickers carry measured baseVolume from executed base quantities and omit derivative fields. info carries the market's stats snapshot and the Edel extensions basis and basisBps (mark minus index), openInterestAmount (contracts) and openInterestValue (settlement asset), fundingRate, nextFundingRate, nextFundingTimestamp, nextFundingDatetime and interval, open1h, change1h, percentage1h, open24h, change24h, percentage24h, open7d, change7d, percentage7d, tradeCount24h (count of executed trades in the trailing 24 hours), and sparkline7d, the last price of each UTC hour over the trailing 7 days, oldest first. A window with no candle answers null open, change and percentage, never zero. Each market's reads have a 4-second deadline: a market that misses it is still listed, with info.readState deadline_exceeded and every figure null, and the rest of the answer arrives. One complete answer is shared by every caller for up to 5 seconds, and the 7-day figures may lag by up to 60 seconds. One unknown symbol answers BadSymbol. Each client source is limited to 120 requests per minute; live prices stream on the realtime ticker channels.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchTickers"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [],
        "parameters": [
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated symbols. Omit it for every tradable market.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2TickersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/markets/{symbol}/candles": {
      "get": {
        "operationId": "v2FetchOhlcvPerps",
        "summary": "Fetch OHLCV (perps)",
        "description": "Translates timeframe, since, limit, optional series, and optional price parameters onto the existing candle query handler. Spot symbols select trade candles only. On the trade series, an interval with no trade after the first trade has a flat candle at the last trade price with volume 0. A flat candle has volume 0 and open = high = low = close. A trade candle always has volume above 0. It is computed at read time. Before the first trade a spot market answers an empty list, or, when it has a display listing price, flat candles at that price with volume 0 from the time the market opened; its ticker then has info.noTradesYet true. With price=mid (fetchOHLCV params { price: 'mid' }), serves our own order book mid series across every timeframe the trade route serves when candle_orderbook_mid is enabled: each 1m row is [t, midOpen, max(midOpen, midClose), min(midOpen, midClose), midClose, 0] and each higher timeframe row is [t, openMidOfFirstMinute, maxOfMinuteMids, minOfMinuteMids, closeMidOfLastMinute, 0] with minutes that have no stored mid left out of max and min (returns an empty list when the flag is off). Every 200 OK answer carries X-Edel-Candle-Price: mid or X-Edel-Candle-Price: trade; an unknown price value is refused with HTTP 400 invalid_request during query validation before the header is set. There is no provider history.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchOHLCV"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [],
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "timeframe",
            "in": "query",
            "required": false,
            "description": "Unified timeframe. Defaults to 1m.",
            "schema": {
              "type": "string",
              "enum": [
                "1m",
                "3m",
                "5m",
                "15m",
                "30m",
                "1h",
                "2h",
                "4h",
                "8h",
                "12h",
                "1d",
                "3d",
                "1w",
                "1M"
              ],
              "default": "1m"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Optional inclusive Unix timestamp in integer milliseconds.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of candles, from 1 to 100. Defaults to 100.",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "series",
            "in": "query",
            "required": false,
            "description": "Exchange-specific source series. Defaults to index. series=mark is declared but not served yet: HTTP 400 operation_not_available (NotSupported), retryable=false.",
            "schema": {
              "type": "string",
              "enum": [
                "trade",
                "index",
                "mark"
              ]
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "description": "Optional price series selector. Omit for the default trade (or perpetual index) series (response header X-Edel-Candle-Price: trade); send price=mid for the venue's order book mid series across all timeframes (response header X-Edel-Candle-Price: mid). Unknown values answer HTTP 400 invalid_request.",
            "schema": {
              "type": "string",
              "enum": [
                "mid"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2OhlcvResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/markets/{symbol}/trades": {
      "get": {
        "operationId": "v2FetchTradesPerps",
        "summary": "Fetch public trades (perps)",
        "description": "Returns one page of the market's public trade tape, newest trades first and in unified trade vocabulary ordered oldest first. A trade carries its price, amount, taker side and time, never an account or order identifier. Page older by sending the oldest trade's info.cursor as cursor. With since the page is the oldest limit trades at or after since, up to now, oldest first. Page newer by sending the newest trade's timestamp as since and its info.cursor as cursor: the page then holds only the trades after that trade, so trades of one millisecond are never skipped or repeated. The tape lags the matching engine by the fill projection's lag. Each client source is limited to 120 requests per minute.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchTrades"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [],
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Optional epoch milliseconds: the page holds the oldest trades at or after since, oldest first. A blank value or a value that is not a nonnegative integer answers HTTP 400 invalid_request (BadRequest).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum trades, from 1 to 100. Defaults to 50.",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Optional info.cursor of a trade already read. Without since: the cursor of the oldest trade read, and the page holds only older trades. With since: the cursor of the newest trade read, sent with that trade's timestamp as since, and the page holds only the trades after it.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2PublicTradesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/markets/{symbol}/book": {
      "get": {
        "operationId": "v2FetchOrderBookPerps",
        "summary": "Fetch an order book (perps)",
        "description": "Returns the order-book snapshot as price and amount tuples, bounded by limit.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchOrderBook"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [],
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum levels per side, from 1 to 500. Defaults to 100.",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 500,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2OrderBookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/trading-fees": {
      "get": {
        "operationId": "v2FetchTradingFeesPerps",
        "summary": "Fetch market trading fees (perps)",
        "description": "Returns maker and taker rates as fractions, keyed by spot or perpetual symbol. Spot fees use the quote asset and are independent of account tiers. When spot is disabled, unfiltered results omit spot symbols and requests naming a spot symbol are refused.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchTradingFees",
          "fetchTradingFee"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [],
        "parameters": [
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated symbols.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2VenueTradingFees"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/funding-rates": {
      "get": {
        "operationId": "v2FetchFundingRatesPerps",
        "summary": "Fetch funding rates (perps)",
        "description": "Returns the funding state of 1 to 32 named markets in unified FundingRates vocabulary, keyed by symbol. Symbols resolve against the markets' reference data in memory, and each distinct market is read from the matching engine's funding state, the same fields fetchFundingRate returns; no database is read. At most 8 reads run at once under one 4-second request deadline, past which the request answers HTTP 503 ExchangeNotAvailable and nothing partial. There is no all-markets form: an absent symbols list answers HTTP 400 BadRequest, and one unknown symbol answers BadSymbol with nothing read. Each client source is limited to 30 requests per minute.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchFundingRates"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [],
        "parameters": [
          {
            "name": "symbols",
            "in": "query",
            "required": true,
            "description": "Comma-separated symbols, from 1 to 32 after duplicates are removed.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2FundingRatesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/accounts/{accountId}/positions": {
      "get": {
        "operationId": "v2FetchPositionsPerps",
        "summary": "Fetch positions (perps)",
        "description": "Returns the existing live position snapshot in unified position vocabulary, optionally filtered by comma-separated symbols. Margin is held per account (cross margin): all open positions share one pool of account equity, so no position has margin of its own. Each row's leverage follows the definition on that field. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchPositions"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated perpetual symbols.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2PositionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/order": {
      "post": {
        "operationId": "v2CreateOrderPerps",
        "summary": "Create one order (perps)",
        "description": "Translates one unified LIMIT or MARKET order into the existing single-order handler. Known request fields are combined with the thin accepted-order response without inventing fill data. timeInForce may be GTC or PO on a limit order (GTC rests the order, PO places it post-only), IOC or FOK on a spot limit order (IOC fills at the limit price or better at once and cancels the rest; FOK fills 100% immediately or cancels with 0 filled and never rests; a perpetual limit IOC answers limit_ioc_not_served_on_perps and a perpetual limit FOK answers limit_fok_not_served_on_perps) and IOC on a market order. PO with postOnly false, IOC with postOnly true (ioc_post_only_conflict), IOC with icebergQty (ioc_iceberg_conflict), FOK with postOnly true (fok_post_only_conflict) and FOK with icebergQty (fok_iceberg_conflict) are refused with HTTP 400 before placement. takeProfitPrice and stopLossPrice follow the autoClose rules of POST /v1/orders, including the minimum distance a market order's take profit keeps from the mark. A spot place, cancel or edit the engine committed answers from the engine record at once: it never waits for the order's projected row, so it answers the same while the order projector is behind. The answer always carries the engine's status, filled and remaining, reduceOnly: false and info.priceAtoms (the limit price atoms, null for a market order). A create or edit whose own command filled the order answers cost, average and lastTradeTimestamp from the fills the engine's committed reply names. When the order has a fill whose cost the answer cannot read yet (an engine reply with no fill data, an idempotent replay, or fills before this command that are not stored yet), info.fillsPending is true: cost and average are absent (never guessed and never 0 for a filled order), fee is null and trades is empty. A later fetchOrder answers the engine's cost; it keeps the marker until every fill of the order is projected. The trades and the fee of a spot order are read from the fills read (fetchMyTrades) and the account fills stream; fetchOrder answers trades empty and fee null in every state. timestamp and datetime are the order's placement time when the engine record proves it, else null until fetchOrder. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "createOrder"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2CreateOrderRequest"
              },
              "example": {
                "symbol": "BTC/USDCx:USDCx",
                "type": "limit",
                "side": "buy",
                "amount": 0.001,
                "price": 65000,
                "params": {
                  "clientOrderId": "client-example-1",
                  "postOnly": false
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted for processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Order"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/orders": {
      "post": {
        "operationId": "v2CreateOrdersPerps",
        "summary": "Create orders (perps)",
        "description": "Translates 1 to 32 OrderRequest entries into the bounded order batch handler. It returns one ordered result per input; accepted siblings remain committed when another entry is refused. On spot markets, entries may be type limit (GTC, PO, IOC, or FOK) or type market (quantity-sized with optional timeInForce IOC, no price, keeping the market-order price protection band). On perpetual markets, entries are limit GTC or PO (limit IOC answers limit_ioc_not_served_on_perps, limit FOK answers limit_fok_not_served_on_perps, and market batch entries are refused with HTTP 400). PO with postOnly false, IOC with postOnly true (ioc_post_only_conflict), IOC with icebergQty (ioc_iceberg_conflict), FOK with postOnly true (fok_post_only_conflict), FOK with icebergQty (fok_iceberg_conflict), and market with price or non-IOC timeInForce are refused with HTTP 400 and no entry is placed. A spot place, cancel or edit the engine committed answers from the engine record at once: it never waits for the order's projected row, so it answers the same while the order projector is behind. The answer always carries the engine's status, filled and remaining, reduceOnly: false and info.priceAtoms (the limit price atoms, null for a market order). A create or edit whose own command filled the order answers cost, average and lastTradeTimestamp from the fills the engine's committed reply names. When the order has a fill whose cost the answer cannot read yet (an engine reply with no fill data, an idempotent replay, or fills before this command that are not stored yet), info.fillsPending is true: cost and average are absent (never guessed and never 0 for a filled order), fee is null and trades is empty. A later fetchOrder answers the engine's cost; it keeps the marker until every fill of the order is projected. The trades and the fee of a spot order are read from the fills read (fetchMyTrades) and the account fills stream; fetchOrder answers trades empty and fee null in every state. timestamp and datetime are the order's placement time when the engine record proves it, else null until fetchOrder. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "createOrders"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2CreateOrdersRequest"
              },
              "example": [
                {
                  "symbol": "BTC/USDCx:USDCx",
                  "type": "limit",
                  "side": "buy",
                  "amount": 0.001,
                  "price": 65000,
                  "params": {
                    "clientOrderId": "client-example-1",
                    "postOnly": false
                  }
                },
                {
                  "symbol": "BTC/USDCx:USDCx",
                  "type": "limit",
                  "side": "sell",
                  "amount": 0.001,
                  "price": 66000,
                  "params": {
                    "clientOrderId": "client-example-2",
                    "postOnly": false
                  }
                }
              ]
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted for processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2CreateOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/orders/{orderId}/cancel": {
      "post": {
        "operationId": "v2CancelOrderPerps",
        "summary": "Cancel one order (perps)",
        "description": "Translates cancelOrder onto the existing owner-authenticated single cancellation handler. The symbol is required to bind the exact market; unknown, foreign, wrong-market, filled, and terminal orders all return OrderNotFound. With params.twap true the id is a TWAP parent order (cancelOrder(id, symbol, { twap: true })): the parent ends as canceled and no more slices go out; a second cancel answers the same canceled order; an unknown, foreign, wrong-market, completed, expired or failed parent returns OrderNotFound. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "cancelOrder"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2CancelOrderRequest"
              },
              "example": {
                "symbol": "BTC/USDCx:USDCx"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted for processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Order"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/orders/cancel": {
      "post": {
        "operationId": "v2CancelOrdersPerps",
        "summary": "Cancel orders (perps)",
        "description": "Translates cancelOrders onto the existing bounded cancellation batch handler. It requires one explicit symbol, accepts 1 to 24 ids, preserves request order, and returns one indexed result per id without rolling back accepted siblings. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "cancelOrders"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2CancelOrdersRequest"
              },
              "example": {
                "ids": [
                  "{{orderId}}"
                ],
                "symbol": "BTC/USDCx:USDCx"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted for processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2CancelOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/orders/cancel-all": {
      "post": {
        "operationId": "v2CancelAllOrdersPerps",
        "summary": "Cancel every open order of one symbol (perps)",
        "description": "Translates cancelAllOrders for one required symbol; there is no account-wide form. It reads the account's open orders on that market once, up to 500. When more are open it answers HTTP 409 InvalidOrder (code command_rejected, not retryable) before cancelling anything; cancel them by id with cancelOrders instead. It then cancels each order through the single-order cancellation, oldest first, and returns one indexed row per order: canceled, refused on its own (for example OrderNotFound when it filled meanwhile), or attempted=false after the first operational failure or the 5-second time budget stopped the drain. Accepted cancellations stay committed. One Idempotency-Key never cancels one order twice; a retry reads the open set again, so it also cancels orders placed after the first attempt. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "cancelAllOrders"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2CancelAllOrdersRequest"
              },
              "example": {
                "symbol": "BTC/USDCx:USDCx"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted for processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2CancelAllOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/orders/{orderId}": {
      "get": {
        "operationId": "v2FetchOrderPerps",
        "summary": "Fetch an order (perps)",
        "description": "Returns one order in unified order vocabulary. The status, amount, filled and remaining are the matching engine's own record, in every state, partially filled included: filled + remaining = amount, and a canceled order keeps what filled and the remainder it canceled. timestamp and datetime are when the venue accepted the order and lastUpdateTimestamp is its last change (a fill, an amend or its cancellation). On a perpetual market the type, time in force, price and reduce-only flag come from the account's own order history row; on a spot market the side, type, price and post-only flag are the engine's committed order. Right after a change the venue's order history may not hold it yet: the route then waits up to half a second and answers HTTP 503 ExchangeNotAvailable, never an older value; that lasts as long as the order history is behind the matching engine (seconds while the engine writes a snapshot), and while it is stopped. An order with a fill answers average and lastTradeTimestamp (its latest fill). average is exact at the market's price scale, rounded half up: a spot order's engine-committed filled quote over filled, a perpetual order's fills (price times size summed) over filled; a perpetual order's cost is that exact notional. A spot order answers the engine's committed cost and its average in every state. lastTradeTimestamp, and a perpetual order's cost and average, wait until every fill of the order is projected (the fills add up to filled); until then the order answers info.fillsPending true with lastTradeTimestamp null, and cost and average absent where the engine committed none. The create, edit and cancel answers read no fills and never wait for the order's projected row. A spot create or edit whose own command filled the order answers cost, the exact average and lastTradeTimestamp (the time of those fills) from the engine's committed reply, which names each fill's price, size and quote, when those fills, with the order's earlier fills for an edit, add up to filled; no info.fillsPending then. Otherwise a spot answer with a fill answers lastTradeTimestamp null and info.fillsPending true, and its cost with the exact average only when that cost is readable at once (the order's row at the engine's sequence, or the stored fills adding up to filled); else cost and average are absent until fetchOrder. A perpetual answer carries no filled amount from the engine, so it omits average and lastTradeTimestamp (fetchOrder answers both). An order with no fill has no average and a null lastTradeTimestamp. A spot order's trades and fee are read from the fills read (fetchMyTrades) for that order: on fetchOrder its trades is empty and its fee is null. A canceled or filled order answers with the same fields for as long as the account's order history lists it; OrderNotFound means the venue never accepted an order with this id for the account, and another account's order answers the same for a trader key. A sub-account key receives 403 forbidden with reason account_not_linked when the order cannot be found on its sub-account. Fields no backing read publishes stay absent. Without the order history read the route answers HTTP 503 ExchangeNotAvailable. The id of a TWAP parent order answers the parent as a Order of type twap: status open while it is pending, running or paused, closed when completed, canceled, expired, or rejected when failed; filled, remaining, cost and average (child quote over child base) sum its children; info carries parentState, parentReason, slicesSent, slicesTotal and nextSliceAt. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchOrder"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Optional symbol checked against the returned order.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "accountId",
            "in": "query",
            "required": false,
            "description": "Optional trading account id to check against a sub-account key's scope.",
            "schema": {
              "type": "string",
              "pattern": "^[\\x21-\\x7e]{1,200}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Order"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/accounts/{accountId}/orders": {
      "get": {
        "operationId": "v2FetchOrdersPerps",
        "summary": "Fetch orders (perps)",
        "description": "Translates symbol, status, since, and limit over the existing cursor-paged order projection. status=closed covers filled, canceled, and replaced terminal rows. While orders.twap is on, the account's TWAP parent orders that match the same filters come first, newest first, as Orders of type twap; status=closed covers every finished parent (completed, canceled, expired, failed). The parents are added to the page of orders and never take a place from it: limit bounds the parents and the orders each on their own. An order with a fill answers average and lastTradeTimestamp (its latest fill). average is exact at the market's price scale, rounded half up: a spot order's engine-committed filled quote over filled, a perpetual order's fills (price times size summed) over filled; a perpetual order's cost is that exact notional. A spot order answers the engine's committed cost and its average in every state. lastTradeTimestamp, and a perpetual order's cost and average, wait until every fill of the order is projected (the fills add up to filled); until then the order answers info.fillsPending true with lastTradeTimestamp null, and cost and average absent where the engine committed none. The create, edit and cancel answers read no fills and never wait for the order's projected row. A spot create or edit whose own command filled the order answers cost, the exact average and lastTradeTimestamp (the time of those fills) from the engine's committed reply, which names each fill's price, size and quote, when those fills, with the order's earlier fills for an edit, add up to filled; no info.fillsPending then. Otherwise a spot answer with a fill answers lastTradeTimestamp null and info.fillsPending true, and its cost with the exact average only when that cost is readable at once (the order's row at the engine's sequence, or the stored fills adding up to filled); else cost and average are absent until fetchOrder. A perpetual answer carries no filled amount from the engine, so it omits average and lastTradeTimestamp (fetchOrder answers both). An order with no fill has no average and a null lastTradeTimestamp. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchOrders",
          "fetchClosedOrders"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Optional perpetual symbol.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Optional inclusive Unix timestamp in integer milliseconds.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum orders, from 1 to 100. Defaults to 50.",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Optional unified status. closed includes every terminal Edel status.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "closed",
                "canceled"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2OrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/accounts/{accountId}/orders/open": {
      "get": {
        "operationId": "v2FetchOpenOrdersPerps",
        "summary": "Fetch open orders (perps)",
        "description": "Returns the existing authoritative engine open set in unified order vocabulary and fails closed rather than hiding truncation. While orders.twap is on, the account's pending, running and paused TWAP parent orders come first, newest first, as Orders of type twap. The parents are added to the open orders and never take a place from them: limit bounds the parents and the orders each on their own. An order with a fill answers average and lastTradeTimestamp (its latest fill). average is exact at the market's price scale, rounded half up: a spot order's engine-committed filled quote over filled, a perpetual order's fills (price times size summed) over filled; a perpetual order's cost is that exact notional. A spot order answers the engine's committed cost and its average in every state. lastTradeTimestamp, and a perpetual order's cost and average, wait until every fill of the order is projected (the fills add up to filled); until then the order answers info.fillsPending true with lastTradeTimestamp null, and cost and average absent where the engine committed none. The create, edit and cancel answers read no fills and never wait for the order's projected row. A spot create or edit whose own command filled the order answers cost, the exact average and lastTradeTimestamp (the time of those fills) from the engine's committed reply, which names each fill's price, size and quote, when those fills, with the order's earlier fills for an edit, add up to filled; no info.fillsPending then. Otherwise a spot answer with a fill answers lastTradeTimestamp null and info.fillsPending true, and its cost with the exact average only when that cost is readable at once (the order's row at the engine's sequence, or the stored fills adding up to filled); else cost and average are absent until fetchOrder. A perpetual answer carries no filled amount from the engine, so it omits average and lastTradeTimestamp (fetchOrder answers both). An order with no fill has no average and a null lastTradeTimestamp. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchOpenOrders"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Optional perpetual symbol.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Optional inclusive Unix timestamp in integer milliseconds.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum open orders, from 1 to 100. Defaults to 50.",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2OrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/accounts/{accountId}/fills": {
      "get": {
        "operationId": "v2FetchMyTradesPerps",
        "summary": "Fetch private trades (perps)",
        "description": "Translates symbol, since, and limit over the existing cursor-paged account fill projection. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "fetchMyTrades"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Optional perpetual symbol.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Optional inclusive Unix timestamp in integer milliseconds.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum trades, from 1 to 100. Defaults to 50.",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2TradesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/orders/{orderId}/edit": {
      "post": {
        "operationId": "v2EditOrderPerps",
        "summary": "Edit one order (perps)",
        "description": "EditOrder(id, symbol, type, side, amount, price): amends an owned resting limit order in place through the same replace controller as POST /v1/orders/:orderId/replace. The order keeps its id, side, post-only and reduce-only settings; it takes the new price and the new TOTAL amount (what has filled plus what rests afterwards), which must be greater than the filled amount, else 409 invalid_quantity. type must be limit, and side must be the order's own side (400 invalid_request otherwise). The order keeps its place in the queue only when the price is unchanged and the amount goes down; any other change moves it to the back at the new price, and a price that crosses the book trades as a taker first unless the order is post-only (409 post_only_would_cross, order unchanged). The checks of a new order apply: order intake, market status, price and size limits, the minimum order notional and the margin or balance for any increase. Every refusal leaves the order unchanged. Unknown, terminal, filled, wrong-market and other-account ids all answer OrderNotFound (404 not_found). While the venue's replace switch is off the answer is 400 operation_not_available. Requires an Idempotency-Key; an exact replay answers the original response. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "editOrder"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2EditOrderRequest"
              },
              "example": {
                "symbol": "BTC/USDCx:USDCx",
                "type": "limit",
                "side": "buy",
                "amount": 0.002,
                "price": 64500
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted for processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2Order"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/perps/orders/edit": {
      "post": {
        "operationId": "v2EditOrdersPerps",
        "summary": "Edit orders (perps)",
        "description": "EditOrders(orders): 1 to 24 edits, each one editOrder (id, symbol, type, side, amount, price) through the same single replace as editOrder and POST /v1/orders/:orderId/replace, in request order. One row per edit: the edited order (same id, the new price and the new TOTAL amount) or that edit's own refusal, with the editOrder rules (unknown, terminal, filled, wrong-market and other-account ids are OrderNotFound; a side other than the order's own is invalid_request; an unknown symbol is BadSymbol). A refusal never stops the other edits; an operational failure (503) stops the batch and every edit after it answers attempted false. Accepted edits stay committed. A symbol of the other product anywhere in the batch refuses the whole batch with 400 market_product_mismatch before any edit. While the venue's replace switch is off every edit answers 400 operation_not_available. Requires an Idempotency-Key; each edit carries a key derived from it, so a retry replays each edit's original answer. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.",
        "tags": [
          "Perps"
        ],
        "x-unified-methods": [
          "editOrders"
        ],
        "x-edel-market-types": [
          "swap"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V2EditOrdersRequest"
              },
              "example": [
                {
                  "symbol": "BTC/USDCx:USDCx",
                  "type": "limit",
                  "side": "buy",
                  "amount": 0.002,
                  "price": 64500,
                  "id": "{{orderId}}"
                }
              ]
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted for processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2EditOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected by the existing venue contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the rate limit window that refused this request resets, rounded up. Retry after it.",
                "required": true,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Dependency unavailable or handler not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V2ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "partnerBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Description pending."
      },
      "organizationOwnerPartnerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Description pending."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "The authorization field takes the session bearer returned by sign-in, or an API key where the route allows keys. Paste the token itself into the authorization field. When invitation-only access is enabled, private operations require the account's sign-in email to be invited. Sign-in can complete without an invitation, but private HTTP, MCP and FIX operations refuse with access_not_allowlisted (HTTP 403): \"Private access is limited to invited accounts. Contact support to request access.\" Public market data remains available. Invitation changes apply to the next private operation, including existing FIX sessions. Do not retry until support confirms access."
      },
      "partnerSessionOrOrgKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Description pending."
      },
      "partnerSessionBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Description pending."
      }
    },
    "schemas": {
      "V2CancelAllOrdersRequest": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "minLength": 1
          },
          "params": {
            "type": "object",
            "properties": {
              "accountId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "The trading account. Required for an organization key (one of its organization's linked accounts); optional otherwise, and then it must be the caller's own account."
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "symbol"
        ],
        "additionalProperties": false
      },
      "V2CancelAllOrdersResponse": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. Canonical bot identifiers also allow the fixed bot-order/v1: prefix followed by an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "canceled"
                  ]
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string",
                      "enum": [
                        "external-order/v1"
                      ]
                    },
                    "postOnly": {
                      "type": "boolean"
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "IOC",
                        "FOK",
                        "GTD"
                      ]
                    },
                    "icebergQty": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "Visible base quantity of an iceberg limit order. The public book shows this quantity; the reserve covers the complete amount."
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell"
                      ],
                      "description": "The accepted order side, when recorded."
                    },
                    "orderType": {
                      "type": "string",
                      "enum": [
                        "limit",
                        "market"
                      ],
                      "description": "The accepted order type, when recorded."
                    },
                    "price": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The accepted limit price as a decimal string when recorded. Null for a recorded market order; absent when no order type or decimal limit price is available."
                    },
                    "priceAtoms": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+$",
                      "description": "The accepted limit price in price atoms when recorded. Null for a recorded market order; absent when the type or limit price is unavailable."
                    },
                    "quantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "The accepted original base quantity in quantity atoms, when recorded."
                    },
                    "filledQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "The filled base quantity in quantity atoms, when recorded. Absence does not mean zero; use account.fills keyed by orderId for execution updates."
                    },
                    "productType": {
                      "type": "string",
                      "enum": [
                        "spot"
                      ]
                    },
                    "lockAsset": {
                      "type": "string",
                      "minLength": 1
                    },
                    "lockedAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "remainingQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "createdAtEpochMs": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "When the venue accepted the order, in Unix epoch milliseconds: the venue clock of the command that placed it. For an order placed before the venue's order history begins (a history reset or a new history start), it is the first time the venue holds for the order: its earliest own command, else its last change, else the first venue record after it; the order was accepted no later than that."
                    },
                    "filledQuoteAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "lastFillAtEpochMs": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "orderId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "accountId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "partially_filled",
                        "filled",
                        "canceled",
                        "replaced"
                      ]
                    },
                    "lastSequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "idempotencyKey": {
                      "type": "string",
                      "minLength": 1
                    },
                    "cancelReason": {
                      "type": "string",
                      "enum": [
                        "margin_unbacked",
                        "risk_evidence_incomplete",
                        "market_session_closed",
                        "reduce_only_position_unavailable",
                        "expired",
                        "price_protection"
                      ],
                      "description": "Why the order closed. price_protection: a market order that is not reduce-only trades only inside a band around the mark price (1% on most markets, 3% on thin ones), and the part that found no liquidity inside the band was cancelled."
                    },
                    "quantity": {
                      "type": "string",
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The order's base quantity when recorded. Also returned when the order closed with part of it unfilled."
                    },
                    "filledQuantity": {
                      "type": "string",
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The base quantity that filled when recorded. Also returned when the order closed with part of it unfilled."
                    },
                    "createdJournalSequence": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "The journal sequence that created the order, when recorded. This is an ordinal, not a timestamp."
                    },
                    "updatedJournalSequence": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "The journal sequence of the latest lifecycle update, equal to lastSequence. This is an ordinal, not a timestamp."
                    },
                    "updatedAtEpochMs": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "When the order last changed (its acceptance, a fill, an amend or its cancellation), in Unix epoch milliseconds: the venue clock of the command that made that change, a maker's fill included. Equal to createdAtEpochMs until the first change. For a change the venue's order history does not hold (made before a history reset), it is the order's latest own command the venue holds, never earlier than createdAtEpochMs."
                    },
                    "clientOrderId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                      "description": "The clientOrderId the order was placed with, exactly as submitted; the venue uses it as the order id, so it equals orderId. Null when the order was placed without one (the venue derived its id) or by the venue itself (a liquidation, an auto-deleverage leg or a trigger)."
                    },
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "accepted": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "version",
                    "orderId",
                    "accountId",
                    "marketId",
                    "status",
                    "lastSequence",
                    "idempotencyKey",
                    "index",
                    "accepted"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "cost": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0,
                  "default": []
                },
                "fee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1
                    },
                    "cost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "currency",
                    "cost"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "const": null
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "featureFlag": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The feature flag that refused this request."
                    },
                    "orderOutcome": {
                      "type": "string",
                      "enum": [
                        "not_submitted",
                        "unknown"
                      ],
                      "description": "unknown means no complete authoritative answer is available; not_submitted is used only with positive evidence that nothing was sent."
                    },
                    "clientOrderIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      },
                      "description": "The original clientOrderIds to reconcile."
                    },
                    "reconciliation": {
                      "type": "string",
                      "minLength": 1,
                      "description": "An order-entry 503 may follow acceptance. Reconcile the original clientOrderId through account.orders (orderId is the clientOrderId) and account.fills, and take one bounded order snapshot after reconnect. A 404 alone does not prove absence of in-flight work. Never poll or automatically resubmit; keep the original clientOrderIds, request body and Idempotency-Key, never retry with a fresh identity."
                    },
                    "version": {
                      "type": "string",
                      "enum": [
                        "external-rest-error/v1"
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "promo_code_unknown",
                        "promo_code_expired",
                        "promo_code_exhausted",
                        "account_not_eligible",
                        "promo_code_already_redeemed",
                        "invalid_request",
                        "unauthorized",
                        "forbidden",
                        "not_found",
                        "idempotency_key_required",
                        "rate_limited",
                        "operation_not_available",
                        "feature_disabled",
                        "kyc_required",
                        "command_rejected",
                        "xreserve_bridge_not_ready",
                        "snapshot_unavailable",
                        "service_degraded",
                        "order_intake_stopped",
                        "account_intake_stopped",
                        "withdrawal_intake_stopped",
                        "deposit_intake_stopped",
                        "channel_disabled",
                        "access_blocked",
                        "access_not_allowlisted",
                        "canton_offline",
                        "dependency_unavailable",
                        "account_legacy_excluded",
                        "bot_fence_stale",
                        "api_key_already_rotated",
                        "passkey_registration_required",
                        "passkey_rejected",
                        "account_exists_sign_in",
                        "registration_in_progress_recover",
                        "malformed_command",
                        "malformed_order_command",
                        "unsupported_order_command",
                        "duplicate_order_command",
                        "idempotency_key_conflict",
                        "unknown_market",
                        "unknown_order",
                        "invalid_account",
                        "invalid_side",
                        "invalid_order_id",
                        "invalid_order_type",
                        "market_order_unavailable",
                        "invalid_price",
                        "invalid_quantity",
                        "invalid_leverage",
                        "invalid_slippage",
                        "market_halted",
                        "duplicate_order_id",
                        "market_not_open",
                        "market_session_closed",
                        "market_pre_close_cutoff",
                        "reduce_only_required",
                        "reduce_only_position_unavailable",
                        "self_trade_prevented",
                        "post_only_would_cross",
                        "max_matches_exceeded",
                        "insufficient_balance",
                        "reduce_only_not_supported",
                        "spot_disabled",
                        "iceberg_not_supported",
                        "invalid_iceberg_quantity",
                        "risk_reserve_unavailable",
                        "invalid_status_transition",
                        "sequencer_rejected",
                        "unknown_margin_account",
                        "invalid_order_size",
                        "withdrawals_blocked",
                        "liquidation_candidate",
                        "bad_debt",
                        "insufficient_margin",
                        "leverage_exceeds_market_max",
                        "reserve_id_conflict",
                        "unknown_reserve",
                        "mark_unavailable",
                        "insufficient_liquidity",
                        "invalid_preview_request",
                        "agents_spot_disabled",
                        "agents_perps_disabled",
                        "order_rejected_unmapped",
                        "order_notional_below_minimum",
                        "gtd_expire_time_in_past",
                        "listing_request_requester_not_owned",
                        "listing_request_requester_kind_unsupported",
                        "listing_request_pending_exists",
                        "listing_request_market_exists",
                        "listing_request_issuer_unknown",
                        "spot_quote_not_venue_settlement_asset",
                        "listing_request_asset_exists",
                        "listing_request_limits_out_of_range",
                        "listing_request_market_shape_invalid",
                        "listing_request_account_pending_limit",
                        "listing_requests_not_accepted",
                        "listing_request_logo_missing",
                        "listing_request_deposit_not_confirmed",
                        "listing_request_deposit_accept_pending",
                        "listing_request_deposit_closed",
                        "listing_request_logo_closed",
                        "organization_not_found",
                        "organization_permission_required",
                        "organization_role_required",
                        "partner_organization_required",
                        "organization_key_required",
                        "organization_key_malformed",
                        "organization_key_unknown",
                        "organization_key_revoked",
                        "organization_key_store_unavailable",
                        "organization_member_not_found",
                        "organization_member_role_fixed",
                        "organization_member_changed",
                        "organization_owner_protected",
                        "organization_last_owner",
                        "sub_account_key_scope_refused",
                        "sub_account_mother_not_configured",
                        "sub_account_mother_ambiguous",
                        "sub_account_parent_mismatch",
                        "sub_account_parent_not_linked",
                        "sub_account_parent_conflict",
                        "sub_account_parent_without_party",
                        "sub_account_limit_reached",
                        "sub_account_name_taken",
                        "sub_account_parent_linked_elsewhere",
                        "sub_account_not_found",
                        "sub_account_not_empty",
                        "sub_account_holds_positions",
                        "sub_account_holds_tokens",
                        "sub_account_exposure_unavailable",
                        "sub_account_external_transfer_refused",
                        "engine_account_capacity_exceeded",
                        "sub_account_transfer_pair_refused",
                        "sub_account_transfer_asset_refused",
                        "transfer_eligibility_insufficient",
                        "transfer_blocked",
                        "venue_halted",
                        "account_unavailable",
                        "recipient_not_found",
                        "self_transfer_not_allowed",
                        "recipient_closed",
                        "sender_restricted",
                        "internal_transfer_asset_refused",
                        "organization_funding_decimals_conflict",
                        "organization_funding_currency_reserved",
                        "organization_funding_currency_ambiguous",
                        "twap_duration_out_of_range",
                        "twap_size_below_minimum",
                        "twap_slice_below_lot",
                        "parent_order_limit_reached",
                        "market_product_mismatch",
                        "product_history_scan_bound",
                        "ioc_post_only_conflict",
                        "ioc_iceberg_conflict",
                        "limit_ioc_not_served_on_perps",
                        "fok_post_only_conflict",
                        "fok_iceberg_conflict",
                        "limit_fok_not_served_on_perps",
                        "gtd_expire_time_required",
                        "expire_time_not_allowed",
                        "limit_gtd_not_served_on_perps",
                        "insufficient_orderbook_liquidity",
                        "withdrawal_amount_below_fee",
                        "spot_convert_market_unavailable",
                        "spot_convert_invalid_lot_size",
                        "spot_convert_below_min_notional",
                        "spot_convert_sell_unfilled",
                        "spot_convert_squid_failed_usdcx_kept",
                        "swap_pair_not_found",
                        "swap_pair_unavailable",
                        "swap_invalid_amount",
                        "swap_insufficient_liquidity",
                        "swap_quote_not_found",
                        "swap_quote_expired",
                        "swap_quote_already_accepted",
                        "swap_order_not_found",
                        "swap_order_expired",
                        "swap_order_invalid_state",
                        "swap_allocation_ttl_too_short",
                        "swap_slippage_exceeded",
                        "swap_settlement_failed_unwound",
                        "swap_circuit_breaker_open",
                        "swap_idempotency_conflict",
                        "swap_invalid_integrator_fee",
                        "swap_service_unavailable"
                      ]
                    },
                    "safeMessage": {
                      "type": "string",
                      "minLength": 1
                    },
                    "retryable": {
                      "type": "boolean"
                    },
                    "recoveryActions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "none",
                          "retry_after",
                          "observe_status",
                          "refresh_snapshot",
                          "resubscribe_stream",
                          "wait_for_projector",
                          "wait_for_operator_recovery",
                          "contact_support",
                          "request_approval",
                          "rerun_dry_run",
                          "do_not_retry"
                        ]
                      },
                      "minItems": 1
                    },
                    "realtimeTicketFailure": {
                      "type": "string",
                      "enum": [
                        "invalid",
                        "replayed",
                        "replaced",
                        "expired",
                        "revoked",
                        "store_unavailable"
                      ]
                    },
                    "apiKeyRejection": {
                      "type": "string",
                      "enum": [
                        "malformed",
                        "unknown",
                        "expired",
                        "revoked",
                        "principal_unavailable",
                        "store_unavailable",
                        "scope_insufficient",
                        "passkey_required",
                        "environment_forbidden",
                        "principal_mismatch",
                        "bot_fence_invalid",
                        "bot_fence_stale",
                        "already_rotated"
                      ]
                    },
                    "agentRefusal": {
                      "type": "string",
                      "enum": [
                        "agents_not_admitted_in_environment",
                        "agent_mode_not_admitted",
                        "agent_limit_reached",
                        "agent_deployment_not_found",
                        "agent_deployment_transition_refused",
                        "agent_deployment_stopping",
                        "agent_deployment_deleting",
                        "agent_deployment_has_open_exposure",
                        "agent_position_close_unavailable",
                        "agent_position_close_outcome_unknown",
                        "agent_position_close_refused",
                        "agent_position_close_partial",
                        "agent_position_close_pause_pending",
                        "agent_balance_return_unavailable",
                        "agent_trading_disabled",
                        "strategy_source_invalid",
                        "market_book_missing",
                        "skill_kill_switch_engaged",
                        "skill_market_closed",
                        "skill_market_session_unknown",
                        "skill_reduce_only_drawdown",
                        "skill_reduce_only_daily_loss",
                        "skill_wallet_unknown",
                        "skill_averaging_down",
                        "skill_entry_price_unknown",
                        "skill_edge_below_costs",
                        "skill_price_unknown",
                        "skill_size_capped",
                        "skill_size_below_minimum",
                        "skill_liquidation_too_close",
                        "skill_margin_unknown",
                        "paper_intent_size",
                        "paper_intent_market_price",
                        "paper_intent_market_time_in_force",
                        "paper_intent_limit_price",
                        "paper_stop_not_simulated",
                        "market_not_listed",
                        "agent_deployment_account_missing",
                        "agent_deployment_funding_missing",
                        "agent_account_already_bound",
                        "market_selection_unavailable",
                        "market_selection_undecided",
                        "market_stream_refused",
                        "pine_author_unavailable",
                        "pine_draft_in_flight",
                        "pine_draft_rate_limited",
                        "backtest_window_invalid",
                        "backtest_initial_capital_invalid",
                        "backtest_candles_unavailable",
                        "backtest_simulation_refused",
                        "backtest_timed_out",
                        "backtest_capacity_exhausted",
                        "backtest_in_flight",
                        "backtest_rate_limited",
                        "model_not_admitted",
                        "model_consent_required",
                        "agent_account_not_found",
                        "agent_account_not_fundable",
                        "agent_test_funding_not_offered",
                        "agent_test_funding_amount_invalid",
                        "agent_test_funding_treasury_floor",
                        "agent_test_funding_daily_cap_reached",
                        "agent_test_funding_daily_capacity_reached",
                        "agent_test_funding_idempotency_conflict",
                        "agent_test_funding_in_flight",
                        "agent_test_funding_pending",
                        "agent_test_funding_released",
                        "agent_test_funding_outcome_unknown",
                        "agent_test_funding_balance_insufficient",
                        "agent_test_funding_balance_unavailable",
                        "agent_funding_owner_balance_only",
                        "agent_live_key_unavailable",
                        "agent_live_order_shape_unsupported",
                        "agent_live_order_too_large",
                        "order_notional_below_minimum",
                        "agent_live_equity_unavailable",
                        "agent_live_open_order_limit",
                        "agent_live_open_orders_unavailable",
                        "agent_live_order_rate_limit",
                        "agent_live_reduce_only",
                        "agent_live_funding_unavailable",
                        "agent_live_view_unavailable",
                        "agent_fees_unpaid",
                        "agent_live_idempotency_key_required",
                        "agent_account_owner_ineligible",
                        "agent_account_identity_pending",
                        "agent_live_idempotency_conflict",
                        "agent_venue_capacity_reached",
                        "agent_deposit_funding_pending",
                        "agent_funding_amount_invalid",
                        "agent_funding_owner_party_missing",
                        "agent_funding_idempotency_conflict",
                        "agent_funding_not_found",
                        "agent_funding_expired",
                        "owner_signature_invalid",
                        "transfer_eligibility_insufficient",
                        "transfer_blocked",
                        "venue_halted",
                        "account_unavailable",
                        "account_transfer_unavailable",
                        "engine_view_unavailable",
                        "account_transfer_not_enabled",
                        "account_transfer_outcome_unknown",
                        "agent_fill_not_found",
                        "strategy_order_id_invalid",
                        "agent_live_venue_unavailable"
                      ]
                    },
                    "rejectionGuard": {
                      "type": "string",
                      "enum": [
                        "custodial_signer_environment_not_service_held",
                        "custodial_signer_owner_approval_missing",
                        "custodial_signer_kind_not_allowed",
                        "custodial_signer_prepared_transaction_refused",
                        "custodial_signer_not_service_held",
                        "custodial_signer_binding_mismatch",
                        "custodial_signer_signature_invalid",
                        "custodial_signer_deposit_over_cap",
                        "custodial_signer_payout_not_consented",
                        "custodial_signer_signature_outcome_unknown",
                        "access_not_allowlisted",
                        "amount_atoms_invalid",
                        "command_act_as_invalid",
                        "command_field_required",
                        "command_value_missing",
                        "completion_synchronizer_mismatch",
                        "deposit_field_required",
                        "deposit_integer_invalid",
                        "deposit_timestamp_invalid",
                        "hashing_scheme_unspecified",
                        "ledger_node_id_invalid",
                        "ledger_offset_invalid",
                        "rejection_completion_status",
                        "signature_failure_reason_invalid",
                        "signature_field_hex",
                        "signature_field_required",
                        "submission_id_mismatch",
                        "successful_completion_evidence",
                        "consumed_replay_evidence",
                        "delegated_signing_key_binding",
                        "deposit_asset_unsupported",
                        "deposit_amount_invalid",
                        "deposit_amount_rail_unsupported",
                        "deposit_amount_scale_exceeded",
                        "conversion_holding_unknown",
                        "conversion_amount_mismatch",
                        "conversion_step_not_due",
                        "deposit_missing",
                        "deposit_owner_binding",
                        "deposit_scope",
                        "dfns_confirmation_environment",
                        "funding_intent",
                        "funding_intent_advance",
                        "funding_intent_already_bound",
                        "funding_intent_cancelled",
                        "funding_intent_consumed_without_deposit",
                        "funding_intent_missing",
                        "intent_asset_unsupported",
                        "intent_owner_binding",
                        "local_confirmation_environment",
                        "owner_intent_scope",
                        "owner_kind_unsupported",
                        "arrival_deposit_delegated_only",
                        "planned_command_identities",
                        "request_owner_binding",
                        "local_authority_party_missing",
                        "local_confirmation_deposit_status",
                        "local_operator_replay_mismatch",
                        "local_recovery_step_mismatch",
                        "local_signer_failed",
                        "local_signing_key_mismatch",
                        "local_wallet_binding",
                        "operator_step_expected",
                        "owner_step_expected",
                        "owner_submission_command_binding",
                        "planned_command_missing",
                        "planned_command_not_unique",
                        "post_offer_step_expected",
                        "reconciliation_signature_scope",
                        "signature_completion_action",
                        "signature_hex_missing",
                        "signing_step_ahead_of_deposit",
                        "treasury_execution_restore",
                        "treasury_offer_contract_missing",
                        "unknown_command_candidates",
                        "completion_read_refused",
                        "completion_correlation",
                        "completion_not_unique",
                        "completion_transaction_correlation",
                        "interactive_act_as_missing",
                        "interactive_transaction_correlation",
                        "reconcile_binding_mismatch",
                        "rejected_completion_has_update",
                        "standard_submission_correlation",
                        "standard_submission_response_invalid",
                        "successful_completion_update_missing",
                        "unrecoverable_command_evidence",
                        "executed_evidence_correlation",
                        "executed_evidence_replay",
                        "executed_evidence_rows",
                        "executed_evidence_signature_status",
                        "execute_permit_rows",
                        "execute_permit_signature_status",
                        "ledger_rejection_correlation",
                        "ledger_rejection_replay",
                        "ledger_rejection_rows",
                        "ledger_rejection_signature_status",
                        "preparation_lock_busy",
                        "reconciliation_signature_state",
                        "signature_identity_binding",
                        "signature_identity_missing",
                        "signature_permitted_command",
                        "signature_preparable_state",
                        "signature_preparation_replay",
                        "signature_record_identity",
                        "signature_record_missing",
                        "signature_record_shape",
                        "signature_replay",
                        "signature_row_count",
                        "signature_scope_environment",
                        "signature_scope_fingerprint",
                        "signature_session_consistency",
                        "canton_command_identity",
                        "command_completion_evidence",
                        "command_confirm_rows",
                        "command_confirm_state",
                        "command_evidence_replay",
                        "command_permit_rows",
                        "command_permit_state",
                        "command_predecessors_unconfirmed",
                        "owner_signature_session_open",
                        "command_release_evidence",
                        "command_release_replay",
                        "command_release_rows",
                        "command_release_state",
                        "signature_restart_state",
                        "existing_receipt_replay",
                        "existing_receipt_rows",
                        "existing_receipt_state",
                        "local_replay_command_state",
                        "local_replay_fence_rows",
                        "local_replay_fence_state",
                        "local_replay_step",
                        "persisted_permit_mismatch",
                        "treasury_offer_command_identity",
                        "treasury_offer_confirm_rows",
                        "treasury_offer_confirm_state",
                        "treasury_offer_evidence_replay",
                        "treasury_offer_permit_rows",
                        "treasury_offer_permit_state",
                        "treasury_offer_reject_rows",
                        "treasury_offer_reject_state",
                        "treasury_offer_rejection_replay",
                        "treasury_offer_submission_id",
                        "treasury_input_amount_mismatch",
                        "treasury_input_release_rows",
                        "treasury_input_release_state",
                        "treasury_input_reservation_mismatch",
                        "treasury_input_reservation_rows",
                        "treasury_input_reservation_state"
                      ]
                    },
                    "withdrawalFailure": {
                      "type": "string",
                      "enum": [
                        "feature_disabled",
                        "spot_disabled",
                        "asset_withdraw_disabled",
                        "backing_alarm_active",
                        "holding_read_unavailable",
                        "asset_registry_stale",
                        "insufficient_balance",
                        "withdrawal_hold_stale",
                        "withdrawal_amount_below_fee",
                        "withdrawal_fee_quote_unavailable",
                        "withdrawal_destination_not_owned",
                        "withdrawal_owner_unavailable",
                        "withdrawal_unavailable",
                        "withdrawal_idempotency_conflict",
                        "requested",
                        "margin_reserved",
                        "authorized",
                        "submitted",
                        "settled",
                        "rejected",
                        "expired",
                        "failed",
                        "invalid_transition",
                        "authorization_setup_failed",
                        "margin_blocked",
                        "co_sign_incomplete",
                        "co_sign_self_approval",
                        "ttl_expired",
                        "canton_submission_failed",
                        "withdrawal_intake_stopped",
                        "withdrawal_payout_prepare_failed",
                        "withdrawal_payout_dfns_signature_failed",
                        "withdrawal_payout_canton_submit_refused",
                        "withdrawal_payout_ledger_time_expired",
                        "asset_unsupported",
                        "withdrawal_amount_invalid",
                        "withdrawal_amount_scale_exceeded",
                        "withdrawal_authorization_binding_mismatch",
                        "withdrawal_capability_unavailable",
                        "withdrawal_checkpoint_unavailable",
                        "withdrawal_not_cancellable",
                        "withdrawal_not_found",
                        "withdrawal_operators_missing",
                        "withdrawal_operators_not_distinct",
                        "withdrawal_owner_party_invalid",
                        "withdrawal_request_invalid",
                        "withdrawal_request_ended",
                        "withdrawal_reservation_release_failed",
                        "withdrawal_submission_unavailable",
                        "withdrawal_enqueue_failed",
                        "withdrawal_publish_failed"
                      ]
                    },
                    "feeShareAcceptRefusal": {
                      "type": "string",
                      "enum": [
                        "challenge_missing",
                        "challenge_expired",
                        "challenge_mismatch",
                        "payee_not_owner",
                        "offer_already_accepted",
                        "offer_expired"
                      ]
                    },
                    "dependency": {
                      "type": "string",
                      "enum": [
                        "dfns",
                        "engine",
                        "squid",
                        "ethereum_rpc"
                      ]
                    },
                    "squidRouteRefusal": {
                      "type": "string",
                      "enum": [
                        "route_not_found",
                        "route_expired",
                        "route_bound_to_other_transaction",
                        "transaction_bound_to_other_route",
                        "source_transaction_not_found",
                        "source_transaction_unverified",
                        "source_token_unsupported",
                        "unlimited_allowance_refused",
                        "provider_route_refused",
                        "slippage_exceeded",
                        "widget_hook_refused",
                        "widget_destination_refused",
                        "widget_recipient_preapproval_required",
                        "account_request_bound",
                        "global_request_bound"
                      ]
                    },
                    "positionSnapshotRefusal": {
                      "type": "string",
                      "enum": [
                        "position_projection_behind_live"
                      ]
                    },
                    "setupKeyRefusal": {
                      "type": "string",
                      "enum": [
                        "setup_key_refused"
                      ]
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "group": {
                          "type": "string",
                          "enum": [
                            "sub_accounts",
                            "trading_spot",
                            "trading_perps",
                            "listings_deposits",
                            "members_keys",
                            "mother_account"
                          ]
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "read",
                            "write"
                          ]
                        }
                      },
                      "required": [
                        "group",
                        "level"
                      ],
                      "additionalProperties": false
                    },
                    "occurredAtEpochMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "accepted": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "AccountNotEnabled",
                            "ArgumentsRequired",
                            "AuthenticationError",
                            "BadRequest",
                            "BadSymbol",
                            "DuplicateOrderId",
                            "ExchangeError",
                            "ExchangeNotAvailable",
                            "InsufficientFunds",
                            "InvalidOrder",
                            "MarketClosed",
                            "NotSupported",
                            "OrderNotFound",
                            "OrderImmediatelyFillable",
                            "PermissionDenied",
                            "RateLimitExceeded"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "promo_code_unknown",
                            "promo_code_expired",
                            "promo_code_exhausted",
                            "account_not_eligible",
                            "promo_code_already_redeemed",
                            "invalid_request",
                            "unauthorized",
                            "forbidden",
                            "not_found",
                            "idempotency_key_required",
                            "rate_limited",
                            "operation_not_available",
                            "feature_disabled",
                            "kyc_required",
                            "command_rejected",
                            "xreserve_bridge_not_ready",
                            "snapshot_unavailable",
                            "service_degraded",
                            "order_intake_stopped",
                            "account_intake_stopped",
                            "withdrawal_intake_stopped",
                            "deposit_intake_stopped",
                            "channel_disabled",
                            "access_blocked",
                            "access_not_allowlisted",
                            "canton_offline",
                            "dependency_unavailable",
                            "account_legacy_excluded",
                            "bot_fence_stale",
                            "api_key_already_rotated",
                            "passkey_registration_required",
                            "passkey_rejected",
                            "account_exists_sign_in",
                            "registration_in_progress_recover",
                            "malformed_command",
                            "malformed_order_command",
                            "unsupported_order_command",
                            "duplicate_order_command",
                            "idempotency_key_conflict",
                            "unknown_market",
                            "unknown_order",
                            "invalid_account",
                            "invalid_side",
                            "invalid_order_id",
                            "invalid_order_type",
                            "market_order_unavailable",
                            "invalid_price",
                            "invalid_quantity",
                            "invalid_leverage",
                            "invalid_slippage",
                            "market_halted",
                            "duplicate_order_id",
                            "market_not_open",
                            "market_session_closed",
                            "market_pre_close_cutoff",
                            "reduce_only_required",
                            "reduce_only_position_unavailable",
                            "self_trade_prevented",
                            "post_only_would_cross",
                            "max_matches_exceeded",
                            "insufficient_balance",
                            "reduce_only_not_supported",
                            "spot_disabled",
                            "iceberg_not_supported",
                            "invalid_iceberg_quantity",
                            "risk_reserve_unavailable",
                            "invalid_status_transition",
                            "sequencer_rejected",
                            "unknown_margin_account",
                            "invalid_order_size",
                            "withdrawals_blocked",
                            "liquidation_candidate",
                            "bad_debt",
                            "insufficient_margin",
                            "leverage_exceeds_market_max",
                            "reserve_id_conflict",
                            "unknown_reserve",
                            "mark_unavailable",
                            "insufficient_liquidity",
                            "invalid_preview_request",
                            "agents_spot_disabled",
                            "agents_perps_disabled",
                            "order_rejected_unmapped",
                            "order_notional_below_minimum",
                            "gtd_expire_time_in_past",
                            "listing_request_requester_not_owned",
                            "listing_request_requester_kind_unsupported",
                            "listing_request_pending_exists",
                            "listing_request_market_exists",
                            "listing_request_issuer_unknown",
                            "spot_quote_not_venue_settlement_asset",
                            "listing_request_asset_exists",
                            "listing_request_limits_out_of_range",
                            "listing_request_market_shape_invalid",
                            "listing_request_account_pending_limit",
                            "listing_requests_not_accepted",
                            "listing_request_logo_missing",
                            "listing_request_deposit_not_confirmed",
                            "listing_request_deposit_accept_pending",
                            "listing_request_deposit_closed",
                            "listing_request_logo_closed",
                            "organization_not_found",
                            "organization_permission_required",
                            "organization_role_required",
                            "partner_organization_required",
                            "organization_key_required",
                            "organization_key_malformed",
                            "organization_key_unknown",
                            "organization_key_revoked",
                            "organization_key_store_unavailable",
                            "organization_member_not_found",
                            "organization_member_role_fixed",
                            "organization_member_changed",
                            "organization_owner_protected",
                            "organization_last_owner",
                            "sub_account_key_scope_refused",
                            "sub_account_mother_not_configured",
                            "sub_account_mother_ambiguous",
                            "sub_account_parent_mismatch",
                            "sub_account_parent_not_linked",
                            "sub_account_parent_conflict",
                            "sub_account_parent_without_party",
                            "sub_account_limit_reached",
                            "sub_account_name_taken",
                            "sub_account_parent_linked_elsewhere",
                            "sub_account_not_found",
                            "sub_account_not_empty",
                            "sub_account_holds_positions",
                            "sub_account_holds_tokens",
                            "sub_account_exposure_unavailable",
                            "sub_account_external_transfer_refused",
                            "engine_account_capacity_exceeded",
                            "sub_account_transfer_pair_refused",
                            "sub_account_transfer_asset_refused",
                            "transfer_eligibility_insufficient",
                            "transfer_blocked",
                            "venue_halted",
                            "account_unavailable",
                            "recipient_not_found",
                            "self_transfer_not_allowed",
                            "recipient_closed",
                            "sender_restricted",
                            "internal_transfer_asset_refused",
                            "organization_funding_decimals_conflict",
                            "organization_funding_currency_reserved",
                            "organization_funding_currency_ambiguous",
                            "twap_duration_out_of_range",
                            "twap_size_below_minimum",
                            "twap_slice_below_lot",
                            "parent_order_limit_reached",
                            "market_product_mismatch",
                            "product_history_scan_bound",
                            "ioc_post_only_conflict",
                            "ioc_iceberg_conflict",
                            "limit_ioc_not_served_on_perps",
                            "fok_post_only_conflict",
                            "fok_iceberg_conflict",
                            "limit_fok_not_served_on_perps",
                            "gtd_expire_time_required",
                            "expire_time_not_allowed",
                            "limit_gtd_not_served_on_perps",
                            "insufficient_orderbook_liquidity",
                            "withdrawal_amount_below_fee",
                            "spot_convert_market_unavailable",
                            "spot_convert_invalid_lot_size",
                            "spot_convert_below_min_notional",
                            "spot_convert_sell_unfilled",
                            "spot_convert_squid_failed_usdcx_kept",
                            "swap_pair_not_found",
                            "swap_pair_unavailable",
                            "swap_invalid_amount",
                            "swap_insufficient_liquidity",
                            "swap_quote_not_found",
                            "swap_quote_expired",
                            "swap_quote_already_accepted",
                            "swap_order_not_found",
                            "swap_order_expired",
                            "swap_order_invalid_state",
                            "swap_allocation_ttl_too_short",
                            "swap_slippage_exceeded",
                            "swap_settlement_failed_unwound",
                            "swap_circuit_breaker_open",
                            "swap_idempotency_conflict",
                            "swap_invalid_integrator_fee",
                            "swap_service_unavailable"
                          ],
                          "description": "For sub-account funding, partner_organization_required identifies a trader credential, sub_account_transfer_pair_refused identifies an invalid pair, sub_account_not_found identifies a missing or foreign sub-account, and sub_account_external_transfer_refused identifies external funding. Only the organization's mother account can fund a sub-account. Available to partner organizations only."
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "field": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "default": null
                        },
                        "attempted": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name",
                        "message",
                        "code",
                        "retryable",
                        "attempted"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "version",
                    "requestId",
                    "code",
                    "safeMessage",
                    "retryable",
                    "recoveryActions",
                    "occurredAtEpochMs",
                    "index",
                    "accepted",
                    "error"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "cost": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0,
                  "default": []
                },
                "fee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1
                    },
                    "cost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "currency",
                    "cost"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info"
              ],
              "additionalProperties": false
            }
          ]
        },
        "maxItems": 500
      },
      "V2CancelOrderRequest": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "minLength": 1
          },
          "params": {
            "type": "object",
            "properties": {
              "twap": {
                "type": "boolean",
                "description": "CancelOrder(id, symbol, { twap: true }): the id is a TWAP parent order, and the cancel ends the parent."
              },
              "accountId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "The trading account. Required for an organization key (one of its organization's linked accounts); optional otherwise, and then it must be the caller's own account."
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "symbol"
        ],
        "additionalProperties": false
      },
      "V2CancelOrdersRequest": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1,
            "maxItems": 24
          },
          "symbol": {
            "type": "string",
            "minLength": 1
          },
          "params": {
            "type": "object",
            "properties": {
              "accountId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "The trading account. Required for an organization key (one of its organization's linked accounts); optional otherwise, and then it must be the caller's own account."
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "ids",
          "symbol"
        ],
        "additionalProperties": false
      },
      "V2CancelOrdersResponse": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. Canonical bot identifiers also allow the fixed bot-order/v1: prefix followed by an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "canceled"
                  ]
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "postOnly": {
                      "type": "boolean"
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "IOC",
                        "FOK",
                        "GTD"
                      ]
                    },
                    "icebergQty": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "Visible base quantity of an iceberg limit order. The public book shows this quantity; the reserve covers the complete amount."
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell"
                      ]
                    },
                    "orderType": {
                      "type": "string",
                      "enum": [
                        "limit",
                        "market"
                      ]
                    },
                    "price": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                    },
                    "priceAtoms": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+$"
                    },
                    "quantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "filledQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "productType": {
                      "type": "string",
                      "enum": [
                        "spot"
                      ]
                    },
                    "lockAsset": {
                      "type": "string",
                      "minLength": 1
                    },
                    "lockedAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "remainingQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "createdAtEpochMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "filledQuoteAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "lastFillAtEpochMs": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "accepted": {
                      "type": "boolean",
                      "const": true
                    },
                    "orderId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "accountId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "partially_filled",
                        "filled",
                        "canceled",
                        "replaced"
                      ]
                    },
                    "lastSequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "idempotencyKey": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "index",
                    "accepted",
                    "orderId",
                    "accountId",
                    "marketId",
                    "status",
                    "lastSequence",
                    "idempotencyKey"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "cost": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0,
                  "default": []
                },
                "fee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1
                    },
                    "cost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "currency",
                    "cost"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "const": null
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "featureFlag": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The feature flag that refused this request."
                    },
                    "orderOutcome": {
                      "type": "string",
                      "enum": [
                        "not_submitted",
                        "unknown"
                      ],
                      "description": "unknown means no complete authoritative answer is available; not_submitted is used only with positive evidence that nothing was sent."
                    },
                    "clientOrderIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      },
                      "description": "The original clientOrderIds to reconcile."
                    },
                    "reconciliation": {
                      "type": "string",
                      "minLength": 1,
                      "description": "An order-entry 503 may follow acceptance. Reconcile the original clientOrderId through account.orders (orderId is the clientOrderId) and account.fills, and take one bounded order snapshot after reconnect. A 404 alone does not prove absence of in-flight work. Never poll or automatically resubmit; keep the original clientOrderIds, request body and Idempotency-Key, never retry with a fresh identity."
                    },
                    "version": {
                      "type": "string",
                      "enum": [
                        "external-rest-error/v1"
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "promo_code_unknown",
                        "promo_code_expired",
                        "promo_code_exhausted",
                        "account_not_eligible",
                        "promo_code_already_redeemed",
                        "invalid_request",
                        "unauthorized",
                        "forbidden",
                        "not_found",
                        "idempotency_key_required",
                        "rate_limited",
                        "operation_not_available",
                        "feature_disabled",
                        "kyc_required",
                        "command_rejected",
                        "xreserve_bridge_not_ready",
                        "snapshot_unavailable",
                        "service_degraded",
                        "order_intake_stopped",
                        "account_intake_stopped",
                        "withdrawal_intake_stopped",
                        "deposit_intake_stopped",
                        "channel_disabled",
                        "access_blocked",
                        "access_not_allowlisted",
                        "canton_offline",
                        "dependency_unavailable",
                        "account_legacy_excluded",
                        "bot_fence_stale",
                        "api_key_already_rotated",
                        "passkey_registration_required",
                        "passkey_rejected",
                        "account_exists_sign_in",
                        "registration_in_progress_recover",
                        "malformed_command",
                        "malformed_order_command",
                        "unsupported_order_command",
                        "duplicate_order_command",
                        "idempotency_key_conflict",
                        "unknown_market",
                        "unknown_order",
                        "invalid_account",
                        "invalid_side",
                        "invalid_order_id",
                        "invalid_order_type",
                        "market_order_unavailable",
                        "invalid_price",
                        "invalid_quantity",
                        "invalid_leverage",
                        "invalid_slippage",
                        "market_halted",
                        "duplicate_order_id",
                        "market_not_open",
                        "market_session_closed",
                        "market_pre_close_cutoff",
                        "reduce_only_required",
                        "reduce_only_position_unavailable",
                        "self_trade_prevented",
                        "post_only_would_cross",
                        "max_matches_exceeded",
                        "insufficient_balance",
                        "reduce_only_not_supported",
                        "spot_disabled",
                        "iceberg_not_supported",
                        "invalid_iceberg_quantity",
                        "risk_reserve_unavailable",
                        "invalid_status_transition",
                        "sequencer_rejected",
                        "unknown_margin_account",
                        "invalid_order_size",
                        "withdrawals_blocked",
                        "liquidation_candidate",
                        "bad_debt",
                        "insufficient_margin",
                        "leverage_exceeds_market_max",
                        "reserve_id_conflict",
                        "unknown_reserve",
                        "mark_unavailable",
                        "insufficient_liquidity",
                        "invalid_preview_request",
                        "agents_spot_disabled",
                        "agents_perps_disabled",
                        "order_rejected_unmapped",
                        "order_notional_below_minimum",
                        "gtd_expire_time_in_past",
                        "listing_request_requester_not_owned",
                        "listing_request_requester_kind_unsupported",
                        "listing_request_pending_exists",
                        "listing_request_market_exists",
                        "listing_request_issuer_unknown",
                        "spot_quote_not_venue_settlement_asset",
                        "listing_request_asset_exists",
                        "listing_request_limits_out_of_range",
                        "listing_request_market_shape_invalid",
                        "listing_request_account_pending_limit",
                        "listing_requests_not_accepted",
                        "listing_request_logo_missing",
                        "listing_request_deposit_not_confirmed",
                        "listing_request_deposit_accept_pending",
                        "listing_request_deposit_closed",
                        "listing_request_logo_closed",
                        "organization_not_found",
                        "organization_permission_required",
                        "organization_role_required",
                        "partner_organization_required",
                        "organization_key_required",
                        "organization_key_malformed",
                        "organization_key_unknown",
                        "organization_key_revoked",
                        "organization_key_store_unavailable",
                        "organization_member_not_found",
                        "organization_member_role_fixed",
                        "organization_member_changed",
                        "organization_owner_protected",
                        "organization_last_owner",
                        "sub_account_key_scope_refused",
                        "sub_account_mother_not_configured",
                        "sub_account_mother_ambiguous",
                        "sub_account_parent_mismatch",
                        "sub_account_parent_not_linked",
                        "sub_account_parent_conflict",
                        "sub_account_parent_without_party",
                        "sub_account_limit_reached",
                        "sub_account_name_taken",
                        "sub_account_parent_linked_elsewhere",
                        "sub_account_not_found",
                        "sub_account_not_empty",
                        "sub_account_holds_positions",
                        "sub_account_holds_tokens",
                        "sub_account_exposure_unavailable",
                        "sub_account_external_transfer_refused",
                        "engine_account_capacity_exceeded",
                        "sub_account_transfer_pair_refused",
                        "sub_account_transfer_asset_refused",
                        "transfer_eligibility_insufficient",
                        "transfer_blocked",
                        "venue_halted",
                        "account_unavailable",
                        "recipient_not_found",
                        "self_transfer_not_allowed",
                        "recipient_closed",
                        "sender_restricted",
                        "internal_transfer_asset_refused",
                        "organization_funding_decimals_conflict",
                        "organization_funding_currency_reserved",
                        "organization_funding_currency_ambiguous",
                        "twap_duration_out_of_range",
                        "twap_size_below_minimum",
                        "twap_slice_below_lot",
                        "parent_order_limit_reached",
                        "market_product_mismatch",
                        "product_history_scan_bound",
                        "ioc_post_only_conflict",
                        "ioc_iceberg_conflict",
                        "limit_ioc_not_served_on_perps",
                        "fok_post_only_conflict",
                        "fok_iceberg_conflict",
                        "limit_fok_not_served_on_perps",
                        "gtd_expire_time_required",
                        "expire_time_not_allowed",
                        "limit_gtd_not_served_on_perps",
                        "insufficient_orderbook_liquidity",
                        "withdrawal_amount_below_fee",
                        "spot_convert_market_unavailable",
                        "spot_convert_invalid_lot_size",
                        "spot_convert_below_min_notional",
                        "spot_convert_sell_unfilled",
                        "spot_convert_squid_failed_usdcx_kept",
                        "swap_pair_not_found",
                        "swap_pair_unavailable",
                        "swap_invalid_amount",
                        "swap_insufficient_liquidity",
                        "swap_quote_not_found",
                        "swap_quote_expired",
                        "swap_quote_already_accepted",
                        "swap_order_not_found",
                        "swap_order_expired",
                        "swap_order_invalid_state",
                        "swap_allocation_ttl_too_short",
                        "swap_slippage_exceeded",
                        "swap_settlement_failed_unwound",
                        "swap_circuit_breaker_open",
                        "swap_idempotency_conflict",
                        "swap_invalid_integrator_fee",
                        "swap_service_unavailable"
                      ]
                    },
                    "safeMessage": {
                      "type": "string",
                      "minLength": 1
                    },
                    "retryable": {
                      "type": "boolean"
                    },
                    "recoveryActions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "none",
                          "retry_after",
                          "observe_status",
                          "refresh_snapshot",
                          "resubscribe_stream",
                          "wait_for_projector",
                          "wait_for_operator_recovery",
                          "contact_support",
                          "request_approval",
                          "rerun_dry_run",
                          "do_not_retry"
                        ]
                      },
                      "minItems": 1
                    },
                    "realtimeTicketFailure": {
                      "type": "string",
                      "enum": [
                        "invalid",
                        "replayed",
                        "replaced",
                        "expired",
                        "revoked",
                        "store_unavailable"
                      ]
                    },
                    "apiKeyRejection": {
                      "type": "string",
                      "enum": [
                        "malformed",
                        "unknown",
                        "expired",
                        "revoked",
                        "principal_unavailable",
                        "store_unavailable",
                        "scope_insufficient",
                        "passkey_required",
                        "environment_forbidden",
                        "principal_mismatch",
                        "bot_fence_invalid",
                        "bot_fence_stale",
                        "already_rotated"
                      ]
                    },
                    "agentRefusal": {
                      "type": "string",
                      "enum": [
                        "agents_not_admitted_in_environment",
                        "agent_mode_not_admitted",
                        "agent_limit_reached",
                        "agent_deployment_not_found",
                        "agent_deployment_transition_refused",
                        "agent_deployment_stopping",
                        "agent_deployment_deleting",
                        "agent_deployment_has_open_exposure",
                        "agent_position_close_unavailable",
                        "agent_position_close_outcome_unknown",
                        "agent_position_close_refused",
                        "agent_position_close_partial",
                        "agent_position_close_pause_pending",
                        "agent_balance_return_unavailable",
                        "agent_trading_disabled",
                        "strategy_source_invalid",
                        "market_book_missing",
                        "skill_kill_switch_engaged",
                        "skill_market_closed",
                        "skill_market_session_unknown",
                        "skill_reduce_only_drawdown",
                        "skill_reduce_only_daily_loss",
                        "skill_wallet_unknown",
                        "skill_averaging_down",
                        "skill_entry_price_unknown",
                        "skill_edge_below_costs",
                        "skill_price_unknown",
                        "skill_size_capped",
                        "skill_size_below_minimum",
                        "skill_liquidation_too_close",
                        "skill_margin_unknown",
                        "paper_intent_size",
                        "paper_intent_market_price",
                        "paper_intent_market_time_in_force",
                        "paper_intent_limit_price",
                        "paper_stop_not_simulated",
                        "market_not_listed",
                        "agent_deployment_account_missing",
                        "agent_deployment_funding_missing",
                        "agent_account_already_bound",
                        "market_selection_unavailable",
                        "market_selection_undecided",
                        "market_stream_refused",
                        "pine_author_unavailable",
                        "pine_draft_in_flight",
                        "pine_draft_rate_limited",
                        "backtest_window_invalid",
                        "backtest_initial_capital_invalid",
                        "backtest_candles_unavailable",
                        "backtest_simulation_refused",
                        "backtest_timed_out",
                        "backtest_capacity_exhausted",
                        "backtest_in_flight",
                        "backtest_rate_limited",
                        "model_not_admitted",
                        "model_consent_required",
                        "agent_account_not_found",
                        "agent_account_not_fundable",
                        "agent_test_funding_not_offered",
                        "agent_test_funding_amount_invalid",
                        "agent_test_funding_treasury_floor",
                        "agent_test_funding_daily_cap_reached",
                        "agent_test_funding_daily_capacity_reached",
                        "agent_test_funding_idempotency_conflict",
                        "agent_test_funding_in_flight",
                        "agent_test_funding_pending",
                        "agent_test_funding_released",
                        "agent_test_funding_outcome_unknown",
                        "agent_test_funding_balance_insufficient",
                        "agent_test_funding_balance_unavailable",
                        "agent_funding_owner_balance_only",
                        "agent_live_key_unavailable",
                        "agent_live_order_shape_unsupported",
                        "agent_live_order_too_large",
                        "order_notional_below_minimum",
                        "agent_live_equity_unavailable",
                        "agent_live_open_order_limit",
                        "agent_live_open_orders_unavailable",
                        "agent_live_order_rate_limit",
                        "agent_live_reduce_only",
                        "agent_live_funding_unavailable",
                        "agent_live_view_unavailable",
                        "agent_fees_unpaid",
                        "agent_live_idempotency_key_required",
                        "agent_account_owner_ineligible",
                        "agent_account_identity_pending",
                        "agent_live_idempotency_conflict",
                        "agent_venue_capacity_reached",
                        "agent_deposit_funding_pending",
                        "agent_funding_amount_invalid",
                        "agent_funding_owner_party_missing",
                        "agent_funding_idempotency_conflict",
                        "agent_funding_not_found",
                        "agent_funding_expired",
                        "owner_signature_invalid",
                        "transfer_eligibility_insufficient",
                        "transfer_blocked",
                        "venue_halted",
                        "account_unavailable",
                        "account_transfer_unavailable",
                        "engine_view_unavailable",
                        "account_transfer_not_enabled",
                        "account_transfer_outcome_unknown",
                        "agent_fill_not_found",
                        "strategy_order_id_invalid",
                        "agent_live_venue_unavailable"
                      ]
                    },
                    "rejectionGuard": {
                      "type": "string",
                      "enum": [
                        "custodial_signer_environment_not_service_held",
                        "custodial_signer_owner_approval_missing",
                        "custodial_signer_kind_not_allowed",
                        "custodial_signer_prepared_transaction_refused",
                        "custodial_signer_not_service_held",
                        "custodial_signer_binding_mismatch",
                        "custodial_signer_signature_invalid",
                        "custodial_signer_deposit_over_cap",
                        "custodial_signer_payout_not_consented",
                        "custodial_signer_signature_outcome_unknown",
                        "access_not_allowlisted",
                        "amount_atoms_invalid",
                        "command_act_as_invalid",
                        "command_field_required",
                        "command_value_missing",
                        "completion_synchronizer_mismatch",
                        "deposit_field_required",
                        "deposit_integer_invalid",
                        "deposit_timestamp_invalid",
                        "hashing_scheme_unspecified",
                        "ledger_node_id_invalid",
                        "ledger_offset_invalid",
                        "rejection_completion_status",
                        "signature_failure_reason_invalid",
                        "signature_field_hex",
                        "signature_field_required",
                        "submission_id_mismatch",
                        "successful_completion_evidence",
                        "consumed_replay_evidence",
                        "delegated_signing_key_binding",
                        "deposit_asset_unsupported",
                        "deposit_amount_invalid",
                        "deposit_amount_rail_unsupported",
                        "deposit_amount_scale_exceeded",
                        "conversion_holding_unknown",
                        "conversion_amount_mismatch",
                        "conversion_step_not_due",
                        "deposit_missing",
                        "deposit_owner_binding",
                        "deposit_scope",
                        "dfns_confirmation_environment",
                        "funding_intent",
                        "funding_intent_advance",
                        "funding_intent_already_bound",
                        "funding_intent_cancelled",
                        "funding_intent_consumed_without_deposit",
                        "funding_intent_missing",
                        "intent_asset_unsupported",
                        "intent_owner_binding",
                        "local_confirmation_environment",
                        "owner_intent_scope",
                        "owner_kind_unsupported",
                        "arrival_deposit_delegated_only",
                        "planned_command_identities",
                        "request_owner_binding",
                        "local_authority_party_missing",
                        "local_confirmation_deposit_status",
                        "local_operator_replay_mismatch",
                        "local_recovery_step_mismatch",
                        "local_signer_failed",
                        "local_signing_key_mismatch",
                        "local_wallet_binding",
                        "operator_step_expected",
                        "owner_step_expected",
                        "owner_submission_command_binding",
                        "planned_command_missing",
                        "planned_command_not_unique",
                        "post_offer_step_expected",
                        "reconciliation_signature_scope",
                        "signature_completion_action",
                        "signature_hex_missing",
                        "signing_step_ahead_of_deposit",
                        "treasury_execution_restore",
                        "treasury_offer_contract_missing",
                        "unknown_command_candidates",
                        "completion_read_refused",
                        "completion_correlation",
                        "completion_not_unique",
                        "completion_transaction_correlation",
                        "interactive_act_as_missing",
                        "interactive_transaction_correlation",
                        "reconcile_binding_mismatch",
                        "rejected_completion_has_update",
                        "standard_submission_correlation",
                        "standard_submission_response_invalid",
                        "successful_completion_update_missing",
                        "unrecoverable_command_evidence",
                        "executed_evidence_correlation",
                        "executed_evidence_replay",
                        "executed_evidence_rows",
                        "executed_evidence_signature_status",
                        "execute_permit_rows",
                        "execute_permit_signature_status",
                        "ledger_rejection_correlation",
                        "ledger_rejection_replay",
                        "ledger_rejection_rows",
                        "ledger_rejection_signature_status",
                        "preparation_lock_busy",
                        "reconciliation_signature_state",
                        "signature_identity_binding",
                        "signature_identity_missing",
                        "signature_permitted_command",
                        "signature_preparable_state",
                        "signature_preparation_replay",
                        "signature_record_identity",
                        "signature_record_missing",
                        "signature_record_shape",
                        "signature_replay",
                        "signature_row_count",
                        "signature_scope_environment",
                        "signature_scope_fingerprint",
                        "signature_session_consistency",
                        "canton_command_identity",
                        "command_completion_evidence",
                        "command_confirm_rows",
                        "command_confirm_state",
                        "command_evidence_replay",
                        "command_permit_rows",
                        "command_permit_state",
                        "command_predecessors_unconfirmed",
                        "owner_signature_session_open",
                        "command_release_evidence",
                        "command_release_replay",
                        "command_release_rows",
                        "command_release_state",
                        "signature_restart_state",
                        "existing_receipt_replay",
                        "existing_receipt_rows",
                        "existing_receipt_state",
                        "local_replay_command_state",
                        "local_replay_fence_rows",
                        "local_replay_fence_state",
                        "local_replay_step",
                        "persisted_permit_mismatch",
                        "treasury_offer_command_identity",
                        "treasury_offer_confirm_rows",
                        "treasury_offer_confirm_state",
                        "treasury_offer_evidence_replay",
                        "treasury_offer_permit_rows",
                        "treasury_offer_permit_state",
                        "treasury_offer_reject_rows",
                        "treasury_offer_reject_state",
                        "treasury_offer_rejection_replay",
                        "treasury_offer_submission_id",
                        "treasury_input_amount_mismatch",
                        "treasury_input_release_rows",
                        "treasury_input_release_state",
                        "treasury_input_reservation_mismatch",
                        "treasury_input_reservation_rows",
                        "treasury_input_reservation_state"
                      ]
                    },
                    "withdrawalFailure": {
                      "type": "string",
                      "enum": [
                        "feature_disabled",
                        "spot_disabled",
                        "asset_withdraw_disabled",
                        "backing_alarm_active",
                        "holding_read_unavailable",
                        "asset_registry_stale",
                        "insufficient_balance",
                        "withdrawal_hold_stale",
                        "withdrawal_amount_below_fee",
                        "withdrawal_fee_quote_unavailable",
                        "withdrawal_destination_not_owned",
                        "withdrawal_owner_unavailable",
                        "withdrawal_unavailable",
                        "withdrawal_idempotency_conflict",
                        "requested",
                        "margin_reserved",
                        "authorized",
                        "submitted",
                        "settled",
                        "rejected",
                        "expired",
                        "failed",
                        "invalid_transition",
                        "authorization_setup_failed",
                        "margin_blocked",
                        "co_sign_incomplete",
                        "co_sign_self_approval",
                        "ttl_expired",
                        "canton_submission_failed",
                        "withdrawal_intake_stopped",
                        "withdrawal_payout_prepare_failed",
                        "withdrawal_payout_dfns_signature_failed",
                        "withdrawal_payout_canton_submit_refused",
                        "withdrawal_payout_ledger_time_expired",
                        "asset_unsupported",
                        "withdrawal_amount_invalid",
                        "withdrawal_amount_scale_exceeded",
                        "withdrawal_authorization_binding_mismatch",
                        "withdrawal_capability_unavailable",
                        "withdrawal_checkpoint_unavailable",
                        "withdrawal_not_cancellable",
                        "withdrawal_not_found",
                        "withdrawal_operators_missing",
                        "withdrawal_operators_not_distinct",
                        "withdrawal_owner_party_invalid",
                        "withdrawal_request_invalid",
                        "withdrawal_request_ended",
                        "withdrawal_reservation_release_failed",
                        "withdrawal_submission_unavailable",
                        "withdrawal_enqueue_failed",
                        "withdrawal_publish_failed"
                      ]
                    },
                    "feeShareAcceptRefusal": {
                      "type": "string",
                      "enum": [
                        "challenge_missing",
                        "challenge_expired",
                        "challenge_mismatch",
                        "payee_not_owner",
                        "offer_already_accepted",
                        "offer_expired"
                      ]
                    },
                    "dependency": {
                      "type": "string",
                      "enum": [
                        "dfns",
                        "engine",
                        "squid",
                        "ethereum_rpc"
                      ]
                    },
                    "squidRouteRefusal": {
                      "type": "string",
                      "enum": [
                        "route_not_found",
                        "route_expired",
                        "route_bound_to_other_transaction",
                        "transaction_bound_to_other_route",
                        "source_transaction_not_found",
                        "source_transaction_unverified",
                        "source_token_unsupported",
                        "unlimited_allowance_refused",
                        "provider_route_refused",
                        "slippage_exceeded",
                        "widget_hook_refused",
                        "widget_destination_refused",
                        "widget_recipient_preapproval_required",
                        "account_request_bound",
                        "global_request_bound"
                      ]
                    },
                    "positionSnapshotRefusal": {
                      "type": "string",
                      "enum": [
                        "position_projection_behind_live"
                      ]
                    },
                    "setupKeyRefusal": {
                      "type": "string",
                      "enum": [
                        "setup_key_refused"
                      ]
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "group": {
                          "type": "string",
                          "enum": [
                            "sub_accounts",
                            "trading_spot",
                            "trading_perps",
                            "listings_deposits",
                            "members_keys",
                            "mother_account"
                          ]
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "read",
                            "write"
                          ]
                        }
                      },
                      "required": [
                        "group",
                        "level"
                      ],
                      "additionalProperties": false
                    },
                    "occurredAtEpochMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "accepted": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "AccountNotEnabled",
                            "ArgumentsRequired",
                            "AuthenticationError",
                            "BadRequest",
                            "BadSymbol",
                            "DuplicateOrderId",
                            "ExchangeError",
                            "ExchangeNotAvailable",
                            "InsufficientFunds",
                            "InvalidOrder",
                            "MarketClosed",
                            "NotSupported",
                            "OrderNotFound",
                            "OrderImmediatelyFillable",
                            "PermissionDenied",
                            "RateLimitExceeded"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "promo_code_unknown",
                            "promo_code_expired",
                            "promo_code_exhausted",
                            "account_not_eligible",
                            "promo_code_already_redeemed",
                            "invalid_request",
                            "unauthorized",
                            "forbidden",
                            "not_found",
                            "idempotency_key_required",
                            "rate_limited",
                            "operation_not_available",
                            "feature_disabled",
                            "kyc_required",
                            "command_rejected",
                            "xreserve_bridge_not_ready",
                            "snapshot_unavailable",
                            "service_degraded",
                            "order_intake_stopped",
                            "account_intake_stopped",
                            "withdrawal_intake_stopped",
                            "deposit_intake_stopped",
                            "channel_disabled",
                            "access_blocked",
                            "access_not_allowlisted",
                            "canton_offline",
                            "dependency_unavailable",
                            "account_legacy_excluded",
                            "bot_fence_stale",
                            "api_key_already_rotated",
                            "passkey_registration_required",
                            "passkey_rejected",
                            "account_exists_sign_in",
                            "registration_in_progress_recover",
                            "malformed_command",
                            "malformed_order_command",
                            "unsupported_order_command",
                            "duplicate_order_command",
                            "idempotency_key_conflict",
                            "unknown_market",
                            "unknown_order",
                            "invalid_account",
                            "invalid_side",
                            "invalid_order_id",
                            "invalid_order_type",
                            "market_order_unavailable",
                            "invalid_price",
                            "invalid_quantity",
                            "invalid_leverage",
                            "invalid_slippage",
                            "market_halted",
                            "duplicate_order_id",
                            "market_not_open",
                            "market_session_closed",
                            "market_pre_close_cutoff",
                            "reduce_only_required",
                            "reduce_only_position_unavailable",
                            "self_trade_prevented",
                            "post_only_would_cross",
                            "max_matches_exceeded",
                            "insufficient_balance",
                            "reduce_only_not_supported",
                            "spot_disabled",
                            "iceberg_not_supported",
                            "invalid_iceberg_quantity",
                            "risk_reserve_unavailable",
                            "invalid_status_transition",
                            "sequencer_rejected",
                            "unknown_margin_account",
                            "invalid_order_size",
                            "withdrawals_blocked",
                            "liquidation_candidate",
                            "bad_debt",
                            "insufficient_margin",
                            "leverage_exceeds_market_max",
                            "reserve_id_conflict",
                            "unknown_reserve",
                            "mark_unavailable",
                            "insufficient_liquidity",
                            "invalid_preview_request",
                            "agents_spot_disabled",
                            "agents_perps_disabled",
                            "order_rejected_unmapped",
                            "order_notional_below_minimum",
                            "gtd_expire_time_in_past",
                            "listing_request_requester_not_owned",
                            "listing_request_requester_kind_unsupported",
                            "listing_request_pending_exists",
                            "listing_request_market_exists",
                            "listing_request_issuer_unknown",
                            "spot_quote_not_venue_settlement_asset",
                            "listing_request_asset_exists",
                            "listing_request_limits_out_of_range",
                            "listing_request_market_shape_invalid",
                            "listing_request_account_pending_limit",
                            "listing_requests_not_accepted",
                            "listing_request_logo_missing",
                            "listing_request_deposit_not_confirmed",
                            "listing_request_deposit_accept_pending",
                            "listing_request_deposit_closed",
                            "listing_request_logo_closed",
                            "organization_not_found",
                            "organization_permission_required",
                            "organization_role_required",
                            "partner_organization_required",
                            "organization_key_required",
                            "organization_key_malformed",
                            "organization_key_unknown",
                            "organization_key_revoked",
                            "organization_key_store_unavailable",
                            "organization_member_not_found",
                            "organization_member_role_fixed",
                            "organization_member_changed",
                            "organization_owner_protected",
                            "organization_last_owner",
                            "sub_account_key_scope_refused",
                            "sub_account_mother_not_configured",
                            "sub_account_mother_ambiguous",
                            "sub_account_parent_mismatch",
                            "sub_account_parent_not_linked",
                            "sub_account_parent_conflict",
                            "sub_account_parent_without_party",
                            "sub_account_limit_reached",
                            "sub_account_name_taken",
                            "sub_account_parent_linked_elsewhere",
                            "sub_account_not_found",
                            "sub_account_not_empty",
                            "sub_account_holds_positions",
                            "sub_account_holds_tokens",
                            "sub_account_exposure_unavailable",
                            "sub_account_external_transfer_refused",
                            "engine_account_capacity_exceeded",
                            "sub_account_transfer_pair_refused",
                            "sub_account_transfer_asset_refused",
                            "transfer_eligibility_insufficient",
                            "transfer_blocked",
                            "venue_halted",
                            "account_unavailable",
                            "recipient_not_found",
                            "self_transfer_not_allowed",
                            "recipient_closed",
                            "sender_restricted",
                            "internal_transfer_asset_refused",
                            "organization_funding_decimals_conflict",
                            "organization_funding_currency_reserved",
                            "organization_funding_currency_ambiguous",
                            "twap_duration_out_of_range",
                            "twap_size_below_minimum",
                            "twap_slice_below_lot",
                            "parent_order_limit_reached",
                            "market_product_mismatch",
                            "product_history_scan_bound",
                            "ioc_post_only_conflict",
                            "ioc_iceberg_conflict",
                            "limit_ioc_not_served_on_perps",
                            "fok_post_only_conflict",
                            "fok_iceberg_conflict",
                            "limit_fok_not_served_on_perps",
                            "gtd_expire_time_required",
                            "expire_time_not_allowed",
                            "limit_gtd_not_served_on_perps",
                            "insufficient_orderbook_liquidity",
                            "withdrawal_amount_below_fee",
                            "spot_convert_market_unavailable",
                            "spot_convert_invalid_lot_size",
                            "spot_convert_below_min_notional",
                            "spot_convert_sell_unfilled",
                            "spot_convert_squid_failed_usdcx_kept",
                            "swap_pair_not_found",
                            "swap_pair_unavailable",
                            "swap_invalid_amount",
                            "swap_insufficient_liquidity",
                            "swap_quote_not_found",
                            "swap_quote_expired",
                            "swap_quote_already_accepted",
                            "swap_order_not_found",
                            "swap_order_expired",
                            "swap_order_invalid_state",
                            "swap_allocation_ttl_too_short",
                            "swap_slippage_exceeded",
                            "swap_settlement_failed_unwound",
                            "swap_circuit_breaker_open",
                            "swap_idempotency_conflict",
                            "swap_invalid_integrator_fee",
                            "swap_service_unavailable"
                          ],
                          "description": "For sub-account funding, partner_organization_required identifies a trader credential, sub_account_transfer_pair_refused identifies an invalid pair, sub_account_not_found identifies a missing or foreign sub-account, and sub_account_external_transfer_refused identifies external funding. Only the organization's mother account can fund a sub-account. Available to partner organizations only."
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "field": {
                          "type": "string",
                          "minLength": 1
                        },
                        "attempted": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "name",
                        "message",
                        "code",
                        "retryable",
                        "field"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "version",
                    "requestId",
                    "code",
                    "safeMessage",
                    "retryable",
                    "recoveryActions",
                    "occurredAtEpochMs",
                    "index",
                    "accepted",
                    "error"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "cost": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0,
                  "default": []
                },
                "fee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1
                    },
                    "cost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "currency",
                    "cost"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info"
              ],
              "additionalProperties": false
            }
          ]
        },
        "minItems": 1,
        "maxItems": 24
      },
      "V2CreateOrderRequest": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "enum": [
                  "limit"
                ]
              },
              "side": {
                "type": "string",
                "enum": [
                  "buy",
                  "sell"
                ]
              },
              "amount": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "price": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "params": {
                "type": "object",
                "properties": {
                  "accountId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "The trading account. Required for an organization key (one of its organization's linked accounts); optional otherwise, and then it must be the caller's own account."
                  },
                  "clientOrderId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                    "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits. Reserved and refused with HTTP 400: the venue's own id form for an order sent without a client id (a fixed venue prefix followed by exactly 32 lowercase hexadecimal digits, as returned in orderId), and ids that start with ord_liquidation_, ord_adl_ or ord_trigger_ (orders the venue places itself)."
                  },
                  "reduceOnly": {
                    "type": "boolean"
                  },
                  "leverageX": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "takeProfitPrice": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "stopLossPrice": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "icebergQty": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Visible base quantity of an iceberg limit order. The public book shows this quantity; the reserve covers the complete amount."
                  },
                  "timeInForce": {
                    "type": "string",
                    "enum": [
                      "GTC",
                      "PO",
                      "IOC",
                      "FOK",
                      "GTD"
                    ],
                    "description": "GTC (the default) rests the order until it fills or is canceled. PO is the same order as post-only: it is refused rather than trade as a taker. PO with postOnly false is refused with 400. IOC (spot markets) fills at the limit price or better at once and cancels the rest, so it never rests: IOC with postOnly true answers 400 ioc_post_only_conflict, and IOC with icebergQty answers 400 ioc_iceberg_conflict. FOK (spot markets) fills 100% immediately at the limit price or better or cancels completely with 0 filled and never rests: FOK with postOnly true answers 400 fok_post_only_conflict, and FOK with icebergQty answers 400 fok_iceberg_conflict. GTD (spot markets) rests until params.expireTime (positive integer UTC epoch ms strictly in the future) and expires deterministically with reserve release. A perpetual limit IOC, FOK, or GTD is refused with 400."
                  },
                  "expireTime": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Description pending."
                  },
                  "postOnly": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "symbol",
              "type",
              "side",
              "amount",
              "price"
            ],
            "additionalProperties": false
          },
          {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "minLength": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "market"
                    ]
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "buy",
                      "sell"
                    ]
                  },
                  "amount": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "accountId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "description": "The trading account. Required for an organization key (one of its organization's linked accounts); optional otherwise, and then it must be the caller's own account."
                      },
                      "clientOrderId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                        "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits. Reserved and refused with HTTP 400: the venue's own id form for an order sent without a client id (a fixed venue prefix followed by exactly 32 lowercase hexadecimal digits, as returned in orderId), and ids that start with ord_liquidation_, ord_adl_ or ord_trigger_ (orders the venue places itself)."
                      },
                      "reduceOnly": {
                        "type": "boolean"
                      },
                      "leverageX": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "takeProfitPrice": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      "stopLossPrice": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      "timeInForce": {
                        "type": "string",
                        "enum": [
                          "IOC"
                        ],
                        "description": "A market order is IOC: whatever does not fill at once is canceled."
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "symbol",
                  "type",
                  "side",
                  "amount"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "minLength": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "market"
                    ]
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "buy",
                      "sell"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "accountId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "description": "The trading account. Required for an organization key (one of its organization's linked accounts); optional otherwise, and then it must be the caller's own account."
                      },
                      "clientOrderId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                        "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits. Reserved and refused with HTTP 400: the venue's own id form for an order sent without a client id (a fixed venue prefix followed by exactly 32 lowercase hexadecimal digits, as returned in orderId), and ids that start with ord_liquidation_, ord_adl_ or ord_trigger_ (orders the venue places itself)."
                      },
                      "reduceOnly": {
                        "type": "boolean"
                      },
                      "leverageX": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "takeProfitPrice": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      "stopLossPrice": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      "timeInForce": {
                        "type": "string",
                        "enum": [
                          "IOC"
                        ],
                        "description": "A market order is IOC: whatever does not fill at once is canceled."
                      },
                      "notional": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      }
                    },
                    "required": [
                      "notional"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "symbol",
                  "type",
                  "side",
                  "params"
                ],
                "additionalProperties": false
              }
            ]
          }
        ]
      },
      "V2CreateOrdersRequest": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "limit"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell"
                  ]
                },
                "amount": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "price": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "params": {
                  "type": "object",
                  "properties": {
                    "accountId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "description": "Description pending."
                    },
                    "clientOrderId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                      "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. An identifier in the bot-order/v1: form, followed by an optional sha256: marker and 64 lowercase hexadecimal digits, is also accepted. Reserved and refused with HTTP 400: the venue's own id form for an order sent without a client id (a fixed venue prefix followed by exactly 32 lowercase hexadecimal digits, as returned in orderId), and ids that start with ord_liquidation_, ord_adl_ or ord_trigger_ (orders the venue places itself)."
                    },
                    "reduceOnly": {
                      "type": "boolean"
                    },
                    "leverageX": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "takeProfitPrice": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "stopLossPrice": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "icebergQty": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "Description pending."
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "PO",
                        "IOC",
                        "FOK",
                        "GTD"
                      ],
                      "description": "Description pending."
                    },
                    "expireTime": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991,
                      "description": "Description pending."
                    },
                    "postOnly": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "symbol",
                "type",
                "side",
                "amount",
                "price"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "market"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell"
                  ]
                },
                "amount": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "params": {
                  "type": "object",
                  "properties": {
                    "accountId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "description": "Description pending."
                    },
                    "clientOrderId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                      "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. An identifier in the bot-order/v1: form, followed by an optional sha256: marker and 64 lowercase hexadecimal digits, is also accepted. Reserved and refused with HTTP 400: the venue's own id form for an order sent without a client id (a fixed venue prefix followed by exactly 32 lowercase hexadecimal digits, as returned in orderId), and ids that start with ord_liquidation_, ord_adl_ or ord_trigger_ (orders the venue places itself)."
                    },
                    "reduceOnly": {
                      "type": "boolean"
                    },
                    "leverageX": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "takeProfitPrice": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "stopLossPrice": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "IOC"
                      ],
                      "description": "Description pending."
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "symbol",
                "type",
                "side",
                "amount"
              ],
              "additionalProperties": false
            }
          ]
        },
        "minItems": 1,
        "maxItems": 32
      },
      "V2CreateOrdersResponse": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. Canonical bot identifiers also allow the fixed bot-order/v1: prefix followed by an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "canceled"
                  ]
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "postOnly": {
                      "type": "boolean"
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "IOC",
                        "FOK",
                        "GTD"
                      ]
                    },
                    "icebergQty": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "Visible base quantity of an iceberg limit order. The public book shows this quantity; the reserve covers the complete amount."
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell"
                      ]
                    },
                    "orderType": {
                      "type": "string",
                      "enum": [
                        "limit",
                        "market"
                      ]
                    },
                    "price": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                    },
                    "priceAtoms": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+$"
                    },
                    "quantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "filledQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "productType": {
                      "type": "string",
                      "enum": [
                        "spot"
                      ]
                    },
                    "lockAsset": {
                      "type": "string",
                      "minLength": 1
                    },
                    "lockedAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "remainingQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "createdAtEpochMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "filledQuoteAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "lastFillAtEpochMs": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "accepted": {
                      "type": "boolean",
                      "const": true
                    },
                    "orderId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "accountId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "partially_filled",
                        "filled",
                        "canceled",
                        "replaced"
                      ]
                    },
                    "lastSequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "idempotencyKey": {
                      "type": "string",
                      "minLength": 1
                    },
                    "fillsPending": {
                      "type": "boolean",
                      "const": true,
                      "description": "True while the order has a fill that this answer cannot fully describe yet (order history is catching up with the matching engine). lastTradeTimestamp is then null, and cost and average are omitted when the matching engine committed no cost for the fill (a perpetual order, or a spot answer without the filled quote). A cost that the matching engine committed is always returned, with its exact average. A later fetchOrder returns the full order without this field once every fill is recorded. Read the trades and fee of a spot order from the fills read (fetchMyTrades) or the account fills stream; fetchOrder always returns an empty trades list and a null fee."
                    }
                  },
                  "required": [
                    "index",
                    "accepted",
                    "orderId",
                    "accountId",
                    "marketId",
                    "status",
                    "lastSequence",
                    "idempotencyKey",
                    "fillsPending"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0
                },
                "fee": {
                  "type": "null"
                },
                "cost": {
                  "type": "number",
                  "minimum": 0,
                  "description": "The filled value in the quote asset, when the matching engine committed one (a spot order with its filled quote). Omitted while no committed value is available."
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info",
                "trades",
                "fee"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. Canonical bot identifiers also allow the fixed bot-order/v1: prefix followed by an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "canceled"
                  ]
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "postOnly": {
                      "type": "boolean"
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "IOC",
                        "FOK",
                        "GTD"
                      ]
                    },
                    "icebergQty": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "Visible base quantity of an iceberg limit order. The public book shows this quantity; the reserve covers the complete amount."
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell"
                      ]
                    },
                    "orderType": {
                      "type": "string",
                      "enum": [
                        "limit",
                        "market"
                      ]
                    },
                    "price": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                    },
                    "priceAtoms": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+$"
                    },
                    "quantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "filledQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "productType": {
                      "type": "string",
                      "enum": [
                        "spot"
                      ]
                    },
                    "lockAsset": {
                      "type": "string",
                      "minLength": 1
                    },
                    "lockedAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "remainingQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "createdAtEpochMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "filledQuoteAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "lastFillAtEpochMs": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "accepted": {
                      "type": "boolean",
                      "const": true
                    },
                    "orderId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "accountId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "partially_filled",
                        "filled",
                        "canceled",
                        "replaced"
                      ]
                    },
                    "lastSequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "idempotencyKey": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "index",
                    "accepted",
                    "orderId",
                    "accountId",
                    "marketId",
                    "status",
                    "lastSequence",
                    "idempotencyKey"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "cost": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0,
                  "default": []
                },
                "fee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1
                    },
                    "cost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "currency",
                    "cost"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "default": null
                },
                "clientOrderId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits."
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "rejected"
                  ]
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "featureFlag": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The feature flag that refused this request."
                    },
                    "orderOutcome": {
                      "type": "string",
                      "enum": [
                        "not_submitted",
                        "unknown"
                      ],
                      "description": "unknown means no complete authoritative answer is available; not_submitted is used only with positive evidence that nothing was sent."
                    },
                    "clientOrderIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      },
                      "description": "The original clientOrderIds to reconcile."
                    },
                    "reconciliation": {
                      "type": "string",
                      "minLength": 1,
                      "description": "An order-entry 503 may follow acceptance. Reconcile the original clientOrderId through account.orders (orderId is the clientOrderId) and account.fills, and take one bounded order snapshot after reconnect. A 404 alone does not prove absence of in-flight work. Never poll or automatically resubmit; keep the original clientOrderIds, request body and Idempotency-Key, never retry with a fresh identity."
                    },
                    "version": {
                      "type": "string",
                      "enum": [
                        "external-rest-error/v1"
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "promo_code_unknown",
                        "promo_code_expired",
                        "promo_code_exhausted",
                        "account_not_eligible",
                        "promo_code_already_redeemed",
                        "invalid_request",
                        "unauthorized",
                        "forbidden",
                        "not_found",
                        "idempotency_key_required",
                        "rate_limited",
                        "operation_not_available",
                        "feature_disabled",
                        "kyc_required",
                        "command_rejected",
                        "xreserve_bridge_not_ready",
                        "snapshot_unavailable",
                        "service_degraded",
                        "order_intake_stopped",
                        "account_intake_stopped",
                        "withdrawal_intake_stopped",
                        "deposit_intake_stopped",
                        "channel_disabled",
                        "access_blocked",
                        "access_not_allowlisted",
                        "canton_offline",
                        "dependency_unavailable",
                        "account_legacy_excluded",
                        "bot_fence_stale",
                        "api_key_already_rotated",
                        "passkey_registration_required",
                        "passkey_rejected",
                        "account_exists_sign_in",
                        "registration_in_progress_recover",
                        "malformed_command",
                        "malformed_order_command",
                        "unsupported_order_command",
                        "duplicate_order_command",
                        "idempotency_key_conflict",
                        "unknown_market",
                        "unknown_order",
                        "invalid_account",
                        "invalid_side",
                        "invalid_order_id",
                        "invalid_order_type",
                        "market_order_unavailable",
                        "invalid_price",
                        "invalid_quantity",
                        "invalid_leverage",
                        "invalid_slippage",
                        "market_halted",
                        "duplicate_order_id",
                        "market_not_open",
                        "market_session_closed",
                        "market_pre_close_cutoff",
                        "reduce_only_required",
                        "reduce_only_position_unavailable",
                        "self_trade_prevented",
                        "post_only_would_cross",
                        "max_matches_exceeded",
                        "insufficient_balance",
                        "reduce_only_not_supported",
                        "spot_disabled",
                        "iceberg_not_supported",
                        "invalid_iceberg_quantity",
                        "risk_reserve_unavailable",
                        "invalid_status_transition",
                        "sequencer_rejected",
                        "unknown_margin_account",
                        "invalid_order_size",
                        "withdrawals_blocked",
                        "liquidation_candidate",
                        "bad_debt",
                        "insufficient_margin",
                        "leverage_exceeds_market_max",
                        "reserve_id_conflict",
                        "unknown_reserve",
                        "mark_unavailable",
                        "insufficient_liquidity",
                        "invalid_preview_request",
                        "agents_spot_disabled",
                        "agents_perps_disabled",
                        "order_rejected_unmapped",
                        "order_notional_below_minimum",
                        "gtd_expire_time_in_past",
                        "listing_request_requester_not_owned",
                        "listing_request_requester_kind_unsupported",
                        "listing_request_pending_exists",
                        "listing_request_market_exists",
                        "listing_request_issuer_unknown",
                        "spot_quote_not_venue_settlement_asset",
                        "listing_request_asset_exists",
                        "listing_request_limits_out_of_range",
                        "listing_request_market_shape_invalid",
                        "listing_request_account_pending_limit",
                        "listing_requests_not_accepted",
                        "listing_request_logo_missing",
                        "listing_request_deposit_not_confirmed",
                        "listing_request_deposit_accept_pending",
                        "listing_request_deposit_closed",
                        "listing_request_logo_closed",
                        "organization_not_found",
                        "organization_permission_required",
                        "organization_role_required",
                        "partner_organization_required",
                        "organization_key_required",
                        "organization_key_malformed",
                        "organization_key_unknown",
                        "organization_key_revoked",
                        "organization_key_store_unavailable",
                        "organization_member_not_found",
                        "organization_member_role_fixed",
                        "organization_member_changed",
                        "organization_owner_protected",
                        "organization_last_owner",
                        "sub_account_key_scope_refused",
                        "sub_account_mother_not_configured",
                        "sub_account_mother_ambiguous",
                        "sub_account_parent_mismatch",
                        "sub_account_parent_not_linked",
                        "sub_account_parent_conflict",
                        "sub_account_parent_without_party",
                        "sub_account_limit_reached",
                        "sub_account_name_taken",
                        "sub_account_parent_linked_elsewhere",
                        "sub_account_not_found",
                        "sub_account_not_empty",
                        "sub_account_holds_positions",
                        "sub_account_holds_tokens",
                        "sub_account_exposure_unavailable",
                        "sub_account_external_transfer_refused",
                        "engine_account_capacity_exceeded",
                        "sub_account_transfer_pair_refused",
                        "sub_account_transfer_asset_refused",
                        "transfer_eligibility_insufficient",
                        "transfer_blocked",
                        "venue_halted",
                        "account_unavailable",
                        "recipient_not_found",
                        "self_transfer_not_allowed",
                        "recipient_closed",
                        "sender_restricted",
                        "internal_transfer_asset_refused",
                        "organization_funding_decimals_conflict",
                        "organization_funding_currency_reserved",
                        "organization_funding_currency_ambiguous",
                        "twap_duration_out_of_range",
                        "twap_size_below_minimum",
                        "twap_slice_below_lot",
                        "parent_order_limit_reached",
                        "market_product_mismatch",
                        "product_history_scan_bound",
                        "ioc_post_only_conflict",
                        "ioc_iceberg_conflict",
                        "limit_ioc_not_served_on_perps",
                        "fok_post_only_conflict",
                        "fok_iceberg_conflict",
                        "limit_fok_not_served_on_perps",
                        "gtd_expire_time_required",
                        "expire_time_not_allowed",
                        "limit_gtd_not_served_on_perps",
                        "insufficient_orderbook_liquidity",
                        "withdrawal_amount_below_fee",
                        "spot_convert_market_unavailable",
                        "spot_convert_invalid_lot_size",
                        "spot_convert_below_min_notional",
                        "spot_convert_sell_unfilled",
                        "spot_convert_squid_failed_usdcx_kept",
                        "swap_pair_not_found",
                        "swap_pair_unavailable",
                        "swap_invalid_amount",
                        "swap_insufficient_liquidity",
                        "swap_quote_not_found",
                        "swap_quote_expired",
                        "swap_quote_already_accepted",
                        "swap_order_not_found",
                        "swap_order_expired",
                        "swap_order_invalid_state",
                        "swap_allocation_ttl_too_short",
                        "swap_slippage_exceeded",
                        "swap_settlement_failed_unwound",
                        "swap_circuit_breaker_open",
                        "swap_idempotency_conflict",
                        "swap_invalid_integrator_fee",
                        "swap_service_unavailable"
                      ]
                    },
                    "safeMessage": {
                      "type": "string",
                      "minLength": 1
                    },
                    "retryable": {
                      "type": "boolean"
                    },
                    "recoveryActions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "none",
                          "retry_after",
                          "observe_status",
                          "refresh_snapshot",
                          "resubscribe_stream",
                          "wait_for_projector",
                          "wait_for_operator_recovery",
                          "contact_support",
                          "request_approval",
                          "rerun_dry_run",
                          "do_not_retry"
                        ]
                      },
                      "minItems": 1
                    },
                    "realtimeTicketFailure": {
                      "type": "string",
                      "enum": [
                        "invalid",
                        "replayed",
                        "replaced",
                        "expired",
                        "revoked",
                        "store_unavailable"
                      ]
                    },
                    "apiKeyRejection": {
                      "type": "string",
                      "enum": [
                        "malformed",
                        "unknown",
                        "expired",
                        "revoked",
                        "principal_unavailable",
                        "store_unavailable",
                        "scope_insufficient",
                        "passkey_required",
                        "environment_forbidden",
                        "principal_mismatch",
                        "bot_fence_invalid",
                        "bot_fence_stale",
                        "already_rotated"
                      ]
                    },
                    "agentRefusal": {
                      "type": "string",
                      "enum": [
                        "agents_not_admitted_in_environment",
                        "agent_mode_not_admitted",
                        "agent_limit_reached",
                        "agent_deployment_not_found",
                        "agent_deployment_transition_refused",
                        "agent_deployment_stopping",
                        "agent_deployment_deleting",
                        "agent_deployment_has_open_exposure",
                        "agent_position_close_unavailable",
                        "agent_position_close_outcome_unknown",
                        "agent_position_close_refused",
                        "agent_position_close_partial",
                        "agent_position_close_pause_pending",
                        "agent_balance_return_unavailable",
                        "agent_trading_disabled",
                        "strategy_source_invalid",
                        "market_book_missing",
                        "skill_kill_switch_engaged",
                        "skill_market_closed",
                        "skill_market_session_unknown",
                        "skill_reduce_only_drawdown",
                        "skill_reduce_only_daily_loss",
                        "skill_wallet_unknown",
                        "skill_averaging_down",
                        "skill_entry_price_unknown",
                        "skill_edge_below_costs",
                        "skill_price_unknown",
                        "skill_size_capped",
                        "skill_size_below_minimum",
                        "skill_liquidation_too_close",
                        "skill_margin_unknown",
                        "paper_intent_size",
                        "paper_intent_market_price",
                        "paper_intent_market_time_in_force",
                        "paper_intent_limit_price",
                        "paper_stop_not_simulated",
                        "market_not_listed",
                        "agent_deployment_account_missing",
                        "agent_deployment_funding_missing",
                        "agent_account_already_bound",
                        "market_selection_unavailable",
                        "market_selection_undecided",
                        "market_stream_refused",
                        "pine_author_unavailable",
                        "pine_draft_in_flight",
                        "pine_draft_rate_limited",
                        "backtest_window_invalid",
                        "backtest_initial_capital_invalid",
                        "backtest_candles_unavailable",
                        "backtest_simulation_refused",
                        "backtest_timed_out",
                        "backtest_capacity_exhausted",
                        "backtest_in_flight",
                        "backtest_rate_limited",
                        "model_not_admitted",
                        "model_consent_required",
                        "agent_account_not_found",
                        "agent_account_not_fundable",
                        "agent_test_funding_not_offered",
                        "agent_test_funding_amount_invalid",
                        "agent_test_funding_treasury_floor",
                        "agent_test_funding_daily_cap_reached",
                        "agent_test_funding_daily_capacity_reached",
                        "agent_test_funding_idempotency_conflict",
                        "agent_test_funding_in_flight",
                        "agent_test_funding_pending",
                        "agent_test_funding_released",
                        "agent_test_funding_outcome_unknown",
                        "agent_test_funding_balance_insufficient",
                        "agent_test_funding_balance_unavailable",
                        "agent_funding_owner_balance_only",
                        "agent_live_key_unavailable",
                        "agent_live_order_shape_unsupported",
                        "agent_live_order_too_large",
                        "order_notional_below_minimum",
                        "agent_live_equity_unavailable",
                        "agent_live_open_order_limit",
                        "agent_live_open_orders_unavailable",
                        "agent_live_order_rate_limit",
                        "agent_live_reduce_only",
                        "agent_live_funding_unavailable",
                        "agent_live_view_unavailable",
                        "agent_fees_unpaid",
                        "agent_live_idempotency_key_required",
                        "agent_account_owner_ineligible",
                        "agent_account_identity_pending",
                        "agent_live_idempotency_conflict",
                        "agent_venue_capacity_reached",
                        "agent_deposit_funding_pending",
                        "agent_funding_amount_invalid",
                        "agent_funding_owner_party_missing",
                        "agent_funding_idempotency_conflict",
                        "agent_funding_not_found",
                        "agent_funding_expired",
                        "owner_signature_invalid",
                        "transfer_eligibility_insufficient",
                        "transfer_blocked",
                        "venue_halted",
                        "account_unavailable",
                        "account_transfer_unavailable",
                        "engine_view_unavailable",
                        "account_transfer_not_enabled",
                        "account_transfer_outcome_unknown",
                        "agent_fill_not_found",
                        "strategy_order_id_invalid",
                        "agent_live_venue_unavailable"
                      ]
                    },
                    "rejectionGuard": {
                      "type": "string",
                      "enum": [
                        "custodial_signer_environment_not_service_held",
                        "custodial_signer_owner_approval_missing",
                        "custodial_signer_kind_not_allowed",
                        "custodial_signer_prepared_transaction_refused",
                        "custodial_signer_not_service_held",
                        "custodial_signer_binding_mismatch",
                        "custodial_signer_signature_invalid",
                        "custodial_signer_deposit_over_cap",
                        "custodial_signer_payout_not_consented",
                        "custodial_signer_signature_outcome_unknown",
                        "access_not_allowlisted",
                        "amount_atoms_invalid",
                        "command_act_as_invalid",
                        "command_field_required",
                        "command_value_missing",
                        "completion_synchronizer_mismatch",
                        "deposit_field_required",
                        "deposit_integer_invalid",
                        "deposit_timestamp_invalid",
                        "hashing_scheme_unspecified",
                        "ledger_node_id_invalid",
                        "ledger_offset_invalid",
                        "rejection_completion_status",
                        "signature_failure_reason_invalid",
                        "signature_field_hex",
                        "signature_field_required",
                        "submission_id_mismatch",
                        "successful_completion_evidence",
                        "consumed_replay_evidence",
                        "delegated_signing_key_binding",
                        "deposit_asset_unsupported",
                        "deposit_amount_invalid",
                        "deposit_amount_rail_unsupported",
                        "deposit_amount_scale_exceeded",
                        "conversion_holding_unknown",
                        "conversion_amount_mismatch",
                        "conversion_step_not_due",
                        "deposit_missing",
                        "deposit_owner_binding",
                        "deposit_scope",
                        "dfns_confirmation_environment",
                        "funding_intent",
                        "funding_intent_advance",
                        "funding_intent_already_bound",
                        "funding_intent_cancelled",
                        "funding_intent_consumed_without_deposit",
                        "funding_intent_missing",
                        "intent_asset_unsupported",
                        "intent_owner_binding",
                        "local_confirmation_environment",
                        "owner_intent_scope",
                        "owner_kind_unsupported",
                        "arrival_deposit_delegated_only",
                        "planned_command_identities",
                        "request_owner_binding",
                        "local_authority_party_missing",
                        "local_confirmation_deposit_status",
                        "local_operator_replay_mismatch",
                        "local_recovery_step_mismatch",
                        "local_signer_failed",
                        "local_signing_key_mismatch",
                        "local_wallet_binding",
                        "operator_step_expected",
                        "owner_step_expected",
                        "owner_submission_command_binding",
                        "planned_command_missing",
                        "planned_command_not_unique",
                        "post_offer_step_expected",
                        "reconciliation_signature_scope",
                        "signature_completion_action",
                        "signature_hex_missing",
                        "signing_step_ahead_of_deposit",
                        "treasury_execution_restore",
                        "treasury_offer_contract_missing",
                        "unknown_command_candidates",
                        "completion_read_refused",
                        "completion_correlation",
                        "completion_not_unique",
                        "completion_transaction_correlation",
                        "interactive_act_as_missing",
                        "interactive_transaction_correlation",
                        "reconcile_binding_mismatch",
                        "rejected_completion_has_update",
                        "standard_submission_correlation",
                        "standard_submission_response_invalid",
                        "successful_completion_update_missing",
                        "unrecoverable_command_evidence",
                        "executed_evidence_correlation",
                        "executed_evidence_replay",
                        "executed_evidence_rows",
                        "executed_evidence_signature_status",
                        "execute_permit_rows",
                        "execute_permit_signature_status",
                        "ledger_rejection_correlation",
                        "ledger_rejection_replay",
                        "ledger_rejection_rows",
                        "ledger_rejection_signature_status",
                        "preparation_lock_busy",
                        "reconciliation_signature_state",
                        "signature_identity_binding",
                        "signature_identity_missing",
                        "signature_permitted_command",
                        "signature_preparable_state",
                        "signature_preparation_replay",
                        "signature_record_identity",
                        "signature_record_missing",
                        "signature_record_shape",
                        "signature_replay",
                        "signature_row_count",
                        "signature_scope_environment",
                        "signature_scope_fingerprint",
                        "signature_session_consistency",
                        "canton_command_identity",
                        "command_completion_evidence",
                        "command_confirm_rows",
                        "command_confirm_state",
                        "command_evidence_replay",
                        "command_permit_rows",
                        "command_permit_state",
                        "command_predecessors_unconfirmed",
                        "owner_signature_session_open",
                        "command_release_evidence",
                        "command_release_replay",
                        "command_release_rows",
                        "command_release_state",
                        "signature_restart_state",
                        "existing_receipt_replay",
                        "existing_receipt_rows",
                        "existing_receipt_state",
                        "local_replay_command_state",
                        "local_replay_fence_rows",
                        "local_replay_fence_state",
                        "local_replay_step",
                        "persisted_permit_mismatch",
                        "treasury_offer_command_identity",
                        "treasury_offer_confirm_rows",
                        "treasury_offer_confirm_state",
                        "treasury_offer_evidence_replay",
                        "treasury_offer_permit_rows",
                        "treasury_offer_permit_state",
                        "treasury_offer_reject_rows",
                        "treasury_offer_reject_state",
                        "treasury_offer_rejection_replay",
                        "treasury_offer_submission_id",
                        "treasury_input_amount_mismatch",
                        "treasury_input_release_rows",
                        "treasury_input_release_state",
                        "treasury_input_reservation_mismatch",
                        "treasury_input_reservation_rows",
                        "treasury_input_reservation_state"
                      ]
                    },
                    "withdrawalFailure": {
                      "type": "string",
                      "enum": [
                        "feature_disabled",
                        "spot_disabled",
                        "asset_withdraw_disabled",
                        "backing_alarm_active",
                        "holding_read_unavailable",
                        "asset_registry_stale",
                        "insufficient_balance",
                        "withdrawal_hold_stale",
                        "withdrawal_amount_below_fee",
                        "withdrawal_fee_quote_unavailable",
                        "withdrawal_destination_not_owned",
                        "withdrawal_owner_unavailable",
                        "withdrawal_unavailable",
                        "withdrawal_idempotency_conflict",
                        "requested",
                        "margin_reserved",
                        "authorized",
                        "submitted",
                        "settled",
                        "rejected",
                        "expired",
                        "failed",
                        "invalid_transition",
                        "authorization_setup_failed",
                        "margin_blocked",
                        "co_sign_incomplete",
                        "co_sign_self_approval",
                        "ttl_expired",
                        "canton_submission_failed",
                        "withdrawal_intake_stopped",
                        "withdrawal_payout_prepare_failed",
                        "withdrawal_payout_dfns_signature_failed",
                        "withdrawal_payout_canton_submit_refused",
                        "withdrawal_payout_ledger_time_expired",
                        "asset_unsupported",
                        "withdrawal_amount_invalid",
                        "withdrawal_amount_scale_exceeded",
                        "withdrawal_authorization_binding_mismatch",
                        "withdrawal_capability_unavailable",
                        "withdrawal_checkpoint_unavailable",
                        "withdrawal_not_cancellable",
                        "withdrawal_not_found",
                        "withdrawal_operators_missing",
                        "withdrawal_operators_not_distinct",
                        "withdrawal_owner_party_invalid",
                        "withdrawal_request_invalid",
                        "withdrawal_request_ended",
                        "withdrawal_reservation_release_failed",
                        "withdrawal_submission_unavailable",
                        "withdrawal_enqueue_failed",
                        "withdrawal_publish_failed"
                      ]
                    },
                    "feeShareAcceptRefusal": {
                      "type": "string",
                      "enum": [
                        "challenge_missing",
                        "challenge_expired",
                        "challenge_mismatch",
                        "payee_not_owner",
                        "offer_already_accepted",
                        "offer_expired"
                      ]
                    },
                    "dependency": {
                      "type": "string",
                      "enum": [
                        "dfns",
                        "engine",
                        "squid",
                        "ethereum_rpc"
                      ]
                    },
                    "squidRouteRefusal": {
                      "type": "string",
                      "enum": [
                        "route_not_found",
                        "route_expired",
                        "route_bound_to_other_transaction",
                        "transaction_bound_to_other_route",
                        "source_transaction_not_found",
                        "source_transaction_unverified",
                        "source_token_unsupported",
                        "unlimited_allowance_refused",
                        "provider_route_refused",
                        "slippage_exceeded",
                        "widget_hook_refused",
                        "widget_destination_refused",
                        "widget_recipient_preapproval_required",
                        "account_request_bound",
                        "global_request_bound"
                      ]
                    },
                    "positionSnapshotRefusal": {
                      "type": "string",
                      "enum": [
                        "position_projection_behind_live"
                      ]
                    },
                    "setupKeyRefusal": {
                      "type": "string",
                      "enum": [
                        "setup_key_refused"
                      ]
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "group": {
                          "type": "string",
                          "enum": [
                            "sub_accounts",
                            "trading_spot",
                            "trading_perps",
                            "listings_deposits",
                            "members_keys",
                            "mother_account"
                          ]
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "read",
                            "write"
                          ]
                        }
                      },
                      "required": [
                        "group",
                        "level"
                      ],
                      "additionalProperties": false
                    },
                    "occurredAtEpochMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "accepted": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "AccountNotEnabled",
                            "ArgumentsRequired",
                            "AuthenticationError",
                            "BadRequest",
                            "BadSymbol",
                            "DuplicateOrderId",
                            "ExchangeError",
                            "ExchangeNotAvailable",
                            "InsufficientFunds",
                            "InvalidOrder",
                            "MarketClosed",
                            "NotSupported",
                            "OrderNotFound",
                            "OrderImmediatelyFillable",
                            "PermissionDenied",
                            "RateLimitExceeded"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "promo_code_unknown",
                            "promo_code_expired",
                            "promo_code_exhausted",
                            "account_not_eligible",
                            "promo_code_already_redeemed",
                            "invalid_request",
                            "unauthorized",
                            "forbidden",
                            "not_found",
                            "idempotency_key_required",
                            "rate_limited",
                            "operation_not_available",
                            "feature_disabled",
                            "kyc_required",
                            "command_rejected",
                            "xreserve_bridge_not_ready",
                            "snapshot_unavailable",
                            "service_degraded",
                            "order_intake_stopped",
                            "account_intake_stopped",
                            "withdrawal_intake_stopped",
                            "deposit_intake_stopped",
                            "channel_disabled",
                            "access_blocked",
                            "access_not_allowlisted",
                            "canton_offline",
                            "dependency_unavailable",
                            "account_legacy_excluded",
                            "bot_fence_stale",
                            "api_key_already_rotated",
                            "passkey_registration_required",
                            "passkey_rejected",
                            "account_exists_sign_in",
                            "registration_in_progress_recover",
                            "malformed_command",
                            "malformed_order_command",
                            "unsupported_order_command",
                            "duplicate_order_command",
                            "idempotency_key_conflict",
                            "unknown_market",
                            "unknown_order",
                            "invalid_account",
                            "invalid_side",
                            "invalid_order_id",
                            "invalid_order_type",
                            "market_order_unavailable",
                            "invalid_price",
                            "invalid_quantity",
                            "invalid_leverage",
                            "invalid_slippage",
                            "market_halted",
                            "duplicate_order_id",
                            "market_not_open",
                            "market_session_closed",
                            "market_pre_close_cutoff",
                            "reduce_only_required",
                            "reduce_only_position_unavailable",
                            "self_trade_prevented",
                            "post_only_would_cross",
                            "max_matches_exceeded",
                            "insufficient_balance",
                            "reduce_only_not_supported",
                            "spot_disabled",
                            "iceberg_not_supported",
                            "invalid_iceberg_quantity",
                            "risk_reserve_unavailable",
                            "invalid_status_transition",
                            "sequencer_rejected",
                            "unknown_margin_account",
                            "invalid_order_size",
                            "withdrawals_blocked",
                            "liquidation_candidate",
                            "bad_debt",
                            "insufficient_margin",
                            "leverage_exceeds_market_max",
                            "reserve_id_conflict",
                            "unknown_reserve",
                            "mark_unavailable",
                            "insufficient_liquidity",
                            "invalid_preview_request",
                            "agents_spot_disabled",
                            "agents_perps_disabled",
                            "order_rejected_unmapped",
                            "order_notional_below_minimum",
                            "gtd_expire_time_in_past",
                            "listing_request_requester_not_owned",
                            "listing_request_requester_kind_unsupported",
                            "listing_request_pending_exists",
                            "listing_request_market_exists",
                            "listing_request_issuer_unknown",
                            "spot_quote_not_venue_settlement_asset",
                            "listing_request_asset_exists",
                            "listing_request_limits_out_of_range",
                            "listing_request_market_shape_invalid",
                            "listing_request_account_pending_limit",
                            "listing_requests_not_accepted",
                            "listing_request_logo_missing",
                            "listing_request_deposit_not_confirmed",
                            "listing_request_deposit_accept_pending",
                            "listing_request_deposit_closed",
                            "listing_request_logo_closed",
                            "organization_not_found",
                            "organization_permission_required",
                            "organization_role_required",
                            "partner_organization_required",
                            "organization_key_required",
                            "organization_key_malformed",
                            "organization_key_unknown",
                            "organization_key_revoked",
                            "organization_key_store_unavailable",
                            "organization_member_not_found",
                            "organization_member_role_fixed",
                            "organization_member_changed",
                            "organization_owner_protected",
                            "organization_last_owner",
                            "sub_account_key_scope_refused",
                            "sub_account_mother_not_configured",
                            "sub_account_mother_ambiguous",
                            "sub_account_parent_mismatch",
                            "sub_account_parent_not_linked",
                            "sub_account_parent_conflict",
                            "sub_account_parent_without_party",
                            "sub_account_limit_reached",
                            "sub_account_name_taken",
                            "sub_account_parent_linked_elsewhere",
                            "sub_account_not_found",
                            "sub_account_not_empty",
                            "sub_account_holds_positions",
                            "sub_account_holds_tokens",
                            "sub_account_exposure_unavailable",
                            "sub_account_external_transfer_refused",
                            "engine_account_capacity_exceeded",
                            "sub_account_transfer_pair_refused",
                            "sub_account_transfer_asset_refused",
                            "transfer_eligibility_insufficient",
                            "transfer_blocked",
                            "venue_halted",
                            "account_unavailable",
                            "recipient_not_found",
                            "self_transfer_not_allowed",
                            "recipient_closed",
                            "sender_restricted",
                            "internal_transfer_asset_refused",
                            "organization_funding_decimals_conflict",
                            "organization_funding_currency_reserved",
                            "organization_funding_currency_ambiguous",
                            "twap_duration_out_of_range",
                            "twap_size_below_minimum",
                            "twap_slice_below_lot",
                            "parent_order_limit_reached",
                            "market_product_mismatch",
                            "product_history_scan_bound",
                            "ioc_post_only_conflict",
                            "ioc_iceberg_conflict",
                            "limit_ioc_not_served_on_perps",
                            "fok_post_only_conflict",
                            "fok_iceberg_conflict",
                            "limit_fok_not_served_on_perps",
                            "gtd_expire_time_required",
                            "expire_time_not_allowed",
                            "limit_gtd_not_served_on_perps",
                            "insufficient_orderbook_liquidity",
                            "withdrawal_amount_below_fee",
                            "spot_convert_market_unavailable",
                            "spot_convert_invalid_lot_size",
                            "spot_convert_below_min_notional",
                            "spot_convert_sell_unfilled",
                            "spot_convert_squid_failed_usdcx_kept",
                            "swap_pair_not_found",
                            "swap_pair_unavailable",
                            "swap_invalid_amount",
                            "swap_insufficient_liquidity",
                            "swap_quote_not_found",
                            "swap_quote_expired",
                            "swap_quote_already_accepted",
                            "swap_order_not_found",
                            "swap_order_expired",
                            "swap_order_invalid_state",
                            "swap_allocation_ttl_too_short",
                            "swap_slippage_exceeded",
                            "swap_settlement_failed_unwound",
                            "swap_circuit_breaker_open",
                            "swap_idempotency_conflict",
                            "swap_invalid_integrator_fee",
                            "swap_service_unavailable"
                          ],
                          "description": "For sub-account funding, partner_organization_required identifies a trader credential, sub_account_transfer_pair_refused identifies an invalid pair, sub_account_not_found identifies a missing or foreign sub-account, and sub_account_external_transfer_refused identifies external funding. Only the organization's mother account can fund a sub-account. Available to partner organizations only."
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "field": {
                          "type": "string",
                          "minLength": 1
                        },
                        "attempted": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "name",
                        "message",
                        "code",
                        "retryable",
                        "field"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "version",
                    "requestId",
                    "code",
                    "safeMessage",
                    "retryable",
                    "recoveryActions",
                    "occurredAtEpochMs",
                    "index",
                    "accepted",
                    "error"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "cost": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0,
                  "default": []
                },
                "fee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1
                    },
                    "cost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "currency",
                    "cost"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "required": [
                "clientOrderId",
                "symbol",
                "status",
                "info"
              ],
              "additionalProperties": false
            }
          ]
        },
        "minItems": 1,
        "maxItems": 32
      },
      "V2EditOrderRequest": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "limit"
            ]
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "price": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "params": {
            "type": "object",
            "properties": {
              "accountId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "The trading account. Required for an organization key (one of its organization's linked accounts); optional otherwise, and then it must be the caller's own account."
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "symbol",
          "type",
          "side",
          "amount",
          "price"
        ],
        "additionalProperties": false
      },
      "V2EditOrdersRequest": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "symbol": {
              "type": "string",
              "minLength": 1
            },
            "type": {
              "type": "string",
              "enum": [
                "limit"
              ]
            },
            "side": {
              "type": "string",
              "enum": [
                "buy",
                "sell"
              ]
            },
            "amount": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "price": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "params": {
              "type": "object",
              "properties": {
                "accountId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "description": "The trading account. Required for an organization key (one of its organization's linked accounts); optional otherwise, and then it must be the caller's own account."
                }
              },
              "additionalProperties": false
            },
            "id": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "symbol",
            "type",
            "side",
            "amount",
            "price",
            "id"
          ],
          "additionalProperties": false
        },
        "minItems": 1,
        "maxItems": 24
      },
      "V2EditOrdersResponse": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. Canonical bot identifiers also allow the fixed bot-order/v1: prefix followed by an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "canceled"
                  ]
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string",
                      "enum": [
                        "external-order/v1"
                      ]
                    },
                    "postOnly": {
                      "type": "boolean"
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "IOC",
                        "FOK",
                        "GTD"
                      ]
                    },
                    "icebergQty": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "The visible quantity of an iceberg limit order, in base units like amount. Only this part appears in the book; the lock covers the full amount."
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell"
                      ],
                      "description": "The accepted order side, when recorded."
                    },
                    "orderType": {
                      "type": "string",
                      "enum": [
                        "limit",
                        "market"
                      ],
                      "description": "The accepted order type, when recorded."
                    },
                    "price": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The accepted limit price as a decimal string when recorded. Null for a recorded market order; absent when no order type or decimal limit price is available."
                    },
                    "priceAtoms": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+$",
                      "description": "The accepted limit price in price atoms when recorded. Null for a recorded market order; absent when the type or limit price is unavailable."
                    },
                    "quantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "The accepted original base quantity in quantity atoms, when recorded."
                    },
                    "filledQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "The filled base quantity in quantity atoms, when recorded. Absence does not mean zero; use account.fills keyed by orderId for execution updates."
                    },
                    "productType": {
                      "type": "string",
                      "enum": [
                        "spot"
                      ]
                    },
                    "lockAsset": {
                      "type": "string",
                      "minLength": 1
                    },
                    "lockedAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "remainingQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "createdAtEpochMs": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "When the venue accepted the order, in Unix epoch milliseconds: the venue clock of the command that placed it. For an order placed before the venue's order history begins (a history reset or a new history start), it is the first time the venue holds for the order: its earliest own command, else its last change, else the first venue record after it; the order was accepted no later than that."
                    },
                    "filledQuoteAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "lastFillAtEpochMs": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "orderId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "accountId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "partially_filled",
                        "filled",
                        "canceled",
                        "replaced"
                      ]
                    },
                    "lastSequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "idempotencyKey": {
                      "type": "string",
                      "minLength": 1
                    },
                    "cancelReason": {
                      "type": "string",
                      "enum": [
                        "margin_unbacked",
                        "risk_evidence_incomplete",
                        "market_session_closed",
                        "reduce_only_position_unavailable",
                        "expired",
                        "price_protection"
                      ],
                      "description": "Why the order closed. `price_protection`: a market order that is not reduce-only trades only inside a band around the mark price (1% on most markets, 3% on thin ones); the part that found no liquidity inside the band was cancelled."
                    },
                    "quantity": {
                      "type": "string",
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The order's base quantity when recorded, also returned when the order closed with part of it unfilled."
                    },
                    "filledQuantity": {
                      "type": "string",
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The base quantity that filled when recorded, also returned when the order closed with part of it unfilled."
                    },
                    "createdJournalSequence": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "The journal sequence that created the order, when recorded. This is an ordinal, not a timestamp."
                    },
                    "updatedJournalSequence": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "The journal sequence of the latest lifecycle update, equal to lastSequence. This is an ordinal, not a timestamp."
                    },
                    "updatedAtEpochMs": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "When the order last changed (its acceptance, a fill, an amend or its cancellation), in Unix epoch milliseconds: the venue clock of the command that made that change, a maker's fill included. Equal to createdAtEpochMs until the first change. For a change the venue's order history does not hold (made before a history reset), it is the order's latest own command the venue holds, never earlier than createdAtEpochMs."
                    },
                    "clientOrderId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                      "description": "The clientOrderId the order was placed with, exactly as submitted; the venue uses it as the order id, so it equals orderId. Null when the order was placed without one (the venue derived its id) or by the venue itself (a liquidation, an auto-deleverage leg or a trigger)."
                    },
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "accepted": {
                      "type": "boolean",
                      "const": true
                    },
                    "fillsPending": {
                      "type": "boolean",
                      "const": true,
                      "description": "True while the order has a fill that this answer cannot fully describe yet (order history is catching up with the matching engine). lastTradeTimestamp is then null, and cost and average are omitted when the matching engine committed no cost for the fill (a perpetual order, or a spot answer without the filled quote). A cost that the matching engine committed is always returned, with its exact average. A later fetchOrder returns the full order without this field once every fill is recorded. Read the trades and fee of a spot order from the fills read (fetchMyTrades) or the account fills stream; fetchOrder always returns an empty trades list and a null fee."
                    }
                  },
                  "required": [
                    "version",
                    "orderId",
                    "accountId",
                    "marketId",
                    "status",
                    "lastSequence",
                    "idempotencyKey",
                    "index",
                    "accepted",
                    "fillsPending"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0
                },
                "fee": {
                  "type": "null"
                },
                "cost": {
                  "type": "number",
                  "minimum": 0,
                  "description": "The filled value in the quote asset, when the matching engine committed one (a spot order with its filled quote). Omitted while no committed value is available."
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info",
                "trades",
                "fee"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. Canonical bot identifiers also allow the fixed bot-order/v1: prefix followed by an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "canceled"
                  ]
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string",
                      "enum": [
                        "external-order/v1"
                      ]
                    },
                    "postOnly": {
                      "type": "boolean"
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "IOC",
                        "FOK",
                        "GTD"
                      ]
                    },
                    "icebergQty": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "Visible base quantity of an iceberg limit order. The public book shows this quantity; the reserve covers the complete amount."
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell"
                      ],
                      "description": "The order's accepted side, if recorded."
                    },
                    "orderType": {
                      "type": "string",
                      "enum": [
                        "limit",
                        "market"
                      ],
                      "description": "The order's accepted kind, if recorded."
                    },
                    "price": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "Accepted limit price as decimal text. A recorded market order has null; omission means the kind or decimal limit price is unavailable."
                    },
                    "priceAtoms": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+$",
                      "description": "Accepted limit price in atoms. A recorded market order has null; omission means the kind or limit price is unavailable."
                    },
                    "quantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "Original accepted base quantity in quantity atoms, if recorded."
                    },
                    "filledQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "Executed base quantity in quantity atoms, if recorded. Omission does not mean zero; use account.fills for this orderId to receive executions."
                    },
                    "productType": {
                      "type": "string",
                      "enum": [
                        "spot"
                      ]
                    },
                    "lockAsset": {
                      "type": "string",
                      "minLength": 1
                    },
                    "lockedAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "remainingQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "createdAtEpochMs": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "When the venue accepted the order, in Unix epoch milliseconds: the venue clock of the command that placed it. For an order placed before the venue's order history begins (a history reset or a new history start), it is the first time the venue holds for the order: its earliest own command, else its last change, else the first venue record after it; the order was accepted no later than that."
                    },
                    "filledQuoteAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "lastFillAtEpochMs": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "orderId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "accountId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "partially_filled",
                        "filled",
                        "canceled",
                        "replaced"
                      ]
                    },
                    "lastSequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "idempotencyKey": {
                      "type": "string",
                      "minLength": 1
                    },
                    "cancelReason": {
                      "type": "string",
                      "enum": [
                        "margin_unbacked",
                        "risk_evidence_incomplete",
                        "market_session_closed",
                        "reduce_only_position_unavailable",
                        "expired",
                        "price_protection"
                      ],
                      "description": "Why the order closed. price_protection: a market order that is not reduce-only trades only inside a band around the mark price (1% on most markets, 3% on thin ones), and the part that found no liquidity inside the band was cancelled."
                    },
                    "quantity": {
                      "type": "string",
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The order's base quantity when recorded. Also returned when the order closed with part of it unfilled."
                    },
                    "filledQuantity": {
                      "type": "string",
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The base quantity that filled when recorded. Also returned when the order closed with part of it unfilled."
                    },
                    "createdJournalSequence": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Sequence at which the order was created, if recorded. This is an ordinal, not a time."
                    },
                    "updatedJournalSequence": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Sequence of the latest lifecycle change, equal to lastSequence. This is an ordinal, not a time."
                    },
                    "updatedAtEpochMs": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "When the order last changed (its acceptance, a fill, an amend or its cancellation), in Unix epoch milliseconds: the venue clock of the command that made that change, a maker's fill included. Equal to createdAtEpochMs until the first change. For a change the venue's order history does not hold (made before a history reset), it is the order's latest own command the venue holds, never earlier than createdAtEpochMs."
                    },
                    "clientOrderId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                      "description": "The clientOrderId the order was placed with, exactly as submitted; the venue uses it as the order id, so it equals orderId. Null when the order was placed without one (the venue derived its id) or by the venue itself (a liquidation, an auto-deleverage leg or a trigger)."
                    },
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "accepted": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "version",
                    "orderId",
                    "accountId",
                    "marketId",
                    "status",
                    "lastSequence",
                    "idempotencyKey",
                    "index",
                    "accepted"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "cost": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0,
                  "default": []
                },
                "fee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1
                    },
                    "cost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "currency",
                    "cost"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "const": null
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "featureFlag": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The feature flag that refused this request."
                    },
                    "orderOutcome": {
                      "type": "string",
                      "enum": [
                        "not_submitted",
                        "unknown"
                      ],
                      "description": "unknown means no complete authoritative answer is available; not_submitted is used only with positive evidence that nothing was sent."
                    },
                    "clientOrderIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      },
                      "description": "The original clientOrderIds to reconcile."
                    },
                    "reconciliation": {
                      "type": "string",
                      "minLength": 1,
                      "description": "An order-entry 503 may follow acceptance. Reconcile the original clientOrderId through account.orders (orderId is the clientOrderId) and account.fills, and take one bounded order snapshot after reconnect. A 404 alone does not prove absence of in-flight work. Never poll or automatically resubmit; keep the original clientOrderIds, request body and Idempotency-Key, never retry with a fresh identity."
                    },
                    "version": {
                      "type": "string",
                      "enum": [
                        "external-rest-error/v1"
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "promo_code_unknown",
                        "promo_code_expired",
                        "promo_code_exhausted",
                        "account_not_eligible",
                        "promo_code_already_redeemed",
                        "invalid_request",
                        "unauthorized",
                        "forbidden",
                        "not_found",
                        "idempotency_key_required",
                        "rate_limited",
                        "operation_not_available",
                        "feature_disabled",
                        "kyc_required",
                        "command_rejected",
                        "xreserve_bridge_not_ready",
                        "snapshot_unavailable",
                        "service_degraded",
                        "order_intake_stopped",
                        "account_intake_stopped",
                        "withdrawal_intake_stopped",
                        "deposit_intake_stopped",
                        "channel_disabled",
                        "access_blocked",
                        "access_not_allowlisted",
                        "canton_offline",
                        "dependency_unavailable",
                        "account_legacy_excluded",
                        "bot_fence_stale",
                        "api_key_already_rotated",
                        "passkey_registration_required",
                        "passkey_rejected",
                        "account_exists_sign_in",
                        "registration_in_progress_recover",
                        "malformed_command",
                        "malformed_order_command",
                        "unsupported_order_command",
                        "duplicate_order_command",
                        "idempotency_key_conflict",
                        "unknown_market",
                        "unknown_order",
                        "invalid_account",
                        "invalid_side",
                        "invalid_order_id",
                        "invalid_order_type",
                        "market_order_unavailable",
                        "invalid_price",
                        "invalid_quantity",
                        "invalid_leverage",
                        "invalid_slippage",
                        "market_halted",
                        "duplicate_order_id",
                        "market_not_open",
                        "market_session_closed",
                        "market_pre_close_cutoff",
                        "reduce_only_required",
                        "reduce_only_position_unavailable",
                        "self_trade_prevented",
                        "post_only_would_cross",
                        "max_matches_exceeded",
                        "insufficient_balance",
                        "reduce_only_not_supported",
                        "spot_disabled",
                        "iceberg_not_supported",
                        "invalid_iceberg_quantity",
                        "risk_reserve_unavailable",
                        "invalid_status_transition",
                        "sequencer_rejected",
                        "unknown_margin_account",
                        "invalid_order_size",
                        "withdrawals_blocked",
                        "liquidation_candidate",
                        "bad_debt",
                        "insufficient_margin",
                        "leverage_exceeds_market_max",
                        "reserve_id_conflict",
                        "unknown_reserve",
                        "mark_unavailable",
                        "insufficient_liquidity",
                        "invalid_preview_request",
                        "agents_spot_disabled",
                        "agents_perps_disabled",
                        "order_rejected_unmapped",
                        "order_notional_below_minimum",
                        "gtd_expire_time_in_past",
                        "listing_request_requester_not_owned",
                        "listing_request_requester_kind_unsupported",
                        "listing_request_pending_exists",
                        "listing_request_market_exists",
                        "listing_request_issuer_unknown",
                        "spot_quote_not_venue_settlement_asset",
                        "listing_request_asset_exists",
                        "listing_request_limits_out_of_range",
                        "listing_request_market_shape_invalid",
                        "listing_request_account_pending_limit",
                        "listing_requests_not_accepted",
                        "listing_request_logo_missing",
                        "listing_request_deposit_not_confirmed",
                        "listing_request_deposit_accept_pending",
                        "listing_request_deposit_closed",
                        "listing_request_logo_closed",
                        "organization_not_found",
                        "organization_permission_required",
                        "organization_role_required",
                        "partner_organization_required",
                        "organization_key_required",
                        "organization_key_malformed",
                        "organization_key_unknown",
                        "organization_key_revoked",
                        "organization_key_store_unavailable",
                        "organization_member_not_found",
                        "organization_member_role_fixed",
                        "organization_member_changed",
                        "organization_owner_protected",
                        "organization_last_owner",
                        "sub_account_key_scope_refused",
                        "sub_account_mother_not_configured",
                        "sub_account_mother_ambiguous",
                        "sub_account_parent_mismatch",
                        "sub_account_parent_not_linked",
                        "sub_account_parent_conflict",
                        "sub_account_parent_without_party",
                        "sub_account_limit_reached",
                        "sub_account_name_taken",
                        "sub_account_parent_linked_elsewhere",
                        "sub_account_not_found",
                        "sub_account_not_empty",
                        "sub_account_holds_positions",
                        "sub_account_holds_tokens",
                        "sub_account_exposure_unavailable",
                        "sub_account_external_transfer_refused",
                        "engine_account_capacity_exceeded",
                        "sub_account_transfer_pair_refused",
                        "sub_account_transfer_asset_refused",
                        "transfer_eligibility_insufficient",
                        "transfer_blocked",
                        "venue_halted",
                        "account_unavailable",
                        "recipient_not_found",
                        "self_transfer_not_allowed",
                        "recipient_closed",
                        "sender_restricted",
                        "internal_transfer_asset_refused",
                        "organization_funding_decimals_conflict",
                        "organization_funding_currency_reserved",
                        "organization_funding_currency_ambiguous",
                        "twap_duration_out_of_range",
                        "twap_size_below_minimum",
                        "twap_slice_below_lot",
                        "parent_order_limit_reached",
                        "market_product_mismatch",
                        "product_history_scan_bound",
                        "ioc_post_only_conflict",
                        "ioc_iceberg_conflict",
                        "limit_ioc_not_served_on_perps",
                        "fok_post_only_conflict",
                        "fok_iceberg_conflict",
                        "limit_fok_not_served_on_perps",
                        "gtd_expire_time_required",
                        "expire_time_not_allowed",
                        "limit_gtd_not_served_on_perps",
                        "insufficient_orderbook_liquidity",
                        "withdrawal_amount_below_fee",
                        "spot_convert_market_unavailable",
                        "spot_convert_invalid_lot_size",
                        "spot_convert_below_min_notional",
                        "spot_convert_sell_unfilled",
                        "spot_convert_squid_failed_usdcx_kept",
                        "swap_pair_not_found",
                        "swap_pair_unavailable",
                        "swap_invalid_amount",
                        "swap_insufficient_liquidity",
                        "swap_quote_not_found",
                        "swap_quote_expired",
                        "swap_quote_already_accepted",
                        "swap_order_not_found",
                        "swap_order_expired",
                        "swap_order_invalid_state",
                        "swap_allocation_ttl_too_short",
                        "swap_slippage_exceeded",
                        "swap_settlement_failed_unwound",
                        "swap_circuit_breaker_open",
                        "swap_idempotency_conflict",
                        "swap_invalid_integrator_fee",
                        "swap_service_unavailable"
                      ]
                    },
                    "safeMessage": {
                      "type": "string",
                      "minLength": 1
                    },
                    "retryable": {
                      "type": "boolean"
                    },
                    "recoveryActions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "none",
                          "retry_after",
                          "observe_status",
                          "refresh_snapshot",
                          "resubscribe_stream",
                          "wait_for_projector",
                          "wait_for_operator_recovery",
                          "contact_support",
                          "request_approval",
                          "rerun_dry_run",
                          "do_not_retry"
                        ]
                      },
                      "minItems": 1
                    },
                    "realtimeTicketFailure": {
                      "type": "string",
                      "enum": [
                        "invalid",
                        "replayed",
                        "replaced",
                        "expired",
                        "revoked",
                        "store_unavailable"
                      ]
                    },
                    "apiKeyRejection": {
                      "type": "string",
                      "enum": [
                        "malformed",
                        "unknown",
                        "expired",
                        "revoked",
                        "principal_unavailable",
                        "store_unavailable",
                        "scope_insufficient",
                        "passkey_required",
                        "environment_forbidden",
                        "principal_mismatch",
                        "bot_fence_invalid",
                        "bot_fence_stale",
                        "already_rotated"
                      ]
                    },
                    "agentRefusal": {
                      "type": "string",
                      "enum": [
                        "agents_not_admitted_in_environment",
                        "agent_mode_not_admitted",
                        "agent_limit_reached",
                        "agent_deployment_not_found",
                        "agent_deployment_transition_refused",
                        "agent_deployment_stopping",
                        "agent_deployment_deleting",
                        "agent_deployment_has_open_exposure",
                        "agent_position_close_unavailable",
                        "agent_position_close_outcome_unknown",
                        "agent_position_close_refused",
                        "agent_position_close_partial",
                        "agent_position_close_pause_pending",
                        "agent_balance_return_unavailable",
                        "agent_trading_disabled",
                        "strategy_source_invalid",
                        "market_book_missing",
                        "skill_kill_switch_engaged",
                        "skill_market_closed",
                        "skill_market_session_unknown",
                        "skill_reduce_only_drawdown",
                        "skill_reduce_only_daily_loss",
                        "skill_wallet_unknown",
                        "skill_averaging_down",
                        "skill_entry_price_unknown",
                        "skill_edge_below_costs",
                        "skill_price_unknown",
                        "skill_size_capped",
                        "skill_size_below_minimum",
                        "skill_liquidation_too_close",
                        "skill_margin_unknown",
                        "paper_intent_size",
                        "paper_intent_market_price",
                        "paper_intent_market_time_in_force",
                        "paper_intent_limit_price",
                        "paper_stop_not_simulated",
                        "market_not_listed",
                        "agent_deployment_account_missing",
                        "agent_deployment_funding_missing",
                        "agent_account_already_bound",
                        "market_selection_unavailable",
                        "market_selection_undecided",
                        "market_stream_refused",
                        "pine_author_unavailable",
                        "pine_draft_in_flight",
                        "pine_draft_rate_limited",
                        "backtest_window_invalid",
                        "backtest_initial_capital_invalid",
                        "backtest_candles_unavailable",
                        "backtest_simulation_refused",
                        "backtest_timed_out",
                        "backtest_capacity_exhausted",
                        "backtest_in_flight",
                        "backtest_rate_limited",
                        "model_not_admitted",
                        "model_consent_required",
                        "agent_account_not_found",
                        "agent_account_not_fundable",
                        "agent_test_funding_not_offered",
                        "agent_test_funding_amount_invalid",
                        "agent_test_funding_treasury_floor",
                        "agent_test_funding_daily_cap_reached",
                        "agent_test_funding_daily_capacity_reached",
                        "agent_test_funding_idempotency_conflict",
                        "agent_test_funding_in_flight",
                        "agent_test_funding_pending",
                        "agent_test_funding_released",
                        "agent_test_funding_outcome_unknown",
                        "agent_test_funding_balance_insufficient",
                        "agent_test_funding_balance_unavailable",
                        "agent_funding_owner_balance_only",
                        "agent_live_key_unavailable",
                        "agent_live_order_shape_unsupported",
                        "agent_live_order_too_large",
                        "order_notional_below_minimum",
                        "agent_live_equity_unavailable",
                        "agent_live_open_order_limit",
                        "agent_live_open_orders_unavailable",
                        "agent_live_order_rate_limit",
                        "agent_live_reduce_only",
                        "agent_live_funding_unavailable",
                        "agent_live_view_unavailable",
                        "agent_fees_unpaid",
                        "agent_live_idempotency_key_required",
                        "agent_account_owner_ineligible",
                        "agent_account_identity_pending",
                        "agent_live_idempotency_conflict",
                        "agent_venue_capacity_reached",
                        "agent_deposit_funding_pending",
                        "agent_funding_amount_invalid",
                        "agent_funding_owner_party_missing",
                        "agent_funding_idempotency_conflict",
                        "agent_funding_not_found",
                        "agent_funding_expired",
                        "owner_signature_invalid",
                        "transfer_eligibility_insufficient",
                        "transfer_blocked",
                        "venue_halted",
                        "account_unavailable",
                        "account_transfer_unavailable",
                        "engine_view_unavailable",
                        "account_transfer_not_enabled",
                        "account_transfer_outcome_unknown",
                        "agent_fill_not_found",
                        "strategy_order_id_invalid",
                        "agent_live_venue_unavailable"
                      ]
                    },
                    "rejectionGuard": {
                      "type": "string",
                      "enum": [
                        "custodial_signer_environment_not_service_held",
                        "custodial_signer_owner_approval_missing",
                        "custodial_signer_kind_not_allowed",
                        "custodial_signer_prepared_transaction_refused",
                        "custodial_signer_not_service_held",
                        "custodial_signer_binding_mismatch",
                        "custodial_signer_signature_invalid",
                        "custodial_signer_deposit_over_cap",
                        "custodial_signer_payout_not_consented",
                        "custodial_signer_signature_outcome_unknown",
                        "access_not_allowlisted",
                        "amount_atoms_invalid",
                        "command_act_as_invalid",
                        "command_field_required",
                        "command_value_missing",
                        "completion_synchronizer_mismatch",
                        "deposit_field_required",
                        "deposit_integer_invalid",
                        "deposit_timestamp_invalid",
                        "hashing_scheme_unspecified",
                        "ledger_node_id_invalid",
                        "ledger_offset_invalid",
                        "rejection_completion_status",
                        "signature_failure_reason_invalid",
                        "signature_field_hex",
                        "signature_field_required",
                        "submission_id_mismatch",
                        "successful_completion_evidence",
                        "consumed_replay_evidence",
                        "delegated_signing_key_binding",
                        "deposit_asset_unsupported",
                        "deposit_amount_invalid",
                        "deposit_amount_rail_unsupported",
                        "deposit_amount_scale_exceeded",
                        "conversion_holding_unknown",
                        "conversion_amount_mismatch",
                        "conversion_step_not_due",
                        "deposit_missing",
                        "deposit_owner_binding",
                        "deposit_scope",
                        "dfns_confirmation_environment",
                        "funding_intent",
                        "funding_intent_advance",
                        "funding_intent_already_bound",
                        "funding_intent_cancelled",
                        "funding_intent_consumed_without_deposit",
                        "funding_intent_missing",
                        "intent_asset_unsupported",
                        "intent_owner_binding",
                        "local_confirmation_environment",
                        "owner_intent_scope",
                        "owner_kind_unsupported",
                        "arrival_deposit_delegated_only",
                        "planned_command_identities",
                        "request_owner_binding",
                        "local_authority_party_missing",
                        "local_confirmation_deposit_status",
                        "local_operator_replay_mismatch",
                        "local_recovery_step_mismatch",
                        "local_signer_failed",
                        "local_signing_key_mismatch",
                        "local_wallet_binding",
                        "operator_step_expected",
                        "owner_step_expected",
                        "owner_submission_command_binding",
                        "planned_command_missing",
                        "planned_command_not_unique",
                        "post_offer_step_expected",
                        "reconciliation_signature_scope",
                        "signature_completion_action",
                        "signature_hex_missing",
                        "signing_step_ahead_of_deposit",
                        "treasury_execution_restore",
                        "treasury_offer_contract_missing",
                        "unknown_command_candidates",
                        "completion_read_refused",
                        "completion_correlation",
                        "completion_not_unique",
                        "completion_transaction_correlation",
                        "interactive_act_as_missing",
                        "interactive_transaction_correlation",
                        "reconcile_binding_mismatch",
                        "rejected_completion_has_update",
                        "standard_submission_correlation",
                        "standard_submission_response_invalid",
                        "successful_completion_update_missing",
                        "unrecoverable_command_evidence",
                        "executed_evidence_correlation",
                        "executed_evidence_replay",
                        "executed_evidence_rows",
                        "executed_evidence_signature_status",
                        "execute_permit_rows",
                        "execute_permit_signature_status",
                        "ledger_rejection_correlation",
                        "ledger_rejection_replay",
                        "ledger_rejection_rows",
                        "ledger_rejection_signature_status",
                        "preparation_lock_busy",
                        "reconciliation_signature_state",
                        "signature_identity_binding",
                        "signature_identity_missing",
                        "signature_permitted_command",
                        "signature_preparable_state",
                        "signature_preparation_replay",
                        "signature_record_identity",
                        "signature_record_missing",
                        "signature_record_shape",
                        "signature_replay",
                        "signature_row_count",
                        "signature_scope_environment",
                        "signature_scope_fingerprint",
                        "signature_session_consistency",
                        "canton_command_identity",
                        "command_completion_evidence",
                        "command_confirm_rows",
                        "command_confirm_state",
                        "command_evidence_replay",
                        "command_permit_rows",
                        "command_permit_state",
                        "command_predecessors_unconfirmed",
                        "owner_signature_session_open",
                        "command_release_evidence",
                        "command_release_replay",
                        "command_release_rows",
                        "command_release_state",
                        "signature_restart_state",
                        "existing_receipt_replay",
                        "existing_receipt_rows",
                        "existing_receipt_state",
                        "local_replay_command_state",
                        "local_replay_fence_rows",
                        "local_replay_fence_state",
                        "local_replay_step",
                        "persisted_permit_mismatch",
                        "treasury_offer_command_identity",
                        "treasury_offer_confirm_rows",
                        "treasury_offer_confirm_state",
                        "treasury_offer_evidence_replay",
                        "treasury_offer_permit_rows",
                        "treasury_offer_permit_state",
                        "treasury_offer_reject_rows",
                        "treasury_offer_reject_state",
                        "treasury_offer_rejection_replay",
                        "treasury_offer_submission_id",
                        "treasury_input_amount_mismatch",
                        "treasury_input_release_rows",
                        "treasury_input_release_state",
                        "treasury_input_reservation_mismatch",
                        "treasury_input_reservation_rows",
                        "treasury_input_reservation_state"
                      ]
                    },
                    "withdrawalFailure": {
                      "type": "string",
                      "enum": [
                        "feature_disabled",
                        "spot_disabled",
                        "asset_withdraw_disabled",
                        "backing_alarm_active",
                        "holding_read_unavailable",
                        "asset_registry_stale",
                        "insufficient_balance",
                        "withdrawal_hold_stale",
                        "withdrawal_amount_below_fee",
                        "withdrawal_fee_quote_unavailable",
                        "withdrawal_destination_not_owned",
                        "withdrawal_owner_unavailable",
                        "withdrawal_unavailable",
                        "withdrawal_idempotency_conflict",
                        "requested",
                        "margin_reserved",
                        "authorized",
                        "submitted",
                        "settled",
                        "rejected",
                        "expired",
                        "failed",
                        "invalid_transition",
                        "authorization_setup_failed",
                        "margin_blocked",
                        "co_sign_incomplete",
                        "co_sign_self_approval",
                        "ttl_expired",
                        "canton_submission_failed",
                        "withdrawal_intake_stopped",
                        "withdrawal_payout_prepare_failed",
                        "withdrawal_payout_dfns_signature_failed",
                        "withdrawal_payout_canton_submit_refused",
                        "withdrawal_payout_ledger_time_expired",
                        "asset_unsupported",
                        "withdrawal_amount_invalid",
                        "withdrawal_amount_scale_exceeded",
                        "withdrawal_authorization_binding_mismatch",
                        "withdrawal_capability_unavailable",
                        "withdrawal_checkpoint_unavailable",
                        "withdrawal_not_cancellable",
                        "withdrawal_not_found",
                        "withdrawal_operators_missing",
                        "withdrawal_operators_not_distinct",
                        "withdrawal_owner_party_invalid",
                        "withdrawal_request_invalid",
                        "withdrawal_request_ended",
                        "withdrawal_reservation_release_failed",
                        "withdrawal_submission_unavailable",
                        "withdrawal_enqueue_failed",
                        "withdrawal_publish_failed"
                      ]
                    },
                    "feeShareAcceptRefusal": {
                      "type": "string",
                      "enum": [
                        "challenge_missing",
                        "challenge_expired",
                        "challenge_mismatch",
                        "payee_not_owner",
                        "offer_already_accepted",
                        "offer_expired"
                      ]
                    },
                    "dependency": {
                      "type": "string",
                      "enum": [
                        "dfns",
                        "engine",
                        "squid",
                        "ethereum_rpc"
                      ]
                    },
                    "squidRouteRefusal": {
                      "type": "string",
                      "enum": [
                        "route_not_found",
                        "route_expired",
                        "route_bound_to_other_transaction",
                        "transaction_bound_to_other_route",
                        "source_transaction_not_found",
                        "source_transaction_unverified",
                        "source_token_unsupported",
                        "unlimited_allowance_refused",
                        "provider_route_refused",
                        "slippage_exceeded",
                        "widget_hook_refused",
                        "widget_destination_refused",
                        "widget_recipient_preapproval_required",
                        "account_request_bound",
                        "global_request_bound"
                      ]
                    },
                    "positionSnapshotRefusal": {
                      "type": "string",
                      "enum": [
                        "position_projection_behind_live"
                      ]
                    },
                    "setupKeyRefusal": {
                      "type": "string",
                      "enum": [
                        "setup_key_refused"
                      ]
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "group": {
                          "type": "string",
                          "enum": [
                            "sub_accounts",
                            "trading_spot",
                            "trading_perps",
                            "listings_deposits",
                            "members_keys",
                            "mother_account"
                          ]
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "read",
                            "write"
                          ]
                        }
                      },
                      "required": [
                        "group",
                        "level"
                      ],
                      "additionalProperties": false
                    },
                    "occurredAtEpochMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "accepted": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "AccountNotEnabled",
                            "ArgumentsRequired",
                            "AuthenticationError",
                            "BadRequest",
                            "BadSymbol",
                            "DuplicateOrderId",
                            "ExchangeError",
                            "ExchangeNotAvailable",
                            "InsufficientFunds",
                            "InvalidOrder",
                            "MarketClosed",
                            "NotSupported",
                            "OrderNotFound",
                            "OrderImmediatelyFillable",
                            "PermissionDenied",
                            "RateLimitExceeded"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "promo_code_unknown",
                            "promo_code_expired",
                            "promo_code_exhausted",
                            "account_not_eligible",
                            "promo_code_already_redeemed",
                            "invalid_request",
                            "unauthorized",
                            "forbidden",
                            "not_found",
                            "idempotency_key_required",
                            "rate_limited",
                            "operation_not_available",
                            "feature_disabled",
                            "kyc_required",
                            "command_rejected",
                            "xreserve_bridge_not_ready",
                            "snapshot_unavailable",
                            "service_degraded",
                            "order_intake_stopped",
                            "account_intake_stopped",
                            "withdrawal_intake_stopped",
                            "deposit_intake_stopped",
                            "channel_disabled",
                            "access_blocked",
                            "access_not_allowlisted",
                            "canton_offline",
                            "dependency_unavailable",
                            "account_legacy_excluded",
                            "bot_fence_stale",
                            "api_key_already_rotated",
                            "passkey_registration_required",
                            "passkey_rejected",
                            "account_exists_sign_in",
                            "registration_in_progress_recover",
                            "malformed_command",
                            "malformed_order_command",
                            "unsupported_order_command",
                            "duplicate_order_command",
                            "idempotency_key_conflict",
                            "unknown_market",
                            "unknown_order",
                            "invalid_account",
                            "invalid_side",
                            "invalid_order_id",
                            "invalid_order_type",
                            "market_order_unavailable",
                            "invalid_price",
                            "invalid_quantity",
                            "invalid_leverage",
                            "invalid_slippage",
                            "market_halted",
                            "duplicate_order_id",
                            "market_not_open",
                            "market_session_closed",
                            "market_pre_close_cutoff",
                            "reduce_only_required",
                            "reduce_only_position_unavailable",
                            "self_trade_prevented",
                            "post_only_would_cross",
                            "max_matches_exceeded",
                            "insufficient_balance",
                            "reduce_only_not_supported",
                            "spot_disabled",
                            "iceberg_not_supported",
                            "invalid_iceberg_quantity",
                            "risk_reserve_unavailable",
                            "invalid_status_transition",
                            "sequencer_rejected",
                            "unknown_margin_account",
                            "invalid_order_size",
                            "withdrawals_blocked",
                            "liquidation_candidate",
                            "bad_debt",
                            "insufficient_margin",
                            "leverage_exceeds_market_max",
                            "reserve_id_conflict",
                            "unknown_reserve",
                            "mark_unavailable",
                            "insufficient_liquidity",
                            "invalid_preview_request",
                            "agents_spot_disabled",
                            "agents_perps_disabled",
                            "order_rejected_unmapped",
                            "order_notional_below_minimum",
                            "gtd_expire_time_in_past",
                            "listing_request_requester_not_owned",
                            "listing_request_requester_kind_unsupported",
                            "listing_request_pending_exists",
                            "listing_request_market_exists",
                            "listing_request_issuer_unknown",
                            "spot_quote_not_venue_settlement_asset",
                            "listing_request_asset_exists",
                            "listing_request_limits_out_of_range",
                            "listing_request_market_shape_invalid",
                            "listing_request_account_pending_limit",
                            "listing_requests_not_accepted",
                            "listing_request_logo_missing",
                            "listing_request_deposit_not_confirmed",
                            "listing_request_deposit_accept_pending",
                            "listing_request_deposit_closed",
                            "listing_request_logo_closed",
                            "organization_not_found",
                            "organization_permission_required",
                            "organization_role_required",
                            "partner_organization_required",
                            "organization_key_required",
                            "organization_key_malformed",
                            "organization_key_unknown",
                            "organization_key_revoked",
                            "organization_key_store_unavailable",
                            "organization_member_not_found",
                            "organization_member_role_fixed",
                            "organization_member_changed",
                            "organization_owner_protected",
                            "organization_last_owner",
                            "sub_account_key_scope_refused",
                            "sub_account_mother_not_configured",
                            "sub_account_mother_ambiguous",
                            "sub_account_parent_mismatch",
                            "sub_account_parent_not_linked",
                            "sub_account_parent_conflict",
                            "sub_account_parent_without_party",
                            "sub_account_limit_reached",
                            "sub_account_name_taken",
                            "sub_account_parent_linked_elsewhere",
                            "sub_account_not_found",
                            "sub_account_not_empty",
                            "sub_account_holds_positions",
                            "sub_account_holds_tokens",
                            "sub_account_exposure_unavailable",
                            "sub_account_external_transfer_refused",
                            "engine_account_capacity_exceeded",
                            "sub_account_transfer_pair_refused",
                            "sub_account_transfer_asset_refused",
                            "transfer_eligibility_insufficient",
                            "transfer_blocked",
                            "venue_halted",
                            "account_unavailable",
                            "recipient_not_found",
                            "self_transfer_not_allowed",
                            "recipient_closed",
                            "sender_restricted",
                            "internal_transfer_asset_refused",
                            "organization_funding_decimals_conflict",
                            "organization_funding_currency_reserved",
                            "organization_funding_currency_ambiguous",
                            "twap_duration_out_of_range",
                            "twap_size_below_minimum",
                            "twap_slice_below_lot",
                            "parent_order_limit_reached",
                            "market_product_mismatch",
                            "product_history_scan_bound",
                            "ioc_post_only_conflict",
                            "ioc_iceberg_conflict",
                            "limit_ioc_not_served_on_perps",
                            "fok_post_only_conflict",
                            "fok_iceberg_conflict",
                            "limit_fok_not_served_on_perps",
                            "gtd_expire_time_required",
                            "expire_time_not_allowed",
                            "limit_gtd_not_served_on_perps",
                            "insufficient_orderbook_liquidity",
                            "withdrawal_amount_below_fee",
                            "spot_convert_market_unavailable",
                            "spot_convert_invalid_lot_size",
                            "spot_convert_below_min_notional",
                            "spot_convert_sell_unfilled",
                            "spot_convert_squid_failed_usdcx_kept",
                            "swap_pair_not_found",
                            "swap_pair_unavailable",
                            "swap_invalid_amount",
                            "swap_insufficient_liquidity",
                            "swap_quote_not_found",
                            "swap_quote_expired",
                            "swap_quote_already_accepted",
                            "swap_order_not_found",
                            "swap_order_expired",
                            "swap_order_invalid_state",
                            "swap_allocation_ttl_too_short",
                            "swap_slippage_exceeded",
                            "swap_settlement_failed_unwound",
                            "swap_circuit_breaker_open",
                            "swap_idempotency_conflict",
                            "swap_invalid_integrator_fee",
                            "swap_service_unavailable"
                          ],
                          "description": "For sub-account funding, partner_organization_required identifies a trader credential, sub_account_transfer_pair_refused identifies an invalid pair, sub_account_not_found identifies a missing or foreign sub-account, and sub_account_external_transfer_refused identifies external funding. Only the organization's mother account can fund a sub-account. Available to partner organizations only."
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "field": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "default": null
                        },
                        "attempted": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name",
                        "message",
                        "code",
                        "retryable",
                        "attempted"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "version",
                    "requestId",
                    "code",
                    "safeMessage",
                    "retryable",
                    "recoveryActions",
                    "occurredAtEpochMs",
                    "index",
                    "accepted",
                    "error"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "cost": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0,
                  "default": []
                },
                "fee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1
                    },
                    "cost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "currency",
                    "cost"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info"
              ],
              "additionalProperties": false
            }
          ]
        },
        "minItems": 1,
        "maxItems": 24
      },
      "V2ErrorResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "AccountNotEnabled",
              "ArgumentsRequired",
              "AuthenticationError",
              "BadRequest",
              "BadSymbol",
              "DuplicateOrderId",
              "ExchangeError",
              "ExchangeNotAvailable",
              "InsufficientFunds",
              "InvalidOrder",
              "MarketClosed",
              "NotSupported",
              "OrderNotFound",
              "OrderImmediatelyFillable",
              "PermissionDenied",
              "RateLimitExceeded"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "enum": [
              "promo_code_unknown",
              "promo_code_expired",
              "promo_code_exhausted",
              "account_not_eligible",
              "promo_code_already_redeemed",
              "invalid_request",
              "unauthorized",
              "forbidden",
              "not_found",
              "idempotency_key_required",
              "rate_limited",
              "operation_not_available",
              "feature_disabled",
              "kyc_required",
              "command_rejected",
              "xreserve_bridge_not_ready",
              "snapshot_unavailable",
              "service_degraded",
              "order_intake_stopped",
              "account_intake_stopped",
              "withdrawal_intake_stopped",
              "deposit_intake_stopped",
              "channel_disabled",
              "access_blocked",
              "access_not_allowlisted",
              "canton_offline",
              "dependency_unavailable",
              "account_legacy_excluded",
              "bot_fence_stale",
              "api_key_already_rotated",
              "passkey_registration_required",
              "passkey_rejected",
              "account_exists_sign_in",
              "registration_in_progress_recover",
              "malformed_command",
              "malformed_order_command",
              "unsupported_order_command",
              "duplicate_order_command",
              "idempotency_key_conflict",
              "unknown_market",
              "unknown_order",
              "invalid_account",
              "invalid_side",
              "invalid_order_id",
              "invalid_order_type",
              "market_order_unavailable",
              "invalid_price",
              "invalid_quantity",
              "invalid_leverage",
              "invalid_slippage",
              "market_halted",
              "duplicate_order_id",
              "market_not_open",
              "market_session_closed",
              "market_pre_close_cutoff",
              "reduce_only_required",
              "reduce_only_position_unavailable",
              "self_trade_prevented",
              "post_only_would_cross",
              "max_matches_exceeded",
              "insufficient_balance",
              "reduce_only_not_supported",
              "spot_disabled",
              "iceberg_not_supported",
              "invalid_iceberg_quantity",
              "risk_reserve_unavailable",
              "invalid_status_transition",
              "sequencer_rejected",
              "unknown_margin_account",
              "invalid_order_size",
              "withdrawals_blocked",
              "liquidation_candidate",
              "bad_debt",
              "insufficient_margin",
              "leverage_exceeds_market_max",
              "reserve_id_conflict",
              "unknown_reserve",
              "mark_unavailable",
              "insufficient_liquidity",
              "invalid_preview_request",
              "agents_spot_disabled",
              "agents_perps_disabled",
              "order_rejected_unmapped",
              "order_notional_below_minimum",
              "gtd_expire_time_in_past",
              "listing_request_requester_not_owned",
              "listing_request_requester_kind_unsupported",
              "listing_request_pending_exists",
              "listing_request_market_exists",
              "listing_request_issuer_unknown",
              "spot_quote_not_venue_settlement_asset",
              "listing_request_asset_exists",
              "listing_request_limits_out_of_range",
              "listing_request_market_shape_invalid",
              "listing_request_account_pending_limit",
              "listing_requests_not_accepted",
              "listing_request_logo_missing",
              "listing_request_deposit_not_confirmed",
              "listing_request_deposit_accept_pending",
              "listing_request_deposit_closed",
              "listing_request_logo_closed",
              "organization_not_found",
              "organization_permission_required",
              "organization_role_required",
              "partner_organization_required",
              "organization_key_required",
              "organization_key_malformed",
              "organization_key_unknown",
              "organization_key_revoked",
              "organization_key_store_unavailable",
              "organization_member_not_found",
              "organization_member_role_fixed",
              "organization_member_changed",
              "organization_owner_protected",
              "organization_last_owner",
              "sub_account_key_scope_refused",
              "sub_account_mother_not_configured",
              "sub_account_mother_ambiguous",
              "sub_account_parent_mismatch",
              "sub_account_parent_not_linked",
              "sub_account_parent_conflict",
              "sub_account_parent_without_party",
              "sub_account_limit_reached",
              "sub_account_name_taken",
              "sub_account_parent_linked_elsewhere",
              "sub_account_not_found",
              "sub_account_not_empty",
              "sub_account_holds_positions",
              "sub_account_holds_tokens",
              "sub_account_exposure_unavailable",
              "sub_account_external_transfer_refused",
              "engine_account_capacity_exceeded",
              "sub_account_transfer_pair_refused",
              "sub_account_transfer_asset_refused",
              "transfer_eligibility_insufficient",
              "transfer_blocked",
              "venue_halted",
              "account_unavailable",
              "recipient_not_found",
              "self_transfer_not_allowed",
              "recipient_closed",
              "sender_restricted",
              "internal_transfer_asset_refused",
              "organization_funding_decimals_conflict",
              "organization_funding_currency_reserved",
              "organization_funding_currency_ambiguous",
              "twap_duration_out_of_range",
              "twap_size_below_minimum",
              "twap_slice_below_lot",
              "parent_order_limit_reached",
              "market_product_mismatch",
              "product_history_scan_bound",
              "ioc_post_only_conflict",
              "ioc_iceberg_conflict",
              "limit_ioc_not_served_on_perps",
              "fok_post_only_conflict",
              "fok_iceberg_conflict",
              "limit_fok_not_served_on_perps",
              "gtd_expire_time_required",
              "expire_time_not_allowed",
              "limit_gtd_not_served_on_perps",
              "insufficient_orderbook_liquidity",
              "withdrawal_amount_below_fee",
              "spot_convert_market_unavailable",
              "spot_convert_invalid_lot_size",
              "spot_convert_below_min_notional",
              "spot_convert_sell_unfilled",
              "spot_convert_squid_failed_usdcx_kept",
              "swap_pair_not_found",
              "swap_pair_unavailable",
              "swap_invalid_amount",
              "swap_insufficient_liquidity",
              "swap_quote_not_found",
              "swap_quote_expired",
              "swap_quote_already_accepted",
              "swap_order_not_found",
              "swap_order_expired",
              "swap_order_invalid_state",
              "swap_allocation_ttl_too_short",
              "swap_slippage_exceeded",
              "swap_settlement_failed_unwound",
              "swap_circuit_breaker_open",
              "swap_idempotency_conflict",
              "swap_invalid_integrator_fee",
              "swap_service_unavailable"
            ],
            "description": "For sub-account funding, partner_organization_required identifies a trader credential, sub_account_transfer_pair_refused identifies an invalid pair, sub_account_not_found identifies a missing or foreign sub-account, and sub_account_external_transfer_refused identifies external funding. Only the organization's mother account can fund a sub-account. Available to partner organizations only."
          },
          "retryable": {
            "type": "boolean"
          },
          "timestamp": {
            "type": "integer",
            "minimum": 0
          },
          "datetime": {
            "type": "string"
          },
          "info": {
            "type": "object",
            "properties": {
              "featureFlag": {
                "type": "string",
                "minLength": 1,
                "description": "The feature flag that refused this request."
              },
              "orderOutcome": {
                "type": "string",
                "enum": [
                  "not_submitted",
                  "unknown"
                ],
                "description": "unknown means no complete authoritative answer is available; not_submitted is used only with positive evidence that nothing was sent."
              },
              "clientOrderIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "description": "The original clientOrderIds to reconcile."
              },
              "reconciliation": {
                "type": "string",
                "minLength": 1,
                "description": "An order-entry 503 may follow acceptance. Reconcile the original clientOrderId through account.orders (orderId is the clientOrderId) and account.fills, and take one bounded order snapshot after reconnect. A 404 alone does not prove absence of in-flight work. Never poll or automatically resubmit; keep the original clientOrderIds, request body and Idempotency-Key, never retry with a fresh identity."
              },
              "version": {
                "type": "string",
                "enum": [
                  "external-rest-error/v1"
                ]
              },
              "requestId": {
                "type": "string",
                "minLength": 1
              },
              "code": {
                "type": "string",
                "enum": [
                  "promo_code_unknown",
                  "promo_code_expired",
                  "promo_code_exhausted",
                  "account_not_eligible",
                  "promo_code_already_redeemed",
                  "invalid_request",
                  "unauthorized",
                  "forbidden",
                  "not_found",
                  "idempotency_key_required",
                  "rate_limited",
                  "operation_not_available",
                  "feature_disabled",
                  "kyc_required",
                  "command_rejected",
                  "xreserve_bridge_not_ready",
                  "snapshot_unavailable",
                  "service_degraded",
                  "order_intake_stopped",
                  "account_intake_stopped",
                  "withdrawal_intake_stopped",
                  "deposit_intake_stopped",
                  "channel_disabled",
                  "access_blocked",
                  "access_not_allowlisted",
                  "canton_offline",
                  "dependency_unavailable",
                  "account_legacy_excluded",
                  "bot_fence_stale",
                  "api_key_already_rotated",
                  "passkey_registration_required",
                  "passkey_rejected",
                  "account_exists_sign_in",
                  "registration_in_progress_recover",
                  "malformed_command",
                  "malformed_order_command",
                  "unsupported_order_command",
                  "duplicate_order_command",
                  "idempotency_key_conflict",
                  "unknown_market",
                  "unknown_order",
                  "invalid_account",
                  "invalid_side",
                  "invalid_order_id",
                  "invalid_order_type",
                  "market_order_unavailable",
                  "invalid_price",
                  "invalid_quantity",
                  "invalid_leverage",
                  "invalid_slippage",
                  "market_halted",
                  "duplicate_order_id",
                  "market_not_open",
                  "market_session_closed",
                  "market_pre_close_cutoff",
                  "reduce_only_required",
                  "reduce_only_position_unavailable",
                  "self_trade_prevented",
                  "post_only_would_cross",
                  "max_matches_exceeded",
                  "insufficient_balance",
                  "reduce_only_not_supported",
                  "spot_disabled",
                  "iceberg_not_supported",
                  "invalid_iceberg_quantity",
                  "risk_reserve_unavailable",
                  "invalid_status_transition",
                  "sequencer_rejected",
                  "unknown_margin_account",
                  "invalid_order_size",
                  "withdrawals_blocked",
                  "liquidation_candidate",
                  "bad_debt",
                  "insufficient_margin",
                  "leverage_exceeds_market_max",
                  "reserve_id_conflict",
                  "unknown_reserve",
                  "mark_unavailable",
                  "insufficient_liquidity",
                  "invalid_preview_request",
                  "agents_spot_disabled",
                  "agents_perps_disabled",
                  "order_rejected_unmapped",
                  "order_notional_below_minimum",
                  "gtd_expire_time_in_past",
                  "listing_request_requester_not_owned",
                  "listing_request_requester_kind_unsupported",
                  "listing_request_pending_exists",
                  "listing_request_market_exists",
                  "listing_request_issuer_unknown",
                  "spot_quote_not_venue_settlement_asset",
                  "listing_request_asset_exists",
                  "listing_request_limits_out_of_range",
                  "listing_request_market_shape_invalid",
                  "listing_request_account_pending_limit",
                  "listing_requests_not_accepted",
                  "listing_request_logo_missing",
                  "listing_request_deposit_not_confirmed",
                  "listing_request_deposit_accept_pending",
                  "listing_request_deposit_closed",
                  "listing_request_logo_closed",
                  "organization_not_found",
                  "organization_permission_required",
                  "organization_role_required",
                  "partner_organization_required",
                  "organization_key_required",
                  "organization_key_malformed",
                  "organization_key_unknown",
                  "organization_key_revoked",
                  "organization_key_store_unavailable",
                  "organization_member_not_found",
                  "organization_member_role_fixed",
                  "organization_member_changed",
                  "organization_owner_protected",
                  "organization_last_owner",
                  "sub_account_key_scope_refused",
                  "sub_account_mother_not_configured",
                  "sub_account_mother_ambiguous",
                  "sub_account_parent_mismatch",
                  "sub_account_parent_not_linked",
                  "sub_account_parent_conflict",
                  "sub_account_parent_without_party",
                  "sub_account_limit_reached",
                  "sub_account_name_taken",
                  "sub_account_parent_linked_elsewhere",
                  "sub_account_not_found",
                  "sub_account_not_empty",
                  "sub_account_holds_positions",
                  "sub_account_holds_tokens",
                  "sub_account_exposure_unavailable",
                  "sub_account_external_transfer_refused",
                  "engine_account_capacity_exceeded",
                  "sub_account_transfer_pair_refused",
                  "sub_account_transfer_asset_refused",
                  "transfer_eligibility_insufficient",
                  "transfer_blocked",
                  "venue_halted",
                  "account_unavailable",
                  "recipient_not_found",
                  "self_transfer_not_allowed",
                  "recipient_closed",
                  "sender_restricted",
                  "internal_transfer_asset_refused",
                  "organization_funding_decimals_conflict",
                  "organization_funding_currency_reserved",
                  "organization_funding_currency_ambiguous",
                  "twap_duration_out_of_range",
                  "twap_size_below_minimum",
                  "twap_slice_below_lot",
                  "parent_order_limit_reached",
                  "market_product_mismatch",
                  "product_history_scan_bound",
                  "ioc_post_only_conflict",
                  "ioc_iceberg_conflict",
                  "limit_ioc_not_served_on_perps",
                  "fok_post_only_conflict",
                  "fok_iceberg_conflict",
                  "limit_fok_not_served_on_perps",
                  "gtd_expire_time_required",
                  "expire_time_not_allowed",
                  "limit_gtd_not_served_on_perps",
                  "insufficient_orderbook_liquidity",
                  "withdrawal_amount_below_fee",
                  "spot_convert_market_unavailable",
                  "spot_convert_invalid_lot_size",
                  "spot_convert_below_min_notional",
                  "spot_convert_sell_unfilled",
                  "spot_convert_squid_failed_usdcx_kept",
                  "swap_pair_not_found",
                  "swap_pair_unavailable",
                  "swap_invalid_amount",
                  "swap_insufficient_liquidity",
                  "swap_quote_not_found",
                  "swap_quote_expired",
                  "swap_quote_already_accepted",
                  "swap_order_not_found",
                  "swap_order_expired",
                  "swap_order_invalid_state",
                  "swap_allocation_ttl_too_short",
                  "swap_slippage_exceeded",
                  "swap_settlement_failed_unwound",
                  "swap_circuit_breaker_open",
                  "swap_idempotency_conflict",
                  "swap_invalid_integrator_fee",
                  "swap_service_unavailable"
                ]
              },
              "safeMessage": {
                "type": "string",
                "minLength": 1
              },
              "retryable": {
                "type": "boolean"
              },
              "recoveryActions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "none",
                    "retry_after",
                    "observe_status",
                    "refresh_snapshot",
                    "resubscribe_stream",
                    "wait_for_projector",
                    "wait_for_operator_recovery",
                    "contact_support",
                    "request_approval",
                    "rerun_dry_run",
                    "do_not_retry"
                  ]
                },
                "minItems": 1
              },
              "realtimeTicketFailure": {
                "type": "string",
                "enum": [
                  "invalid",
                  "replayed",
                  "replaced",
                  "expired",
                  "revoked",
                  "store_unavailable"
                ]
              },
              "apiKeyRejection": {
                "type": "string",
                "enum": [
                  "malformed",
                  "unknown",
                  "expired",
                  "revoked",
                  "principal_unavailable",
                  "store_unavailable",
                  "scope_insufficient",
                  "passkey_required",
                  "environment_forbidden",
                  "principal_mismatch",
                  "bot_fence_invalid",
                  "bot_fence_stale",
                  "already_rotated"
                ]
              },
              "agentRefusal": {
                "type": "string",
                "enum": [
                  "agents_not_admitted_in_environment",
                  "agent_mode_not_admitted",
                  "agent_limit_reached",
                  "agent_deployment_not_found",
                  "agent_deployment_transition_refused",
                  "agent_deployment_stopping",
                  "agent_deployment_deleting",
                  "agent_deployment_has_open_exposure",
                  "agent_position_close_unavailable",
                  "agent_position_close_outcome_unknown",
                  "agent_position_close_refused",
                  "agent_position_close_partial",
                  "agent_position_close_pause_pending",
                  "agent_balance_return_unavailable",
                  "agent_trading_disabled",
                  "strategy_source_invalid",
                  "market_book_missing",
                  "skill_kill_switch_engaged",
                  "skill_market_closed",
                  "skill_market_session_unknown",
                  "skill_reduce_only_drawdown",
                  "skill_reduce_only_daily_loss",
                  "skill_wallet_unknown",
                  "skill_averaging_down",
                  "skill_entry_price_unknown",
                  "skill_edge_below_costs",
                  "skill_price_unknown",
                  "skill_size_capped",
                  "skill_size_below_minimum",
                  "skill_liquidation_too_close",
                  "skill_margin_unknown",
                  "paper_intent_size",
                  "paper_intent_market_price",
                  "paper_intent_market_time_in_force",
                  "paper_intent_limit_price",
                  "paper_stop_not_simulated",
                  "market_not_listed",
                  "agent_deployment_account_missing",
                  "agent_deployment_funding_missing",
                  "agent_account_already_bound",
                  "market_selection_unavailable",
                  "market_selection_undecided",
                  "market_stream_refused",
                  "pine_author_unavailable",
                  "pine_draft_in_flight",
                  "pine_draft_rate_limited",
                  "backtest_window_invalid",
                  "backtest_initial_capital_invalid",
                  "backtest_candles_unavailable",
                  "backtest_simulation_refused",
                  "backtest_timed_out",
                  "backtest_capacity_exhausted",
                  "backtest_in_flight",
                  "backtest_rate_limited",
                  "model_not_admitted",
                  "model_consent_required",
                  "agent_account_not_found",
                  "agent_account_not_fundable",
                  "agent_test_funding_not_offered",
                  "agent_test_funding_amount_invalid",
                  "agent_test_funding_treasury_floor",
                  "agent_test_funding_daily_cap_reached",
                  "agent_test_funding_daily_capacity_reached",
                  "agent_test_funding_idempotency_conflict",
                  "agent_test_funding_in_flight",
                  "agent_test_funding_pending",
                  "agent_test_funding_released",
                  "agent_test_funding_outcome_unknown",
                  "agent_test_funding_balance_insufficient",
                  "agent_test_funding_balance_unavailable",
                  "agent_funding_owner_balance_only",
                  "agent_live_key_unavailable",
                  "agent_live_order_shape_unsupported",
                  "agent_live_order_too_large",
                  "order_notional_below_minimum",
                  "agent_live_equity_unavailable",
                  "agent_live_open_order_limit",
                  "agent_live_open_orders_unavailable",
                  "agent_live_order_rate_limit",
                  "agent_live_reduce_only",
                  "agent_live_funding_unavailable",
                  "agent_live_view_unavailable",
                  "agent_fees_unpaid",
                  "agent_live_idempotency_key_required",
                  "agent_account_owner_ineligible",
                  "agent_account_identity_pending",
                  "agent_live_idempotency_conflict",
                  "agent_venue_capacity_reached",
                  "agent_deposit_funding_pending",
                  "agent_funding_amount_invalid",
                  "agent_funding_owner_party_missing",
                  "agent_funding_idempotency_conflict",
                  "agent_funding_not_found",
                  "agent_funding_expired",
                  "owner_signature_invalid",
                  "transfer_eligibility_insufficient",
                  "transfer_blocked",
                  "venue_halted",
                  "account_unavailable",
                  "account_transfer_unavailable",
                  "engine_view_unavailable",
                  "account_transfer_not_enabled",
                  "account_transfer_outcome_unknown",
                  "agent_fill_not_found",
                  "strategy_order_id_invalid",
                  "agent_live_venue_unavailable"
                ]
              },
              "rejectionGuard": {
                "type": "string",
                "enum": [
                  "custodial_signer_environment_not_service_held",
                  "custodial_signer_owner_approval_missing",
                  "custodial_signer_kind_not_allowed",
                  "custodial_signer_prepared_transaction_refused",
                  "custodial_signer_not_service_held",
                  "custodial_signer_binding_mismatch",
                  "custodial_signer_signature_invalid",
                  "custodial_signer_deposit_over_cap",
                  "custodial_signer_payout_not_consented",
                  "custodial_signer_signature_outcome_unknown",
                  "access_not_allowlisted",
                  "amount_atoms_invalid",
                  "command_act_as_invalid",
                  "command_field_required",
                  "command_value_missing",
                  "completion_synchronizer_mismatch",
                  "deposit_field_required",
                  "deposit_integer_invalid",
                  "deposit_timestamp_invalid",
                  "hashing_scheme_unspecified",
                  "ledger_node_id_invalid",
                  "ledger_offset_invalid",
                  "rejection_completion_status",
                  "signature_failure_reason_invalid",
                  "signature_field_hex",
                  "signature_field_required",
                  "submission_id_mismatch",
                  "successful_completion_evidence",
                  "consumed_replay_evidence",
                  "delegated_signing_key_binding",
                  "deposit_asset_unsupported",
                  "deposit_amount_invalid",
                  "deposit_amount_rail_unsupported",
                  "deposit_amount_scale_exceeded",
                  "conversion_holding_unknown",
                  "conversion_amount_mismatch",
                  "conversion_step_not_due",
                  "deposit_missing",
                  "deposit_owner_binding",
                  "deposit_scope",
                  "dfns_confirmation_environment",
                  "funding_intent",
                  "funding_intent_advance",
                  "funding_intent_already_bound",
                  "funding_intent_cancelled",
                  "funding_intent_consumed_without_deposit",
                  "funding_intent_missing",
                  "intent_asset_unsupported",
                  "intent_owner_binding",
                  "local_confirmation_environment",
                  "owner_intent_scope",
                  "owner_kind_unsupported",
                  "arrival_deposit_delegated_only",
                  "planned_command_identities",
                  "request_owner_binding",
                  "local_authority_party_missing",
                  "local_confirmation_deposit_status",
                  "local_operator_replay_mismatch",
                  "local_recovery_step_mismatch",
                  "local_signer_failed",
                  "local_signing_key_mismatch",
                  "local_wallet_binding",
                  "operator_step_expected",
                  "owner_step_expected",
                  "owner_submission_command_binding",
                  "planned_command_missing",
                  "planned_command_not_unique",
                  "post_offer_step_expected",
                  "reconciliation_signature_scope",
                  "signature_completion_action",
                  "signature_hex_missing",
                  "signing_step_ahead_of_deposit",
                  "treasury_execution_restore",
                  "treasury_offer_contract_missing",
                  "unknown_command_candidates",
                  "completion_read_refused",
                  "completion_correlation",
                  "completion_not_unique",
                  "completion_transaction_correlation",
                  "interactive_act_as_missing",
                  "interactive_transaction_correlation",
                  "reconcile_binding_mismatch",
                  "rejected_completion_has_update",
                  "standard_submission_correlation",
                  "standard_submission_response_invalid",
                  "successful_completion_update_missing",
                  "unrecoverable_command_evidence",
                  "executed_evidence_correlation",
                  "executed_evidence_replay",
                  "executed_evidence_rows",
                  "executed_evidence_signature_status",
                  "execute_permit_rows",
                  "execute_permit_signature_status",
                  "ledger_rejection_correlation",
                  "ledger_rejection_replay",
                  "ledger_rejection_rows",
                  "ledger_rejection_signature_status",
                  "preparation_lock_busy",
                  "reconciliation_signature_state",
                  "signature_identity_binding",
                  "signature_identity_missing",
                  "signature_permitted_command",
                  "signature_preparable_state",
                  "signature_preparation_replay",
                  "signature_record_identity",
                  "signature_record_missing",
                  "signature_record_shape",
                  "signature_replay",
                  "signature_row_count",
                  "signature_scope_environment",
                  "signature_scope_fingerprint",
                  "signature_session_consistency",
                  "canton_command_identity",
                  "command_completion_evidence",
                  "command_confirm_rows",
                  "command_confirm_state",
                  "command_evidence_replay",
                  "command_permit_rows",
                  "command_permit_state",
                  "command_predecessors_unconfirmed",
                  "owner_signature_session_open",
                  "command_release_evidence",
                  "command_release_replay",
                  "command_release_rows",
                  "command_release_state",
                  "signature_restart_state",
                  "existing_receipt_replay",
                  "existing_receipt_rows",
                  "existing_receipt_state",
                  "local_replay_command_state",
                  "local_replay_fence_rows",
                  "local_replay_fence_state",
                  "local_replay_step",
                  "persisted_permit_mismatch",
                  "treasury_offer_command_identity",
                  "treasury_offer_confirm_rows",
                  "treasury_offer_confirm_state",
                  "treasury_offer_evidence_replay",
                  "treasury_offer_permit_rows",
                  "treasury_offer_permit_state",
                  "treasury_offer_reject_rows",
                  "treasury_offer_reject_state",
                  "treasury_offer_rejection_replay",
                  "treasury_offer_submission_id",
                  "treasury_input_amount_mismatch",
                  "treasury_input_release_rows",
                  "treasury_input_release_state",
                  "treasury_input_reservation_mismatch",
                  "treasury_input_reservation_rows",
                  "treasury_input_reservation_state"
                ]
              },
              "withdrawalFailure": {
                "type": "string",
                "enum": [
                  "feature_disabled",
                  "spot_disabled",
                  "asset_withdraw_disabled",
                  "backing_alarm_active",
                  "holding_read_unavailable",
                  "asset_registry_stale",
                  "insufficient_balance",
                  "withdrawal_hold_stale",
                  "withdrawal_amount_below_fee",
                  "withdrawal_fee_quote_unavailable",
                  "withdrawal_destination_not_owned",
                  "withdrawal_owner_unavailable",
                  "withdrawal_unavailable",
                  "withdrawal_idempotency_conflict",
                  "requested",
                  "margin_reserved",
                  "authorized",
                  "submitted",
                  "settled",
                  "rejected",
                  "expired",
                  "failed",
                  "invalid_transition",
                  "authorization_setup_failed",
                  "margin_blocked",
                  "co_sign_incomplete",
                  "co_sign_self_approval",
                  "ttl_expired",
                  "canton_submission_failed",
                  "withdrawal_intake_stopped",
                  "withdrawal_payout_prepare_failed",
                  "withdrawal_payout_dfns_signature_failed",
                  "withdrawal_payout_canton_submit_refused",
                  "withdrawal_payout_ledger_time_expired",
                  "asset_unsupported",
                  "withdrawal_amount_invalid",
                  "withdrawal_amount_scale_exceeded",
                  "withdrawal_authorization_binding_mismatch",
                  "withdrawal_capability_unavailable",
                  "withdrawal_checkpoint_unavailable",
                  "withdrawal_not_cancellable",
                  "withdrawal_not_found",
                  "withdrawal_operators_missing",
                  "withdrawal_operators_not_distinct",
                  "withdrawal_owner_party_invalid",
                  "withdrawal_request_invalid",
                  "withdrawal_request_ended",
                  "withdrawal_reservation_release_failed",
                  "withdrawal_submission_unavailable",
                  "withdrawal_enqueue_failed",
                  "withdrawal_publish_failed"
                ]
              },
              "feeShareAcceptRefusal": {
                "type": "string",
                "enum": [
                  "challenge_missing",
                  "challenge_expired",
                  "challenge_mismatch",
                  "payee_not_owner",
                  "offer_already_accepted",
                  "offer_expired"
                ]
              },
              "dependency": {
                "type": "string",
                "enum": [
                  "dfns",
                  "engine",
                  "squid",
                  "ethereum_rpc"
                ]
              },
              "squidRouteRefusal": {
                "type": "string",
                "enum": [
                  "route_not_found",
                  "route_expired",
                  "route_bound_to_other_transaction",
                  "transaction_bound_to_other_route",
                  "source_transaction_not_found",
                  "source_transaction_unverified",
                  "source_token_unsupported",
                  "unlimited_allowance_refused",
                  "provider_route_refused",
                  "slippage_exceeded",
                  "widget_hook_refused",
                  "widget_destination_refused",
                  "widget_recipient_preapproval_required",
                  "account_request_bound",
                  "global_request_bound"
                ]
              },
              "positionSnapshotRefusal": {
                "type": "string",
                "enum": [
                  "position_projection_behind_live"
                ]
              },
              "setupKeyRefusal": {
                "type": "string",
                "enum": [
                  "setup_key_refused"
                ]
              },
              "info": {
                "type": "object",
                "properties": {
                  "group": {
                    "type": "string",
                    "enum": [
                      "sub_accounts",
                      "trading_spot",
                      "trading_perps",
                      "listings_deposits",
                      "members_keys",
                      "mother_account"
                    ]
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "read",
                      "write"
                    ]
                  }
                },
                "required": [
                  "group",
                  "level"
                ],
                "additionalProperties": false
              },
              "occurredAtEpochMs": {
                "type": "integer",
                "minimum": 0
              },
              "positions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "marketId": {
                      "type": "string"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "long",
                        "short"
                      ]
                    },
                    "size": {
                      "type": "string"
                    },
                    "sizeAtoms": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "marketId",
                    "side",
                    "size",
                    "sizeAtoms"
                  ],
                  "additionalProperties": false
                }
              },
              "tokens": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "asset": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "asset",
                    "amount"
                  ],
                  "additionalProperties": false
                }
              },
              "progress": {
                "type": "object",
                "properties": {
                  "accountId": {
                    "type": "string",
                    "pattern": "^[\\x21-\\x7e]{1,200}$"
                  },
                  "cancelledOrdersCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "filledDuringClosureCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "remainingOrdersCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "remainingPositionsCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "remainingPositions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "marketId": {
                          "type": "string"
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "long",
                            "short"
                          ]
                        },
                        "size": {
                          "type": "string"
                        },
                        "sizeAtoms": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "marketId",
                        "side",
                        "size",
                        "sizeAtoms"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "closedPositionsCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "revokedKeysCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "returnedAmount": {
                    "type": "string"
                  },
                  "returnedAsset": {
                    "type": "string"
                  },
                  "transferId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "transferIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "accountId",
                  "cancelledOrdersCount",
                  "filledDuringClosureCount",
                  "remainingOrdersCount",
                  "remainingPositionsCount",
                  "remainingPositions",
                  "closedPositionsCount",
                  "revokedKeysCount",
                  "returnedAmount",
                  "returnedAsset",
                  "transferId",
                  "transferIds"
                ],
                "additionalProperties": false,
                "description": "Description pending."
              },
              "rateLimit": {
                "type": "object",
                "properties": {
                  "limiter": {
                    "type": "string",
                    "enum": [
                      "trader",
                      "organization"
                    ]
                  },
                  "requestsPerWindow": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "windowMs": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "limiter",
                  "requestsPerWindow",
                  "windowMs"
                ],
                "additionalProperties": false
              },
              "rule": {
                "type": "string",
                "enum": [
                  "amount_step",
                  "amount_min",
                  "amount_max",
                  "price_tick",
                  "price_min",
                  "price_max"
                ],
                "description": "The published limit that refused the order: amount_step (precision.amount), amount_min and amount_max (limits.amount), price_tick (precision.price), price_min and price_max (limits.price)."
              },
              "field": {
                "type": "string",
                "minLength": 1,
                "description": "The request field the refusal is about, as a path in the request body (price, amount, params.notional)."
              },
              "limit": {
                "type": "string",
                "pattern": "^\\d+(?:\\.\\d+)?$",
                "description": "The value of the published limit (the step, the tick, the minimum or the maximum)."
              },
              "nearestValid": {
                "type": "string",
                "pattern": "^\\d+(?:\\.\\d+)?$",
                "description": "The nearest value of the field that meets the limit."
              },
              "minCost": {
                "type": "string",
                "pattern": "^\\d+(?:\\.\\d+)?$",
                "description": "The minimum cost of one order, in the quote asset (limits.cost.min)."
              },
              "free": {
                "type": "string",
                "pattern": "^\\d+(?:\\.\\d+)?$",
                "description": "The amount the source account may move now (its free balance, in the transfer's currency). Balance locked in open orders, used as margin, held by a pending withdrawal or pending settlement is not free."
              },
              "price": {
                "type": "string",
                "pattern": "^\\d+(?:\\.\\d+)?$",
                "description": "The price the minimum was measured at. A limit order: its limit price. A spot market order: the lower of the best opposite price and the band price."
              },
              "cost": {
                "type": "string",
                "pattern": "^\\d+(?:\\.\\d+)?$",
                "description": "The order's cost at that price, rounded up to the quote atom."
              },
              "minAmount": {
                "type": "string",
                "pattern": "^\\d+(?:\\.\\d+)?$",
                "description": "The smallest amount, on the lot, whose cost at that price reaches minCost."
              }
            },
            "required": [
              "version",
              "requestId",
              "code",
              "safeMessage",
              "retryable",
              "recoveryActions",
              "occurredAtEpochMs"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "name",
          "message",
          "code",
          "retryable",
          "timestamp",
          "datetime",
          "info"
        ],
        "additionalProperties": false
      },
      "V2FundingRatesResponse": {
        "type": "object",
        "additionalProperties": {
          "type": "object",
          "properties": {
            "symbol": {
              "type": "string",
              "minLength": 1
            },
            "timestamp": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "description": "When the mark and index were read; null when the market has no accepted price yet."
            },
            "datetime": {
              "type": [
                "string",
                "null"
              ]
            },
            "markPrice": {
              "type": [
                "number",
                "null"
              ],
              "description": "null when the market has no accepted price yet."
            },
            "indexPrice": {
              "type": [
                "number",
                "null"
              ],
              "description": "null when the market has no accepted price yet."
            },
            "fundingRate": {
              "type": "number",
              "description": "The last funding interval's rate as a fraction, rounded toward zero to a whole number of basis points. A positive rate means long positions pay and short positions receive; a negative rate means short positions pay and long positions receive. Funding pays the interval premium capped at 75 basis points, divided by 8, every hour. Each position settles the exact amount, so this field can show slightly less than a position pays: a 75 basis point premium pays 0.0009375 while this field shows 0.0009."
            },
            "nextFundingRate": {
              "type": "number",
              "description": "The rate the current funding interval would pay if it closed now, as a fraction, rounded toward zero to a whole number of basis points. Each position settles the exact amount. A positive rate means long positions pay and short positions receive; a negative rate means short positions pay and long positions receive."
            },
            "nextFundingTimestamp": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0
            },
            "nextFundingDatetime": {
              "type": [
                "string",
                "null"
              ]
            },
            "interval": {
              "type": "string",
              "minLength": 1
            },
            "info": {
              "type": "object",
              "properties": {
                "marketId": {
                  "type": "string",
                  "minLength": 1
                },
                "nextFundingTimeEpochMs": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                },
                "fundingIntervalMs": {
                  "type": "integer",
                  "minimum": 0
                },
                "marketData": {
                  "type": "object",
                  "properties": {
                    "indexPriceAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "indexPrice": {
                      "type": "string",
                      "pattern": "^-?[0-9]+\\.[0-9]+$"
                    },
                    "markPriceAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "markPrice": {
                      "type": "string",
                      "pattern": "^-?[0-9]+\\.[0-9]+$"
                    },
                    "asOfEpochMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "indexPriceAtoms",
                    "indexPrice",
                    "markPriceAtoms",
                    "markPrice",
                    "asOfEpochMs"
                  ],
                  "additionalProperties": false
                },
                "fundingRateBps": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$",
                  "description": "The last funding interval's rate. A positive rate means long positions pay and short positions receive; a negative rate means short positions pay and long positions receive. Funding pays the interval premium capped at 75 basis points, divided by 8, every hour: at most 9.375 basis points of the index price an hour. This rate is shown in whole basis points rounded toward zero, so it can show less than a position pays (a 75 basis point premium pays 9.375 basis points and shows 9) and shows 0 for an hour that pays less than 1 basis point, while positions still pay. Take exact amounts and who pays from the funding index on market.funding: fundingPaymentPerBaseAtoms and cumulativeFundingIndexAtoms."
                },
                "predictedFundingRateBps": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$",
                  "description": "The rate the current funding interval would pay if it closed now. A positive rate means long positions pay and short positions receive; a negative rate means short positions pay and long positions receive. Funding pays the interval premium capped at 75 basis points, divided by 8, every hour: at most 9.375 basis points of the index price an hour. This rate is shown in whole basis points rounded toward zero, so it can show less than a position pays (a 75 basis point premium pays 9.375 basis points and shows 9) and shows 0 for an hour that pays less than 1 basis point, while positions still pay. Take exact amounts and who pays from the funding index on market.funding: fundingPaymentPerBaseAtoms and cumulativeFundingIndexAtoms."
                }
              },
              "required": [
                "marketId",
                "nextFundingTimeEpochMs",
                "fundingIntervalMs",
                "marketData",
                "fundingRateBps",
                "predictedFundingRateBps"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "symbol",
            "timestamp",
            "datetime",
            "markPrice",
            "indexPrice",
            "fundingRate",
            "nextFundingRate",
            "nextFundingTimestamp",
            "nextFundingDatetime",
            "interval",
            "info"
          ],
          "additionalProperties": false
        }
      },
      "V2MarketStatsResponse": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string",
                "pattern": "^([^/:]+)\\/([^/:]+)$"
              },
              "timestamp": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              },
              "datetime": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "high": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "low": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "bid": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Best bid price; null when the book has no bid."
              },
              "bidVolume": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0
              },
              "ask": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Best ask price; null when the book has no ask."
              },
              "askVolume": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0
              },
              "open": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "First price of the trailing 24 hours; null when no candle falls inside them."
              },
              "close": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "last": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "change": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "last minus open, over the trailing 24 hours."
              },
              "percentage": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The change over the trailing 24 hours in percent."
              },
              "quoteVolume": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "description": "Traded volume of the trailing 24 hours in the settlement asset, which is the quote asset."
              },
              "markPrice": {
                "type": "null"
              },
              "indexPrice": {
                "type": "null"
              },
              "vwap": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "previousClose": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "average": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "baseVolume": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "description": "Base quantity traded in the trailing 24 hours, or null when unavailable."
              },
              "info": {
                "type": "object",
                "properties": {
                  "readState": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "deadline_exceeded"
                    ],
                    "description": "complete, or deadline_exceeded when the market's reads missed their deadline: every figure of that ticker is then null."
                  },
                  "marketId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "open1h": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "First price of the trailing hour, in quote units per base unit; null when no candle falls inside it."
                  },
                  "change1h": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Last price minus open1h, in quote units per base unit; null with open1h."
                  },
                  "percentage1h": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Change over the trailing hour in percent, rounded toward zero to a hundredth; null with open1h."
                  },
                  "open24h": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "First price of the trailing 24 hours, in quote units per base unit; null when no candle falls inside it."
                  },
                  "change24h": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Last price minus open24h, in quote units per base unit; null with open24h."
                  },
                  "percentage24h": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Change over the trailing 24 hours in percent, rounded toward zero to a hundredth; null with open24h."
                  },
                  "open7d": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "First price of the trailing 7 days, in quote units per base unit; null when no candle falls inside it."
                  },
                  "change7d": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Last price minus open7d, in quote units per base unit; null with open7d."
                  },
                  "percentage7d": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Change over the trailing 7 days in percent, rounded toward zero to a hundredth; null with open7d."
                  },
                  "tradeCount24h": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Description pending."
                  },
                  "sparkline7d": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "prefixItems": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Start of the UTC hour in Unix milliseconds."
                        },
                        {
                          "type": "number",
                          "description": "Last price of that hour in quote units per base unit."
                        }
                      ],
                      "items": false,
                      "minItems": 2,
                      "maxItems": 2
                    },
                    "description": "Up to 169 hourly closes covering the trailing 7 days, oldest first. An hour with no candle is left out, not filled."
                  },
                  "marketCap": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null,
                    "description": "Circulating base supply times the last traded price, in quote units; null if either is unavailable."
                  },
                  "noTradesYet": {
                    "type": "boolean",
                    "description": "True while the market has never traded: its OHLCV candles are then a flat display line at the listing price, not trades."
                  },
                  "listingPrice": {
                    "type": "string",
                    "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                    "description": "The display listing price while noTradesYet is true, as decimal text: the close of the flat listing candles of the OHLCV read. Not a trade price and not a mark. Absent after the first trade and when the market has no listing price."
                  }
                },
                "required": [
                  "readState",
                  "marketId",
                  "open1h",
                  "change1h",
                  "percentage1h",
                  "open24h",
                  "change24h",
                  "percentage24h",
                  "open7d",
                  "change7d",
                  "percentage7d",
                  "tradeCount24h",
                  "sparkline7d"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "symbol",
              "timestamp",
              "datetime",
              "high",
              "low",
              "bid",
              "bidVolume",
              "ask",
              "askVolume",
              "open",
              "close",
              "last",
              "change",
              "percentage",
              "quoteVolume",
              "markPrice",
              "indexPrice",
              "vwap",
              "previousClose",
              "average",
              "baseVolume",
              "info"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string",
                "minLength": 1
              },
              "timestamp": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "description": "Time the mark and index values were observed, or null before an accepted price is available."
              },
              "datetime": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "high": {
                "type": "number"
              },
              "low": {
                "type": "number"
              },
              "last": {
                "type": "number"
              },
              "percentage": {
                "type": "number"
              },
              "quoteVolume": {
                "type": "number",
                "minimum": 0
              },
              "markPrice": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Null before an accepted market price is available."
              },
              "indexPrice": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Null before an accepted market price is available."
              },
              "fundingRate": {
                "type": "number",
                "description": "The last funding interval's rate as a fraction, rounded toward zero to a whole number of basis points. A positive rate means long positions pay and short positions receive; a negative rate means short positions pay and long positions receive. Funding pays the interval premium capped at 75 basis points, divided by 8, every hour. Each position settles the exact amount, so this field can show slightly less than a position pays: a 75 basis point premium pays 0.0009375 while this field shows 0.0009."
              },
              "nextFundingRate": {
                "type": "number",
                "description": "The rate the current funding interval would pay if it closed now, as a fraction, rounded toward zero to a whole number of basis points. Each position settles the exact amount. A positive rate means long positions pay and short positions receive; a negative rate means short positions pay and long positions receive."
              },
              "nextFundingTimestamp": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              },
              "nextFundingDatetime": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "interval": {
                "type": "string",
                "minLength": 1
              },
              "info": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string",
                    "enum": [
                      "external-market-stats/v1"
                    ]
                  },
                  "marketId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "volume24hQuoteAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "volume24hQuote": {
                    "type": "string",
                    "pattern": "^-?[0-9]+\\.[0-9]+$"
                  },
                  "openInterestBaseAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "openInterestBase": {
                    "type": "string",
                    "pattern": "^-?[0-9]+\\.[0-9]+$"
                  },
                  "openInterestQuoteAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "openInterestQuote": {
                    "type": "string",
                    "pattern": "^-?[0-9]+\\.[0-9]+$"
                  },
                  "fundingRateBps": {
                    "type": "string",
                    "pattern": "^-?(0|[1-9][0-9]*)$"
                  },
                  "predictedFundingRateBps": {
                    "type": "string",
                    "pattern": "^-?(0|[1-9][0-9]*)$"
                  },
                  "nextFundingTimeEpochMs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "fundingIntervalMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "marketData": {
                    "type": "object",
                    "properties": {
                      "indexPriceAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$"
                      },
                      "indexPrice": {
                        "type": "string",
                        "pattern": "^-?[0-9]+\\.[0-9]+$"
                      },
                      "markPriceAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$"
                      },
                      "markPrice": {
                        "type": "string",
                        "pattern": "^-?[0-9]+\\.[0-9]+$"
                      },
                      "asOfEpochMs": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "indexPriceAtoms",
                      "indexPrice",
                      "markPriceAtoms",
                      "markPrice",
                      "asOfEpochMs"
                    ],
                    "additionalProperties": false
                  },
                  "lastPriceAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "lastPrice": {
                    "type": "string",
                    "pattern": "^-?[0-9]+\\.[0-9]+$"
                  },
                  "change24hBps": {
                    "type": "string",
                    "pattern": "^-?(0|[1-9][0-9]*)$"
                  },
                  "high24hAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "high24h": {
                    "type": "string",
                    "pattern": "^-?[0-9]+\\.[0-9]+$"
                  },
                  "low24hAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "low24h": {
                    "type": "string",
                    "pattern": "^-?[0-9]+\\.[0-9]+$"
                  }
                },
                "required": [
                  "version",
                  "marketId",
                  "volume24hQuoteAtoms",
                  "volume24hQuote",
                  "openInterestBaseAtoms",
                  "openInterestBase",
                  "openInterestQuoteAtoms",
                  "openInterestQuote",
                  "fundingRateBps",
                  "predictedFundingRateBps",
                  "nextFundingTimeEpochMs",
                  "fundingIntervalMs",
                  "marketData",
                  "lastPriceAtoms",
                  "lastPrice",
                  "change24hBps",
                  "high24hAtoms",
                  "high24h",
                  "low24hAtoms",
                  "low24h"
                ],
                "additionalProperties": false
              },
              "vwap": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "previousClose": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "average": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "baseVolume": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0
              },
              "bid": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "bidVolume": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0
              },
              "ask": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "askVolume": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0
              },
              "open": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "close": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "change": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "symbol",
              "timestamp",
              "datetime",
              "high",
              "low",
              "last",
              "percentage",
              "quoteVolume",
              "markPrice",
              "indexPrice",
              "fundingRate",
              "nextFundingRate",
              "nextFundingTimestamp",
              "nextFundingDatetime",
              "interval",
              "info",
              "vwap",
              "previousClose",
              "average",
              "baseVolume",
              "bid",
              "bidVolume",
              "ask",
              "askVolume",
              "open",
              "close",
              "change"
            ],
            "additionalProperties": false
          }
        ]
      },
      "V2MarketsResponse": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "base": {
                  "type": "string",
                  "minLength": 1
                },
                "quote": {
                  "type": "string",
                  "minLength": 1
                },
                "settle": {
                  "type": "string",
                  "minLength": 1
                },
                "baseId": {
                  "type": "string",
                  "minLength": 1
                },
                "quoteId": {
                  "type": "string",
                  "minLength": 1
                },
                "settleId": {
                  "type": "string",
                  "minLength": 1
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "swap"
                  ]
                },
                "spot": {
                  "type": "boolean",
                  "const": false
                },
                "margin": {
                  "type": "boolean",
                  "const": false
                },
                "swap": {
                  "type": "boolean",
                  "const": true
                },
                "future": {
                  "type": "boolean",
                  "const": false
                },
                "option": {
                  "type": "boolean",
                  "const": false
                },
                "active": {
                  "type": "boolean"
                },
                "contract": {
                  "type": "boolean",
                  "const": true
                },
                "linear": {
                  "type": "boolean",
                  "const": true
                },
                "inverse": {
                  "type": "boolean",
                  "const": false
                },
                "contractSize": {
                  "type": "number",
                  "const": 1
                },
                "maker": {
                  "type": "number",
                  "minimum": 0
                },
                "taker": {
                  "type": "number",
                  "minimum": 0
                },
                "precision": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "price": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "amount",
                    "price"
                  ],
                  "additionalProperties": false
                },
                "limits": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "object",
                      "properties": {
                        "min": {
                          "type": "number",
                          "minimum": 0
                        },
                        "max": {
                          "type": "number",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "min",
                        "max"
                      ],
                      "additionalProperties": false
                    },
                    "price": {
                      "type": "object",
                      "properties": {
                        "min": {
                          "type": "number",
                          "minimum": 0
                        },
                        "max": {
                          "type": "number",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "min",
                        "max"
                      ],
                      "additionalProperties": false
                    },
                    "leverage": {
                      "type": "object",
                      "properties": {
                        "min": {
                          "type": "number",
                          "const": 1
                        },
                        "max": {
                          "type": "number",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "min",
                        "max"
                      ],
                      "additionalProperties": false
                    },
                    "cost": {
                      "type": "object",
                      "properties": {
                        "min": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "max": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "min",
                        "max"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "amount",
                    "price",
                    "leverage"
                  ],
                  "additionalProperties": false
                },
                "info": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "circulatingSupply": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,10})?$",
                          "maxLength": 78
                        },
                        "productType": {
                          "type": "string",
                          "enum": [
                            "perpetual"
                          ]
                        },
                        "baseAsset": {
                          "type": "string",
                          "minLength": 1
                        },
                        "quoteAsset": {
                          "type": "string",
                          "minLength": 1
                        },
                        "baseDecimals": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10
                        },
                        "quoteDecimals": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10
                        },
                        "tickSizeAtoms": {
                          "type": "string",
                          "pattern": "^[1-9][0-9]*$"
                        },
                        "lotSizeAtoms": {
                          "type": "string",
                          "pattern": "^[1-9][0-9]*$"
                        },
                        "minNotionalAtoms": {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]*)$"
                        },
                        "marketOrderPriceBandBps": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        "makerFeeRateHundredthsBps": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "takerFeeRateHundredthsBps": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "underlyingSymbol": {
                          "type": "string",
                          "minLength": 1
                        },
                        "marketType": {
                          "type": "string",
                          "enum": [
                            "crypto",
                            "stock",
                            "forex",
                            "commodity",
                            "index"
                          ]
                        },
                        "logoUrl": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "logoUnavailable": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "backfilling",
                            "open",
                            "paused",
                            "halted",
                            "cancel_only",
                            "reduce_only"
                          ]
                        },
                        "priceScale": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "quantityScale": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "minPrice": {
                          "type": "string",
                          "minLength": 1
                        },
                        "maxPrice": {
                          "type": "string",
                          "minLength": 1
                        },
                        "minQuantity": {
                          "type": "string",
                          "minLength": 1
                        },
                        "maxQuantity": {
                          "type": "string",
                          "minLength": 1
                        },
                        "initialMarginBps": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "maintenanceMarginTiers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "notionalThresholdAtoms": {
                                "type": "string",
                                "pattern": "^(0|[1-9][0-9]*)$"
                              },
                              "maintenanceMarginBps": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "minimum": -9007199254740991,
                                "maximum": 9999
                              }
                            },
                            "required": [
                              "notionalThresholdAtoms",
                              "maintenanceMarginBps"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 16
                        },
                        "maxLeverageX": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "makerFeeBps": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "takerFeeBps": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "settlementAsset": {
                          "type": "string",
                          "minLength": 1
                        },
                        "lastPriceAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "lastPrice": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "change24hBps": {
                          "type": "string",
                          "pattern": "^-?(0|[1-9][0-9]*)$"
                        },
                        "favorite": {
                          "type": "boolean"
                        },
                        "settlementAssetDecimals": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10,
                          "description": "Decimal scale for settlementAsset. Collateral atoms are integer counts of 10^-settlementAssetDecimals units, including margin, balances, PnL, fees and transfers."
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "crypto",
                            "equities",
                            "commodities",
                            "fx",
                            "indices",
                            "memes"
                          ],
                          "description": "The display category a trader filters the market under. Not the trading session class."
                        }
                      },
                      "required": [
                        "marketId",
                        "underlyingSymbol",
                        "marketType",
                        "logoUrl",
                        "logoUnavailable",
                        "status",
                        "priceScale",
                        "quantityScale",
                        "minPrice",
                        "maxPrice",
                        "minQuantity",
                        "maxQuantity",
                        "initialMarginBps",
                        "maintenanceMarginTiers",
                        "maxLeverageX",
                        "makerFeeBps",
                        "takerFeeBps",
                        "settlementAsset",
                        "lastPriceAtoms",
                        "lastPrice",
                        "change24hBps",
                        "settlementAssetDecimals",
                        "category"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "circulatingSupply": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,10})?$",
                          "maxLength": 78
                        },
                        "productType": {
                          "type": "string",
                          "enum": [
                            "spot"
                          ]
                        },
                        "baseAsset": {
                          "type": "string",
                          "minLength": 1
                        },
                        "quoteAsset": {
                          "type": "string",
                          "minLength": 1
                        },
                        "baseDecimals": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10
                        },
                        "quoteDecimals": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10
                        },
                        "tickSizeAtoms": {
                          "type": "string",
                          "pattern": "^[1-9][0-9]*$"
                        },
                        "lotSizeAtoms": {
                          "type": "string",
                          "pattern": "^[1-9][0-9]*$"
                        },
                        "minNotionalAtoms": {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]*)$"
                        },
                        "marketOrderPriceBandBps": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        "makerFeeRateHundredthsBps": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "takerFeeRateHundredthsBps": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "underlyingSymbol": {
                          "type": "string",
                          "minLength": 1
                        },
                        "marketType": {
                          "type": "string",
                          "enum": [
                            "crypto",
                            "stock",
                            "forex",
                            "commodity",
                            "index"
                          ]
                        },
                        "logoUrl": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "logoUnavailable": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "backfilling",
                            "open",
                            "paused",
                            "halted",
                            "cancel_only",
                            "reduce_only"
                          ]
                        },
                        "priceScale": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "quantityScale": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "minPrice": {
                          "type": "string",
                          "minLength": 1
                        },
                        "maxPrice": {
                          "type": "string",
                          "minLength": 1
                        },
                        "minQuantity": {
                          "type": "string",
                          "minLength": 1
                        },
                        "maxQuantity": {
                          "type": "string",
                          "minLength": 1
                        },
                        "initialMarginBps": {
                          "type": "null"
                        },
                        "maintenanceMarginTiers": {
                          "type": "null"
                        },
                        "maxLeverageX": {
                          "type": "null"
                        },
                        "makerFeeBps": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "takerFeeBps": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "settlementAsset": {
                          "type": "string",
                          "minLength": 1
                        },
                        "lastPriceAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "lastPrice": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "change24hBps": {
                          "type": "string",
                          "pattern": "^-?(0|[1-9][0-9]*)$"
                        },
                        "favorite": {
                          "type": "boolean"
                        },
                        "settlementAssetDecimals": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10,
                          "description": "Decimal scale for settlementAsset. Collateral atoms are integer counts of 10^-settlementAssetDecimals units, including margin, balances, PnL, fees and transfers."
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "crypto",
                            "equities",
                            "commodities",
                            "fx",
                            "indices",
                            "memes"
                          ],
                          "description": "The display category a trader filters the market under. Not the trading session class."
                        }
                      },
                      "required": [
                        "productType",
                        "marketId",
                        "underlyingSymbol",
                        "marketType",
                        "logoUrl",
                        "logoUnavailable",
                        "status",
                        "priceScale",
                        "quantityScale",
                        "minPrice",
                        "maxPrice",
                        "minQuantity",
                        "maxQuantity",
                        "initialMarginBps",
                        "maintenanceMarginTiers",
                        "maxLeverageX",
                        "makerFeeBps",
                        "takerFeeBps",
                        "settlementAsset",
                        "lastPriceAtoms",
                        "lastPrice",
                        "change24hBps",
                        "settlementAssetDecimals",
                        "category"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "expiry": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                },
                "expiryDatetime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "strike": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "optionType": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                }
              },
              "required": [
                "id",
                "symbol",
                "base",
                "quote",
                "settle",
                "baseId",
                "quoteId",
                "settleId",
                "type",
                "spot",
                "margin",
                "swap",
                "future",
                "option",
                "active",
                "contract",
                "linear",
                "inverse",
                "contractSize",
                "maker",
                "taker",
                "precision",
                "limits",
                "info",
                "expiry",
                "expiryDatetime",
                "strike",
                "optionType",
                "created"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "settle": {
                  "type": "null",
                  "default": null
                },
                "settleId": {
                  "type": "null",
                  "default": null
                },
                "contractSize": {
                  "type": "null",
                  "default": null
                },
                "linear": {
                  "type": "null",
                  "default": null
                },
                "inverse": {
                  "type": "null",
                  "default": null
                },
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "pattern": "^([^/:]+)\\/([^/:]+)$"
                },
                "base": {
                  "type": "string",
                  "minLength": 1
                },
                "quote": {
                  "type": "string",
                  "minLength": 1
                },
                "baseId": {
                  "type": "string",
                  "minLength": 1
                },
                "quoteId": {
                  "type": "string",
                  "minLength": 1
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "spot"
                  ]
                },
                "spot": {
                  "type": "boolean",
                  "const": true
                },
                "margin": {
                  "type": "boolean",
                  "const": false
                },
                "swap": {
                  "type": "boolean",
                  "const": false
                },
                "future": {
                  "type": "boolean",
                  "const": false
                },
                "option": {
                  "type": "boolean",
                  "const": false
                },
                "contract": {
                  "type": "boolean",
                  "const": false
                },
                "active": {
                  "type": "boolean"
                },
                "maker": {
                  "type": "number",
                  "minimum": 0
                },
                "taker": {
                  "type": "number",
                  "minimum": 0
                },
                "percentage": {
                  "type": "boolean",
                  "const": true
                },
                "tierBased": {
                  "type": "boolean",
                  "const": false,
                  "description": "Spot rates do not change with the account's fee tier."
                },
                "feeSide": {
                  "type": "string",
                  "enum": [
                    "quote"
                  ],
                  "description": "Maker and taker fees are paid in the quote asset, USDCx."
                },
                "precision": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "price": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "amount",
                    "price"
                  ],
                  "additionalProperties": false
                },
                "limits": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "object",
                      "properties": {
                        "min": {
                          "type": "number",
                          "minimum": 0
                        },
                        "max": {
                          "type": "number",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "min",
                        "max"
                      ],
                      "additionalProperties": false
                    },
                    "price": {
                      "type": "object",
                      "properties": {
                        "min": {
                          "type": "number",
                          "minimum": 0
                        },
                        "max": {
                          "type": "number",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "min",
                        "max"
                      ],
                      "additionalProperties": false
                    },
                    "cost": {
                      "type": "object",
                      "properties": {
                        "min": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "max": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "min",
                        "max"
                      ],
                      "additionalProperties": false,
                      "description": "Order value expressed in quote-asset units."
                    }
                  },
                  "required": [
                    "amount",
                    "price",
                    "cost"
                  ],
                  "additionalProperties": false
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "logoUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 2048,
                      "description": "The asset's published logo URL, or null when the client should display its fallback icon."
                    },
                    "logoUnavailable": {
                      "type": "boolean"
                    },
                    "circulatingSupply": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,10})?$",
                      "maxLength": 78
                    },
                    "marketId": {
                      "type": "string",
                      "pattern": "^[^-]+-[^-]+-SPOT$"
                    },
                    "productType": {
                      "type": "string",
                      "enum": [
                        "spot"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "cancel_only",
                        "paused",
                        "halted"
                      ]
                    },
                    "baseAsset": {
                      "type": "string",
                      "minLength": 1
                    },
                    "quoteAsset": {
                      "type": "string",
                      "minLength": 1
                    },
                    "baseDecimals": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 10
                    },
                    "quoteDecimals": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 10
                    },
                    "tickSizeAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "Minimum price increment in quote atoms per one base unit."
                    },
                    "lotSizeAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "Minimum quantity increment in base-asset atoms."
                    },
                    "makerFeeRateHundredthsBps": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "takerFeeRateHundredthsBps": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "crypto",
                        "equities",
                        "commodities",
                        "fx",
                        "indices",
                        "memes"
                      ],
                      "description": "The display category a trader filters the market under. Not the trading session class."
                    },
                    "marketOrderPriceBandBps": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 10000,
                      "description": "How far a market order may trade past the best opposite price, in basis points: a buy fills up to the best ask times (1 + band), a sell down to the best bid times (1 - band), inside the price limits. Absent when the market has no band, and then it accepts no market order."
                    },
                    "marketOrderMinCostRule": {
                      "type": "string",
                      "minLength": 1,
                      "description": "How the minimum cost (limits.cost.min) is measured for a market order, in words. Present with marketOrderPriceBandBps. Read it as text: its wording can change. Today it reads: A market order's cost is its amount times the LOWER of the best opposite price and the band price, rounded up to the quote atom, and must reach limits.cost.min. A sell uses the band price ceil(bestBid x (10000 - marketOrderPriceBandBps) / 10000); a buy uses the best ask. A limit order's cost is its amount times its limit price."
                    },
                    "priceScale": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Decimal places of the venue's integer price atoms for this market."
                    },
                    "quantityScale": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Decimal places of the venue's integer quantity atoms for this market."
                    }
                  },
                  "required": [
                    "marketId",
                    "productType",
                    "status",
                    "baseAsset",
                    "quoteAsset",
                    "baseDecimals",
                    "quoteDecimals",
                    "tickSizeAtoms",
                    "lotSizeAtoms",
                    "makerFeeRateHundredthsBps",
                    "takerFeeRateHundredthsBps",
                    "category",
                    "priceScale",
                    "quantityScale"
                  ],
                  "additionalProperties": false
                },
                "expiry": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "expiryDatetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "strike": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "optionType": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "created": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                }
              },
              "required": [
                "id",
                "symbol",
                "base",
                "quote",
                "baseId",
                "quoteId",
                "type",
                "spot",
                "margin",
                "swap",
                "future",
                "option",
                "contract",
                "active",
                "maker",
                "taker",
                "percentage",
                "tierBased",
                "feeSide",
                "precision",
                "limits",
                "info"
              ],
              "additionalProperties": false
            }
          ]
        }
      },
      "V2OhlcvResponse": {
        "type": "array",
        "items": {
          "type": "array",
          "prefixItems": [
            {
              "type": "integer",
              "minimum": 0,
              "description": "Start of the candle bucket as a Unix timestamp in milliseconds."
            },
            {
              "type": "number",
              "description": "First price in the bucket in quote units per base unit, encoded as a JSON number."
            },
            {
              "type": "number",
              "description": "Highest price in the bucket in quote units per base unit, encoded as a JSON number."
            },
            {
              "type": "number",
              "description": "Lowest price in the bucket in quote units per base unit, encoded as a JSON number."
            },
            {
              "type": "number",
              "description": "Last price in the bucket in quote units per base unit, encoded as a JSON number."
            },
            {
              "type": "number",
              "minimum": 0,
              "description": "Base volume, the OHLCV volume: the summed traded base quantity of the bucket's trades in base units (base-asset atoms divided by 10 raised to the market's quantityScale), as a JSON number, whatever series gives the prices; a bucket with no trade is 0. A perpetual market's default series is index: index prices with the traded base volume of the same buckets. series=trade gives trade prices with the same volume."
            }
          ],
          "items": false,
          "minItems": 6,
          "maxItems": 6
        },
        "description": "Candles as [timestamp, open, high, low, close, volume] tuples. The requested series selects trade or index candles; per-candle source is not included in this response."
      },
      "V2Order": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "clientOrderId": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1,
                "maxLength": 256,
                "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits.",
                "default": null
              },
              "symbol": {
                "type": "string",
                "minLength": 1
              },
              "timestamp": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "default": null
              },
              "datetime": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "lastUpdateTimestamp": {
                "type": "integer",
                "minimum": 0
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "closed",
                  "canceled"
                ]
              },
              "side": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "buy",
                  "sell",
                  null
                ],
                "default": null
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "limit",
                  "market",
                  null
                ],
                "default": null
              },
              "timeInForce": {
                "type": "string",
                "enum": [
                  "GTC",
                  "IOC",
                  "FOK",
                  "GTD",
                  "PO"
                ]
              },
              "price": {
                "type": [
                  "number",
                  "null"
                ],
                "default": null
              },
              "average": {
                "type": "number",
                "exclusiveMinimum": 0,
                "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
              },
              "amount": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "default": null
              },
              "filled": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "default": null
              },
              "remaining": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "default": null
              },
              "reduceOnly": {
                "type": [
                  "boolean",
                  "null"
                ],
                "default": null
              },
              "postOnly": {
                "type": [
                  "boolean",
                  "null"
                ],
                "default": null
              },
              "info": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string",
                    "enum": [
                      "external-order/v1"
                    ]
                  },
                  "postOnly": {
                    "type": "boolean"
                  },
                  "timeInForce": {
                    "type": "string",
                    "enum": [
                      "GTC",
                      "IOC",
                      "FOK",
                      "GTD"
                    ]
                  },
                  "icebergQty": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Visible base quantity of an iceberg limit order. The public book shows this quantity; the reserve covers the complete amount."
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "buy",
                      "sell"
                    ],
                    "description": "The order's accepted side, if recorded."
                  },
                  "orderType": {
                    "type": "string",
                    "enum": [
                      "limit",
                      "market"
                    ],
                    "description": "The order's accepted kind, if recorded."
                  },
                  "price": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                    "description": "Accepted limit price as decimal text. A recorded market order has null; omission means the kind or decimal limit price is unavailable."
                  },
                  "priceAtoms": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9]+$",
                    "description": "Accepted limit price in atoms. A recorded market order has null; omission means the kind or limit price is unavailable."
                  },
                  "quantityAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$",
                    "description": "Original accepted base quantity in quantity atoms, if recorded."
                  },
                  "filledQuantityAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$",
                    "description": "Executed base quantity in quantity atoms, if recorded. Omission does not mean zero; use account.fills for this orderId to receive executions."
                  },
                  "productType": {
                    "type": "string",
                    "enum": [
                      "spot"
                    ]
                  },
                  "lockAsset": {
                    "type": "string",
                    "minLength": 1
                  },
                  "lockedAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "remainingQuantityAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "createdAtEpochMs": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "When the venue accepted the order, in Unix epoch milliseconds: the venue clock of the command that placed it. For an order placed before the venue's order history begins (a history reset or a new history start), it is the first time the venue holds for the order: its earliest own command, else its last change, else the first venue record after it; the order was accepted no later than that."
                  },
                  "filledQuoteAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "lastFillAtEpochMs": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "orderId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "accountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "marketId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "partially_filled",
                      "filled",
                      "canceled",
                      "replaced"
                    ]
                  },
                  "lastSequence": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "cancelReason": {
                    "type": "string",
                    "enum": [
                      "margin_unbacked",
                      "risk_evidence_incomplete",
                      "market_session_closed",
                      "reduce_only_position_unavailable",
                      "expired",
                      "price_protection"
                    ],
                    "description": "Why the order closed. price_protection: a market order that is not reduce-only trades only inside a band around the mark price (1% on most markets, 3% on thin ones), and the part that found no liquidity inside the band was cancelled."
                  },
                  "quantity": {
                    "type": "string",
                    "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                    "description": "The order's base quantity when recorded. Also returned when the order closed with part of it unfilled."
                  },
                  "filledQuantity": {
                    "type": "string",
                    "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                    "description": "The base quantity that filled when recorded. Also returned when the order closed with part of it unfilled."
                  },
                  "createdJournalSequence": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Sequence at which the order was created, if recorded. This is an ordinal, not a time."
                  },
                  "updatedJournalSequence": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Sequence of the latest lifecycle change, equal to lastSequence. This is an ordinal, not a time."
                  },
                  "updatedAtEpochMs": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "When the order last changed (its acceptance, a fill, an amend or its cancellation), in Unix epoch milliseconds: the venue clock of the command that made that change, a maker's fill included. Equal to createdAtEpochMs until the first change. For a change the venue's order history does not hold (made before a history reset), it is the order's latest own command the venue holds, never earlier than createdAtEpochMs."
                  },
                  "clientOrderId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 256,
                    "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                    "description": "The clientOrderId the order was placed with, exactly as submitted; the venue uses it as the order id, so it equals orderId. Null when the order was placed without one (the venue derived its id) or by the venue itself (a liquidation, an auto-deleverage leg or a trigger)."
                  },
                  "fillsPending": {
                    "type": "boolean",
                    "const": true,
                    "description": "True while the order has a fill that this answer cannot fully describe yet (order history is catching up with the matching engine). lastTradeTimestamp is then null, and cost and average are omitted when the matching engine committed no cost for the fill (a perpetual order, or a spot answer without the filled quote). A cost that the matching engine committed is always returned, with its exact average. A later fetchOrder returns the full order without this field once every fill is recorded. Read the trades and fee of a spot order from the fills read (fetchMyTrades) or the account fills stream; fetchOrder always returns an empty trades list and a null fee."
                  }
                },
                "required": [
                  "version",
                  "orderId",
                  "accountId",
                  "marketId",
                  "status",
                  "lastSequence",
                  "idempotencyKey",
                  "fillsPending"
                ],
                "additionalProperties": false
              },
              "lastTradeTimestamp": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "default": null
              },
              "trades": {
                "type": "array",
                "prefixItems": [],
                "items": false,
                "minItems": 0,
                "maxItems": 0
              },
              "fee": {
                "type": "null"
              },
              "cost": {
                "type": "number",
                "minimum": 0,
                "description": "The filled value in the quote asset, when the matching engine committed one (a spot order with its filled quote). Omitted while no committed value is available."
              }
            },
            "required": [
              "id",
              "symbol",
              "status",
              "info",
              "trades",
              "fee"
            ],
            "additionalProperties": false
          },
          {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientOrderId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 256,
                    "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                    "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits.",
                    "default": null
                  },
                  "symbol": {
                    "type": "string",
                    "minLength": 1
                  },
                  "timestamp": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "datetime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "lastUpdateTimestamp": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "closed",
                      "canceled"
                    ]
                  },
                  "side": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "buy",
                      "sell",
                      null
                    ],
                    "default": null
                  },
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "limit",
                      "market",
                      null
                    ],
                    "default": null
                  },
                  "timeInForce": {
                    "type": "string",
                    "enum": [
                      "GTC",
                      "IOC",
                      "FOK",
                      "GTD",
                      "PO"
                    ]
                  },
                  "price": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "default": null
                  },
                  "average": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                  },
                  "amount": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "filled": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "remaining": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "reduceOnly": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": null
                  },
                  "postOnly": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": null
                  },
                  "info": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "type": "string",
                        "enum": [
                          "external-order/v1"
                        ]
                      },
                      "postOnly": {
                        "type": "boolean"
                      },
                      "timeInForce": {
                        "type": "string",
                        "enum": [
                          "GTC",
                          "IOC",
                          "FOK",
                          "GTD"
                        ]
                      },
                      "icebergQty": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "description": "The visible quantity of an iceberg limit order, in base units like amount. Only this part appears in the book; the lock covers the full amount."
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "buy",
                          "sell"
                        ],
                        "description": "The order's accepted side, if recorded."
                      },
                      "orderType": {
                        "type": "string",
                        "enum": [
                          "limit",
                          "market"
                        ],
                        "description": "The order's accepted type, if recorded."
                      },
                      "price": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                        "description": "Accepted limit price as decimal text. A recorded market order has null; omission means the type or decimal limit price is unavailable."
                      },
                      "priceAtoms": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^[0-9]+$",
                        "description": "Accepted limit price in atoms. A recorded market order has null; omission means the type or limit price is unavailable."
                      },
                      "quantityAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$",
                        "description": "Original accepted base quantity in quantity atoms, if recorded."
                      },
                      "filledQuantityAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$",
                        "description": "Executed base quantity in quantity atoms, if recorded. Omission does not mean zero; use account.fills for this orderId to receive executions."
                      },
                      "productType": {
                        "type": "string",
                        "enum": [
                          "spot"
                        ]
                      },
                      "lockAsset": {
                        "type": "string",
                        "minLength": 1
                      },
                      "lockedAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$"
                      },
                      "remainingQuantityAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$"
                      },
                      "createdAtEpochMs": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "When the venue accepted the order, in Unix epoch milliseconds: the venue clock of the command that placed it. For an order placed before the venue's order history begins (a history reset or a new history start), it is the first time the venue holds for the order: its earliest own command, else its last change, else the first venue record after it; the order was accepted no later than that."
                      },
                      "filledQuoteAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$"
                      },
                      "lastFillAtEpochMs": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "orderId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "accountId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "marketId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "open",
                          "partially_filled",
                          "filled",
                          "canceled",
                          "replaced"
                        ]
                      },
                      "lastSequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "idempotencyKey": {
                        "type": "string",
                        "minLength": 1
                      },
                      "cancelReason": {
                        "type": "string",
                        "enum": [
                          "margin_unbacked",
                          "risk_evidence_incomplete",
                          "market_session_closed",
                          "reduce_only_position_unavailable",
                          "expired",
                          "price_protection"
                        ],
                        "description": "Why the order closed. price_protection: a market order that is not reduce-only trades only inside a band around the mark price (1% on most markets, 3% on thin ones), and the part that found no liquidity inside the band was cancelled."
                      },
                      "quantity": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                        "description": "The order's base quantity when recorded. Also returned when the order closed with part of it unfilled."
                      },
                      "filledQuantity": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                        "description": "The base quantity that filled when recorded. Also returned when the order closed with part of it unfilled."
                      },
                      "createdJournalSequence": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Sequence at which the order was created, if recorded. This is an ordinal, not a time."
                      },
                      "updatedJournalSequence": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Sequence of the latest lifecycle change, equal to lastSequence. This is an ordinal, not a time."
                      },
                      "updatedAtEpochMs": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "When the order last changed (its acceptance, a fill, an amend or its cancellation), in Unix epoch milliseconds: the venue clock of the command that made that change, a maker's fill included. Equal to createdAtEpochMs until the first change. For a change the venue's order history does not hold (made before a history reset), it is the order's latest own command the venue holds, never earlier than createdAtEpochMs."
                      },
                      "clientOrderId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                        "description": "The clientOrderId the order was placed with, exactly as submitted; the venue uses it as the order id, so it equals orderId. Null when the order was placed without one (the venue derived its id) or by the venue itself (a liquidation, an auto-deleverage leg or a trigger)."
                      },
                      "fillsPending": {
                        "type": "boolean",
                        "const": true,
                        "description": "True while the order has a fill that this answer cannot fully describe yet (order history is catching up with the matching engine). lastTradeTimestamp is then null, and cost and average are omitted when the matching engine committed no cost for the fill (a perpetual order, or a spot answer without the filled quote). A cost that the matching engine committed is always returned, with its exact average. A later fetchOrder returns the full order without this field once every fill is recorded. Read the trades and fee of a spot order from the fills read (fetchMyTrades) or the account fills stream; fetchOrder always returns an empty trades list and a null fee."
                      }
                    },
                    "required": [
                      "version",
                      "orderId",
                      "accountId",
                      "marketId",
                      "status",
                      "lastSequence",
                      "idempotencyKey",
                      "fillsPending"
                    ],
                    "additionalProperties": false
                  },
                  "lastTradeTimestamp": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "trades": {
                    "type": "array",
                    "prefixItems": [],
                    "items": false,
                    "minItems": 0,
                    "maxItems": 0
                  },
                  "fee": {
                    "type": "null"
                  },
                  "cost": {
                    "type": "number",
                    "minimum": 0,
                    "description": "The filled value in the quote asset, when the matching engine committed one (a spot order with its filled quote). Omitted while no committed value is available."
                  }
                },
                "required": [
                  "id",
                  "symbol",
                  "status",
                  "info",
                  "trades",
                  "fee"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientOrderId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 256,
                    "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                    "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits.",
                    "default": null
                  },
                  "symbol": {
                    "type": "string",
                    "minLength": 1
                  },
                  "timestamp": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "datetime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "lastUpdateTimestamp": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "closed",
                      "canceled"
                    ]
                  },
                  "side": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "buy",
                      "sell",
                      null
                    ],
                    "default": null
                  },
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "limit",
                      "market",
                      null
                    ],
                    "default": null
                  },
                  "timeInForce": {
                    "type": "string",
                    "enum": [
                      "GTC",
                      "IOC",
                      "FOK",
                      "GTD",
                      "PO"
                    ]
                  },
                  "price": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "default": null
                  },
                  "average": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                  },
                  "amount": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "filled": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "remaining": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "reduceOnly": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": null
                  },
                  "postOnly": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": null
                  },
                  "info": {
                    "type": "object",
                    "properties": {
                      "orderId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "accountId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "marketId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "configurationId": {
                        "type": "string",
                        "minLength": 1,
                        "pattern": "^[A-Za-z0-9_-]+$"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "open",
                          "partially_filled",
                          "filled",
                          "canceled",
                          "replaced"
                        ]
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "buy",
                          "sell"
                        ]
                      },
                      "orderType": {
                        "type": "string",
                        "enum": [
                          "limit",
                          "market"
                        ]
                      },
                      "price": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                      },
                      "quantity": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                      },
                      "filledQuantity": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                      },
                      "remainingQuantity": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                      },
                      "reduceOnly": {
                        "type": "boolean"
                      },
                      "postOnly": {
                        "type": "boolean",
                        "description": "The accepted post-only setting, when present in the recorded order."
                      },
                      "timeInForce": {
                        "type": "string",
                        "enum": [
                          "GTC",
                          "IOC",
                          "FOK",
                          "GTD"
                        ],
                        "description": "The accepted time-in-force setting, when recorded. FOK may appear on historical reads but is not a new-order option."
                      },
                      "updatedAtEpochMs": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "lastSequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "origin": {
                        "type": "string",
                        "enum": [
                          "liquidation",
                          "auto_deleverage"
                        ],
                        "description": "Present only on an order the venue placed itself: `liquidation` for a liquidation close, `auto_deleverage` for an auto-deleveraging leg."
                      },
                      "clientOrderId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                        "description": "The client order id the order was placed with: the same value as clientOrderId on every order read. Null for an order placed without one and for an order the engine placed itself.",
                        "default": null
                      },
                      "fillsPending": {
                        "type": "boolean",
                        "const": true,
                        "description": "True while the order has a fill that this answer cannot fully describe yet (order history is catching up with the matching engine). lastTradeTimestamp is then null, and cost and average are omitted when the matching engine committed no cost for the fill (a perpetual order, or a spot answer without the filled quote). A cost that the matching engine committed is always returned, with its exact average. A later fetchOrder returns the full order without this field once every fill is recorded. Read the trades and fee of a spot order from the fills read (fetchMyTrades) or the account fills stream; fetchOrder always returns an empty trades list and a null fee."
                      }
                    },
                    "required": [
                      "orderId",
                      "accountId",
                      "marketId",
                      "status",
                      "updatedAtEpochMs",
                      "lastSequence",
                      "fillsPending"
                    ],
                    "additionalProperties": false
                  },
                  "lastTradeTimestamp": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "trades": {
                    "type": "array",
                    "prefixItems": [],
                    "items": false,
                    "minItems": 0,
                    "maxItems": 0
                  },
                  "fee": {
                    "type": "null"
                  },
                  "cost": {
                    "type": "number",
                    "minimum": 0,
                    "description": "The filled value in the quote asset, when the matching engine committed one (a spot order with its filled quote). Omitted while no committed value is available."
                  }
                },
                "required": [
                  "id",
                  "symbol",
                  "status",
                  "info",
                  "trades",
                  "fee"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientOrderId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 256,
                    "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                    "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits.",
                    "default": null
                  },
                  "symbol": {
                    "type": "string",
                    "minLength": 1
                  },
                  "timestamp": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "datetime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null
                  },
                  "lastUpdateTimestamp": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "closed",
                      "canceled"
                    ]
                  },
                  "side": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "buy",
                      "sell",
                      null
                    ],
                    "default": null
                  },
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "limit",
                      "market",
                      null
                    ],
                    "default": null
                  },
                  "timeInForce": {
                    "type": "string",
                    "enum": [
                      "GTC",
                      "IOC",
                      "FOK",
                      "GTD",
                      "PO"
                    ]
                  },
                  "price": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "default": null
                  },
                  "average": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                  },
                  "amount": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "filled": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "remaining": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "reduceOnly": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": null
                  },
                  "postOnly": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": null
                  },
                  "info": {
                    "type": "object",
                    "properties": {
                      "orderId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "accountId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "marketId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "buy",
                          "sell"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "open",
                          "partially_filled"
                        ]
                      },
                      "priceAtoms": {
                        "type": "string",
                        "pattern": "^(0|[1-9][0-9]*)$"
                      },
                      "quantityAtoms": {
                        "type": "string",
                        "pattern": "^(0|[1-9][0-9]*)$"
                      },
                      "filledQuantityAtoms": {
                        "type": "string",
                        "pattern": "^(0|[1-9][0-9]*)$"
                      },
                      "remainingQuantityAtoms": {
                        "type": "string",
                        "pattern": "^(0|[1-9][0-9]*)$"
                      },
                      "reduceOnly": {
                        "type": "boolean"
                      },
                      "autoClose": {
                        "type": "object",
                        "properties": {
                          "takeProfitPriceAtoms": {
                            "type": "string",
                            "pattern": "^[1-9][0-9]*$"
                          },
                          "stopLossPriceAtoms": {
                            "type": "string",
                            "pattern": "^[1-9][0-9]*$"
                          }
                        },
                        "additionalProperties": false,
                        "description": "Optional position-protection prices in atoms. For a buy, take profit must exceed the admission price and stop loss must be lower; a sell reverses those comparisons. Equality returns invalid_price. A limit order's submitted price is its admission price. A non-reduce-only market order uses the mark adjusted by its protection band: 100 bps on a standard market or 300 bps on a thin market, higher for buys and lower for sells. That adjusted price determines the minimum distance to take profit. A reduce-only market order uses the best opposite quote. After entry, a qualifying mark-price crossing triggers a reduce-only market close: take profit for a long and stop loss for a short cross upward; the other two cross downward."
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "receivedAtEpochMs": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "createdJournalSequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "updatedJournalSequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "priceScale": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "quantityScale": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "clientOrderId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                        "description": "The client order id the order was placed with: the same value as clientOrderId on every order read. Null for an order placed without one and for an order the engine placed itself.",
                        "default": null
                      },
                      "fillsPending": {
                        "type": "boolean",
                        "const": true,
                        "description": "True while the order has a fill that this answer cannot fully describe yet (order history is catching up with the matching engine). lastTradeTimestamp is then null, and cost and average are omitted when the matching engine committed no cost for the fill (a perpetual order, or a spot answer without the filled quote). A cost that the matching engine committed is always returned, with its exact average. A later fetchOrder returns the full order without this field once every fill is recorded. Read the trades and fee of a spot order from the fills read (fetchMyTrades) or the account fills stream; fetchOrder always returns an empty trades list and a null fee."
                      }
                    },
                    "required": [
                      "orderId",
                      "accountId",
                      "marketId",
                      "side",
                      "status",
                      "priceAtoms",
                      "quantityAtoms",
                      "filledQuantityAtoms",
                      "remainingQuantityAtoms",
                      "reduceOnly",
                      "sequence",
                      "receivedAtEpochMs",
                      "createdJournalSequence",
                      "updatedJournalSequence",
                      "priceScale",
                      "quantityScale",
                      "fillsPending"
                    ],
                    "additionalProperties": false
                  },
                  "lastTradeTimestamp": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "trades": {
                    "type": "array",
                    "prefixItems": [],
                    "items": false,
                    "minItems": 0,
                    "maxItems": 0
                  },
                  "fee": {
                    "type": "null"
                  },
                  "cost": {
                    "type": "number",
                    "minimum": 0,
                    "description": "The filled value in the quote asset, when the matching engine committed one (a spot order with its filled quote). Omitted while no committed value is available."
                  }
                },
                "required": [
                  "id",
                  "symbol",
                  "status",
                  "info",
                  "trades",
                  "fee"
                ],
                "additionalProperties": false
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "clientOrderId": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1,
                "maxLength": 256,
                "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. Canonical bot identifiers also allow the fixed bot-order/v1: prefix followed by an optional sha256: marker and 64 lowercase hexadecimal digits.",
                "default": null
              },
              "symbol": {
                "type": "string",
                "minLength": 1
              },
              "timestamp": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "default": null
              },
              "datetime": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "lastUpdateTimestamp": {
                "type": "integer",
                "minimum": 0
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "closed",
                  "canceled"
                ]
              },
              "side": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "buy",
                  "sell",
                  null
                ],
                "default": null
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "limit",
                  "market",
                  null
                ],
                "default": null
              },
              "timeInForce": {
                "type": "string",
                "enum": [
                  "GTC",
                  "IOC",
                  "FOK",
                  "GTD",
                  "PO"
                ]
              },
              "price": {
                "type": [
                  "number",
                  "null"
                ],
                "default": null
              },
              "average": {
                "type": "number",
                "exclusiveMinimum": 0,
                "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
              },
              "amount": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "default": null
              },
              "filled": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "default": null
              },
              "remaining": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "default": null
              },
              "reduceOnly": {
                "type": [
                  "boolean",
                  "null"
                ],
                "default": null
              },
              "postOnly": {
                "type": [
                  "boolean",
                  "null"
                ],
                "default": null
              },
              "info": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "version": {
                        "type": "string",
                        "enum": [
                          "external-order/v1"
                        ]
                      },
                      "postOnly": {
                        "type": "boolean"
                      },
                      "timeInForce": {
                        "type": "string",
                        "enum": [
                          "GTC",
                          "IOC",
                          "FOK",
                          "GTD"
                        ]
                      },
                      "icebergQty": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "description": "The visible quantity of an iceberg limit order, in base units like amount. Only this part appears in the book; the lock covers the full amount."
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "buy",
                          "sell"
                        ],
                        "description": "The order's accepted side, if recorded."
                      },
                      "orderType": {
                        "type": "string",
                        "enum": [
                          "limit",
                          "market"
                        ],
                        "description": "The order's accepted type, if recorded."
                      },
                      "price": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                        "description": "Accepted limit price as decimal text. A recorded market order has null; omission means the type or decimal limit price is unavailable."
                      },
                      "priceAtoms": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^[0-9]+$",
                        "description": "Accepted limit price in atoms. A recorded market order has null; omission means the type or limit price is unavailable."
                      },
                      "quantityAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$",
                        "description": "Original accepted base quantity in quantity atoms, if recorded."
                      },
                      "filledQuantityAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$",
                        "description": "Executed base quantity in quantity atoms, if recorded. Omission does not mean zero; use account.fills for this orderId to receive executions."
                      },
                      "productType": {
                        "type": "string",
                        "enum": [
                          "spot"
                        ]
                      },
                      "lockAsset": {
                        "type": "string",
                        "minLength": 1
                      },
                      "lockedAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$"
                      },
                      "remainingQuantityAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$"
                      },
                      "createdAtEpochMs": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "When the venue accepted the order, in Unix epoch milliseconds: the venue clock of the command that placed it. For an order placed before the venue's order history begins (a history reset or a new history start), it is the first time the venue holds for the order: its earliest own command, else its last change, else the first venue record after it; the order was accepted no later than that."
                      },
                      "filledQuoteAtoms": {
                        "type": "string",
                        "pattern": "^[0-9]+$"
                      },
                      "lastFillAtEpochMs": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "orderId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "accountId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "marketId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "open",
                          "partially_filled",
                          "filled",
                          "canceled",
                          "replaced"
                        ]
                      },
                      "lastSequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "idempotencyKey": {
                        "type": "string",
                        "minLength": 1
                      },
                      "cancelReason": {
                        "type": "string",
                        "enum": [
                          "margin_unbacked",
                          "risk_evidence_incomplete",
                          "market_session_closed",
                          "reduce_only_position_unavailable",
                          "expired",
                          "price_protection"
                        ],
                        "description": "Why the order closed. price_protection: a market order that is not reduce-only trades only inside a band around the mark price (1% on most markets, 3% on thin ones), and the part that found no liquidity inside the band was cancelled."
                      },
                      "quantity": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                        "description": "The order's base quantity when recorded. Also returned when the order closed with part of it unfilled."
                      },
                      "filledQuantity": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                        "description": "The base quantity that filled when recorded. Also returned when the order closed with part of it unfilled."
                      },
                      "createdJournalSequence": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Sequence at which the order was created, if recorded. This is an ordinal, not a time."
                      },
                      "updatedJournalSequence": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Sequence of the latest lifecycle change, equal to lastSequence. This is an ordinal, not a time."
                      },
                      "updatedAtEpochMs": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "When the order last changed (its acceptance, a fill, an amend or its cancellation), in Unix epoch milliseconds: the venue clock of the command that made that change, a maker's fill included. Equal to createdAtEpochMs until the first change. For a change the venue's order history does not hold (made before a history reset), it is the order's latest own command the venue holds, never earlier than createdAtEpochMs."
                      },
                      "clientOrderId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                        "description": "The clientOrderId the order was placed with, exactly as submitted; the venue uses it as the order id, so it equals orderId. Null when the order was placed without one (the venue derived its id) or by the venue itself (a liquidation, an auto-deleverage leg or a trigger)."
                      }
                    },
                    "required": [
                      "version",
                      "orderId",
                      "accountId",
                      "marketId",
                      "status",
                      "lastSequence",
                      "idempotencyKey"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "orderId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "accountId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "marketId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "configurationId": {
                        "type": "string",
                        "minLength": 1,
                        "pattern": "^[A-Za-z0-9_-]+$"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "open",
                          "partially_filled",
                          "filled",
                          "canceled",
                          "replaced"
                        ]
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "buy",
                          "sell"
                        ]
                      },
                      "orderType": {
                        "type": "string",
                        "enum": [
                          "limit",
                          "market"
                        ]
                      },
                      "price": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                      },
                      "quantity": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                      },
                      "filledQuantity": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                      },
                      "remainingQuantity": {
                        "type": "string",
                        "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                      },
                      "reduceOnly": {
                        "type": "boolean"
                      },
                      "postOnly": {
                        "type": "boolean",
                        "description": "The accepted post-only setting, when present in the recorded order."
                      },
                      "timeInForce": {
                        "type": "string",
                        "enum": [
                          "GTC",
                          "IOC",
                          "FOK",
                          "GTD"
                        ],
                        "description": "The accepted time-in-force setting, when recorded. FOK may appear on historical reads but is not a new-order option."
                      },
                      "updatedAtEpochMs": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "lastSequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "origin": {
                        "type": "string",
                        "enum": [
                          "liquidation",
                          "auto_deleverage"
                        ],
                        "description": "Present only on an order the venue placed itself: `liquidation` for a liquidation close, `auto_deleverage` for an auto-deleveraging leg."
                      },
                      "clientOrderId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                        "description": "The client order id the order was placed with: the same value as clientOrderId on every order read. Null for an order placed without one and for an order the engine placed itself.",
                        "default": null
                      }
                    },
                    "required": [
                      "orderId",
                      "accountId",
                      "marketId",
                      "status",
                      "updatedAtEpochMs",
                      "lastSequence"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "orderId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "accountId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "marketId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "buy",
                          "sell"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "open",
                          "partially_filled"
                        ]
                      },
                      "priceAtoms": {
                        "type": "string",
                        "pattern": "^(0|[1-9][0-9]*)$"
                      },
                      "quantityAtoms": {
                        "type": "string",
                        "pattern": "^(0|[1-9][0-9]*)$"
                      },
                      "filledQuantityAtoms": {
                        "type": "string",
                        "pattern": "^(0|[1-9][0-9]*)$"
                      },
                      "remainingQuantityAtoms": {
                        "type": "string",
                        "pattern": "^(0|[1-9][0-9]*)$"
                      },
                      "reduceOnly": {
                        "type": "boolean"
                      },
                      "autoClose": {
                        "type": "object",
                        "properties": {
                          "takeProfitPriceAtoms": {
                            "type": "string",
                            "pattern": "^[1-9][0-9]*$"
                          },
                          "stopLossPriceAtoms": {
                            "type": "string",
                            "pattern": "^[1-9][0-9]*$"
                          }
                        },
                        "additionalProperties": false,
                        "description": "Optional position-protection prices in atoms. For a buy, take profit must exceed the admission price and stop loss must be lower; a sell reverses those comparisons. Equality returns invalid_price. A limit order's submitted price is its admission price. A non-reduce-only market order uses the mark adjusted by its protection band: 100 bps on a standard market or 300 bps on a thin market, higher for buys and lower for sells. That adjusted price determines the minimum distance to take profit. A reduce-only market order uses the best opposite quote. After entry, a qualifying mark-price crossing triggers a reduce-only market close: take profit for a long and stop loss for a short cross upward; the other two cross downward."
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "receivedAtEpochMs": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "createdJournalSequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "updatedJournalSequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "priceScale": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "quantityScale": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "clientOrderId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                        "description": "The client order id the order was placed with: the same value as clientOrderId on every order read. Null for an order placed without one and for an order the engine placed itself.",
                        "default": null
                      }
                    },
                    "required": [
                      "orderId",
                      "accountId",
                      "marketId",
                      "side",
                      "status",
                      "priceAtoms",
                      "quantityAtoms",
                      "filledQuantityAtoms",
                      "remainingQuantityAtoms",
                      "reduceOnly",
                      "sequence",
                      "receivedAtEpochMs",
                      "createdJournalSequence",
                      "updatedJournalSequence",
                      "priceScale",
                      "quantityScale"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "lastTradeTimestamp": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "default": null
              },
              "cost": {
                "type": [
                  "number",
                  "null"
                ],
                "default": null
              },
              "trades": {
                "type": "array",
                "prefixItems": [],
                "items": false,
                "minItems": 0,
                "maxItems": 0,
                "default": []
              },
              "fee": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "currency": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1
                  },
                  "cost": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "rate": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "currency",
                  "cost"
                ],
                "additionalProperties": false,
                "default": null
              }
            },
            "required": [
              "id",
              "symbol",
              "status",
              "info"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "clientOrderId": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1,
                "maxLength": 256,
                "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits."
              },
              "symbol": {
                "type": "string",
                "pattern": "^([^/:]+)\\/([^/:]+)$"
              },
              "timestamp": {
                "type": "integer",
                "minimum": 0
              },
              "datetime": {
                "type": "string"
              },
              "lastTradeTimestamp": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              },
              "lastUpdateTimestamp": {
                "type": "integer",
                "minimum": 0
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "closed",
                  "canceled"
                ]
              },
              "side": {
                "type": "string",
                "enum": [
                  "buy",
                  "sell"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "limit",
                  "market"
                ]
              },
              "timeInForce": {
                "type": "string",
                "enum": [
                  "GTC",
                  "IOC",
                  "FOK",
                  "GTD"
                ]
              },
              "price": {
                "type": [
                  "number",
                  "null"
                ],
                "exclusiveMinimum": 0,
                "description": "A market order has no fixed price and returns null."
              },
              "average": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "filled": {
                "type": "number",
                "minimum": 0
              },
              "remaining": {
                "type": "number",
                "minimum": 0
              },
              "cost": {
                "type": "number",
                "minimum": 0,
                "description": "Executed order value in quote-asset units."
              },
              "postOnly": {
                "type": "boolean"
              },
              "reduceOnly": {
                "type": "boolean",
                "const": false
              },
              "trades": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "order": {
                      "type": "string",
                      "minLength": 1
                    },
                    "symbol": {
                      "type": "string",
                      "minLength": 1
                    },
                    "timestamp": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "datetime": {
                      "type": "string"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell"
                      ]
                    },
                    "takerOrMaker": {
                      "type": "string",
                      "enum": [
                        "maker",
                        "taker"
                      ]
                    },
                    "price": {
                      "type": "number"
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "fee": {
                      "type": "object",
                      "properties": {
                        "cost": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "cost",
                        "currency"
                      ],
                      "additionalProperties": false
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "tradeId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "accountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "maker",
                            "taker"
                          ]
                        },
                        "feePaidAtoms": {
                          "type": "string",
                          "pattern": "^-?[0-9]+$"
                        },
                        "feePaid": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "feeRole": {
                          "type": "string",
                          "enum": [
                            "maker",
                            "taker"
                          ]
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "buy",
                            "sell"
                          ]
                        },
                        "priceAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "price": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "sizeAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "size": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "orderId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "realizedPnlAtoms": {
                          "type": "string",
                          "pattern": "^-?[0-9]+$"
                        },
                        "realizedPnl": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "occurredAtEpochMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "lastSequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "liquidation",
                            "auto_deleverage"
                          ],
                          "description": "Present only when the venue placed this side's order: `liquidation` for a liquidation close, `auto_deleverage` for an auto-deleveraging leg."
                        }
                      },
                      "required": [
                        "tradeId",
                        "accountId",
                        "marketId",
                        "role",
                        "feePaidAtoms",
                        "feePaid",
                        "feeRole",
                        "side",
                        "priceAtoms",
                        "price",
                        "sizeAtoms",
                        "size",
                        "orderId",
                        "occurredAtEpochMs",
                        "lastSequence"
                      ],
                      "additionalProperties": false
                    },
                    "type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "limit",
                        "market",
                        null
                      ]
                    },
                    "cost": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "symbol",
                    "timestamp",
                    "datetime",
                    "side",
                    "takerOrMaker",
                    "price",
                    "amount",
                    "fee",
                    "info",
                    "type",
                    "cost"
                  ],
                  "additionalProperties": false
                }
              },
              "fee": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "cost": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "cost",
                  "currency"
                ],
                "additionalProperties": false
              },
              "info": {
                "type": "object",
                "properties": {
                  "orderId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "accountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "marketId": {
                    "type": "string",
                    "pattern": "^[^-]+-[^-]+-SPOT$"
                  },
                  "productType": {
                    "type": "string",
                    "enum": [
                      "spot"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "partially_filled",
                      "filled",
                      "canceled",
                      "replaced"
                    ]
                  },
                  "priceAtoms": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9]+$",
                    "description": "A market order has no fixed limit price and returns null."
                  },
                  "quantityAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "filledQuantityAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "remainingQuantityAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "lockAsset": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Asset reserved by the order: quote for a buy, base for a sell."
                  },
                  "lockedAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$",
                    "description": "Remaining order reserve in atoms. A buy reserves its price times remaining quantity plus the maximum applicable fee allowance."
                  },
                  "icebergQty": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Visible iceberg quantity, disclosed only to the order's owner."
                  },
                  "fillsPending": {
                    "type": "boolean",
                    "const": true,
                    "description": "True while a fill of the order is not yet recorded in order history: lastTradeTimestamp is null until then. cost and average are always the values that the matching engine committed."
                  }
                },
                "required": [
                  "orderId",
                  "accountId",
                  "marketId",
                  "productType",
                  "status",
                  "priceAtoms",
                  "quantityAtoms",
                  "filledQuantityAtoms",
                  "remainingQuantityAtoms",
                  "lockAsset",
                  "lockedAtoms"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "clientOrderId",
              "symbol",
              "timestamp",
              "datetime",
              "lastTradeTimestamp",
              "status",
              "side",
              "type",
              "timeInForce",
              "price",
              "amount",
              "filled",
              "remaining",
              "cost",
              "postOnly",
              "reduceOnly",
              "trades",
              "fee",
              "info"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^po_[0-9a-f]{32}$"
              },
              "clientOrderId": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1,
                "maxLength": 256,
                "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits."
              },
              "symbol": {
                "type": "string",
                "pattern": "^([^/:]+)\\/([^/:]+)$"
              },
              "timestamp": {
                "type": "integer",
                "minimum": 0
              },
              "datetime": {
                "type": "string"
              },
              "lastTradeTimestamp": {
                "type": "null"
              },
              "lastUpdateTimestamp": {
                "type": "integer",
                "minimum": 0
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "closed",
                  "canceled",
                  "expired",
                  "rejected"
                ]
              },
              "side": {
                "type": "string",
                "enum": [
                  "buy",
                  "sell"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "twap"
                ]
              },
              "price": {
                "type": [
                  "number",
                  "null"
                ],
                "exclusiveMinimum": 0,
                "description": "The limit price of the TWAP order, or null if no limit price was set."
              },
              "average": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "amount": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "filled": {
                "type": "number",
                "minimum": 0
              },
              "remaining": {
                "type": "number",
                "minimum": 0
              },
              "cost": {
                "type": "number",
                "minimum": 0,
                "description": "Executed order value in quote-asset units."
              },
              "postOnly": {
                "type": "boolean",
                "const": false
              },
              "reduceOnly": {
                "type": "boolean",
                "const": false
              },
              "trades": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "order": {
                      "type": "string",
                      "minLength": 1
                    },
                    "symbol": {
                      "type": "string",
                      "minLength": 1
                    },
                    "timestamp": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "datetime": {
                      "type": "string"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell"
                      ]
                    },
                    "takerOrMaker": {
                      "type": "string",
                      "enum": [
                        "maker",
                        "taker"
                      ]
                    },
                    "price": {
                      "type": "number"
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "fee": {
                      "type": "object",
                      "properties": {
                        "cost": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "cost",
                        "currency"
                      ],
                      "additionalProperties": false
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "tradeId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "accountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "maker",
                            "taker"
                          ]
                        },
                        "feePaidAtoms": {
                          "type": "string",
                          "pattern": "^-?[0-9]+$"
                        },
                        "feePaid": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "feeRole": {
                          "type": "string",
                          "enum": [
                            "maker",
                            "taker"
                          ]
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "buy",
                            "sell"
                          ]
                        },
                        "priceAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "price": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "sizeAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "size": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "orderId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "realizedPnlAtoms": {
                          "type": "string",
                          "pattern": "^-?[0-9]+$"
                        },
                        "realizedPnl": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "occurredAtEpochMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "lastSequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "liquidation",
                            "auto_deleverage"
                          ],
                          "description": "Present only when the venue placed this side's order: `liquidation` for a liquidation close, `auto_deleverage` for an auto-deleveraging leg."
                        }
                      },
                      "required": [
                        "tradeId",
                        "accountId",
                        "marketId",
                        "role",
                        "feePaidAtoms",
                        "feePaid",
                        "feeRole",
                        "side",
                        "priceAtoms",
                        "price",
                        "sizeAtoms",
                        "size",
                        "orderId",
                        "occurredAtEpochMs",
                        "lastSequence"
                      ],
                      "additionalProperties": false
                    },
                    "type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "limit",
                        "market",
                        null
                      ]
                    },
                    "cost": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "symbol",
                    "timestamp",
                    "datetime",
                    "side",
                    "takerOrMaker",
                    "price",
                    "amount",
                    "fee",
                    "info",
                    "type",
                    "cost"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 0,
                "description": "Always empty. Read the child order fills from the fills read (fetchMyTrades)."
              },
              "fee": {
                "type": "null"
              },
              "info": {
                "type": "object",
                "properties": {
                  "orderId": {
                    "type": "string",
                    "pattern": "^po_[0-9a-f]{32}$"
                  },
                  "accountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "marketId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "productType": {
                    "type": "string",
                    "enum": [
                      "spot"
                    ]
                  },
                  "parentKind": {
                    "type": "string",
                    "enum": [
                      "twap"
                    ]
                  },
                  "parentState": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "running",
                      "paused",
                      "completed",
                      "canceled",
                      "expired",
                      "failed"
                    ]
                  },
                  "parentReason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "description": "Reason the TWAP order is paused or failed, or null in any other state."
                  },
                  "slicesSent": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "slicesTotal": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "nextSliceAt": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "description": "Unix epoch time in milliseconds for the next scheduled slice, or null after the TWAP order reaches a final state."
                  },
                  "durationMs": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "randomize": {
                    "type": "boolean"
                  },
                  "amountAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "filledBaseAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "filledQuoteAtoms": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  },
                  "limitPriceAtoms": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "orderId",
                  "accountId",
                  "marketId",
                  "productType",
                  "parentKind",
                  "parentState",
                  "parentReason",
                  "slicesSent",
                  "slicesTotal",
                  "nextSliceAt",
                  "durationMs",
                  "randomize",
                  "amountAtoms",
                  "filledBaseAtoms",
                  "filledQuoteAtoms",
                  "limitPriceAtoms"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "clientOrderId",
              "symbol",
              "timestamp",
              "datetime",
              "lastTradeTimestamp",
              "lastUpdateTimestamp",
              "status",
              "side",
              "type",
              "price",
              "amount",
              "filled",
              "remaining",
              "cost",
              "postOnly",
              "reduceOnly",
              "trades",
              "fee",
              "info"
            ],
            "additionalProperties": false
          }
        ]
      },
      "V2OrderBookResponse": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "minLength": 1
          },
          "bids": {
            "type": "array",
            "items": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number",
                  "minimum": 0
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            }
          },
          "asks": {
            "type": "array",
            "items": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number",
                  "minimum": 0
                }
              ],
              "items": false,
              "minItems": 2,
              "maxItems": 2
            }
          },
          "nonce": {
            "type": "integer",
            "minimum": 0
          },
          "info": {
            "type": "object",
            "properties": {
              "version": {
                "type": "string",
                "enum": [
                  "external-book-snapshot/v1"
                ]
              },
              "marketId": {
                "type": "string",
                "minLength": 1
              },
              "snapshotSequence": {
                "type": "integer",
                "minimum": 0
              },
              "readModelDigest": {
                "type": "string",
                "pattern": "^sha256:[0-9a-f]{64}$",
                "description": "Covers the book content published here -- marketId, snapshotSequence, bids and asks. Recomputable by a client from this payload."
              },
              "bids": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "priceAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "price": {
                      "type": "string",
                      "pattern": "^-?[0-9]+\\.[0-9]+$"
                    },
                    "sizeAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "size": {
                      "type": "string",
                      "pattern": "^-?[0-9]+\\.[0-9]+$"
                    }
                  },
                  "required": [
                    "priceAtoms",
                    "price",
                    "sizeAtoms",
                    "size"
                  ],
                  "additionalProperties": false
                }
              },
              "asks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "priceAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "price": {
                      "type": "string",
                      "pattern": "^-?[0-9]+\\.[0-9]+$"
                    },
                    "sizeAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "size": {
                      "type": "string",
                      "pattern": "^-?[0-9]+\\.[0-9]+$"
                    }
                  },
                  "required": [
                    "priceAtoms",
                    "price",
                    "sizeAtoms",
                    "size"
                  ],
                  "additionalProperties": false
                }
              },
              "checksum": {
                "type": "string",
                "pattern": "^sha256:[0-9a-f]{64}$"
              },
              "resync": {
                "type": "object",
                "properties": {
                  "stream": {
                    "type": "string",
                    "enum": [
                      "market.book"
                    ]
                  },
                  "fromSequence": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "stream",
                  "fromSequence"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "version",
              "marketId",
              "snapshotSequence",
              "readModelDigest",
              "bids",
              "asks",
              "checksum",
              "resync"
            ],
            "additionalProperties": false
          },
          "timestamp": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "default": null
          },
          "datetime": {
            "type": [
              "string",
              "null"
            ],
            "default": null
          }
        },
        "required": [
          "symbol",
          "bids",
          "asks",
          "nonce",
          "info"
        ],
        "additionalProperties": false
      },
      "V2OrdersResponse": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. Canonical bot identifiers also allow the fixed bot-order/v1: prefix followed by an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "canceled"
                  ]
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string",
                      "enum": [
                        "external-order/v1"
                      ]
                    },
                    "postOnly": {
                      "type": "boolean"
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "IOC",
                        "FOK",
                        "GTD"
                      ]
                    },
                    "icebergQty": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "The visible quantity of an iceberg limit order, in base units like amount. Only this part appears in the book; the lock covers the full amount."
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell"
                      ],
                      "description": "The order's accepted side, if recorded."
                    },
                    "orderType": {
                      "type": "string",
                      "enum": [
                        "limit",
                        "market"
                      ],
                      "description": "The order's accepted type, if recorded."
                    },
                    "price": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "Accepted limit price as decimal text. A recorded market order has null; omission means the type or decimal limit price is unavailable."
                    },
                    "priceAtoms": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+$",
                      "description": "Accepted limit price in atoms. A recorded market order has null; omission means the type or limit price is unavailable."
                    },
                    "quantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "Original accepted base quantity in quantity atoms, if recorded."
                    },
                    "filledQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "Executed base quantity in quantity atoms, if recorded. Omission does not mean zero; use account.fills for this orderId to receive executions."
                    },
                    "productType": {
                      "type": "string",
                      "enum": [
                        "spot"
                      ]
                    },
                    "lockAsset": {
                      "type": "string",
                      "minLength": 1
                    },
                    "lockedAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "remainingQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "createdAtEpochMs": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "When the venue accepted the order, in Unix epoch milliseconds: the venue clock of the command that placed it. For an order placed before the venue's order history begins (a history reset or a new history start), it is the first time the venue holds for the order: its earliest own command, else its last change, else the first venue record after it; the order was accepted no later than that."
                    },
                    "filledQuoteAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "lastFillAtEpochMs": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "orderId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "accountId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "partially_filled",
                        "filled",
                        "canceled",
                        "replaced"
                      ]
                    },
                    "lastSequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "idempotencyKey": {
                      "type": "string",
                      "minLength": 1
                    },
                    "cancelReason": {
                      "type": "string",
                      "enum": [
                        "margin_unbacked",
                        "risk_evidence_incomplete",
                        "market_session_closed",
                        "reduce_only_position_unavailable",
                        "expired",
                        "price_protection"
                      ],
                      "description": "Why the order closed. price_protection: a market order that is not reduce-only trades only inside a band around the mark price (1% on most markets, 3% on thin ones), and the part that found no liquidity inside the band was cancelled."
                    },
                    "quantity": {
                      "type": "string",
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The order's base quantity when recorded. Also returned when the order closed with part of it unfilled."
                    },
                    "filledQuantity": {
                      "type": "string",
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The base quantity that filled when recorded. Also returned when the order closed with part of it unfilled."
                    },
                    "createdJournalSequence": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Sequence at which the order was created, if recorded. This is an ordinal, not a time."
                    },
                    "updatedJournalSequence": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Sequence of the latest lifecycle change, equal to lastSequence. This is an ordinal, not a time."
                    },
                    "updatedAtEpochMs": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "When the order last changed (its acceptance, a fill, an amend or its cancellation), in Unix epoch milliseconds: the venue clock of the command that made that change, a maker's fill included. Equal to createdAtEpochMs until the first change. For a change the venue's order history does not hold (made before a history reset), it is the order's latest own command the venue holds, never earlier than createdAtEpochMs."
                    },
                    "clientOrderId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                      "description": "The clientOrderId the order was placed with, exactly as submitted; the venue uses it as the order id, so it equals orderId. Null when the order was placed without one (the venue derived its id) or by the venue itself (a liquidation, an auto-deleverage leg or a trigger)."
                    },
                    "fillsPending": {
                      "type": "boolean",
                      "const": true,
                      "description": "True while the order has a fill that this answer cannot fully describe yet (order history is catching up with the matching engine). lastTradeTimestamp is then null, and cost and average are omitted when the matching engine committed no cost for the fill (a perpetual order, or a spot answer without the filled quote). A cost that the matching engine committed is always returned, with its exact average. A later fetchOrder returns the full order without this field once every fill is recorded. Read the trades and fee of a spot order from the fills read (fetchMyTrades) or the account fills stream; fetchOrder always returns an empty trades list and a null fee."
                    }
                  },
                  "required": [
                    "version",
                    "orderId",
                    "accountId",
                    "marketId",
                    "status",
                    "lastSequence",
                    "idempotencyKey",
                    "fillsPending"
                  ],
                  "additionalProperties": false
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0
                },
                "fee": {
                  "type": "null"
                },
                "cost": {
                  "type": "number",
                  "minimum": 0,
                  "description": "The filled value in the quote asset, when the matching engine committed one (a spot order with its filled quote). Omitted while no committed value is available."
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info",
                "trades",
                "fee"
              ],
              "additionalProperties": false
            },
            {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "clientOrderId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                      "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits.",
                      "default": null
                    },
                    "symbol": {
                      "type": "string",
                      "minLength": 1
                    },
                    "timestamp": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "datetime": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null
                    },
                    "lastUpdateTimestamp": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed",
                        "canceled"
                      ]
                    },
                    "side": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "buy",
                        "sell",
                        null
                      ],
                      "default": null
                    },
                    "type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "limit",
                        "market",
                        null
                      ],
                      "default": null
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "IOC",
                        "FOK",
                        "GTD",
                        "PO"
                      ]
                    },
                    "price": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "default": null
                    },
                    "average": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                    },
                    "amount": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "filled": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "remaining": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "reduceOnly": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "default": null
                    },
                    "postOnly": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "default": null
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "string",
                          "enum": [
                            "external-order/v1"
                          ]
                        },
                        "postOnly": {
                          "type": "boolean"
                        },
                        "timeInForce": {
                          "type": "string",
                          "enum": [
                            "GTC",
                            "IOC",
                            "FOK",
                            "GTD"
                          ]
                        },
                        "icebergQty": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "description": "The visible quantity of an iceberg limit order, in base units like amount. Only this part appears in the book; the lock covers the full amount."
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "buy",
                            "sell"
                          ],
                          "description": "The order's accepted side, if recorded."
                        },
                        "orderType": {
                          "type": "string",
                          "enum": [
                            "limit",
                            "market"
                          ],
                          "description": "The order's accepted type, if recorded."
                        },
                        "price": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                          "description": "Accepted limit price as decimal text. A recorded market order has null; omission means the type or decimal limit price is unavailable."
                        },
                        "priceAtoms": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^[0-9]+$",
                          "description": "Accepted limit price in atoms. A recorded market order has null; omission means the type or limit price is unavailable."
                        },
                        "quantityAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$",
                          "description": "Original accepted base quantity in quantity atoms, if recorded."
                        },
                        "filledQuantityAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$",
                          "description": "Executed base quantity in quantity atoms, if recorded. Omission does not mean zero; use account.fills for this orderId to receive executions."
                        },
                        "productType": {
                          "type": "string",
                          "enum": [
                            "spot"
                          ]
                        },
                        "lockAsset": {
                          "type": "string",
                          "minLength": 1
                        },
                        "lockedAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "remainingQuantityAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "createdAtEpochMs": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "When the venue accepted the order, in Unix epoch milliseconds: the venue clock of the command that placed it. For an order placed before the venue's order history begins (a history reset or a new history start), it is the first time the venue holds for the order: its earliest own command, else its last change, else the first venue record after it; the order was accepted no later than that."
                        },
                        "filledQuoteAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "lastFillAtEpochMs": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "orderId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "accountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "partially_filled",
                            "filled",
                            "canceled",
                            "replaced"
                          ]
                        },
                        "lastSequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "idempotencyKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "cancelReason": {
                          "type": "string",
                          "enum": [
                            "margin_unbacked",
                            "risk_evidence_incomplete",
                            "market_session_closed",
                            "reduce_only_position_unavailable",
                            "expired",
                            "price_protection"
                          ],
                          "description": "Why the order closed. price_protection: a market order that is not reduce-only trades only inside a band around the mark price (1% on most markets, 3% on thin ones), and the part that found no liquidity inside the band was cancelled."
                        },
                        "quantity": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                          "description": "The order's base quantity when recorded. Also returned when the order closed with part of it unfilled."
                        },
                        "filledQuantity": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                          "description": "The base quantity that filled when recorded. Also returned when the order closed with part of it unfilled."
                        },
                        "createdJournalSequence": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Sequence at which the order was created, if recorded. This is an ordinal, not a time."
                        },
                        "updatedJournalSequence": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Sequence of the latest lifecycle change, equal to lastSequence. This is an ordinal, not a time."
                        },
                        "updatedAtEpochMs": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "When the order last changed (its acceptance, a fill, an amend or its cancellation), in Unix epoch milliseconds: the venue clock of the command that made that change, a maker's fill included. Equal to createdAtEpochMs until the first change. For a change the venue's order history does not hold (made before a history reset), it is the order's latest own command the venue holds, never earlier than createdAtEpochMs."
                        },
                        "clientOrderId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                          "description": "The clientOrderId the order was placed with, exactly as submitted; the venue uses it as the order id, so it equals orderId. Null when the order was placed without one (the venue derived its id) or by the venue itself (a liquidation, an auto-deleverage leg or a trigger)."
                        },
                        "fillsPending": {
                          "type": "boolean",
                          "const": true,
                          "description": "True while the order has a fill that this answer cannot fully describe yet (order history is catching up with the matching engine). lastTradeTimestamp is then null, and cost and average are omitted when the matching engine committed no cost for the fill (a perpetual order, or a spot answer without the filled quote). A cost that the matching engine committed is always returned, with its exact average. A later fetchOrder returns the full order without this field once every fill is recorded. Read the trades and fee of a spot order from the fills read (fetchMyTrades) or the account fills stream; fetchOrder always returns an empty trades list and a null fee."
                        }
                      },
                      "required": [
                        "version",
                        "orderId",
                        "accountId",
                        "marketId",
                        "status",
                        "lastSequence",
                        "idempotencyKey",
                        "fillsPending"
                      ],
                      "additionalProperties": false
                    },
                    "lastTradeTimestamp": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "trades": {
                      "type": "array",
                      "prefixItems": [],
                      "items": false,
                      "minItems": 0,
                      "maxItems": 0
                    },
                    "fee": {
                      "type": "null"
                    },
                    "cost": {
                      "type": "number",
                      "minimum": 0,
                      "description": "The filled value in the quote asset, when the matching engine committed one (a spot order with its filled quote). Omitted while no committed value is available."
                    }
                  },
                  "required": [
                    "id",
                    "symbol",
                    "status",
                    "info",
                    "trades",
                    "fee"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "clientOrderId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                      "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits.",
                      "default": null
                    },
                    "symbol": {
                      "type": "string",
                      "minLength": 1
                    },
                    "timestamp": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "datetime": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null
                    },
                    "lastUpdateTimestamp": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed",
                        "canceled"
                      ]
                    },
                    "side": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "buy",
                        "sell",
                        null
                      ],
                      "default": null
                    },
                    "type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "limit",
                        "market",
                        null
                      ],
                      "default": null
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "IOC",
                        "FOK",
                        "GTD",
                        "PO"
                      ]
                    },
                    "price": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "default": null
                    },
                    "average": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                    },
                    "amount": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "filled": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "remaining": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "reduceOnly": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "default": null
                    },
                    "postOnly": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "default": null
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "orderId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "accountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "configurationId": {
                          "type": "string",
                          "minLength": 1,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "partially_filled",
                            "filled",
                            "canceled",
                            "replaced"
                          ]
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "buy",
                            "sell"
                          ]
                        },
                        "orderType": {
                          "type": "string",
                          "enum": [
                            "limit",
                            "market"
                          ]
                        },
                        "price": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                        },
                        "quantity": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                        },
                        "filledQuantity": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                        },
                        "remainingQuantity": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                        },
                        "reduceOnly": {
                          "type": "boolean"
                        },
                        "postOnly": {
                          "type": "boolean",
                          "description": "The accepted post-only setting, when present in the recorded order."
                        },
                        "timeInForce": {
                          "type": "string",
                          "enum": [
                            "GTC",
                            "IOC",
                            "FOK",
                            "GTD"
                          ],
                          "description": "The accepted time-in-force setting, when recorded. FOK may appear on historical reads but is not a new-order option."
                        },
                        "updatedAtEpochMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "lastSequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "liquidation",
                            "auto_deleverage"
                          ],
                          "description": "Present only on an order the venue placed itself: `liquidation` for a liquidation close, `auto_deleverage` for an auto-deleveraging leg."
                        },
                        "clientOrderId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                          "description": "The client order id the order was placed with: the same value as clientOrderId on every order read. Null for an order placed without one and for an order the engine placed itself.",
                          "default": null
                        },
                        "fillsPending": {
                          "type": "boolean",
                          "const": true,
                          "description": "True while the order has a fill that this answer cannot fully describe yet (order history is catching up with the matching engine). lastTradeTimestamp is then null, and cost and average are omitted when the matching engine committed no cost for the fill (a perpetual order, or a spot answer without the filled quote). A cost that the matching engine committed is always returned, with its exact average. A later fetchOrder returns the full order without this field once every fill is recorded. Read the trades and fee of a spot order from the fills read (fetchMyTrades) or the account fills stream; fetchOrder always returns an empty trades list and a null fee."
                        }
                      },
                      "required": [
                        "orderId",
                        "accountId",
                        "marketId",
                        "status",
                        "updatedAtEpochMs",
                        "lastSequence",
                        "fillsPending"
                      ],
                      "additionalProperties": false
                    },
                    "lastTradeTimestamp": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "trades": {
                      "type": "array",
                      "prefixItems": [],
                      "items": false,
                      "minItems": 0,
                      "maxItems": 0
                    },
                    "fee": {
                      "type": "null"
                    },
                    "cost": {
                      "type": "number",
                      "minimum": 0,
                      "description": "The filled value in the quote asset, when the matching engine committed one (a spot order with its filled quote). Omitted while no committed value is available."
                    }
                  },
                  "required": [
                    "id",
                    "symbol",
                    "status",
                    "info",
                    "trades",
                    "fee"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "clientOrderId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                      "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits.",
                      "default": null
                    },
                    "symbol": {
                      "type": "string",
                      "minLength": 1
                    },
                    "timestamp": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "datetime": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null
                    },
                    "lastUpdateTimestamp": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed",
                        "canceled"
                      ]
                    },
                    "side": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "buy",
                        "sell",
                        null
                      ],
                      "default": null
                    },
                    "type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "limit",
                        "market",
                        null
                      ],
                      "default": null
                    },
                    "timeInForce": {
                      "type": "string",
                      "enum": [
                        "GTC",
                        "IOC",
                        "FOK",
                        "GTD",
                        "PO"
                      ]
                    },
                    "price": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "default": null
                    },
                    "average": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                    },
                    "amount": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "filled": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "remaining": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "reduceOnly": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "default": null
                    },
                    "postOnly": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "default": null
                    },
                    "info": {
                      "type": "object",
                      "properties": {
                        "orderId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "accountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "buy",
                            "sell"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "partially_filled"
                          ]
                        },
                        "priceAtoms": {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]*)$"
                        },
                        "quantityAtoms": {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]*)$"
                        },
                        "filledQuantityAtoms": {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]*)$"
                        },
                        "remainingQuantityAtoms": {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]*)$"
                        },
                        "reduceOnly": {
                          "type": "boolean"
                        },
                        "autoClose": {
                          "type": "object",
                          "properties": {
                            "takeProfitPriceAtoms": {
                              "type": "string",
                              "pattern": "^[1-9][0-9]*$"
                            },
                            "stopLossPriceAtoms": {
                              "type": "string",
                              "pattern": "^[1-9][0-9]*$"
                            }
                          },
                          "additionalProperties": false,
                          "description": "Optional position-protection prices in atoms. For a buy, take profit must exceed the admission price and stop loss must be lower; a sell reverses those comparisons. Equality returns invalid_price. A limit order's submitted price is its admission price. A non-reduce-only market order uses the mark adjusted by its protection band: 100 bps on a standard market or 300 bps on a thin market, higher for buys and lower for sells. That adjusted price determines the minimum distance to take profit. A reduce-only market order uses the best opposite quote. After entry, a qualifying mark-price crossing triggers a reduce-only market close: take profit for a long and stop loss for a short cross upward; the other two cross downward."
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "receivedAtEpochMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdJournalSequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedJournalSequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "priceScale": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "quantityScale": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "clientOrderId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                          "description": "The client order id the order was placed with: the same value as clientOrderId on every order read. Null for an order placed without one and for an order the engine placed itself.",
                          "default": null
                        },
                        "fillsPending": {
                          "type": "boolean",
                          "const": true,
                          "description": "True while the order has a fill that this answer cannot fully describe yet (order history is catching up with the matching engine). lastTradeTimestamp is then null, and cost and average are omitted when the matching engine committed no cost for the fill (a perpetual order, or a spot answer without the filled quote). A cost that the matching engine committed is always returned, with its exact average. A later fetchOrder returns the full order without this field once every fill is recorded. Read the trades and fee of a spot order from the fills read (fetchMyTrades) or the account fills stream; fetchOrder always returns an empty trades list and a null fee."
                        }
                      },
                      "required": [
                        "orderId",
                        "accountId",
                        "marketId",
                        "side",
                        "status",
                        "priceAtoms",
                        "quantityAtoms",
                        "filledQuantityAtoms",
                        "remainingQuantityAtoms",
                        "reduceOnly",
                        "sequence",
                        "receivedAtEpochMs",
                        "createdJournalSequence",
                        "updatedJournalSequence",
                        "priceScale",
                        "quantityScale",
                        "fillsPending"
                      ],
                      "additionalProperties": false
                    },
                    "lastTradeTimestamp": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "trades": {
                      "type": "array",
                      "prefixItems": [],
                      "items": false,
                      "minItems": 0,
                      "maxItems": 0
                    },
                    "fee": {
                      "type": "null"
                    },
                    "cost": {
                      "type": "number",
                      "minimum": 0,
                      "description": "The filled value in the quote asset, when the matching engine committed one (a spot order with its filled quote). Omitted while no committed value is available."
                    }
                  },
                  "required": [
                    "id",
                    "symbol",
                    "status",
                    "info",
                    "trades",
                    "fee"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. Canonical bot identifiers also allow the fixed bot-order/v1: prefix followed by an optional sha256: marker and 64 lowercase hexadecimal digits.",
                  "default": null
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "canceled"
                  ]
                },
                "side": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "buy",
                    "sell",
                    null
                  ],
                  "default": null
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ],
                  "default": null
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD",
                    "PO"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "The average fill price, exact at the market's price scale (rounded half up). For a spot order it is the filled quote amount that the matching engine committed, divided by filled; for a perpetual order it is the sum of fill price times fill size over its recorded fills, divided by filled. Omitted while nothing has filled, and while info.fillsPending is true and no committed cost is available."
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "filled": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "remaining": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "reduceOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "postOnly": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "default": null
                },
                "info": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "string",
                          "enum": [
                            "external-order/v1"
                          ]
                        },
                        "postOnly": {
                          "type": "boolean"
                        },
                        "timeInForce": {
                          "type": "string",
                          "enum": [
                            "GTC",
                            "IOC",
                            "FOK",
                            "GTD"
                          ]
                        },
                        "icebergQty": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "description": "The visible quantity of an iceberg limit order, in base units like amount. Only this part appears in the book; the lock covers the full amount."
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "buy",
                            "sell"
                          ],
                          "description": "The order's accepted side, if recorded."
                        },
                        "orderType": {
                          "type": "string",
                          "enum": [
                            "limit",
                            "market"
                          ],
                          "description": "The order's accepted type, if recorded."
                        },
                        "price": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                          "description": "Accepted limit price as decimal text. A recorded market order has null; omission means the type or decimal limit price is unavailable."
                        },
                        "priceAtoms": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^[0-9]+$",
                          "description": "Accepted limit price in atoms. A recorded market order has null; omission means the type or limit price is unavailable."
                        },
                        "quantityAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$",
                          "description": "Original accepted base quantity in quantity atoms, if recorded."
                        },
                        "filledQuantityAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$",
                          "description": "Executed base quantity in quantity atoms, if recorded. Omission does not mean zero; use account.fills for this orderId to receive executions."
                        },
                        "productType": {
                          "type": "string",
                          "enum": [
                            "spot"
                          ]
                        },
                        "lockAsset": {
                          "type": "string",
                          "minLength": 1
                        },
                        "lockedAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "remainingQuantityAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "createdAtEpochMs": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "When the venue accepted the order, in Unix epoch milliseconds: the venue clock of the command that placed it. For an order placed before the venue's order history begins (a history reset or a new history start), it is the first time the venue holds for the order: its earliest own command, else its last change, else the first venue record after it; the order was accepted no later than that."
                        },
                        "filledQuoteAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "lastFillAtEpochMs": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "orderId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "accountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "partially_filled",
                            "filled",
                            "canceled",
                            "replaced"
                          ]
                        },
                        "lastSequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "idempotencyKey": {
                          "type": "string",
                          "minLength": 1
                        },
                        "cancelReason": {
                          "type": "string",
                          "enum": [
                            "margin_unbacked",
                            "risk_evidence_incomplete",
                            "market_session_closed",
                            "reduce_only_position_unavailable",
                            "expired",
                            "price_protection"
                          ],
                          "description": "Why the order closed. price_protection: a market order that is not reduce-only trades only inside a band around the mark price (1% on most markets, 3% on thin ones), and the part that found no liquidity inside the band was cancelled."
                        },
                        "quantity": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                          "description": "The order's base quantity when recorded. Also returned when the order closed with part of it unfilled."
                        },
                        "filledQuantity": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                          "description": "The base quantity that filled when recorded. Also returned when the order closed with part of it unfilled."
                        },
                        "createdJournalSequence": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Sequence at which the order was created, if recorded. This is an ordinal, not a time."
                        },
                        "updatedJournalSequence": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Sequence of the latest lifecycle change, equal to lastSequence. This is an ordinal, not a time."
                        },
                        "updatedAtEpochMs": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "When the order last changed (its acceptance, a fill, an amend or its cancellation), in Unix epoch milliseconds: the venue clock of the command that made that change, a maker's fill included. Equal to createdAtEpochMs until the first change. For a change the venue's order history does not hold (made before a history reset), it is the order's latest own command the venue holds, never earlier than createdAtEpochMs."
                        },
                        "clientOrderId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                          "description": "The clientOrderId the order was placed with, exactly as submitted; the venue uses it as the order id, so it equals orderId. Null when the order was placed without one (the venue derived its id) or by the venue itself (a liquidation, an auto-deleverage leg or a trigger)."
                        }
                      },
                      "required": [
                        "version",
                        "orderId",
                        "accountId",
                        "marketId",
                        "status",
                        "lastSequence",
                        "idempotencyKey"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "orderId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "accountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "configurationId": {
                          "type": "string",
                          "minLength": 1,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "partially_filled",
                            "filled",
                            "canceled",
                            "replaced"
                          ]
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "buy",
                            "sell"
                          ]
                        },
                        "orderType": {
                          "type": "string",
                          "enum": [
                            "limit",
                            "market"
                          ]
                        },
                        "price": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                        },
                        "quantity": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                        },
                        "filledQuantity": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                        },
                        "remainingQuantity": {
                          "type": "string",
                          "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
                        },
                        "reduceOnly": {
                          "type": "boolean"
                        },
                        "postOnly": {
                          "type": "boolean",
                          "description": "The accepted post-only setting, when present in the recorded order."
                        },
                        "timeInForce": {
                          "type": "string",
                          "enum": [
                            "GTC",
                            "IOC",
                            "FOK",
                            "GTD"
                          ],
                          "description": "The accepted time-in-force setting, when recorded. FOK may appear on historical reads but is not a new-order option."
                        },
                        "updatedAtEpochMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "lastSequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "liquidation",
                            "auto_deleverage"
                          ],
                          "description": "Present only on an order the venue placed itself: `liquidation` for a liquidation close, `auto_deleverage` for an auto-deleveraging leg."
                        },
                        "clientOrderId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                          "description": "The client order id the order was placed with: the same value as clientOrderId on every order read. Null for an order placed without one and for an order the engine placed itself.",
                          "default": null
                        }
                      },
                      "required": [
                        "orderId",
                        "accountId",
                        "marketId",
                        "status",
                        "updatedAtEpochMs",
                        "lastSequence"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "orderId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "accountId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "buy",
                            "sell"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "partially_filled"
                          ]
                        },
                        "priceAtoms": {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]*)$"
                        },
                        "quantityAtoms": {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]*)$"
                        },
                        "filledQuantityAtoms": {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]*)$"
                        },
                        "remainingQuantityAtoms": {
                          "type": "string",
                          "pattern": "^(0|[1-9][0-9]*)$"
                        },
                        "reduceOnly": {
                          "type": "boolean"
                        },
                        "autoClose": {
                          "type": "object",
                          "properties": {
                            "takeProfitPriceAtoms": {
                              "type": "string",
                              "pattern": "^[1-9][0-9]*$"
                            },
                            "stopLossPriceAtoms": {
                              "type": "string",
                              "pattern": "^[1-9][0-9]*$"
                            }
                          },
                          "additionalProperties": false,
                          "description": "Optional position-protection prices in atoms. For a buy, take profit must exceed the admission price and stop loss must be lower; a sell reverses those comparisons. Equality returns invalid_price. A limit order's submitted price is its admission price. A non-reduce-only market order uses the mark adjusted by its protection band: 100 bps on a standard market or 300 bps on a thin market, higher for buys and lower for sells. That adjusted price determines the minimum distance to take profit. A reduce-only market order uses the best opposite quote. After entry, a qualifying mark-price crossing triggers a reduce-only market close: take profit for a long and stop loss for a short cross upward; the other two cross downward."
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "receivedAtEpochMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdJournalSequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedJournalSequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "priceScale": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "quantityScale": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "clientOrderId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                          "description": "The client order id the order was placed with: the same value as clientOrderId on every order read. Null for an order placed without one and for an order the engine placed itself.",
                          "default": null
                        }
                      },
                      "required": [
                        "orderId",
                        "accountId",
                        "marketId",
                        "side",
                        "status",
                        "priceAtoms",
                        "quantityAtoms",
                        "filledQuantityAtoms",
                        "remainingQuantityAtoms",
                        "reduceOnly",
                        "sequence",
                        "receivedAtEpochMs",
                        "createdJournalSequence",
                        "updatedJournalSequence",
                        "priceScale",
                        "quantityScale"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "default": null
                },
                "cost": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "default": null
                },
                "trades": {
                  "type": "array",
                  "prefixItems": [],
                  "items": false,
                  "minItems": 0,
                  "maxItems": 0,
                  "default": []
                },
                "fee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1
                    },
                    "cost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "currency",
                    "cost"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "required": [
                "id",
                "symbol",
                "status",
                "info"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits."
                },
                "symbol": {
                  "type": "string",
                  "pattern": "^([^/:]+)\\/([^/:]+)$"
                },
                "timestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "datetime": {
                  "type": "string"
                },
                "lastTradeTimestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "canceled"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "limit",
                    "market"
                  ]
                },
                "timeInForce": {
                  "type": "string",
                  "enum": [
                    "GTC",
                    "IOC",
                    "FOK",
                    "GTD"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "exclusiveMinimum": 0,
                  "description": "A market order has no fixed price and returns null."
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "amount": {
                  "type": "number",
                  "minimum": 0
                },
                "filled": {
                  "type": "number",
                  "minimum": 0
                },
                "remaining": {
                  "type": "number",
                  "minimum": 0
                },
                "cost": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Executed order value in quote-asset units."
                },
                "postOnly": {
                  "type": "boolean"
                },
                "reduceOnly": {
                  "type": "boolean",
                  "const": false
                },
                "trades": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "order": {
                        "type": "string",
                        "minLength": 1
                      },
                      "symbol": {
                        "type": "string",
                        "minLength": 1
                      },
                      "timestamp": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "datetime": {
                        "type": "string"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "buy",
                          "sell"
                        ]
                      },
                      "takerOrMaker": {
                        "type": "string",
                        "enum": [
                          "maker",
                          "taker"
                        ]
                      },
                      "price": {
                        "type": "number"
                      },
                      "amount": {
                        "type": "number",
                        "minimum": 0
                      },
                      "fee": {
                        "type": "object",
                        "properties": {
                          "cost": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "cost",
                          "currency"
                        ],
                        "additionalProperties": false
                      },
                      "info": {
                        "type": "object",
                        "properties": {
                          "tradeId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "accountId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "marketId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "maker",
                              "taker"
                            ]
                          },
                          "feePaidAtoms": {
                            "type": "string",
                            "pattern": "^-?[0-9]+$"
                          },
                          "feePaid": {
                            "type": "string",
                            "pattern": "^-?[0-9]+\\.[0-9]+$"
                          },
                          "feeRole": {
                            "type": "string",
                            "enum": [
                              "maker",
                              "taker"
                            ]
                          },
                          "side": {
                            "type": "string",
                            "enum": [
                              "buy",
                              "sell"
                            ]
                          },
                          "priceAtoms": {
                            "type": "string",
                            "pattern": "^[0-9]+$"
                          },
                          "price": {
                            "type": "string",
                            "pattern": "^-?[0-9]+\\.[0-9]+$"
                          },
                          "sizeAtoms": {
                            "type": "string",
                            "pattern": "^[0-9]+$"
                          },
                          "size": {
                            "type": "string",
                            "pattern": "^-?[0-9]+\\.[0-9]+$"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "realizedPnlAtoms": {
                            "type": "string",
                            "pattern": "^-?[0-9]+$"
                          },
                          "realizedPnl": {
                            "type": "string",
                            "pattern": "^-?[0-9]+\\.[0-9]+$"
                          },
                          "occurredAtEpochMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "lastSequence": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "liquidation",
                              "auto_deleverage"
                            ],
                            "description": "Present only when the venue placed this side's order: `liquidation` for a liquidation close, `auto_deleverage` for an auto-deleveraging leg."
                          }
                        },
                        "required": [
                          "tradeId",
                          "accountId",
                          "marketId",
                          "role",
                          "feePaidAtoms",
                          "feePaid",
                          "feeRole",
                          "side",
                          "priceAtoms",
                          "price",
                          "sizeAtoms",
                          "size",
                          "orderId",
                          "occurredAtEpochMs",
                          "lastSequence"
                        ],
                        "additionalProperties": false
                      },
                      "type": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "limit",
                          "market",
                          null
                        ]
                      },
                      "cost": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "order",
                      "symbol",
                      "timestamp",
                      "datetime",
                      "side",
                      "takerOrMaker",
                      "price",
                      "amount",
                      "fee",
                      "info",
                      "type",
                      "cost"
                    ],
                    "additionalProperties": false
                  }
                },
                "fee": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "cost": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "cost",
                    "currency"
                  ],
                  "additionalProperties": false
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "orderId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "accountId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "pattern": "^[^-]+-[^-]+-SPOT$"
                    },
                    "productType": {
                      "type": "string",
                      "enum": [
                        "spot"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "partially_filled",
                        "filled",
                        "canceled",
                        "replaced"
                      ]
                    },
                    "priceAtoms": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+$",
                      "description": "A market order has no fixed limit price and returns null."
                    },
                    "quantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "filledQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "remainingQuantityAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "lockAsset": {
                      "type": "string",
                      "minLength": 1,
                      "description": "Asset reserved by the order: quote for a buy, base for a sell."
                    },
                    "lockedAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "Remaining order reserve in atoms. A buy reserves its price times remaining quantity plus the maximum applicable fee allowance."
                    },
                    "icebergQty": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "Visible iceberg quantity, disclosed only to the order's owner."
                    },
                    "fillsPending": {
                      "type": "boolean",
                      "const": true,
                      "description": "True while a fill of the order is not yet recorded in order history: lastTradeTimestamp is null until then. cost and average are always the values that the matching engine committed."
                    }
                  },
                  "required": [
                    "orderId",
                    "accountId",
                    "marketId",
                    "productType",
                    "status",
                    "priceAtoms",
                    "quantityAtoms",
                    "filledQuantityAtoms",
                    "remainingQuantityAtoms",
                    "lockAsset",
                    "lockedAtoms"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "clientOrderId",
                "symbol",
                "timestamp",
                "datetime",
                "lastTradeTimestamp",
                "status",
                "side",
                "type",
                "timeInForce",
                "price",
                "amount",
                "filled",
                "remaining",
                "cost",
                "postOnly",
                "reduceOnly",
                "trades",
                "fee",
                "info"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^po_[0-9a-f]{32}$"
                },
                "clientOrderId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^(?:[A-Za-z0-9._:-]+|bot-order\\/v1:(?:sha256:)?[a-f0-9]{64})$",
                  "description": "A client identifier of 1 to 256 ASCII letters, digits, periods, underscores, colons or hyphens. The canonical bot-order/v1: form additionally accepts an optional sha256: marker and 64 lowercase hexadecimal digits."
                },
                "symbol": {
                  "type": "string",
                  "pattern": "^([^/:]+)\\/([^/:]+)$"
                },
                "timestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "datetime": {
                  "type": "string"
                },
                "lastTradeTimestamp": {
                  "type": "null"
                },
                "lastUpdateTimestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "canceled",
                    "expired",
                    "rejected"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "twap"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "exclusiveMinimum": 0,
                  "description": "The limit price of the TWAP order, or null if no limit price was set."
                },
                "average": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "amount": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "filled": {
                  "type": "number",
                  "minimum": 0
                },
                "remaining": {
                  "type": "number",
                  "minimum": 0
                },
                "cost": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Executed order value in quote-asset units."
                },
                "postOnly": {
                  "type": "boolean",
                  "const": false
                },
                "reduceOnly": {
                  "type": "boolean",
                  "const": false
                },
                "trades": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "order": {
                        "type": "string",
                        "minLength": 1
                      },
                      "symbol": {
                        "type": "string",
                        "minLength": 1
                      },
                      "timestamp": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "datetime": {
                        "type": "string"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "buy",
                          "sell"
                        ]
                      },
                      "takerOrMaker": {
                        "type": "string",
                        "enum": [
                          "maker",
                          "taker"
                        ]
                      },
                      "price": {
                        "type": "number"
                      },
                      "amount": {
                        "type": "number",
                        "minimum": 0
                      },
                      "fee": {
                        "type": "object",
                        "properties": {
                          "cost": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "cost",
                          "currency"
                        ],
                        "additionalProperties": false
                      },
                      "info": {
                        "type": "object",
                        "properties": {
                          "tradeId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "accountId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "marketId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "maker",
                              "taker"
                            ]
                          },
                          "feePaidAtoms": {
                            "type": "string",
                            "pattern": "^-?[0-9]+$"
                          },
                          "feePaid": {
                            "type": "string",
                            "pattern": "^-?[0-9]+\\.[0-9]+$"
                          },
                          "feeRole": {
                            "type": "string",
                            "enum": [
                              "maker",
                              "taker"
                            ]
                          },
                          "side": {
                            "type": "string",
                            "enum": [
                              "buy",
                              "sell"
                            ]
                          },
                          "priceAtoms": {
                            "type": "string",
                            "pattern": "^[0-9]+$"
                          },
                          "price": {
                            "type": "string",
                            "pattern": "^-?[0-9]+\\.[0-9]+$"
                          },
                          "sizeAtoms": {
                            "type": "string",
                            "pattern": "^[0-9]+$"
                          },
                          "size": {
                            "type": "string",
                            "pattern": "^-?[0-9]+\\.[0-9]+$"
                          },
                          "orderId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "realizedPnlAtoms": {
                            "type": "string",
                            "pattern": "^-?[0-9]+$"
                          },
                          "realizedPnl": {
                            "type": "string",
                            "pattern": "^-?[0-9]+\\.[0-9]+$"
                          },
                          "occurredAtEpochMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "lastSequence": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "liquidation",
                              "auto_deleverage"
                            ],
                            "description": "Present only when the venue placed this side's order: `liquidation` for a liquidation close, `auto_deleverage` for an auto-deleveraging leg."
                          }
                        },
                        "required": [
                          "tradeId",
                          "accountId",
                          "marketId",
                          "role",
                          "feePaidAtoms",
                          "feePaid",
                          "feeRole",
                          "side",
                          "priceAtoms",
                          "price",
                          "sizeAtoms",
                          "size",
                          "orderId",
                          "occurredAtEpochMs",
                          "lastSequence"
                        ],
                        "additionalProperties": false
                      },
                      "type": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "limit",
                          "market",
                          null
                        ]
                      },
                      "cost": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "order",
                      "symbol",
                      "timestamp",
                      "datetime",
                      "side",
                      "takerOrMaker",
                      "price",
                      "amount",
                      "fee",
                      "info",
                      "type",
                      "cost"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 0,
                  "description": "Always empty. Read the child order fills from the fills read (fetchMyTrades)."
                },
                "fee": {
                  "type": "null"
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "orderId": {
                      "type": "string",
                      "pattern": "^po_[0-9a-f]{32}$"
                    },
                    "accountId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "productType": {
                      "type": "string",
                      "enum": [
                        "spot"
                      ]
                    },
                    "parentKind": {
                      "type": "string",
                      "enum": [
                        "twap"
                      ]
                    },
                    "parentState": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "paused",
                        "completed",
                        "canceled",
                        "expired",
                        "failed"
                      ]
                    },
                    "parentReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "description": "Reason the TWAP order is paused or failed, or null in any other state."
                    },
                    "slicesSent": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "slicesTotal": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "nextSliceAt": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "description": "Unix epoch time in milliseconds for the next scheduled slice, or null after the TWAP order reaches a final state."
                    },
                    "durationMs": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "randomize": {
                      "type": "boolean"
                    },
                    "amountAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "filledBaseAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "filledQuoteAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "limitPriceAtoms": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[0-9]+$"
                    }
                  },
                  "required": [
                    "orderId",
                    "accountId",
                    "marketId",
                    "productType",
                    "parentKind",
                    "parentState",
                    "parentReason",
                    "slicesSent",
                    "slicesTotal",
                    "nextSliceAt",
                    "durationMs",
                    "randomize",
                    "amountAtoms",
                    "filledBaseAtoms",
                    "filledQuoteAtoms",
                    "limitPriceAtoms"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "clientOrderId",
                "symbol",
                "timestamp",
                "datetime",
                "lastTradeTimestamp",
                "lastUpdateTimestamp",
                "status",
                "side",
                "type",
                "price",
                "amount",
                "filled",
                "remaining",
                "cost",
                "postOnly",
                "reduceOnly",
                "trades",
                "fee",
                "info"
              ],
              "additionalProperties": false
            }
          ]
        }
      },
      "V2PositionsResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1
            },
            "symbol": {
              "type": "string",
              "minLength": 1
            },
            "timestamp": {
              "type": "integer",
              "minimum": 0
            },
            "datetime": {
              "type": "string"
            },
            "side": {
              "type": "string",
              "enum": [
                "long",
                "short"
              ]
            },
            "contracts": {
              "type": "number",
              "minimum": 0
            },
            "contractSize": {
              "type": "number",
              "const": 1
            },
            "notional": {
              "type": "number",
              "minimum": 0
            },
            "entryPrice": {
              "type": "number"
            },
            "markPrice": {
              "type": "number"
            },
            "liquidationPrice": {
              "type": "number"
            },
            "unrealizedPnl": {
              "type": "number"
            },
            "realizedPnl": {
              "type": "number"
            },
            "maintenanceMargin": {
              "type": "number",
              "minimum": 0
            },
            "leverage": {
              "type": "number",
              "minimum": 0,
              "description": "This position's leverage: its notional value at the mark price divided by the account's equity at the same sequence, as a nonnegative decimal with 4 decimal places, rounded toward zero (a decimal string on the stream, a JSON number on rows). The denominator is the whole account's equity, not a margin amount set aside for this position. Margin is held per account (cross margin): all open positions share one pool of account equity, so no position has margin of its own. The value is null on the stream, and the field is left out of rows, when account equity is zero or negative or the position is flat; it is never infinite and never a placeholder zero. Absent on frames and rows from a producer that does not carry it."
            },
            "info": {
              "type": "object",
              "properties": {
                "positionId": {
                  "type": "string",
                  "minLength": 1
                },
                "accountId": {
                  "type": "string",
                  "minLength": 1
                },
                "marketId": {
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "long",
                    "short"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed",
                    "liquidated"
                  ]
                },
                "openedAtEpochMs": {
                  "type": "integer",
                  "minimum": 0
                },
                "closedAtEpochMs": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                },
                "maxQuantityAtoms": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "maxQuantity": {
                  "type": "string",
                  "pattern": "^-?[0-9]+\\.[0-9]+$"
                },
                "currentQuantityAtoms": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "currentQuantity": {
                  "type": "string",
                  "pattern": "^-?[0-9]+\\.[0-9]+$"
                },
                "avgEntryPriceAtoms": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "avgEntryPrice": {
                  "type": "string",
                  "pattern": "^-?[0-9]+\\.[0-9]+$"
                },
                "avgExitPriceAtoms": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^[0-9]+$"
                },
                "avgExitPrice": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^-?[0-9]+\\.[0-9]+$"
                },
                "realizedPnlAtoms": {
                  "type": "string",
                  "pattern": "^-?[0-9]+$"
                },
                "realizedPnl": {
                  "type": "string",
                  "pattern": "^-?[0-9]+\\.[0-9]+$"
                },
                "feesPaidAtoms": {
                  "type": "string",
                  "pattern": "^-?[0-9]+$"
                },
                "feesPaid": {
                  "type": "string",
                  "pattern": "^-?[0-9]+\\.[0-9]+$"
                },
                "fundingPaidAtoms": {
                  "type": "string",
                  "pattern": "^-?[0-9]+$"
                },
                "fundingPaid": {
                  "type": "string",
                  "pattern": "^-?[0-9]+\\.[0-9]+$"
                },
                "closeReason": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "user_close",
                    "liquidation",
                    null
                  ]
                },
                "lastSequence": {
                  "type": "integer",
                  "minimum": 0
                },
                "markPriceAtoms": {
                  "type": "string",
                  "pattern": "^(0|[1-9][0-9]*)$"
                },
                "unrealizedPnlAtoms": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$"
                },
                "liquidationPriceAtoms": {
                  "type": "string",
                  "pattern": "^(0|[1-9][0-9]*)$"
                },
                "marginHealthBps": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$"
                },
                "equityAtoms": {
                  "type": "string",
                  "pattern": "^-?(0|[1-9][0-9]*)$"
                },
                "maintenanceRequirementAtoms": {
                  "type": "string",
                  "pattern": "^(0|[1-9][0-9]*)$"
                },
                "marginStatus": {
                  "type": "string",
                  "enum": [
                    "healthy",
                    "liquidation_candidate",
                    "bankrupt"
                  ]
                },
                "riskAsOfMarketDataSequence": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "liquidationTierConsistent": {
                  "type": "boolean",
                  "const": true
                },
                "adlIndicator": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 5,
                  "description": "The position's place in its market's auto-deleveraging queue, from 1 to 5; 5 is reduced first if an opposite position becomes bankrupt beyond what the order book and the insurance fund absorb. For display only. It is refreshed on each liquidation pass, so it can trail the latest mark, and is absent until the market has been ranked."
                }
              },
              "required": [
                "positionId",
                "accountId",
                "marketId",
                "side",
                "status",
                "openedAtEpochMs",
                "closedAtEpochMs",
                "maxQuantityAtoms",
                "maxQuantity",
                "currentQuantityAtoms",
                "currentQuantity",
                "avgEntryPriceAtoms",
                "avgEntryPrice",
                "avgExitPriceAtoms",
                "avgExitPrice",
                "realizedPnlAtoms",
                "realizedPnl",
                "feesPaidAtoms",
                "feesPaid",
                "fundingPaidAtoms",
                "fundingPaid",
                "closeReason",
                "lastSequence",
                "markPriceAtoms",
                "unrealizedPnlAtoms",
                "liquidationPriceAtoms",
                "marginHealthBps",
                "equityAtoms",
                "maintenanceRequirementAtoms",
                "marginStatus",
                "riskAsOfMarketDataSequence",
                "liquidationTierConsistent"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "id",
            "symbol",
            "timestamp",
            "datetime",
            "side",
            "contracts",
            "contractSize",
            "notional",
            "entryPrice",
            "markPrice",
            "liquidationPrice",
            "realizedPnl",
            "info"
          ],
          "additionalProperties": false
        }
      },
      "V2PublicTradesResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1
            },
            "symbol": {
              "type": "string",
              "minLength": 1
            },
            "timestamp": {
              "type": "integer",
              "minimum": 0
            },
            "datetime": {
              "type": "string"
            },
            "side": {
              "type": "string",
              "enum": [
                "buy",
                "sell"
              ]
            },
            "price": {
              "type": "number"
            },
            "amount": {
              "type": "number",
              "minimum": 0
            },
            "info": {
              "type": "object",
              "properties": {
                "tradeId": {
                  "type": "string",
                  "pattern": "^edjc:[a-f0-9]{64}$"
                },
                "marketId": {
                  "type": "string",
                  "minLength": 1
                },
                "priceAtoms": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "sizeAtoms": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                },
                "takerSide": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell"
                  ]
                },
                "occurredAtEpochMs": {
                  "type": "integer",
                  "minimum": 0
                },
                "lastSequence": {
                  "type": "integer",
                  "minimum": 0
                },
                "eventIndex": {
                  "type": "integer",
                  "minimum": 0
                },
                "cursor": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "tradeId",
                "marketId",
                "priceAtoms",
                "sizeAtoms",
                "takerSide",
                "occurredAtEpochMs",
                "lastSequence",
                "eventIndex",
                "cursor"
              ],
              "additionalProperties": false
            },
            "type": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "limit",
                "market",
                null
              ],
              "default": null
            },
            "cost": {
              "type": "number"
            },
            "order": {
              "type": "null",
              "default": null
            },
            "takerOrMaker": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "maker",
                "taker",
                null
              ],
              "default": null
            },
            "fee": {
              "type": "object",
              "properties": {
                "currency": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1
                },
                "cost": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "rate": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "currency",
                "cost"
              ],
              "additionalProperties": false,
              "default": {
                "currency": null,
                "cost": null
              }
            }
          },
          "required": [
            "id",
            "symbol",
            "timestamp",
            "datetime",
            "side",
            "price",
            "amount",
            "info",
            "cost"
          ],
          "additionalProperties": false
        },
        "maxItems": 100
      },
      "V2TickersResponse": {
        "type": "object",
        "additionalProperties": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "high": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "low": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "bid": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Best bid price; null when the book has no bid."
                },
                "bidVolume": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0
                },
                "ask": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Best ask price; null when the book has no ask."
                },
                "askVolume": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0
                },
                "open": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "First price of the trailing 24 hours; null when no candle falls inside them."
                },
                "close": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "last": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "change": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "last minus open, over the trailing 24 hours."
                },
                "percentage": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "The change over the trailing 24 hours in percent."
                },
                "quoteVolume": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "description": "Traded volume of the trailing 24 hours in the settlement asset, which is the quote asset."
                },
                "markPrice": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "indexPrice": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "readState": {
                      "type": "string",
                      "enum": [
                        "complete",
                        "deadline_exceeded"
                      ],
                      "description": "complete, or deadline_exceeded when the market's reads missed their deadline: every figure of that ticker is then null."
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "stats": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "version": {
                          "type": "string",
                          "enum": [
                            "external-market-stats/v1"
                          ]
                        },
                        "marketId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "volume24hQuoteAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "volume24hQuote": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "openInterestBaseAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "openInterestBase": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "openInterestQuoteAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "openInterestQuote": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "fundingRateBps": {
                          "type": "string",
                          "pattern": "^-?(0|[1-9][0-9]*)$"
                        },
                        "predictedFundingRateBps": {
                          "type": "string",
                          "pattern": "^-?(0|[1-9][0-9]*)$"
                        },
                        "nextFundingTimeEpochMs": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "fundingIntervalMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "marketData": {
                          "type": "object",
                          "properties": {
                            "indexPriceAtoms": {
                              "type": "string",
                              "pattern": "^[0-9]+$"
                            },
                            "indexPrice": {
                              "type": "string",
                              "pattern": "^-?[0-9]+\\.[0-9]+$"
                            },
                            "markPriceAtoms": {
                              "type": "string",
                              "pattern": "^[0-9]+$"
                            },
                            "markPrice": {
                              "type": "string",
                              "pattern": "^-?[0-9]+\\.[0-9]+$"
                            },
                            "asOfEpochMs": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "indexPriceAtoms",
                            "indexPrice",
                            "markPriceAtoms",
                            "markPrice",
                            "asOfEpochMs"
                          ],
                          "additionalProperties": false
                        },
                        "lastPriceAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "lastPrice": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "change24hBps": {
                          "type": "string",
                          "pattern": "^-?(0|[1-9][0-9]*)$"
                        },
                        "high24hAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "high24h": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        },
                        "low24hAtoms": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "low24h": {
                          "type": "string",
                          "pattern": "^-?[0-9]+\\.[0-9]+$"
                        }
                      },
                      "required": [
                        "version",
                        "marketId",
                        "volume24hQuoteAtoms",
                        "volume24hQuote",
                        "openInterestBaseAtoms",
                        "openInterestBase",
                        "openInterestQuoteAtoms",
                        "openInterestQuote",
                        "fundingRateBps",
                        "predictedFundingRateBps",
                        "nextFundingTimeEpochMs",
                        "fundingIntervalMs",
                        "marketData",
                        "lastPriceAtoms",
                        "lastPrice",
                        "change24hBps",
                        "high24hAtoms",
                        "high24h",
                        "low24hAtoms",
                        "low24h"
                      ],
                      "additionalProperties": false,
                      "description": "The market's stats snapshot: mark, index and last prices, open interest, funding and the 24h figures."
                    },
                    "open1h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "First price of the trailing hour, in quote units per base unit; null when no candle falls inside it."
                    },
                    "change1h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Last price minus open1h, in quote units per base unit; null with open1h."
                    },
                    "percentage1h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Change over the trailing hour in percent, rounded toward zero to a hundredth; null with open1h."
                    },
                    "open24h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "First price of the trailing 24 hours, in quote units per base unit; null when no candle falls inside it."
                    },
                    "change24h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Last price minus open24h, in quote units per base unit; null with open24h."
                    },
                    "percentage24h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Change over the trailing 24 hours in percent, rounded toward zero to a hundredth; null with open24h."
                    },
                    "open7d": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "First price of the trailing 7 days, in quote units per base unit; null when no candle falls inside it."
                    },
                    "change7d": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Last price minus open7d, in quote units per base unit; null with open7d."
                    },
                    "percentage7d": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Change over the trailing 7 days in percent, rounded toward zero to a hundredth; null with open7d."
                    },
                    "tradeCount24h": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "description": "Description pending."
                    },
                    "sparkline7d": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "prefixItems": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "description": "Start of the UTC hour in Unix milliseconds."
                          },
                          {
                            "type": "number",
                            "description": "Last price of that hour in quote units per base unit."
                          }
                        ],
                        "items": false,
                        "minItems": 2,
                        "maxItems": 2
                      },
                      "description": "Up to 169 hourly closes covering the trailing 7 days, oldest first. An hour with no candle is left out, not filled."
                    },
                    "basis": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Mark price minus index price, in quote units per base unit."
                    },
                    "basisBps": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The basis in basis points of the index price, rounded toward zero; null while the index price is zero."
                    },
                    "openInterestAmount": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "description": "Open interest in contracts; one contract is one unit of the base asset."
                    },
                    "openInterestValue": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "description": "Open interest valued in the settlement asset."
                    },
                    "fundingRate": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The last funding interval's rate as a fraction, rounded toward zero to a whole number of basis points. A positive rate means long positions pay and short positions receive; a negative rate means short positions pay and long positions receive. Funding pays the interval premium capped at 75 basis points, divided by 8, every hour. Each position settles the exact amount, so this field can show slightly less than a position pays: a 75 basis point premium pays 0.0009375 while this field shows 0.0009."
                    },
                    "nextFundingRate": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The rate the current funding interval would pay if it closed now, as a fraction, rounded toward zero to a whole number of basis points. Each position settles the exact amount. A positive rate means long positions pay and short positions receive; a negative rate means short positions pay and long positions receive."
                    },
                    "nextFundingTimestamp": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "nextFundingDatetime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "interval": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1
                    }
                  },
                  "required": [
                    "readState",
                    "marketId",
                    "stats",
                    "open1h",
                    "change1h",
                    "percentage1h",
                    "open24h",
                    "change24h",
                    "percentage24h",
                    "open7d",
                    "change7d",
                    "percentage7d",
                    "tradeCount24h",
                    "sparkline7d",
                    "basis",
                    "basisBps",
                    "openInterestAmount",
                    "openInterestValue",
                    "fundingRate",
                    "nextFundingRate",
                    "nextFundingTimestamp",
                    "nextFundingDatetime",
                    "interval"
                  ],
                  "additionalProperties": false
                },
                "vwap": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "previousClose": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "average": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "baseVolume": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0
                }
              },
              "required": [
                "symbol",
                "timestamp",
                "datetime",
                "high",
                "low",
                "bid",
                "bidVolume",
                "ask",
                "askVolume",
                "open",
                "close",
                "last",
                "change",
                "percentage",
                "quoteVolume",
                "markPrice",
                "indexPrice",
                "info",
                "vwap",
                "previousClose",
                "average",
                "baseVolume"
              ],
              "additionalProperties": false,
              "description": "Unified Ticker. Base and quote volumes sum executed fills in base and quote units over the trailing 24 hours; all figures are null when the read misses its deadline."
            },
            {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string",
                  "pattern": "^([^/:]+)\\/([^/:]+)$"
                },
                "timestamp": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                },
                "datetime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "high": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "low": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "bid": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Best bid price; null when the book has no bid."
                },
                "bidVolume": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0
                },
                "ask": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Best ask price; null when the book has no ask."
                },
                "askVolume": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0
                },
                "open": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "First price of the trailing 24 hours; null when no candle falls inside them."
                },
                "close": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "last": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "change": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "last minus open, over the trailing 24 hours."
                },
                "percentage": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "The change over the trailing 24 hours in percent."
                },
                "quoteVolume": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "description": "Traded volume of the trailing 24 hours in the settlement asset, which is the quote asset."
                },
                "markPrice": {
                  "type": "null"
                },
                "indexPrice": {
                  "type": "null"
                },
                "vwap": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "previousClose": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "average": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "baseVolume": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "description": "Base quantity traded in the trailing 24 hours, or null when unavailable."
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "readState": {
                      "type": "string",
                      "enum": [
                        "complete",
                        "deadline_exceeded"
                      ],
                      "description": "complete, or deadline_exceeded when the market's reads missed their deadline: every figure of that ticker is then null."
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "open1h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "First price of the trailing hour, in quote units per base unit; null when no candle falls inside it."
                    },
                    "change1h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Last price minus open1h, in quote units per base unit; null with open1h."
                    },
                    "percentage1h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Change over the trailing hour in percent, rounded toward zero to a hundredth; null with open1h."
                    },
                    "open24h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "First price of the trailing 24 hours, in quote units per base unit; null when no candle falls inside it."
                    },
                    "change24h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Last price minus open24h, in quote units per base unit; null with open24h."
                    },
                    "percentage24h": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Change over the trailing 24 hours in percent, rounded toward zero to a hundredth; null with open24h."
                    },
                    "open7d": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "First price of the trailing 7 days, in quote units per base unit; null when no candle falls inside it."
                    },
                    "change7d": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Last price minus open7d, in quote units per base unit; null with open7d."
                    },
                    "percentage7d": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Change over the trailing 7 days in percent, rounded toward zero to a hundredth; null with open7d."
                    },
                    "tradeCount24h": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Description pending."
                    },
                    "sparkline7d": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "prefixItems": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "description": "Start of the UTC hour in Unix milliseconds."
                          },
                          {
                            "type": "number",
                            "description": "Last price of that hour in quote units per base unit."
                          }
                        ],
                        "items": false,
                        "minItems": 2,
                        "maxItems": 2
                      },
                      "description": "Up to 169 hourly closes covering the trailing 7 days, oldest first. An hour with no candle is left out, not filled."
                    },
                    "marketCap": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null,
                      "description": "Circulating base supply times the last traded price, in quote units; null if either is unavailable."
                    },
                    "noTradesYet": {
                      "type": "boolean",
                      "description": "True while the market has never traded: its OHLCV candles are then a flat display line at the listing price, not trades."
                    },
                    "listingPrice": {
                      "type": "string",
                      "pattern": "^[0-9]+(?:\\.[0-9]+)?$",
                      "description": "The display listing price while noTradesYet is true, as decimal text: the close of the flat listing candles of the OHLCV read. Not a trade price and not a mark. Absent after the first trade and when the market has no listing price."
                    }
                  },
                  "required": [
                    "readState",
                    "marketId",
                    "open1h",
                    "change1h",
                    "percentage1h",
                    "open24h",
                    "change24h",
                    "percentage24h",
                    "open7d",
                    "change7d",
                    "percentage7d",
                    "tradeCount24h",
                    "sparkline7d"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "symbol",
                "timestamp",
                "datetime",
                "high",
                "low",
                "bid",
                "bidVolume",
                "ask",
                "askVolume",
                "open",
                "close",
                "last",
                "change",
                "percentage",
                "quoteVolume",
                "markPrice",
                "indexPrice",
                "vwap",
                "previousClose",
                "average",
                "baseVolume",
                "info"
              ],
              "additionalProperties": false
            }
          ]
        }
      },
      "V2TradesResponse": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "order": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "datetime": {
                  "type": "string"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell"
                  ]
                },
                "takerOrMaker": {
                  "type": "string",
                  "enum": [
                    "maker",
                    "taker"
                  ]
                },
                "price": {
                  "type": "number"
                },
                "amount": {
                  "type": "number",
                  "minimum": 0
                },
                "fee": {
                  "type": "object",
                  "properties": {
                    "cost": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "cost",
                    "currency"
                  ],
                  "additionalProperties": false
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "tradeId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "accountId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "maker",
                        "taker"
                      ]
                    },
                    "feePaidAtoms": {
                      "type": "string",
                      "pattern": "^-?[0-9]+$"
                    },
                    "feePaid": {
                      "type": "string",
                      "pattern": "^-?[0-9]+\\.[0-9]+$"
                    },
                    "feeRole": {
                      "type": "string",
                      "enum": [
                        "maker",
                        "taker"
                      ]
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell"
                      ]
                    },
                    "priceAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "price": {
                      "type": "string",
                      "pattern": "^-?[0-9]+\\.[0-9]+$"
                    },
                    "sizeAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "size": {
                      "type": "string",
                      "pattern": "^-?[0-9]+\\.[0-9]+$"
                    },
                    "orderId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "realizedPnlAtoms": {
                      "type": "string",
                      "pattern": "^-?[0-9]+$"
                    },
                    "realizedPnl": {
                      "type": "string",
                      "pattern": "^-?[0-9]+\\.[0-9]+$"
                    },
                    "occurredAtEpochMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "lastSequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "liquidation",
                        "auto_deleverage"
                      ],
                      "description": "Present only when the venue placed this side's order: `liquidation` for a liquidation close, `auto_deleverage` for an auto-deleveraging leg."
                    }
                  },
                  "required": [
                    "tradeId",
                    "accountId",
                    "marketId",
                    "role",
                    "feePaidAtoms",
                    "feePaid",
                    "feeRole",
                    "side",
                    "priceAtoms",
                    "price",
                    "sizeAtoms",
                    "size",
                    "orderId",
                    "occurredAtEpochMs",
                    "lastSequence"
                  ],
                  "additionalProperties": false
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ]
                },
                "cost": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "order",
                "symbol",
                "timestamp",
                "datetime",
                "side",
                "takerOrMaker",
                "price",
                "amount",
                "fee",
                "info",
                "type",
                "cost"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "order": {
                  "type": "string",
                  "minLength": 1
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "limit",
                    "market",
                    null
                  ]
                },
                "symbol": {
                  "type": "string",
                  "pattern": "^([^/:]+)\\/([^/:]+)$"
                },
                "timestamp": {
                  "type": "integer",
                  "minimum": 0
                },
                "datetime": {
                  "type": "string"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell"
                  ]
                },
                "takerOrMaker": {
                  "type": "string",
                  "enum": [
                    "maker",
                    "taker"
                  ]
                },
                "price": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "amount": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "cost": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "fee": {
                  "type": "object",
                  "properties": {
                    "cost": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "cost",
                    "currency"
                  ],
                  "additionalProperties": false
                },
                "info": {
                  "type": "object",
                  "properties": {
                    "tradeId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "orderId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "marketId": {
                      "type": "string",
                      "pattern": "^[^-]+-[^-]+-SPOT$"
                    },
                    "priceAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "baseAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "quoteAtoms": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    },
                    "feeAtoms": {
                      "type": "string",
                      "pattern": "^-?[0-9]+$"
                    },
                    "feeAsset": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "tradeId",
                    "orderId",
                    "marketId",
                    "priceAtoms",
                    "baseAtoms",
                    "quoteAtoms",
                    "feeAtoms",
                    "feeAsset"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "order",
                "type",
                "symbol",
                "timestamp",
                "datetime",
                "side",
                "takerOrMaker",
                "price",
                "amount",
                "cost",
                "fee",
                "info"
              ],
              "additionalProperties": false
            }
          ]
        }
      },
      "V2VenueTradingFees": {
        "type": "object",
        "additionalProperties": {
          "type": "object",
          "properties": {
            "symbol": {
              "type": "string",
              "minLength": 1
            },
            "maker": {
              "type": "number",
              "minimum": 0,
              "description": "Fee fraction applied to notional;0.000125 is 1.25 basis points."
            },
            "taker": {
              "type": "number",
              "minimum": 0,
              "description": "Fee fraction applied to notional;0.000125 is 1.25 basis points."
            },
            "percentage": {
              "type": "boolean",
              "const": true
            },
            "tierBased": {
              "type": "boolean"
            },
            "info": {
              "type": "object",
              "properties": {
                "marketId": {
                  "type": "string",
                  "minLength": 1
                },
                "makerFeeRateHundredthsBps": {
                  "type": "integer",
                  "minimum": 0
                },
                "takerFeeRateHundredthsBps": {
                  "type": "integer",
                  "minimum": 0
                },
                "feeAsset": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "marketId",
                "makerFeeRateHundredthsBps",
                "takerFeeRateHundredthsBps",
                "feeAsset"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "symbol",
            "maker",
            "taker",
            "percentage",
            "tierBased",
            "info"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "tags": [
    {
      "name": "Perps",
      "description": "Description pending."
    }
  ]
}
