{
  "asyncapi": "2.6.0",
  "info": {
    "title": "Blocksize Market Data API AsyncAPI",
    "version": "1.0.0",
    "description": "Generated from the Blocksize machine-readable API documentation. The API uses JSON-RPC 2.0 over WebSocket and selected HTTP POST methods."
  },
  "externalDocs": {
    "description": "Human-readable Blocksize API documentation",
    "url": "https://matrix.blocksize.capital/api-docs"
  },
  "servers": {
    "production": {
      "url": "data.blocksize.capital/marketdata/v1/ws",
      "protocol": "wss"
    }
  },
  "channels": {
    "/marketdata/v1/ws": {
      "publish": {
        "operationId": "sendJsonRpcRequest",
        "summary": "Send JSON-RPC requests to the Blocksize WebSocket API",
        "message": {
          "oneOf": [
            {
              "$ref": "#/components/messages/AuthenticationLogonRequest"
            },
            {
              "$ref": "#/components/messages/AuthenticationLogoffRequest"
            },
            {
              "$ref": "#/components/messages/VwapSubscribeRequest"
            },
            {
              "$ref": "#/components/messages/VwapUnsubscribeRequest"
            },
            {
              "$ref": "#/components/messages/VwapInstrumentsRequest"
            },
            {
              "$ref": "#/components/messages/VwapLatestRequest"
            },
            {
              "$ref": "#/components/messages/FixedvwapSubscribeRequest"
            },
            {
              "$ref": "#/components/messages/FixedvwapUnsubscribeRequest"
            },
            {
              "$ref": "#/components/messages/ClosingpriceListRequest"
            },
            {
              "$ref": "#/components/messages/ClosingpriceTradesRequest"
            },
            {
              "$ref": "#/components/messages/BidaskSubscribeRequest"
            },
            {
              "$ref": "#/components/messages/BidaskUnsubscribeRequest"
            },
            {
              "$ref": "#/components/messages/BidaskInstrumentsRequest"
            },
            {
              "$ref": "#/components/messages/BidaskGetSnapshotRequest"
            },
            {
              "$ref": "#/components/messages/StateSubscribeRequest"
            },
            {
              "$ref": "#/components/messages/StateUnsubscribeRequest"
            },
            {
              "$ref": "#/components/messages/StatePoolRequest"
            },
            {
              "$ref": "#/components/messages/StateInstrumentsRequest"
            },
            {
              "$ref": "#/components/messages/TradeSubscribeRequest"
            },
            {
              "$ref": "#/components/messages/TradeUnsubscribeRequest"
            },
            {
              "$ref": "#/components/messages/TimeNowRequest"
            }
          ]
        }
      },
      "subscribe": {
        "operationId": "receiveJsonRpcMessage",
        "summary": "Receive JSON-RPC responses and subscription notifications",
        "message": {
          "oneOf": [
            {
              "$ref": "#/components/messages/JsonRpcErrorResponse"
            },
            {
              "$ref": "#/components/messages/AuthenticationLogonResponse"
            },
            {
              "$ref": "#/components/messages/AuthenticationLogoffResponse"
            },
            {
              "$ref": "#/components/messages/VwapSubscribeResponse"
            },
            {
              "$ref": "#/components/messages/VwapUnsubscribeResponse"
            },
            {
              "$ref": "#/components/messages/VwapInstrumentsResponse"
            },
            {
              "$ref": "#/components/messages/VwapLatestResponse"
            },
            {
              "$ref": "#/components/messages/FixedvwapSubscribeResponse"
            },
            {
              "$ref": "#/components/messages/FixedvwapUnsubscribeResponse"
            },
            {
              "$ref": "#/components/messages/ClosingpriceListResponse"
            },
            {
              "$ref": "#/components/messages/ClosingpriceTradesResponse"
            },
            {
              "$ref": "#/components/messages/BidaskSubscribeResponse"
            },
            {
              "$ref": "#/components/messages/BidaskUnsubscribeResponse"
            },
            {
              "$ref": "#/components/messages/BidaskInstrumentsResponse"
            },
            {
              "$ref": "#/components/messages/BidaskGetSnapshotResponse"
            },
            {
              "$ref": "#/components/messages/StateSubscribeResponse"
            },
            {
              "$ref": "#/components/messages/StateUnsubscribeResponse"
            },
            {
              "$ref": "#/components/messages/StatePoolResponse"
            },
            {
              "$ref": "#/components/messages/StateInstrumentsResponse"
            },
            {
              "$ref": "#/components/messages/TradeSubscribeResponse"
            },
            {
              "$ref": "#/components/messages/TradeUnsubscribeResponse"
            },
            {
              "$ref": "#/components/messages/TimeNowResponse"
            },
            {
              "$ref": "#/components/messages/VwapSubscribeNotification"
            },
            {
              "$ref": "#/components/messages/FixedvwapSubscribeNotification"
            },
            {
              "$ref": "#/components/messages/BidaskSubscribeNotification"
            },
            {
              "$ref": "#/components/messages/StateSubscribeNotification"
            },
            {
              "$ref": "#/components/messages/TradeSubscribeNotification"
            }
          ]
        }
      }
    }
  },
  "components": {
    "messages": {
      "AuthenticationLogonRequest": {
        "name": "AuthenticationLogonRequest",
        "payload": {
          "$ref": "#/components/schemas/AuthenticationLogonRequest"
        }
      },
      "AuthenticationLogonResponse": {
        "name": "AuthenticationLogonResponse",
        "payload": {
          "$ref": "#/components/schemas/AuthenticationLogonResponse"
        }
      },
      "AuthenticationLogoffRequest": {
        "name": "AuthenticationLogoffRequest",
        "payload": {
          "$ref": "#/components/schemas/AuthenticationLogoffRequest"
        }
      },
      "AuthenticationLogoffResponse": {
        "name": "AuthenticationLogoffResponse",
        "payload": {
          "$ref": "#/components/schemas/AuthenticationLogoffResponse"
        }
      },
      "VwapSubscribeRequest": {
        "name": "VwapSubscribeRequest",
        "payload": {
          "$ref": "#/components/schemas/VwapSubscribeRequest"
        }
      },
      "VwapSubscribeResponse": {
        "name": "VwapSubscribeResponse",
        "payload": {
          "$ref": "#/components/schemas/VwapSubscribeResponse"
        }
      },
      "VwapUnsubscribeRequest": {
        "name": "VwapUnsubscribeRequest",
        "payload": {
          "$ref": "#/components/schemas/VwapUnsubscribeRequest"
        }
      },
      "VwapUnsubscribeResponse": {
        "name": "VwapUnsubscribeResponse",
        "payload": {
          "$ref": "#/components/schemas/VwapUnsubscribeResponse"
        }
      },
      "VwapInstrumentsRequest": {
        "name": "VwapInstrumentsRequest",
        "payload": {
          "$ref": "#/components/schemas/VwapInstrumentsRequest"
        }
      },
      "VwapInstrumentsResponse": {
        "name": "VwapInstrumentsResponse",
        "payload": {
          "$ref": "#/components/schemas/VwapInstrumentsResponse"
        }
      },
      "VwapLatestRequest": {
        "name": "VwapLatestRequest",
        "payload": {
          "$ref": "#/components/schemas/VwapLatestRequest"
        }
      },
      "VwapLatestResponse": {
        "name": "VwapLatestResponse",
        "payload": {
          "$ref": "#/components/schemas/VwapLatestResponse"
        }
      },
      "FixedvwapSubscribeRequest": {
        "name": "FixedvwapSubscribeRequest",
        "payload": {
          "$ref": "#/components/schemas/FixedvwapSubscribeRequest"
        }
      },
      "FixedvwapSubscribeResponse": {
        "name": "FixedvwapSubscribeResponse",
        "payload": {
          "$ref": "#/components/schemas/FixedvwapSubscribeResponse"
        }
      },
      "FixedvwapUnsubscribeRequest": {
        "name": "FixedvwapUnsubscribeRequest",
        "payload": {
          "$ref": "#/components/schemas/FixedvwapUnsubscribeRequest"
        }
      },
      "FixedvwapUnsubscribeResponse": {
        "name": "FixedvwapUnsubscribeResponse",
        "payload": {
          "$ref": "#/components/schemas/FixedvwapUnsubscribeResponse"
        }
      },
      "ClosingpriceListRequest": {
        "name": "ClosingpriceListRequest",
        "payload": {
          "$ref": "#/components/schemas/ClosingpriceListRequest"
        }
      },
      "ClosingpriceListResponse": {
        "name": "ClosingpriceListResponse",
        "payload": {
          "$ref": "#/components/schemas/ClosingpriceListResponse"
        }
      },
      "ClosingpriceTradesRequest": {
        "name": "ClosingpriceTradesRequest",
        "payload": {
          "$ref": "#/components/schemas/ClosingpriceTradesRequest"
        }
      },
      "ClosingpriceTradesResponse": {
        "name": "ClosingpriceTradesResponse",
        "payload": {
          "$ref": "#/components/schemas/ClosingpriceTradesResponse"
        }
      },
      "BidaskSubscribeRequest": {
        "name": "BidaskSubscribeRequest",
        "payload": {
          "$ref": "#/components/schemas/BidaskSubscribeRequest"
        }
      },
      "BidaskSubscribeResponse": {
        "name": "BidaskSubscribeResponse",
        "payload": {
          "$ref": "#/components/schemas/BidaskSubscribeResponse"
        }
      },
      "BidaskUnsubscribeRequest": {
        "name": "BidaskUnsubscribeRequest",
        "payload": {
          "$ref": "#/components/schemas/BidaskUnsubscribeRequest"
        }
      },
      "BidaskUnsubscribeResponse": {
        "name": "BidaskUnsubscribeResponse",
        "payload": {
          "$ref": "#/components/schemas/BidaskUnsubscribeResponse"
        }
      },
      "BidaskInstrumentsRequest": {
        "name": "BidaskInstrumentsRequest",
        "payload": {
          "$ref": "#/components/schemas/BidaskInstrumentsRequest"
        }
      },
      "BidaskInstrumentsResponse": {
        "name": "BidaskInstrumentsResponse",
        "payload": {
          "$ref": "#/components/schemas/BidaskInstrumentsResponse"
        }
      },
      "BidaskGetSnapshotRequest": {
        "name": "BidaskGetSnapshotRequest",
        "payload": {
          "$ref": "#/components/schemas/BidaskGetSnapshotRequest"
        }
      },
      "BidaskGetSnapshotResponse": {
        "name": "BidaskGetSnapshotResponse",
        "payload": {
          "$ref": "#/components/schemas/BidaskGetSnapshotResponse"
        }
      },
      "StateSubscribeRequest": {
        "name": "StateSubscribeRequest",
        "payload": {
          "$ref": "#/components/schemas/StateSubscribeRequest"
        }
      },
      "StateSubscribeResponse": {
        "name": "StateSubscribeResponse",
        "payload": {
          "$ref": "#/components/schemas/StateSubscribeResponse"
        }
      },
      "StateUnsubscribeRequest": {
        "name": "StateUnsubscribeRequest",
        "payload": {
          "$ref": "#/components/schemas/StateUnsubscribeRequest"
        }
      },
      "StateUnsubscribeResponse": {
        "name": "StateUnsubscribeResponse",
        "payload": {
          "$ref": "#/components/schemas/StateUnsubscribeResponse"
        }
      },
      "StatePoolRequest": {
        "name": "StatePoolRequest",
        "payload": {
          "$ref": "#/components/schemas/StatePoolRequest"
        }
      },
      "StatePoolResponse": {
        "name": "StatePoolResponse",
        "payload": {
          "$ref": "#/components/schemas/StatePoolResponse"
        }
      },
      "StateInstrumentsRequest": {
        "name": "StateInstrumentsRequest",
        "payload": {
          "$ref": "#/components/schemas/StateInstrumentsRequest"
        }
      },
      "StateInstrumentsResponse": {
        "name": "StateInstrumentsResponse",
        "payload": {
          "$ref": "#/components/schemas/StateInstrumentsResponse"
        }
      },
      "TradeSubscribeRequest": {
        "name": "TradeSubscribeRequest",
        "payload": {
          "$ref": "#/components/schemas/TradeSubscribeRequest"
        }
      },
      "TradeSubscribeResponse": {
        "name": "TradeSubscribeResponse",
        "payload": {
          "$ref": "#/components/schemas/TradeSubscribeResponse"
        }
      },
      "TradeUnsubscribeRequest": {
        "name": "TradeUnsubscribeRequest",
        "payload": {
          "$ref": "#/components/schemas/TradeUnsubscribeRequest"
        }
      },
      "TradeUnsubscribeResponse": {
        "name": "TradeUnsubscribeResponse",
        "payload": {
          "$ref": "#/components/schemas/TradeUnsubscribeResponse"
        }
      },
      "TimeNowRequest": {
        "name": "TimeNowRequest",
        "payload": {
          "$ref": "#/components/schemas/TimeNowRequest"
        }
      },
      "TimeNowResponse": {
        "name": "TimeNowResponse",
        "payload": {
          "$ref": "#/components/schemas/TimeNowResponse"
        }
      },
      "VwapSubscribeNotification": {
        "name": "VwapSubscribeNotification",
        "payload": {
          "$ref": "#/components/schemas/VwapSubscribeNotification"
        }
      },
      "FixedvwapSubscribeNotification": {
        "name": "FixedvwapSubscribeNotification",
        "payload": {
          "$ref": "#/components/schemas/FixedvwapSubscribeNotification"
        }
      },
      "BidaskSubscribeNotification": {
        "name": "BidaskSubscribeNotification",
        "payload": {
          "$ref": "#/components/schemas/BidaskSubscribeNotification"
        }
      },
      "StateSubscribeNotification": {
        "name": "StateSubscribeNotification",
        "payload": {
          "$ref": "#/components/schemas/StateSubscribeNotification"
        }
      },
      "TradeSubscribeNotification": {
        "name": "TradeSubscribeNotification",
        "payload": {
          "$ref": "#/components/schemas/TradeSubscribeNotification"
        }
      },
      "JsonRpcErrorResponse": {
        "name": "JsonRpcErrorResponse",
        "payload": {
          "$ref": "#/components/schemas/JsonRpcErrorResponse"
        }
      }
    },
    "schemas": {
      "JsonRpcId": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          }
        ]
      },
      "JsonRpcError": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              -32600,
              -32601,
              -32602,
              -32603,
              -32700,
              4000,
              4001,
              4002,
              4003
            ]
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "JsonRpcErrorResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "error"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/JsonRpcId"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "enum": [
                  -32600,
                  -32601,
                  -32602,
                  -32603,
                  -32700,
                  4000,
                  4001,
                  4002,
                  4003
                ]
              },
              "message": {
                "type": "string"
              },
              "data": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "AuthenticationLogonParams": {
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "description": "Your generated API key"
          },
          "token": {
            "type": "string",
            "description": "An optional API Token"
          }
        },
        "required": [
          "api_key",
          "token"
        ],
        "additionalProperties": false
      },
      "AuthenticationLogonResult": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "description": "If authentication was successful, this will contain the user ID of the logged in user."
          }
        },
        "required": [
          "user_id"
        ],
        "additionalProperties": false
      },
      "AuthenticationLogonRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "authentication_logon"
          },
          "params": {
            "$ref": "#/components/schemas/AuthenticationLogonParams"
          }
        },
        "additionalProperties": false
      },
      "AuthenticationLogonResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/AuthenticationLogonResult"
          }
        },
        "additionalProperties": false
      },
      "AuthenticationLogoffParams": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "AuthenticationLogoffResult": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "description": "If the logout was successful this field will be empty."
          }
        },
        "required": [
          "user_id"
        ],
        "additionalProperties": false
      },
      "AuthenticationLogoffRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "authentication_logoff"
          },
          "params": {
            "$ref": "#/components/schemas/AuthenticationLogoffParams"
          }
        },
        "additionalProperties": false
      },
      "AuthenticationLogoffResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/AuthenticationLogoffResult"
          }
        },
        "additionalProperties": false
      },
      "VwapSubscribeParams": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tickers"
          }
        },
        "required": [
          "tickers"
        ],
        "additionalProperties": false
      },
      "VwapSubscribeResult": {
        "type": "object",
        "properties": {
          "snapshot": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The ticker of the instrument"
                },
                "price": {
                  "type": "number",
                  "format": "double",
                  "description": "The VWAP of the instrument"
                },
                "size": {
                  "type": "number",
                  "format": "double",
                  "description": "Total size"
                },
                "volume": {
                  "type": "number",
                  "format": "double",
                  "description": "Total volume"
                },
                "market_cap": {
                  "type": "number",
                  "format": "double",
                  "description": "Circulating supply of the base token times the price"
                },
                "ts": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Timestamp of VWAP in milliseconds. Indicates last timestamp (exchange provided) of the last trade used for calculation"
                }
              },
              "required": [
                "ticker",
                "price",
                "size",
                "volume",
                "ts"
              ],
              "additionalProperties": false
            },
            "description": "This will contain a list of the latest prices for all the requested tickers"
          }
        },
        "required": [
          "snapshot"
        ],
        "additionalProperties": false
      },
      "VwapSubscribeRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "vwap_subscribe"
          },
          "params": {
            "$ref": "#/components/schemas/VwapSubscribeParams"
          }
        },
        "additionalProperties": false
      },
      "VwapSubscribeResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/VwapSubscribeResult"
          }
        },
        "additionalProperties": false
      },
      "VwapUnsubscribeParams": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tickers"
          }
        },
        "required": [
          "tickers"
        ],
        "additionalProperties": false
      },
      "VwapUnsubscribeResult": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "VwapUnsubscribeRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "vwap_unsubscribe"
          },
          "params": {
            "$ref": "#/components/schemas/VwapUnsubscribeParams"
          }
        },
        "additionalProperties": false
      },
      "VwapUnsubscribeResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/VwapUnsubscribeResult"
          }
        },
        "additionalProperties": false
      },
      "VwapInstrumentsParams": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "VwapInstrumentsResult": {
        "type": "object",
        "properties": {
          "instruments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The instrument's ticker"
                },
                "base_currency": {
                  "type": "string",
                  "description": "The instrument's base currency"
                },
                "quote_currency": {
                  "type": "string",
                  "description": "The instrument's quote currency"
                },
                "exchanges": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "A list of exchanges which are currently used to calculate the price"
                }
              },
              "required": [
                "ticker",
                "base_currency",
                "quote_currency",
                "exchanges"
              ],
              "additionalProperties": false
            },
            "description": "A list of all pairs that can be subscribed to"
          }
        },
        "required": [
          "instruments"
        ],
        "additionalProperties": false
      },
      "VwapInstrumentsRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "vwap_instruments"
          },
          "params": {
            "$ref": "#/components/schemas/VwapInstrumentsParams"
          }
        },
        "additionalProperties": false
      },
      "VwapInstrumentsResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/VwapInstrumentsResult"
          }
        },
        "additionalProperties": false
      },
      "VwapLatestParams": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker of the instrument"
          }
        },
        "required": [
          "ticker"
        ],
        "additionalProperties": false
      },
      "VwapLatestResult": {
        "type": "object",
        "properties": {
          "vwap": {
            "type": "object",
            "properties": {
              "ticker": {
                "type": "string",
                "description": "The ticker of the instrument"
              },
              "price": {
                "type": "number",
                "format": "double",
                "description": "The VWAP of the instrument"
              },
              "size": {
                "type": "number",
                "format": "double",
                "description": "Total size"
              },
              "volume": {
                "type": "number",
                "format": "double",
                "description": "Total volume"
              },
              "market_cap": {
                "type": "number",
                "format": "double",
                "description": "Circulating supply of the base token times the price"
              },
              "ts": {
                "type": "integer",
                "format": "int64",
                "description": "Timestamp of VWAP in milliseconds. Indicates last timestamp (exchange provided) of the last trade used for calculation"
              }
            },
            "required": [
              "ticker",
              "price",
              "size",
              "volume",
              "ts"
            ],
            "additionalProperties": false,
            "description": "The latest known VWAP for the given ticker"
          }
        },
        "required": [
          "vwap"
        ],
        "additionalProperties": false
      },
      "VwapLatestRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "vwap_latest"
          },
          "params": {
            "$ref": "#/components/schemas/VwapLatestParams"
          }
        },
        "additionalProperties": false
      },
      "VwapLatestResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/VwapLatestResult"
          }
        },
        "additionalProperties": false
      },
      "FixedvwapSubscribeParams": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tickers"
          }
        },
        "required": [
          "tickers"
        ],
        "additionalProperties": false
      },
      "FixedvwapSubscribeResult": {
        "type": "object",
        "properties": {
          "snapshot": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The ticker of the instrument"
                },
                "price": {
                  "type": "number",
                  "format": "double",
                  "description": "The VWAP of the instrument"
                },
                "size": {
                  "type": "number",
                  "format": "double",
                  "description": "Total size"
                },
                "volume": {
                  "type": "number",
                  "format": "double",
                  "description": "Total volume"
                },
                "market_cap": {
                  "type": "number",
                  "format": "double",
                  "description": "Circulating supply of the base token times the price"
                },
                "ts": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Timestamp of VWAP in milliseconds. Indicates last timestamp (exchange provided) of the last trade used for calculation"
                }
              },
              "required": [
                "ticker",
                "price",
                "size",
                "volume",
                "ts"
              ],
              "additionalProperties": false
            },
            "description": "This will contain a list of the latest prices for all the requested tickers"
          }
        },
        "required": [
          "snapshot"
        ],
        "additionalProperties": false
      },
      "FixedvwapSubscribeRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "fixedvwap_subscribe"
          },
          "params": {
            "$ref": "#/components/schemas/FixedvwapSubscribeParams"
          }
        },
        "additionalProperties": false
      },
      "FixedvwapSubscribeResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/FixedvwapSubscribeResult"
          }
        },
        "additionalProperties": false
      },
      "FixedvwapUnsubscribeParams": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tickers"
          }
        },
        "required": [
          "tickers"
        ],
        "additionalProperties": false
      },
      "FixedvwapUnsubscribeResult": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "FixedvwapUnsubscribeRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "fixedvwap_unsubscribe"
          },
          "params": {
            "$ref": "#/components/schemas/FixedvwapUnsubscribeParams"
          }
        },
        "additionalProperties": false
      },
      "FixedvwapUnsubscribeResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/FixedvwapUnsubscribeResult"
          }
        },
        "additionalProperties": false
      },
      "ClosingpriceListParams": {
        "type": "object",
        "properties": {
          "ts": {
            "type": "integer",
            "format": "int64",
            "description": "The Unix timestamp in milliseconds."
          },
          "quote": {
            "type": "string",
            "description": "An optional quote currency to report prices in. If EUR or USD are specified, synthetic prices will be calculated."
          }
        },
        "required": [
          "ts",
          "quote"
        ],
        "additionalProperties": false
      },
      "ClosingpriceListResult": {
        "type": "object",
        "properties": {
          "conversion_rates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "from": {
                  "type": "string",
                  "description": "The currency this conversion rate is being applied to"
                },
                "to": {
                  "type": "string",
                  "description": "The currency this conversion rate will result in"
                },
                "rate": {
                  "type": "string",
                  "description": "The conversion rate"
                },
                "ts": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The Unix timestamp in milliseconds."
                },
                "datetime": {
                  "type": "string",
                  "description": "The timestamp in RFC3339 format."
                }
              },
              "required": [
                "from",
                "to",
                "rate",
                "ts",
                "datetime"
              ],
              "additionalProperties": false
            },
            "description": "The conversion rates applied to calculate synthetic prices."
          },
          "prices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "base": {
                  "type": "string",
                  "description": "The base currency"
                },
                "quote": {
                  "type": "string",
                  "description": "The quote currency"
                },
                "price": {
                  "type": "string",
                  "description": "The closing price"
                },
                "ts": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The Unix timestamp in milliseconds."
                },
                "datetime": {
                  "type": "string",
                  "description": "The timestamp in RFC3339 format."
                },
                "original_quote": {
                  "type": "string",
                  "description": "For those pairs that were calculated using conversion"
                }
              },
              "required": [
                "base",
                "quote",
                "price",
                "ts",
                "datetime"
              ],
              "additionalProperties": false
            },
            "description": "A list of closing prices"
          }
        },
        "required": [
          "prices"
        ],
        "additionalProperties": false
      },
      "ClosingpriceListRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "closingprice_list"
          },
          "params": {
            "$ref": "#/components/schemas/ClosingpriceListParams"
          }
        },
        "additionalProperties": false
      },
      "ClosingpriceListResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/ClosingpriceListResult"
          }
        },
        "additionalProperties": false
      },
      "ClosingpriceTradesParams": {
        "type": "object",
        "properties": {
          "base": {
            "type": "string",
            "description": "The base currency"
          },
          "quote": {
            "type": "string",
            "description": "The quote currency"
          },
          "ts": {
            "type": "integer",
            "format": "int64",
            "description": "The UTC timestamp in milliseconds."
          }
        },
        "required": [
          "base",
          "quote",
          "ts"
        ],
        "additionalProperties": false
      },
      "ClosingpriceTradesResult": {
        "type": "object",
        "properties": {
          "prices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "base": {
                  "type": "string",
                  "description": "The base currency"
                },
                "quote": {
                  "type": "string",
                  "description": "The quote currency"
                },
                "exchange": {
                  "type": "string",
                  "description": "The trade exchange"
                },
                "price": {
                  "type": "string",
                  "description": "The trade price"
                },
                "size": {
                  "type": "string",
                  "description": "Size of the trade in base currency"
                },
                "ts": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The UTC timestamp in milliseconds."
                }
              },
              "required": [
                "base",
                "quote",
                "exchange",
                "price",
                "size",
                "ts"
              ],
              "additionalProperties": false
            },
            "description": "A list of trades"
          }
        },
        "required": [
          "prices"
        ],
        "additionalProperties": false
      },
      "ClosingpriceTradesRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "closingprice_trades"
          },
          "params": {
            "$ref": "#/components/schemas/ClosingpriceTradesParams"
          }
        },
        "additionalProperties": false
      },
      "ClosingpriceTradesResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/ClosingpriceTradesResult"
          }
        },
        "additionalProperties": false
      },
      "BidaskSubscribeParams": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tickers"
          }
        },
        "required": [
          "tickers"
        ],
        "additionalProperties": false
      },
      "BidaskSubscribeResult": {
        "type": "object",
        "properties": {
          "snapshot": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The ticker of the instrument"
                },
                "agg_bid_price": {
                  "type": "string",
                  "description": "The aggregated bid price of the instrument"
                },
                "agg_bid_size": {
                  "type": "string",
                  "description": "The aggregated bid size of the instrument"
                },
                "agg_ask_price": {
                  "type": "string",
                  "description": "The aggregated ask price of the instrument"
                },
                "agg_ask_size": {
                  "type": "string",
                  "description": "The aggregated ask size of the instrument"
                },
                "agg_mid_price": {
                  "type": "string",
                  "description": "The aggregated mid price of the instrument"
                },
                "ts": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The UTC timestamp in microseconds."
                },
                "market_cap": {
                  "type": "number",
                  "format": "double",
                  "description": "Circulating supply of the base token times mid price"
                }
              },
              "required": [
                "ticker",
                "agg_bid_price",
                "agg_bid_size",
                "agg_ask_price",
                "agg_ask_size",
                "agg_mid_price",
                "ts"
              ],
              "additionalProperties": false
            },
            "description": "This will contain price updates for all the requested tickers"
          }
        },
        "required": [
          "snapshot"
        ],
        "additionalProperties": false
      },
      "BidaskSubscribeRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "bidask_subscribe"
          },
          "params": {
            "$ref": "#/components/schemas/BidaskSubscribeParams"
          }
        },
        "additionalProperties": false
      },
      "BidaskSubscribeResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/BidaskSubscribeResult"
          }
        },
        "additionalProperties": false
      },
      "BidaskUnsubscribeParams": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tickers"
          }
        },
        "required": [
          "tickers"
        ],
        "additionalProperties": false
      },
      "BidaskUnsubscribeResult": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "BidaskUnsubscribeRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "bidask_unsubscribe"
          },
          "params": {
            "$ref": "#/components/schemas/BidaskUnsubscribeParams"
          }
        },
        "additionalProperties": false
      },
      "BidaskUnsubscribeResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/BidaskUnsubscribeResult"
          }
        },
        "additionalProperties": false
      },
      "BidaskInstrumentsParams": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "BidaskInstrumentsResult": {
        "type": "object",
        "properties": {
          "instruments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The instrument's ticker"
                },
                "base_currency": {
                  "type": "string",
                  "description": "The instrument's base currency"
                },
                "quote_currency": {
                  "type": "string",
                  "description": "The instrument's quote currency"
                },
                "exchanges": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "A list of exchanges which are currently used to calculate the price"
                }
              },
              "required": [
                "ticker",
                "base_currency",
                "quote_currency",
                "exchanges"
              ],
              "additionalProperties": false
            },
            "description": "A list of all pairs that can be subscribed to"
          }
        },
        "required": [
          "instruments"
        ],
        "additionalProperties": false
      },
      "BidaskInstrumentsRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "bidask_instruments"
          },
          "params": {
            "$ref": "#/components/schemas/BidaskInstrumentsParams"
          }
        },
        "additionalProperties": false
      },
      "BidaskInstrumentsResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/BidaskInstrumentsResult"
          }
        },
        "additionalProperties": false
      },
      "BidaskGetSnapshotParams": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "BidaskGetSnapshotResult": {
        "type": "object",
        "properties": {
          "snapshot": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The ticker of the instrument"
                },
                "agg_bid_price": {
                  "type": "string",
                  "description": "The aggregated bid price of the instrument"
                },
                "agg_bid_size": {
                  "type": "string",
                  "description": "The aggregated bid size of the instrument"
                },
                "agg_ask_price": {
                  "type": "string",
                  "description": "The aggregated ask price of the instrument"
                },
                "agg_ask_size": {
                  "type": "string",
                  "description": "The aggregated ask size of the instrument"
                },
                "agg_mid_price": {
                  "type": "string",
                  "description": "The aggregated mid price of the instrument"
                },
                "ts": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The UTC timestamp in microseconds."
                },
                "market_cap": {
                  "type": "number",
                  "format": "double",
                  "description": "Circulating supply of the base token times mid price"
                }
              },
              "required": [
                "ticker",
                "agg_bid_price",
                "agg_bid_size",
                "agg_ask_price",
                "agg_ask_size",
                "agg_mid_price",
                "ts"
              ],
              "additionalProperties": false
            },
            "description": "This will contain price updates for all the requested tickers"
          }
        },
        "required": [
          "snapshot"
        ],
        "additionalProperties": false
      },
      "BidaskGetSnapshotRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "bidask_getSnapshot"
          },
          "params": {
            "$ref": "#/components/schemas/BidaskGetSnapshotParams"
          }
        },
        "additionalProperties": false
      },
      "BidaskGetSnapshotResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/BidaskGetSnapshotResult"
          }
        },
        "additionalProperties": false
      },
      "StateSubscribeParams": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tickers"
          }
        },
        "required": [
          "tickers"
        ],
        "additionalProperties": false
      },
      "StateSubscribeResult": {
        "type": "object",
        "properties": {
          "snapshot": {
            "type": "array",
            "items": {},
            "description": "This will contain the current aggregated data of all the requested tickers"
          }
        },
        "required": [
          "snapshot"
        ],
        "additionalProperties": false
      },
      "StateSubscribeRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "state_subscribe"
          },
          "params": {
            "$ref": "#/components/schemas/StateSubscribeParams"
          }
        },
        "additionalProperties": false
      },
      "StateSubscribeResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/StateSubscribeResult"
          }
        },
        "additionalProperties": false
      },
      "StateUnsubscribeParams": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tickers"
          }
        },
        "required": [
          "tickers"
        ],
        "additionalProperties": false
      },
      "StateUnsubscribeResult": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "StateUnsubscribeRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "state_unsubscribe"
          },
          "params": {
            "$ref": "#/components/schemas/StateUnsubscribeParams"
          }
        },
        "additionalProperties": false
      },
      "StateUnsubscribeResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/StateUnsubscribeResult"
          }
        },
        "additionalProperties": false
      },
      "StatePoolParams": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "block": {
            "type": "integer",
            "format": "int64"
          },
          "block_time": {
            "type": "integer",
            "format": "int64"
          },
          "network": {
            "type": "string"
          },
          "pool": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "StatePoolResult": {
        "type": "object",
        "properties": {
          "state": {}
        },
        "additionalProperties": false
      },
      "StatePoolRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "state_pool"
          },
          "params": {
            "$ref": "#/components/schemas/StatePoolParams"
          }
        },
        "additionalProperties": false
      },
      "StatePoolResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/StatePoolResult"
          }
        },
        "additionalProperties": false
      },
      "StateInstrumentsParams": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "StateInstrumentsResult": {
        "type": "object",
        "properties": {
          "instruments": {
            "type": "array",
            "items": {}
          }
        },
        "additionalProperties": false
      },
      "StateInstrumentsRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "state_instruments"
          },
          "params": {
            "$ref": "#/components/schemas/StateInstrumentsParams"
          }
        },
        "additionalProperties": false
      },
      "StateInstrumentsResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/StateInstrumentsResult"
          }
        },
        "additionalProperties": false
      },
      "TradeSubscribeParams": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tickers"
          },
          "filters": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of exchanges or tags to filter the trades by"
          }
        },
        "required": [
          "tickers"
        ],
        "additionalProperties": false
      },
      "TradeSubscribeResult": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "TradeSubscribeRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "trade_subscribe"
          },
          "params": {
            "$ref": "#/components/schemas/TradeSubscribeParams"
          }
        },
        "additionalProperties": false
      },
      "TradeSubscribeResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/TradeSubscribeResult"
          }
        },
        "additionalProperties": false
      },
      "TradeUnsubscribeParams": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of tickers"
          }
        },
        "required": [
          "tickers"
        ],
        "additionalProperties": false
      },
      "TradeUnsubscribeResult": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "TradeUnsubscribeRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "trade_unsubscribe"
          },
          "params": {
            "$ref": "#/components/schemas/TradeUnsubscribeParams"
          }
        },
        "additionalProperties": false
      },
      "TradeUnsubscribeResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/TradeUnsubscribeResult"
          }
        },
        "additionalProperties": false
      },
      "TimeNowParams": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "TimeNowResult": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "description": "The server time in seconds (Unix)."
          }
        },
        "additionalProperties": false
      },
      "TimeNowRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "method": {
            "type": "string",
            "const": "time_now"
          },
          "params": {
            "$ref": "#/components/schemas/TimeNowParams"
          }
        },
        "additionalProperties": false
      },
      "TimeNowResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "result": {
            "$ref": "#/components/schemas/TimeNowResult"
          }
        },
        "additionalProperties": false
      },
      "VwapSubscribeNotificationParams": {
        "type": "object",
        "properties": {
          "updates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The ticker of the instrument"
                },
                "price": {
                  "type": "number",
                  "format": "double",
                  "description": "The VWAP of the instrument"
                },
                "size": {
                  "type": "number",
                  "format": "double",
                  "description": "Total size"
                },
                "volume": {
                  "type": "number",
                  "format": "double",
                  "description": "Total volume"
                },
                "market_cap": {
                  "type": "number",
                  "format": "double",
                  "description": "Circulating supply of the base token times the price"
                },
                "ts": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Timestamp of VWAP in milliseconds. Indicates last timestamp (exchange provided) of the last trade used for calculation"
                }
              },
              "required": [
                "ticker",
                "price",
                "size",
                "volume",
                "ts"
              ],
              "additionalProperties": false
            },
            "description": "This will contain price updates for one or multiple pairs the session is subscribed to"
          }
        },
        "required": [
          "updates"
        ],
        "additionalProperties": false
      },
      "VwapSubscribeNotification": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "method": {
            "type": "string",
            "const": "vwap"
          },
          "params": {
            "$ref": "#/components/schemas/VwapSubscribeNotificationParams"
          }
        },
        "additionalProperties": false
      },
      "FixedvwapSubscribeNotificationParams": {
        "type": "object",
        "properties": {
          "updates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The ticker of the instrument"
                },
                "price": {
                  "type": "number",
                  "format": "double",
                  "description": "The VWAP of the instrument"
                },
                "size": {
                  "type": "number",
                  "format": "double",
                  "description": "Total size"
                },
                "volume": {
                  "type": "number",
                  "format": "double",
                  "description": "Total volume"
                },
                "market_cap": {
                  "type": "number",
                  "format": "double",
                  "description": "Circulating supply of the base token times the price"
                },
                "ts": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Timestamp of VWAP in milliseconds. Indicates last timestamp (exchange provided) of the last trade used for calculation"
                }
              },
              "required": [
                "ticker",
                "price",
                "size",
                "volume",
                "ts"
              ],
              "additionalProperties": false
            },
            "description": "This will contain price updates for one or multiple pairs the session is subscribed to"
          }
        },
        "required": [
          "updates"
        ],
        "additionalProperties": false
      },
      "FixedvwapSubscribeNotification": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "method": {
            "type": "string",
            "const": "fixedvwap"
          },
          "params": {
            "$ref": "#/components/schemas/FixedvwapSubscribeNotificationParams"
          }
        },
        "additionalProperties": false
      },
      "BidaskSubscribeNotificationParams": {
        "type": "object",
        "properties": {
          "updates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The ticker of the instrument"
                },
                "agg_bid_price": {
                  "type": "string",
                  "description": "The aggregated bid price of the instrument"
                },
                "agg_bid_size": {
                  "type": "string",
                  "description": "The aggregated bid size of the instrument"
                },
                "agg_ask_price": {
                  "type": "string",
                  "description": "The aggregated ask price of the instrument"
                },
                "agg_ask_size": {
                  "type": "string",
                  "description": "The aggregated ask size of the instrument"
                },
                "agg_mid_price": {
                  "type": "string",
                  "description": "The aggregated mid price of the instrument"
                },
                "ts": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The UTC timestamp in microseconds."
                },
                "market_cap": {
                  "type": "number",
                  "format": "double",
                  "description": "Circulating supply of the base token times mid price"
                }
              },
              "required": [
                "ticker",
                "agg_bid_price",
                "agg_bid_size",
                "agg_ask_price",
                "agg_ask_size",
                "agg_mid_price",
                "ts"
              ],
              "additionalProperties": false
            },
            "description": "This will contain price updates for one or multiple pairs the session is subscribed to"
          }
        },
        "required": [
          "updates"
        ],
        "additionalProperties": false
      },
      "BidaskSubscribeNotification": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "method": {
            "type": "string",
            "const": "bidask"
          },
          "params": {
            "$ref": "#/components/schemas/BidaskSubscribeNotificationParams"
          }
        },
        "additionalProperties": false
      },
      "StateSubscribeNotificationParams": {
        "type": "object",
        "properties": {
          "states": {
            "type": "array",
            "items": {},
            "description": "This will contain the current aggregated data of one or multiple pairs the session is subscribed to"
          }
        },
        "required": [
          "states"
        ],
        "additionalProperties": false
      },
      "StateSubscribeNotification": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "method": {
            "type": "string",
            "const": "state"
          },
          "params": {
            "$ref": "#/components/schemas/StateSubscribeNotificationParams"
          }
        },
        "additionalProperties": false
      },
      "TradeSubscribeNotificationParams": {
        "type": "object",
        "properties": {
          "trades": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "timestamp": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The Unix timestamp of the trade in milliseconds."
                },
                "ticker": {
                  "type": "string",
                  "description": "The ticker of the instrument that was traded."
                },
                "price": {
                  "type": "string",
                  "description": "The price the instrument was traded at, denoted in the Quote currency."
                },
                "size": {
                  "type": "string",
                  "description": "The size of the trade, denoted in the Base currency."
                },
                "exchange": {
                  "type": "string",
                  "description": "The name of the exchange the trade occurred at."
                },
                "base": {
                  "type": "string",
                  "description": "The ticker of the base currency."
                },
                "quote": {
                  "type": "string",
                  "description": "The ticker of the quote currency."
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "A list of tags associated with the trade."
                }
              },
              "required": [
                "timestamp",
                "ticker",
                "price",
                "size",
                "exchange",
                "base",
                "quote"
              ],
              "additionalProperties": false
            },
            "description": "A batched list of trade events"
          }
        },
        "required": [
          "trades"
        ],
        "additionalProperties": false
      },
      "TradeSubscribeNotification": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method",
          "params"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "method": {
            "type": "string",
            "const": "trade"
          },
          "params": {
            "$ref": "#/components/schemas/TradeSubscribeNotificationParams"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "user",
        "description": "Authenticate by sending authentication_logon with an API key."
      }
    }
  }
}
