{
  "openapi": "3.0.1",
  "info": {
    "title": "Figure Markets High Frequency Trading Exchange Public API",
    "description": "Endpoints are rate limited to 50 requests per minute, by source IP",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "http://localhost:8080/service-hft-exchange",
      "description": "Local environment"
    },
    {
      "url": "https://www.figuremarkets.dev/service-hft-exchange",
      "description": "Sandbox environment"
    },
    {
      "url": "https://www.figuremarkets.com/service-hft-exchange",
      "description": "Production environment"
    }
  ],
  "paths": {
    "/api/v1/trades/{symbol}": {
      "get": {
        "tags": [
          "Trades"
        ],
        "summary": "Get trades by market",
        "operationId": "getTrades",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "description": "Market id",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Market id"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Filter for trades created on or before the date. There will be no end cap if omitted.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Filter for trades created on or after the date. There will be no start cap if omitted.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTradesResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/markets": {
      "get": {
        "tags": [
          "Markets"
        ],
        "summary": "Get all markets",
        "operationId": "getAllMarkets",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "maximum": 50,
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/LocationFilter"
            }
          },
          {
            "name": "market_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/com.figuremarkets.exchange.proto.hft.Markets.Market.MarketType"
              },
              "default": [
                "ATS",
                "CRYPTO",
                "FUND",
                "VIRTUAL_YLDS",
                "CONNECT"
              ]
            }
          },
          {
            "name": "base_asset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quote_asset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "candle_type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CandleType"
            }
          },
          {
            "name": "include_hidden",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseMarketResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/markets/{symbol}": {
      "get": {
        "tags": [
          "Markets"
        ],
        "summary": "Get a market",
        "operationId": "getMarket",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "description": "Market id",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Market id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/markets/{symbol}/orderbook": {
      "get": {
        "tags": [
          "Markets"
        ],
        "operationId": "getMarketOrderBook",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "depth",
            "in": "query",
            "description": "If set to 0 or not specified, all entries will be returned. Does not apply to level 1",
            "required": false,
            "schema": {
              "title": "Number of order book entries to return in each direction",
              "minimum": 0,
              "type": "string",
              "description": "If set to 0 or not specified, all entries will be returned. Does not apply to level 1"
            }
          },
          {
            "name": "level",
            "in": "query",
            "description": "The level of aggregation for the order book. 1 \u003d best bid/ask, 2 \u003d aggregated bids/asks, 3 \u003d complete order book without aggregation",
            "required": false,
            "schema": {
              "title": "Order book aggregation level",
              "type": "string",
              "description": "The level of aggregation for the order book. 1 \u003d best bid/ask, 2 \u003d aggregated bids/asks, 3 \u003d complete order book without aggregation",
              "default": "2",
              "enum": [
                "1",
                "2",
                "3"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderBookResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/markets/{symbol}/candles": {
      "get": {
        "tags": [
          "Markets"
        ],
        "summary": "Get market candles. Periods with no activity will not have candles.",
        "operationId": "getMarketCandles",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "description": "Market id",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Market id"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "interval_in_minutes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "candle_type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CandleType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketCandlesResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assets": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get all assets",
        "operationId": "getAllAssets",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "include_lending_facility_assets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseAssetResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assets/{name}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get asset by name",
        "operationId": "getAssetByName",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assets/{name}/price": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get asset price at a given time",
        "operationId": "getAssetPrice",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quoteAsset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "USD"
            }
          },
          {
            "name": "marketLocation",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/com.figuremarkets.exchange.proto.hft.Markets.Market.MarketLocation"
            }
          },
          {
            "name": "time",
            "in": "query",
            "required": true,
            "schema": {
              "title": "Time to price asset",
              "type": "string",
              "format": "date-time",
              "example": "2025-09-11T13:30:00.000Z"
            },
            "example": "2025-09-11T13:30:00.000Z"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetPrice"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assets/blockchains": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get all blockchains",
        "operationId": "getAllBlockchains",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponseBlockchainResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assets/blockchains/{uuid}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get blockchain by uuid",
        "operationId": "getBlockchainByUuid",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlockchainResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PublicMatchOrderResponse": {
        "required": [
          "created",
          "id",
          "price",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "quantity": {
            "type": "number"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "settlementTxHash": {
            "type": "string"
          }
        }
      },
      "PublicTradesResponse": {
        "required": [
          "denom",
          "marketId",
          "matches",
          "symbol"
        ],
        "type": "object",
        "properties": {
          "denom": {
            "type": "string"
          },
          "symbol": {
            "type": "string",
            "description": "Symbol for the book",
            "deprecated": true
          },
          "marketId": {
            "type": "string"
          },
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicMatchOrderResponse"
            }
          }
        }
      },
      "LocationFilter": {
        "type": "string",
        "enum": [
          "ALL",
          "US",
          "CAYMAN",
          "IRELAND"
        ]
      },
      "com.figuremarkets.exchange.proto.hft.Markets.Market.MarketType": {
        "type": "string",
        "enum": [
          "UNKNOWN_MARKET_TYPE",
          "CRYPTO",
          "PERPETUAL",
          "FUND",
          "ATS",
          "VIRTUAL",
          "VIRTUAL_YLDS",
          "CONNECT"
        ]
      },
      "CandleType": {
        "type": "string",
        "enum": [
          "MID_MARKET",
          "TRADE"
        ]
      },
      "DayOfWeek": {
        "type": "string",
        "enum": [
          "MONDAY",
          "TUESDAY",
          "WEDNESDAY",
          "THURSDAY",
          "FRIDAY",
          "SATURDAY",
          "SUNDAY"
        ]
      },
      "DayScheduleResponse": {
        "required": [
          "dayOfWeek",
          "marketOpenTimes",
          "timezone"
        ],
        "type": "object",
        "properties": {
          "dayOfWeek": {
            "$ref": "#/components/schemas/DayOfWeek"
          },
          "marketOpenTimes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketTimesResponse"
            }
          },
          "timezone": {
            "type": "string"
          }
        },
        "description": "List of hours the market is open by day. Null for 24/7 markets"
      },
      "Fee": {
        "required": [
          "minBasisPoints",
          "rate"
        ],
        "type": "object",
        "properties": {
          "rate": {
            "type": "number",
            "description": "The fee rate as a percentage (e.g. 0.001 for 0.1%)"
          },
          "minBasisPoints": {
            "type": "number",
            "description": "The fee rate as basis points"
          },
          "minimumNotional": {
            "type": "number",
            "description": "The minimum fee amount that must be charged per order."
          },
          "maximumRate": {
            "type": "number",
            "description": "The maximum fee rate that can be applied to an order as a percentage"
          },
          "maxBasisPoints": {
            "type": "number",
            "description": "The maximum fee rate that can be applied to an order as basis points"
          }
        }
      },
      "HolidayScheduleResponse": {
        "required": [
          "date",
          "marketOpenTimes",
          "timezone"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "marketOpenTimes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketTimesResponse"
            }
          },
          "timezone": {
            "type": "string"
          }
        },
        "description": "List of holidays that the market observes. Null for 24/7 markets"
      },
      "MarketResponse": {
        "required": [
          "baseVolume24h",
          "contractAddress",
          "contractAddressUrl",
          "denom",
          "denomExponent",
          "displayName",
          "ep3InstrumentId",
          "exchangePrice",
          "high24h",
          "id",
          "inRegularTradingHours",
          "indexPrice",
          "lastTradedPrice",
          "low24h",
          "marketLocation",
          "marketLocations",
          "marketOrderProtectionBasisPoints",
          "marketType",
          "minTradeQuantity",
          "orderLimits",
          "priceChange24h",
          "priceIncrement",
          "pricePrecision",
          "proTradeAvailable",
          "quantityPrecision",
          "quoteDenom",
          "quoteExponent",
          "requiredAttributes",
          "sizeIncrement",
          "status",
          "symbol",
          "tradeCount24h",
          "unifiedCryptoassetId",
          "usesNasdaqSchedule",
          "volume24h"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The market\u0027s id, previously symbol"
          },
          "symbol": {
            "type": "string",
            "deprecated": true
          },
          "displayName": {
            "type": "string",
            "description": "Display name for market"
          },
          "denom": {
            "type": "string"
          },
          "quoteDenom": {
            "type": "string"
          },
          "bestBid": {
            "type": "string"
          },
          "bestAsk": {
            "type": "string"
          },
          "midMarketPrice": {
            "type": "string"
          },
          "priceChange24h": {
            "type": "string"
          },
          "percentageChange24h": {
            "type": "number"
          },
          "lastTradedPrice": {
            "type": "string"
          },
          "volume24h": {
            "type": "string",
            "description": "the total value of all trades in the last 24 hours in terms of the quote asset"
          },
          "high24h": {
            "type": "string"
          },
          "low24h": {
            "type": "string"
          },
          "indexPrice": {
            "type": "string",
            "description": "Oracle index price"
          },
          "tradeCount24h": {
            "type": "integer",
            "format": "int64"
          },
          "denomExponent": {
            "type": "integer",
            "format": "int32",
            "deprecated": true
          },
          "quoteExponent": {
            "type": "integer",
            "format": "int32",
            "deprecated": true
          },
          "pricePrecision": {
            "type": "integer",
            "description": "number of decimal places for market prices",
            "format": "int32"
          },
          "quantityPrecision": {
            "type": "integer",
            "description": "number of decimal places for market quantities",
            "format": "int32"
          },
          "sizeIncrement": {
            "type": "string",
            "description": "order size increment display. e.g \"10\" for hash"
          },
          "priceIncrement": {
            "type": "string",
            "description": "Display price increment. e.g \".001\" for hash"
          },
          "minTradeQuantity": {
            "type": "string"
          },
          "askFee": {
            "$ref": "#/components/schemas/Fee"
          },
          "bidFee": {
            "$ref": "#/components/schemas/Fee"
          },
          "makerFee": {
            "$ref": "#/components/schemas/Fee"
          },
          "takerFee": {
            "$ref": "#/components/schemas/Fee"
          },
          "marketLocation": {
            "$ref": "#/components/schemas/com.figuremarkets.exchange.proto.hft.Markets.Market.MarketLocation"
          },
          "marketLocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/com.figuremarkets.exchange.proto.hft.Markets.Market.MarketLocation"
            }
          },
          "marketType": {
            "$ref": "#/components/schemas/com.figuremarkets.exchange.proto.hft.Markets.Market.MarketType"
          },
          "ep3InstrumentId": {
            "type": "string",
            "deprecated": true
          },
          "navPrice": {
            "type": "string",
            "description": "Net asset value for ATS markets"
          },
          "volumeWeightedAveragePrice": {
            "type": "string",
            "description": "Volume weighted average for ATS markets"
          },
          "exchangePrice": {
            "type": "string"
          },
          "proTradeAvailable": {
            "type": "boolean"
          },
          "baseVolume24h": {
            "type": "string",
            "description": "the total value of all trades in the last 24 hours in terms of the base asset"
          },
          "contractAddressUrl": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contractAddress": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unifiedCryptoassetId": {
            "type": "string",
            "description": "the CoinMarketCap unified Cryptoasset ID (or CMC ID) to represent a unique cryptoasset"
          },
          "requiredAttributes": {
            "type": "array",
            "description": "Provenance blockchain attributes required to hold the base and quote denoms",
            "items": {
              "type": "string",
              "description": "Provenance blockchain attributes required to hold the base and quote denoms"
            }
          },
          "hidden": {
            "title": "Market is not displayed",
            "type": "boolean",
            "description": "Only included in response when true. Specifies whether market is hidden from the UI."
          },
          "minOrderQty": {
            "title": "Minimum order quantity",
            "type": "number",
            "description": "Use orderLimits.minOrderQty instead",
            "deprecated": true
          },
          "marketOrderProtectionBasisPoints": {
            "title": "Market order protection limit",
            "type": "integer",
            "description": "Use orderLimits.marketOrderProtectionBasisPoints instead",
            "format": "int64",
            "deprecated": true
          },
          "orderLimits": {
            "$ref": "#/components/schemas/OrderLimits"
          },
          "inRegularTradingHours": {
            "type": "boolean",
            "description": "True if market is in regular trading hours"
          },
          "usesNasdaqSchedule": {
            "type": "boolean",
            "description": "True if market follows Nasdaq hours and holidays"
          },
          "holidaySchedule": {
            "type": "array",
            "description": "List of holidays that the market observes. Null for 24/7 markets",
            "items": {
              "$ref": "#/components/schemas/HolidayScheduleResponse"
            }
          },
          "daySchedule": {
            "type": "array",
            "description": "List of hours the market is open by day. Null for 24/7 markets",
            "items": {
              "$ref": "#/components/schemas/DayScheduleResponse"
            }
          },
          "status": {
            "$ref": "#/components/schemas/com.figuremarkets.exchange.proto.hft.Markets.Market.MarketStatus"
          }
        }
      },
      "MarketTimesResponse": {
        "required": [
          "endTime",
          "startTime"
        ],
        "type": "object",
        "properties": {
          "startTime": {
            "type": "string",
            "description": "Time in HH:mm:ss format",
            "example": "10:30:00"
          },
          "endTime": {
            "type": "string",
            "description": "Time in HH:mm:ss format",
            "example": "10:30:00"
          }
        }
      },
      "OrderLimits": {
        "type": "object",
        "properties": {
          "minOrderQty": {
            "title": "Minimum order quantity",
            "type": "number",
            "description": "In base asset units"
          },
          "maxOrderQty": {
            "title": "Maximum order quantity",
            "type": "number",
            "description": "In base asset units"
          },
          "minNotionalOrderValue": {
            "title": "Minimum notional order value",
            "type": "number",
            "description": "Represented in quote asset units (i.e. 1 USD). (Limit orders) order price * quantity; (Market to limit orders) instrument reference price * quantity"
          },
          "maxNotionalOrderValue": {
            "title": "Maximum notional order value",
            "type": "number",
            "description": "Represented in quote asset units (i.e. 1 USD). (Limit orders) order price * quantity; (Market to limit orders) instrument reference price * quantity"
          },
          "relativePriceLimitLowPercent": {
            "title": "Relative Price Limit (Low) Percent",
            "type": "number",
            "description": "Price limits calculated as a percentage from the Settlement Price (or Trading Reference Price if this is set). Orders that violate a Relative Price Limit are rejected. Enforced against both buy orders and sell orders. Expects value of 1 \u003d 100%, 0.1 \u003d 10%, etc."
          },
          "relativePriceLimitHighPercent": {
            "title": "Relative Price Limit (High) Percent",
            "type": "number",
            "description": "Price limits calculated as a percentage from the Settlement Price (or Trading Reference Price if this is set). Orders that violate a Relative Price Limit are rejected. Enforced against both buy orders and sell orders. Expects value of 1 \u003d 100%, 0.1 \u003d 10%, etc."
          },
          "marketOrderProtectionBasisPoints": {
            "title": "Market order price protection limit",
            "type": "integer",
            "description": "In basis points. Defaults to global protection rules if not set.",
            "format": "int64"
          }
        }
      },
      "PaginatedResponseMarketResponse": {
        "required": [
          "data",
          "pagination"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketResponse"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationResponse"
          }
        }
      },
      "PaginationResponse": {
        "required": [
          "page",
          "size",
          "totalCount",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "com.figuremarkets.exchange.proto.hft.Markets.Market.MarketLocation": {
        "type": "string",
        "enum": [
          "UNKNOWN_MARKET_LOCATION",
          "US",
          "CAYMAN",
          "IRELAND"
        ]
      },
      "com.figuremarkets.exchange.proto.hft.Markets.Market.MarketStatus": {
        "type": "string",
        "enum": [
          "UNKNOWN_MARKET_STATUS",
          "PENDING",
          "OPEN",
          "CLOSED",
          "PREOPEN",
          "SUSPENDED",
          "EXPIRED",
          "TERMINATED",
          "HALTED",
          "MATCH_AND_CLOSE"
        ]
      },
      "AggregateOrderBookEntry": {
        "required": [
          "price",
          "quantity",
          "totalQuantity"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderBookEntryI"
          },
          {
            "type": "object",
            "properties": {
              "quantity": {
                "title": "Quantity at this price",
                "type": "number"
              },
              "totalQuantity": {
                "title": "Total quantity at this price or better",
                "type": "number"
              }
            }
          }
        ]
      },
      "OrderBookEntry": {
        "required": [
          "price",
          "quantity"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderBookEntryI"
          },
          {
            "type": "object",
            "properties": {
              "quantity": {
                "title": "Order quantity",
                "type": "number"
              }
            }
          }
        ]
      },
      "OrderBookEntryI": {
        "title": "Bids (buy orders) in the order book, ordered by price descending",
        "required": [
          "price",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "quantity": {
            "type": "number"
          },
          "price": {
            "title": "Price at which the order is placed",
            "type": "number"
          }
        }
      },
      "OrderBookResponse": {
        "required": [
          "asks",
          "bids",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "asks": {
            "title": "Asks (sell orders) in the order book, ordered by price ascending",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AggregateOrderBookEntry"
                },
                {
                  "$ref": "#/components/schemas/OrderBookEntry"
                }
              ]
            }
          },
          "bids": {
            "title": "Bids (buy orders) in the order book, ordered by price descending",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AggregateOrderBookEntry"
                },
                {
                  "$ref": "#/components/schemas/OrderBookEntry"
                }
              ]
            }
          }
        }
      },
      "MarketCandlesResponse": {
        "required": [
          "denom",
          "marketDisplayName",
          "marketId",
          "matchHistoryData",
          "symbol"
        ],
        "type": "object",
        "properties": {
          "denom": {
            "type": "string"
          },
          "symbol": {
            "type": "string",
            "deprecated": true
          },
          "marketDisplayName": {
            "type": "string"
          },
          "marketId": {
            "type": "string"
          },
          "matchHistoryData": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MatchHistoryDataResponse"
            }
          }
        }
      },
      "MatchHistoryDataResponse": {
        "required": [
          "close",
          "date",
          "high",
          "low",
          "open",
          "volume"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "open": {
            "type": "string"
          },
          "close": {
            "type": "string"
          },
          "low": {
            "type": "string"
          },
          "high": {
            "type": "string"
          },
          "volume": {
            "type": "string"
          }
        }
      },
      "AssetResponse": {
        "required": [
          "blockchainUuids",
          "displayName",
          "exponent",
          "fixedPrice",
          "name",
          "provenanceRequiredAttributes",
          "provider",
          "type"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "subtitle": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "websiteUrl": {
            "type": "string"
          },
          "whitepaperUrl": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/com.figuremarkets.exchange.proto.hft.Assets.Asset.AssetType"
          },
          "fixedPrice": {
            "type": "boolean"
          },
          "exponent": {
            "type": "integer",
            "format": "int32"
          },
          "provenanceMarkerName": {
            "type": "string"
          },
          "provenanceDisplayDenom": {
            "type": "string"
          },
          "provenanceRequiredAttributes": {
            "type": "array",
            "description": "Required attribute names from the Provenance marker account for this asset\u0027s denom, if any",
            "items": {
              "type": "string",
              "description": "Required attribute names from the Provenance marker account for this asset\u0027s denom, if any"
            }
          },
          "provider": {
            "$ref": "#/components/schemas/ProviderCase"
          },
          "iconUrl": {
            "type": "string"
          },
          "displayExponent": {
            "type": "integer",
            "format": "int32"
          },
          "network": {
            "type": "string"
          },
          "blockchainUuids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "depositConfig": {
            "$ref": "#/components/schemas/DepositConfigResponse"
          },
          "withdrawConfig": {
            "$ref": "#/components/schemas/WithdrawConfigResponse"
          },
          "sortOrder": {
            "type": "integer",
            "format": "int32"
          },
          "displayCategory": {
            "$ref": "#/components/schemas/com.figuremarkets.exchange.proto.hft.Assets.AssetDisplayMetadata.Category"
          },
          "haircutPercentage": {
            "maximum": 1,
            "minimum": 0,
            "type": "number",
            "description": "The percentage of the asset value that is deducted as a haircut for collateralized assets"
          },
          "contractAddressUrls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contractAddresses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unifiedCryptoassetId": {
            "type": "string"
          },
          "lendingFacilitiesDetails": {
            "$ref": "#/components/schemas/LendingFacilitiesDetails"
          }
        }
      },
      "DepositConfigResponse": {
        "type": "object",
        "properties": {
          "processingTime": {
            "type": "string"
          },
          "minimumQuantity": {
            "type": "number"
          },
          "depositEnabled": {
            "type": "boolean"
          },
          "availableLocations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "LendingFacilitiesDetails": {
        "required": [
          "advanceRate",
          "price",
          "unpaidBalance"
        ],
        "type": "object",
        "properties": {
          "advanceRate": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "unpaidBalance": {
            "type": "number"
          }
        },
        "description": "Only applicable to lending facility assets"
      },
      "PaginatedResponseAssetResponse": {
        "required": [
          "data",
          "pagination"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssetResponse"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationResponse"
          }
        }
      },
      "ProviderCase": {
        "type": "string",
        "enum": [
          "MPC_ASSET",
          "NATIVE_ASSET",
          "FIAT_ASSET",
          "PM_ASSET",
          "PRIME_VAULT_ASSET",
          "FORGE_ASSET",
          "PROVIDER_NOT_SET"
        ]
      },
      "WithdrawConfigResponse": {
        "required": [
          "minimumWithdrawalPrecision"
        ],
        "type": "object",
        "properties": {
          "processingTime": {
            "type": "string"
          },
          "minimumWithdrawalPrecision": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "com.figuremarkets.exchange.proto.hft.Assets.Asset.AssetType": {
        "type": "string",
        "enum": [
          "UNKNOWN_ASSET_TYPE",
          "STABLECOIN",
          "CRYPTO",
          "FUND",
          "LENDING_FACILITY",
          "STOCK"
        ]
      },
      "com.figuremarkets.exchange.proto.hft.Assets.AssetDisplayMetadata.Category": {
        "type": "string",
        "enum": [
          "UNKNOWN_CATEGORY",
          "CASH_EQUIVALENT",
          "CRYPTO",
          "SECURITY",
          "OTHER",
          "STOCK"
        ]
      },
      "AssetPrice": {
        "required": [
          "asset",
          "price"
        ],
        "type": "object",
        "properties": {
          "asset": {
            "type": "string"
          },
          "price": {
            "type": "number"
          }
        }
      },
      "BlockchainDepositConfigResponse": {
        "type": "object",
        "properties": {
          "processingTime": {
            "type": "string"
          }
        }
      },
      "BlockchainResponse": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "explorerUrl": {
            "type": "string"
          },
          "explorerTxUrl": {
            "type": "string"
          },
          "networkIconUrl": {
            "type": "string"
          },
          "depositConfig": {
            "$ref": "#/components/schemas/BlockchainDepositConfigResponse"
          },
          "withdrawConfig": {
            "$ref": "#/components/schemas/BlockchainWithdrawConfigResponse"
          }
        }
      },
      "BlockchainWithdrawConfigResponse": {
        "type": "object",
        "properties": {
          "processingTime": {
            "type": "string"
          }
        }
      },
      "PaginatedResponseBlockchainResponse": {
        "required": [
          "data",
          "pagination"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockchainResponse"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationResponse"
          }
        }
      }
    }
  }
}