{
  "sections": [
    {
      "title": "BLOCKSIZE CONNECT",
      "descriptionText": "The API endpoints provide access to reliable BLOCKSIZE CONNECT market data such as:\n\n- Real-Time VWAP\n- 24-Hour VWAP\n- 30-Minute VWAP\n- Real-Time Bid/Ask\n\nThe access is dependent on the user's actual subscriptions. Before consuming data, users have to authenticate with an API key.\n\n## Customer Portal\nAs a user of BLOCKSIZE CONNECT, you can manage your subscription details by logging into the customer portal:\n\n[matrix.blocksize.capital](https://matrix.blocksize.capital/auth/open/sign-up?license_key=akM8ds1eFs)\n\nHere you can also add or change your payment details such as credit cards.\n\t\n## Limits\nUsage of the API is subject to limits:\n\n- 100 concurrent connections per IP\n\n",
      "endpoints": [
        {
          "title": "",
          "descriptionText": "### Endpoints\n#### Production\nWebsockets: `wss://data.blocksize.capital/marketdata/v1/ws` \nHTTP: `https://data.blocksize.capital/marketdata/v1/api` \n\nTo use the HTTP endpoint, ensure to add your API Key as an 'x-api-key' header in the request. This is crucial for authentication and accessing the API services.\n\n",
          "authenticationRequired": false,
          "httpAvailable": false,
          "parameters": {
            "requests": [],
            "responses": [],
            "notifications": []
          },
          "examples": [],
          "deprecated": false,
          "deprecatedText": ""
        }
      ]
    },
    {
      "title": "Authentication",
      "descriptionText": "The Authentication service allows to authenticate a session.",
      "endpoints": [
        {
          "title": "authentication_logon",
          "descriptionText": "This method authenticates the current session.\n\nThis is a prerequisite for many of the other methods.",
          "authenticationRequired": false,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "api_key",
                "isRequired": true,
                "descriptionText": "Your generated API key",
                "type": {
                  "string": {
                    "maxLength": "0"
                  }
                }
              },
              {
                "fieldName": "token",
                "isRequired": true,
                "descriptionText": "An optional API Token",
                "type": {
                  "string": {
                    "maxLength": "0"
                  }
                }
              }
            ],
            "responses": [
              {
                "fieldName": "user_id",
                "isRequired": true,
                "descriptionText": "If authentication was successful, this will contain the user ID of the logged in user.",
                "type": {
                  "string": {
                    "maxLength": "0"
                  }
                }
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "{\"api_key\":\"\",\"token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"}",
              "response": "{\"user_id\":\"OjSYjQdxBC\"}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "authentication_logoff",
          "descriptionText": "This method logs the user out of the current session.\n\t\t\t\t\nLogging off won't clear the current subscriptions, they will just be paused. Logging in again will resume all subscriptions.'.",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [],
            "responses": [
              {
                "fieldName": "user_id",
                "isRequired": true,
                "descriptionText": "If the logout was successful this field will be empty.",
                "type": {
                  "string": {
                    "maxLength": "0"
                  }
                }
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "null",
              "response": "{\"user_id\":\"\"}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        }
      ]
    },
    {
      "title": "Real-Time VWAP",
      "descriptionText": "",
      "endpoints": [
        {
          "title": "vwap_subscribe",
          "descriptionText": "\nThis method subscribes to one or multiple instruments.\n\nThe server will respond to a subscription with a response containing the latest known prices for all successful pairs.\n\nAfter a successful subscription, notification messages will be sent by the server to the client with the method `vwap`\n\nUpdates will be sent in 250 millisecond batches.\n\nUpdates will immediately be sent when the price of an asset has changed and re-sent if the price has remained unchanged for 60 consecutive seconds.",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "tickers",
                "isRequired": true,
                "descriptionText": "A list of tickers",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              }
            ],
            "responses": [
              {
                "fieldName": "snapshot",
                "isRequired": true,
                "descriptionText": "This will contain a list of the latest prices for all the requested tickers",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "ticker",
                            "isRequired": true,
                            "descriptionText": "The ticker of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "price",
                            "isRequired": true,
                            "descriptionText": "The VWAP of the instrument",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "size",
                            "isRequired": true,
                            "descriptionText": "Total size",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "volume",
                            "isRequired": true,
                            "descriptionText": "Total volume",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "market_cap",
                            "isRequired": false,
                            "descriptionText": "Circulating supply of the base token times the price",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "ts",
                            "isRequired": true,
                            "descriptionText": "Timestamp of VWAP in milliseconds. Indicates last timestamp (exchange provided) of the last trade used for calculation",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ],
            "notifications": [
              {
                "fieldName": "updates",
                "isRequired": true,
                "descriptionText": "This will contain price updates for one or multiple pairs the session is subscribed to",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "ticker",
                            "isRequired": true,
                            "descriptionText": "The ticker of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "price",
                            "isRequired": true,
                            "descriptionText": "The VWAP of the instrument",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "size",
                            "isRequired": true,
                            "descriptionText": "Total size",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "volume",
                            "isRequired": true,
                            "descriptionText": "Total volume",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "market_cap",
                            "isRequired": false,
                            "descriptionText": "Circulating supply of the base token times the price",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "ts",
                            "isRequired": true,
                            "descriptionText": "Timestamp of VWAP in milliseconds. Indicates last timestamp (exchange provided) of the last trade used for calculation",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ]
          },
          "examples": [
            {
              "request": "{\"tickers\":[\"BTCEUR\",\"ETHEUR\"]}",
              "response": "{\"snapshot\":[{\"ticker\":\"ETHEUR\",\"price\":2398.6491068570076,\"size\":1238.9841055992033,\"volume\":32265.21,\"ts\":1662492937000},{\"ticker\":\"BTCEUR\",\"price\":34745.13362675458,\"size\":0.13582984000000048,\"volume\":4719.42594130071,\"ts\":1662492937000}]}",
              "notifications": [
                {
                  "method": "vwap",
                  "params": "{\"updates\":[{\"ticker\":\"ETHEUR\",\"price\":2400.209999999564,\"size\":0.06804130000001375,\"volume\":163.31340867300332,\"ts\":1662492940000}]}"
                },
                {
                  "method": "vwap",
                  "params": "{\"updates\":[{\"ticker\":\"BTCEUR\",\"price\":34748.12924828815,\"size\":0.006374660000000493,\"volume\":221.50750959390967,\"ts\":1662492940000}]}"
                }
              ]
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "vwap_unsubscribe",
          "descriptionText": "\nThis method unsubscribes from one or multiple instruments.\n\t\t\t\t\nAfter a successful unsubscription, no more notifications will be sent for the instruments.",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "tickers",
                "isRequired": true,
                "descriptionText": "A list of tickers",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              }
            ],
            "responses": [],
            "notifications": []
          },
          "examples": [
            {
              "request": "{\"tickers\":[\"BTCEUR\"]}",
              "response": "{}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "vwap_instruments",
          "descriptionText": "This method returns all available pairs.",
          "authenticationRequired": true,
          "httpAvailable": true,
          "parameters": {
            "requests": [],
            "responses": [
              {
                "fieldName": "instruments",
                "isRequired": true,
                "descriptionText": "A list of all pairs that can be subscribed to",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "ticker",
                            "isRequired": true,
                            "descriptionText": "The instrument's ticker",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "base_currency",
                            "isRequired": true,
                            "descriptionText": "The instrument's base currency",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "quote_currency",
                            "isRequired": true,
                            "descriptionText": "The instrument's quote currency",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "exchanges",
                            "isRequired": true,
                            "descriptionText": "A list of exchanges which are currently used to calculate the price",
                            "type": {
                              "array": {
                                "item": {
                                  "string": {
                                    "maxLength": "0"
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "null",
              "response": "{\"instruments\":[{\"ticker\":\"BTCEUR\",\"base_currency\":\"BTC\",\"quote_currency\":\"EUR\",\"exchanges\":[\"BINANCE\",\"COINBASE\",\"KRAKEN\",\"MEXC\",\"OKCOIN\",\"POLONIEX\"]},{\"ticker\":\"ETHEUR\",\"base_currency\":\"ETH\",\"quote_currency\":\"EUR\",\"exchanges\":[\"BINANCE\",\"COINBASE\",\"KRAKEN\"]}]}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "vwap_latest",
          "descriptionText": "This method returns the latest known VWAP for the given ticker.",
          "authenticationRequired": true,
          "httpAvailable": true,
          "parameters": {
            "requests": [
              {
                "fieldName": "ticker",
                "isRequired": true,
                "descriptionText": "The ticker of the instrument",
                "type": {
                  "string": {
                    "maxLength": "0"
                  }
                }
              }
            ],
            "responses": [
              {
                "fieldName": "vwap",
                "isRequired": true,
                "descriptionText": "The latest known VWAP for the given ticker",
                "type": {
                  "object": {
                    "properties": [
                      {
                        "fieldName": "ticker",
                        "isRequired": true,
                        "descriptionText": "The ticker of the instrument",
                        "type": {
                          "string": {
                            "maxLength": "0"
                          }
                        }
                      },
                      {
                        "fieldName": "price",
                        "isRequired": true,
                        "descriptionText": "The VWAP of the instrument",
                        "type": {
                          "float": {}
                        }
                      },
                      {
                        "fieldName": "size",
                        "isRequired": true,
                        "descriptionText": "Total size",
                        "type": {
                          "float": {}
                        }
                      },
                      {
                        "fieldName": "volume",
                        "isRequired": true,
                        "descriptionText": "Total volume",
                        "type": {
                          "float": {}
                        }
                      },
                      {
                        "fieldName": "market_cap",
                        "isRequired": false,
                        "descriptionText": "Circulating supply of the base token times the price",
                        "type": {
                          "float": {}
                        }
                      },
                      {
                        "fieldName": "ts",
                        "isRequired": true,
                        "descriptionText": "Timestamp of VWAP in milliseconds. Indicates last timestamp (exchange provided) of the last trade used for calculation",
                        "type": {
                          "int": {
                            "timestamp": false
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "{\"ticker\":\"BTCEUR\"}",
              "response": "{\"vwap\":{\"ticker\":\"BTCEUR\",\"price\":34748.12924828815,\"size\":0.006374660000000493,\"volume\":221.50750959390967,\"ts\":1662492940000}}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        }
      ]
    },
    {
      "title": "24-Hour VWAP",
      "descriptionText": "",
      "endpoints": [
        {
          "title": "fixedvwap_subscribe",
          "descriptionText": "\nThis method subscribes for fixed window VWAP (currently only 24h) to one or multiple instruments.\n\t\t\t\t\nThe server will respond to a subscription with a response containing the latest known prices for all successful pairs.\n\t\t\t\t\nAfter a successful subscription, notification messages will be sent by the server to the client with the method `fixedvwap`Updates will be sent every midnight UTC.",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "tickers",
                "isRequired": true,
                "descriptionText": "A list of tickers",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              }
            ],
            "responses": [
              {
                "fieldName": "snapshot",
                "isRequired": true,
                "descriptionText": "This will contain a list of the latest prices for all the requested tickers",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "ticker",
                            "isRequired": true,
                            "descriptionText": "The ticker of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "price",
                            "isRequired": true,
                            "descriptionText": "The VWAP of the instrument",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "size",
                            "isRequired": true,
                            "descriptionText": "Total size",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "volume",
                            "isRequired": true,
                            "descriptionText": "Total volume",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "market_cap",
                            "isRequired": false,
                            "descriptionText": "Circulating supply of the base token times the price",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "ts",
                            "isRequired": true,
                            "descriptionText": "Timestamp of VWAP in milliseconds. Indicates last timestamp (exchange provided) of the last trade used for calculation",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ],
            "notifications": [
              {
                "fieldName": "updates",
                "isRequired": true,
                "descriptionText": "This will contain price updates for one or multiple pairs the session is subscribed to",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "ticker",
                            "isRequired": true,
                            "descriptionText": "The ticker of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "price",
                            "isRequired": true,
                            "descriptionText": "The VWAP of the instrument",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "size",
                            "isRequired": true,
                            "descriptionText": "Total size",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "volume",
                            "isRequired": true,
                            "descriptionText": "Total volume",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "market_cap",
                            "isRequired": false,
                            "descriptionText": "Circulating supply of the base token times the price",
                            "type": {
                              "float": {}
                            }
                          },
                          {
                            "fieldName": "ts",
                            "isRequired": true,
                            "descriptionText": "Timestamp of VWAP in milliseconds. Indicates last timestamp (exchange provided) of the last trade used for calculation",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ]
          },
          "examples": [
            {
              "request": "{\"tickers\":[\"BTCEUR\",\"ETHEUR\"]}",
              "response": "{\"snapshot\":[{\"ticker\":\"ETHEUR\",\"price\":2398.6491068570076,\"size\":1238.9841055992033,\"volume\":32265.21,\"ts\":1662336000000},{\"ticker\":\"BTCEUR\",\"price\":34745.13362675458,\"size\":0.13582984000000048,\"volume\":4719.42594130071,\"ts\":1662336000000}]}",
              "notifications": [
                {
                  "method": "fixedvwap",
                  "params": "{\"updates\":[{\"ticker\":\"BTCEUR\",\"price\":34748.12924828815,\"size\":0.006374660000000493,\"volume\":221.50750959390967,\"ts\":1662422400000}]}"
                },
                {
                  "method": "fixedvwap",
                  "params": "{\"updates\":[{\"ticker\":\"ETHEUR\",\"price\":2400.209999999564,\"size\":0.06804130000001375,\"volume\":163.31340867300332,\"ts\":1662422400000}]}"
                }
              ]
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "fixedvwap_unsubscribe",
          "descriptionText": "\nThis method unsubscribes from one or multiple instruments.\n\t\t\t\t\nAfter a successful unsubscription, no more notifications will be sent for the instruments.",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "tickers",
                "isRequired": true,
                "descriptionText": "A list of tickers",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              }
            ],
            "responses": [],
            "notifications": []
          },
          "examples": [
            {
              "request": "{\"tickers\":[\"BTCEUR\"]}",
              "response": "{}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        }
      ]
    },
    {
      "title": "30-Minute VWAP",
      "descriptionText": "The 30-Minute VWAP service allows to get the closing price in a given timeframe for all available pairs",
      "endpoints": [
        {
          "title": "closingprice_list",
          "descriptionText": "This method returns the volume weighted closing price (the last price before a particular point in time)\n\t\t\t\t\t\t\t\tfor all available exchanges ",
          "authenticationRequired": true,
          "httpAvailable": true,
          "parameters": {
            "requests": [
              {
                "fieldName": "ts",
                "isRequired": true,
                "descriptionText": "The Unix timestamp in milliseconds.",
                "type": {
                  "int": {
                    "timestamp": false
                  }
                }
              },
              {
                "fieldName": "quote",
                "isRequired": true,
                "descriptionText": "An optional quote currency to report prices in. If EUR or USD are specified, synthetic prices will be calculated.",
                "type": {
                  "string": {
                    "maxLength": "0"
                  }
                }
              }
            ],
            "responses": [
              {
                "fieldName": "conversion_rates",
                "isRequired": false,
                "descriptionText": "The conversion rates applied to calculate synthetic prices.",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "from",
                            "isRequired": true,
                            "descriptionText": "The currency this conversion rate is being applied to",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "to",
                            "isRequired": true,
                            "descriptionText": "The currency this conversion rate will result in",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "rate",
                            "isRequired": true,
                            "descriptionText": "The conversion rate",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "ts",
                            "isRequired": true,
                            "descriptionText": "The Unix timestamp in milliseconds.",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          },
                          {
                            "fieldName": "datetime",
                            "isRequired": true,
                            "descriptionText": "The timestamp in RFC3339 format.",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              },
              {
                "fieldName": "prices",
                "isRequired": true,
                "descriptionText": "A list of closing prices",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "base",
                            "isRequired": true,
                            "descriptionText": "The base currency",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "quote",
                            "isRequired": true,
                            "descriptionText": "The quote currency",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "price",
                            "isRequired": true,
                            "descriptionText": "The closing price",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "ts",
                            "isRequired": true,
                            "descriptionText": "The Unix timestamp in milliseconds.",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          },
                          {
                            "fieldName": "datetime",
                            "isRequired": true,
                            "descriptionText": "The timestamp in RFC3339 format.",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "original_quote",
                            "isRequired": false,
                            "descriptionText": "For those pairs that were calculated using conversion",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "{\"ts\":1662336000000,\"quote\":\"EUR\"}",
              "response": "{\"conversion_rates\":[{\"from\":\"USD\",\"to\":\"EUR\",\"rate\":\"0.94132\",\"ts\":1662336000000,\"datetime\":\"2022-09-05T00:00:00Z\"}],\"prices\":[{\"base\":\"BTC\",\"quote\":\"EUR\",\"price\":\"19509.844934\",\"ts\":1662336000000,\"datetime\":\"2022-09-05T00:00:00Z\"},{\"base\":\"ETH\",\"quote\":\"EUR\",\"price\":\"1499.184833\",\"ts\":1662336000000,\"datetime\":\"2022-09-05T00:00:00Z\"},{\"base\":\"STETH\",\"quote\":\"EUR\",\"price\":\"1492.812422\",\"ts\":1662336000000,\"datetime\":\"2022-09-05T00:00:00Z\",\"original_quote\":\"USD\"}]}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "closingprice_trades",
          "descriptionText": "This method returns the trades used for calculation of closing price",
          "authenticationRequired": true,
          "httpAvailable": true,
          "parameters": {
            "requests": [
              {
                "fieldName": "base",
                "isRequired": true,
                "descriptionText": "The base currency",
                "type": {
                  "string": {
                    "maxLength": "0"
                  }
                }
              },
              {
                "fieldName": "quote",
                "isRequired": true,
                "descriptionText": "The quote currency",
                "type": {
                  "string": {
                    "maxLength": "0"
                  }
                }
              },
              {
                "fieldName": "ts",
                "isRequired": true,
                "descriptionText": "The UTC timestamp in milliseconds.",
                "type": {
                  "int": {
                    "timestamp": false
                  }
                }
              }
            ],
            "responses": [
              {
                "fieldName": "prices",
                "isRequired": true,
                "descriptionText": "A list of trades",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "base",
                            "isRequired": true,
                            "descriptionText": "The base currency",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "quote",
                            "isRequired": true,
                            "descriptionText": "The quote currency",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "exchange",
                            "isRequired": true,
                            "descriptionText": "The trade exchange",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "price",
                            "isRequired": true,
                            "descriptionText": "The trade price",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "size",
                            "isRequired": true,
                            "descriptionText": "Size of the trade in base currency",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "ts",
                            "isRequired": true,
                            "descriptionText": "The UTC timestamp in milliseconds.",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "{\"base\":\"BTC\",\"quote\":\"EUR\",\"ts\":1662336000000}",
              "response": "{\"prices\":[{\"base\":\"BTC\",\"quote\":\"EUR\",\"exchange\":\"\",\"price\":\"19509.844934\",\"size\":\"1.2\",\"ts\":0}]}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        }
      ]
    },
    {
      "title": "Real-Time Bid/Ask",
      "descriptionText": "The Bid/Ask service allows to subscribe to aggregated bid and ask prices for one or multiple instruments.",
      "endpoints": [
        {
          "title": "bidask_subscribe",
          "descriptionText": "\nThis method subscribes the session to one or multiple Bid/Ask prices.\n\t\t\t\t\nThe server will respond with the latest known prices for all successful pairs.\n\t\t\t\t\nAfter a successful subscription, notification messages will be sent by the server to the client with the method `bidask`\n\t\t\t\t\nUpdates will be sent in 250 millisecond batches.\n\t\t\t\t\nUpdates will immediately be sent when the price of an asset has changed and re-sent if the price has remained unchanged for 60 consecutive seconds.\n\t\t\t\t",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "tickers",
                "isRequired": true,
                "descriptionText": "A list of tickers",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              }
            ],
            "responses": [
              {
                "fieldName": "snapshot",
                "isRequired": true,
                "descriptionText": "This will contain price updates for all the requested tickers",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "ticker",
                            "isRequired": true,
                            "descriptionText": "The ticker of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_bid_price",
                            "isRequired": true,
                            "descriptionText": "The aggregated bid price of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_bid_size",
                            "isRequired": true,
                            "descriptionText": "The aggregated bid size of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_ask_price",
                            "isRequired": true,
                            "descriptionText": "The aggregated ask price of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_ask_size",
                            "isRequired": true,
                            "descriptionText": "The aggregated ask size of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_mid_price",
                            "isRequired": true,
                            "descriptionText": "The aggregated mid price of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "ts",
                            "isRequired": true,
                            "descriptionText": "The UTC timestamp in microseconds.",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          },
                          {
                            "fieldName": "market_cap",
                            "isRequired": false,
                            "descriptionText": "Circulating supply of the base token times mid price",
                            "type": {
                              "float": {}
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ],
            "notifications": [
              {
                "fieldName": "updates",
                "isRequired": true,
                "descriptionText": "This will contain price updates for one or multiple pairs the session is subscribed to",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "ticker",
                            "isRequired": true,
                            "descriptionText": "The ticker of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_bid_price",
                            "isRequired": true,
                            "descriptionText": "The aggregated bid price of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_bid_size",
                            "isRequired": true,
                            "descriptionText": "The aggregated bid size of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_ask_price",
                            "isRequired": true,
                            "descriptionText": "The aggregated ask price of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_ask_size",
                            "isRequired": true,
                            "descriptionText": "The aggregated ask size of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_mid_price",
                            "isRequired": true,
                            "descriptionText": "The aggregated mid price of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "ts",
                            "isRequired": true,
                            "descriptionText": "The UTC timestamp in microseconds.",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          },
                          {
                            "fieldName": "market_cap",
                            "isRequired": false,
                            "descriptionText": "Circulating supply of the base token times mid price",
                            "type": {
                              "float": {}
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ]
          },
          "examples": [
            {
              "request": "{\"tickers\":[\"BTCEUR\",\"ETHEUR\"]}",
              "response": "{\"snapshot\":[{\"ticker\":\"BTCEUR\",\"agg_bid_price\":\"34742.891246719\",\"agg_bid_size\":\"0.72134\",\"agg_ask_price\":\"34747.901471201\",\"agg_ask_size\":\"1.69092\",\"agg_mid_price\":\"34745.39635896\",\"ts\":1690781315257},{\"ticker\":\"ETHEUR\",\"agg_bid_price\":\"2397.5671024014\",\"agg_bid_size\":\"4.201\",\"agg_ask_price\":\"2400.851271406\",\"agg_ask_size\":\"0.91424\",\"agg_mid_price\":\"2399.2091869037\",\"ts\":1690781333106}]}",
              "notifications": [
                {
                  "method": "bidask",
                  "params": "{\"updates\":[{\"ticker\":\"ETHEUR\",\"agg_bid_price\":\"2398.510512857\",\"agg_bid_size\":\"3.954102168\",\"agg_ask_price\":\"2401.51241\",\"agg_ask_size\":\"0.91424\",\"agg_mid_price\":\"2400.0114614285\",\"ts\":1690781333106}]}"
                }
              ]
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "bidask_unsubscribe",
          "descriptionText": "\nThis method unsubscribes from one or multiple instruments.\n\t\t\t\t\nAfter a successful unsubscription, no more notifications will be sent for the instruments.",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "tickers",
                "isRequired": true,
                "descriptionText": "A list of tickers",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              }
            ],
            "responses": [],
            "notifications": []
          },
          "examples": [
            {
              "request": "{\"tickers\":[\"BTCEUR\"]}",
              "response": "{}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "bidask_instruments",
          "descriptionText": "This method returns all available pairs.",
          "authenticationRequired": true,
          "httpAvailable": true,
          "parameters": {
            "requests": [],
            "responses": [
              {
                "fieldName": "instruments",
                "isRequired": true,
                "descriptionText": "A list of all pairs that can be subscribed to",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "ticker",
                            "isRequired": true,
                            "descriptionText": "The instrument's ticker",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "base_currency",
                            "isRequired": true,
                            "descriptionText": "The instrument's base currency",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "quote_currency",
                            "isRequired": true,
                            "descriptionText": "The instrument's quote currency",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "exchanges",
                            "isRequired": true,
                            "descriptionText": "A list of exchanges which are currently used to calculate the price",
                            "type": {
                              "array": {
                                "item": {
                                  "string": {
                                    "maxLength": "0"
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "null",
              "response": "{\"instruments\":[{\"ticker\":\"BTCEUR\",\"base_currency\":\"BTC\",\"quote_currency\":\"EUR\",\"exchanges\":[\"BINANCE\",\"COINBASE\",\"KRAKEN\",\"MEXC\",\"OKCOIN\",\"POLONIEX\"]},{\"ticker\":\"ETHEUR\",\"base_currency\":\"ETH\",\"quote_currency\":\"EUR\",\"exchanges\":[\"BINANCE\",\"COINBASE\",\"KRAKEN\"]}]}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "bidask_getSnapshot",
          "descriptionText": "Returns a snapshot of the latest bid/ask for all instruments over the last 24h. If no data exists yet, returns an empty snapshot.",
          "authenticationRequired": true,
          "httpAvailable": true,
          "parameters": {
            "requests": [],
            "responses": [
              {
                "fieldName": "snapshot",
                "isRequired": true,
                "descriptionText": "This will contain price updates for all the requested tickers",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "ticker",
                            "isRequired": true,
                            "descriptionText": "The ticker of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_bid_price",
                            "isRequired": true,
                            "descriptionText": "The aggregated bid price of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_bid_size",
                            "isRequired": true,
                            "descriptionText": "The aggregated bid size of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_ask_price",
                            "isRequired": true,
                            "descriptionText": "The aggregated ask price of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_ask_size",
                            "isRequired": true,
                            "descriptionText": "The aggregated ask size of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "agg_mid_price",
                            "isRequired": true,
                            "descriptionText": "The aggregated mid price of the instrument",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "ts",
                            "isRequired": true,
                            "descriptionText": "The UTC timestamp in microseconds.",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          },
                          {
                            "fieldName": "market_cap",
                            "isRequired": false,
                            "descriptionText": "Circulating supply of the base token times mid price",
                            "type": {
                              "float": {}
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "null",
              "response": "{\"snapshot\":[{\"ticker\":\"BTCEUR\",\"agg_bid_price\":\"34742.89\",\"agg_bid_size\":\"0.72\",\"agg_ask_price\":\"34747.90\",\"agg_ask_size\":\"1.69\",\"agg_mid_price\":\"34745.40\",\"ts\":1690781315257000}]}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        }
      ]
    },
    {
      "title": "Events",
      "descriptionText": "",
      "endpoints": [
        {
          "title": "trade_subscribe",
          "descriptionText": "\nThis method subscribes to the trades one or multiple instruments.\n\t\t\t\t\nThe server will always respond with an empty response.\n\t\t\t\t\nAfter a successful subscription, notification messages will be sent by the server to the client with the method `trade`\n\t\t\t\t\nUpdate notifications will be send in 250 millisecond batches. Updates will only be sent if a trade occurred.\n\t\t\t\t\nTo subscribe to all trades, use a special wildcard ticker `*`:\n\t\t\t\t\n`\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 0,\n  \"method\": \"trade_subscribe\",\n  \"params\": {\n    \"tickers\": [\n      \"*\"\n    ]\n  }\n}\t\t\t\t\n`",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "tickers",
                "isRequired": true,
                "descriptionText": "A list of tickers",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              },
              {
                "fieldName": "filters",
                "isRequired": false,
                "descriptionText": "A list of exchanges or tags to filter the trades by",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              }
            ],
            "responses": [],
            "notifications": [
              {
                "fieldName": "trades",
                "isRequired": true,
                "descriptionText": "A batched list of trade events",
                "type": {
                  "array": {
                    "item": {
                      "object": {
                        "properties": [
                          {
                            "fieldName": "timestamp",
                            "isRequired": true,
                            "descriptionText": "The Unix timestamp of the trade in milliseconds.",
                            "type": {
                              "int": {
                                "timestamp": false
                              }
                            }
                          },
                          {
                            "fieldName": "ticker",
                            "isRequired": true,
                            "descriptionText": "The ticker of the instrument that was traded.",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "price",
                            "isRequired": true,
                            "descriptionText": "The price the instrument was traded at, denoted in the Quote currency.",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "size",
                            "isRequired": true,
                            "descriptionText": "The size of the trade, denoted in the Base currency.",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "exchange",
                            "isRequired": true,
                            "descriptionText": "The name of the exchange the trade occurred at.",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "base",
                            "isRequired": true,
                            "descriptionText": "The ticker of the base currency.",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "quote",
                            "isRequired": true,
                            "descriptionText": "The ticker of the quote currency.",
                            "type": {
                              "string": {
                                "maxLength": "0"
                              }
                            }
                          },
                          {
                            "fieldName": "tags",
                            "isRequired": false,
                            "descriptionText": "A list of tags associated with the trade.",
                            "type": {
                              "array": {
                                "item": {
                                  "string": {
                                    "maxLength": "0"
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            ]
          },
          "examples": [
            {
              "request": "{\"tickers\":[\"WETHUSDT\",\"WETHUSDC\"],\"filters\":[\"Binance\"]}",
              "response": "{}",
              "notifications": [
                {
                  "method": "trade",
                  "params": "{\"trades\":[{\"timestamp\":1653413274,\"ticker\":\"WETHUSDC\",\"price\":\"1936.560945696583\",\"size\":\"34.84534949284921\",\"exchange\":\"UNISWAPV3_ETHEREUM\",\"base\":\"WETH\",\"quote\":\"USDC\"},{\"timestamp\":1653413274,\"ticker\":\"WETHUSDC\",\"price\":\"1938.399952607055\",\"size\":\"13.92915344931057\",\"exchange\":\"UNISWAPV3_ETHEREUM\",\"base\":\"WETH\",\"quote\":\"USDC\"}]}"
                },
                {
                  "method": "trade",
                  "params": "{\"trades\":[{\"timestamp\":1653413275,\"ticker\":\"WETHUSDC\",\"price\":\"1941.097139713692\",\"size\":\"1.593544492294829\",\"exchange\":\"UNISWAPV2_ETHEREUM\",\"base\":\"WETH\",\"quote\":\"USDC\"},{\"timestamp\":1653413275,\"ticker\":\"WETHUSDC\",\"price\":\"1941.097139713692\",\"size\":\"1.593544492294829\",\"exchange\":\"UNISWAPV2_ETHEREUM\",\"base\":\"WETH\",\"quote\":\"USDC\"},{\"timestamp\":1653413275,\"ticker\":\"WETHUSDT\",\"price\":\"1947.47485439373\",\"size\":\"0.08029212631280865\",\"exchange\":\"UNISWAPV2_ETHEREUM\",\"base\":\"WETH\",\"quote\":\"USDT\"},{\"timestamp\":1653413275,\"ticker\":\"WETHUSDT\",\"price\":\"1947.47485439373\",\"size\":\"0.08029212631280865\",\"exchange\":\"UNISWAPV2_ETHEREUM\",\"base\":\"WETH\",\"quote\":\"USDT\"}]}"
                }
              ]
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "trade_unsubscribe",
          "descriptionText": "\nThis method unsubscribes from one or multiple instruments.\n\t\t\t\t\nAfter a successful unsubscription, no more notifications will be sent for the instruments.\n\t\t\t\t\nIf subscribed using the wildcard character `*`, the unsubscription has to be done with the same.",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "tickers",
                "isRequired": true,
                "descriptionText": "A list of tickers",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              }
            ],
            "responses": [],
            "notifications": []
          },
          "examples": [
            {
              "request": "{\"tickers\":[\"BTCEUR\"]}",
              "response": "{}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        }
      ]
    },
    {
      "title": "State Price Service",
      "descriptionText": "The State service allows to subscribe to the state of the dex for one or multiple pairs.",
      "endpoints": [
        {
          "title": "state_subscribe",
          "descriptionText": "\nThis method subscribes to one or multiple instruments.\n\nAfter a successful subscription, notification messages will be sent by the server to the client with the method `state`\n\nThe server will respond to a subscription with a response containing the latest known state for all successful pairs.\n\nUpdates will immediately be sent when the state of an asset has changed and re-sent if the state has remained unchanged for 60 consecutive seconds.\n\t\t\t\t",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "tickers",
                "isRequired": true,
                "descriptionText": "A list of tickers",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              }
            ],
            "responses": [
              {
                "fieldName": "states",
                "isRequired": true,
                "descriptionText": "This will contain the current aggregated data of one or multiple pairs the session is subscribed to",
                "type": {
                  "array": {}
                }
              }
            ],
            "notifications": [
              {
                "fieldName": "states",
                "isRequired": true,
                "descriptionText": "This will contain the current aggregated data of one or multiple pairs the session is subscribed to",
                "type": {
                  "array": {}
                }
              }
            ]
          },
          "examples": [
            {
              "request": "{\"tickers\":[\"BTCUSDT\"]}",
              "response": "{\"snapshot\":[{\"timestamp\":1774952248,\"base_symbol\":\"BTC\",\"quote_symbol\":\"USDT\",\"aggregated_plus_1_percent_usd_market_depth\":\"100\",\"aggregated_minus_1_percent_usd_market_depth\":\"100\",\"aggregated_7d_usd_trading_volume\":\"100\"}]}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "state_unsubscribe",
          "descriptionText": "\nThis method unsubscribes from one or multiple instruments.\n\t\t\t\t\nAfter a successful unsubscription, no more notifications will be sent for the instruments.",
          "authenticationRequired": true,
          "httpAvailable": false,
          "parameters": {
            "requests": [
              {
                "fieldName": "tickers",
                "isRequired": true,
                "descriptionText": "A list of tickers",
                "type": {
                  "array": {
                    "item": {
                      "string": {
                        "maxLength": "0"
                      }
                    }
                  }
                }
              }
            ],
            "responses": [],
            "notifications": []
          },
          "examples": [
            {
              "request": "{\"tickers\":[\"BTCEUR\"]}",
              "response": "{}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "state_pool",
          "descriptionText": "This method returns the state price of a given pool.",
          "authenticationRequired": true,
          "httpAvailable": true,
          "parameters": {
            "requests": [],
            "responses": [
              {
                "fieldName": "state",
                "isRequired": true,
                "descriptionText": "The requested state of the pool"
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "null",
              "response": "{\"state\":{\"timestamp\":1774952248,\"base_symbol\":\"alETH\",\"quote_symbol\":\"USD\",\"aggregated_plus_1_percent_usd_market_depth\":\"100\",\"aggregated_minus_1_percent_usd_market_depth\":\"100\",\"aggregated_7d_usd_trading_volume\":\"100\"}}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        },
        {
          "title": "state_instruments",
          "descriptionText": "This method returns the supported instruments.",
          "authenticationRequired": true,
          "httpAvailable": true,
          "parameters": {
            "requests": [],
            "responses": [
              {
                "fieldName": "instruments",
                "isRequired": false,
                "descriptionText": "",
                "type": {
                  "array": {}
                }
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "null",
              "response": "{\"instruments\":[{\"symbol\":\"ALETHETH\",\"pools\":[{\"address\":\"0x123\",\"network\":\"ethereum\"}]}]}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        }
      ]
    },
    {
      "title": "Time",
      "descriptionText": "",
      "endpoints": [
        {
          "title": "time_now",
          "descriptionText": "This method can be used to get the current time of the server or to test if the connection is still alive.",
          "authenticationRequired": true,
          "httpAvailable": true,
          "parameters": {
            "requests": [],
            "responses": [
              {
                "fieldName": "timestamp",
                "isRequired": false,
                "descriptionText": "The server time in seconds (Unix).",
                "type": {
                  "int": {
                    "timestamp": false
                  }
                }
              }
            ],
            "notifications": []
          },
          "examples": [
            {
              "request": "null",
              "response": "{\"timestamp\":1644195661}",
              "notifications": []
            }
          ],
          "deprecated": false,
          "deprecatedText": ""
        }
      ]
    }
  ],
  "errors": [
    {
      "code": "-32600",
      "message": "invalid request",
      "descriptionText": "The request made was invalid. Check data for more details."
    },
    {
      "code": "-32601",
      "message": "method not found",
      "descriptionText": "The requested method or service could not be found."
    },
    {
      "code": "-32602",
      "message": "invalid params",
      "descriptionText": "The requested method expects a different parameter format."
    },
    {
      "code": "-32603",
      "message": "internal error",
      "descriptionText": "An internal error occurred. Check data for more details."
    },
    {
      "code": "-32700",
      "message": "parse error",
      "descriptionText": "An invalid JSON message was received."
    },
    {
      "code": "4000",
      "message": "unauthenticated",
      "descriptionText": "A method that requires authentication was called from an unauthenticated session."
    },
    {
      "code": "4001",
      "message": "invalid API key",
      "descriptionText": "The API key that was tried to authenticate with is invalid."
    },
    {
      "code": "4002",
      "message": "invalid API token",
      "descriptionText": "The API token that was tried to authenticate with is invalid."
    },
    {
      "code": "4003",
      "message": "payment required",
      "descriptionText": "An active subscription is required before using the requested method."
    }
  ],
  "jsonRpc": {
    "default": {
      "title": "JSON-RPC",
      "descriptionText": "JSON-RPC is a light-weight remote procedure call (RPC) protocol. This API implements the JSON-RPC specification over Websockets and HTTP. All messages that are exchanged between client and server are in JSON format.",
      "endpoints": [
        {
          "parameters": {
            "requestsListDescription": "Every JSON-RPC request must be a JSON object with the following fields:",
            "requestsList": [
              {
                "fieldName": "jsonrpc",
                "descriptionText": "Must be set to 2.0.",
                "type": "string"
              },
              {
                "fieldName": "method",
                "descriptionText": "Must be a valid method name as highlighted by this documentation.",
                "type": "string"
              },
              {
                "fieldName": "id",
                "descriptionText": "Can be any identifier set by the client to map requests->responses.",
                "type": "string or int"
              },
              {
                "fieldName": "params",
                "descriptionText": "A structured value of arguments the method expects. Can be omitted if the method accepts no arguments.",
                "type": "object"
              }
            ],
            "responsesListDescription": "Every JSON-RPC response must be a JSON object with the following fields:",
            "responsesList": [
              {
                "fieldName": "jsonrpc",
                "descriptionText": "Must be set to 2.0.",
                "type": "string"
              },
              {
                "fieldName": "id",
                "descriptionText": "The identifier as set by the client. If no ID was specified or can otherwise not be parsed, id will be null",
                "type": "string or int"
              },
              {
                "fieldName": "result",
                "descriptionText": "If an error occurred during the method call, the error field will be present and will an object containing information on the error.",
                "type": "object"
              },
              {
                "fieldName": "error",
                "descriptionText": "A structured value of arguments the method expects. Can be omitted if the method accepts no arguments.",
                "type": "object"
              },
              {
                "fieldName": "› code",
                "descriptionText": "Code indicated the type of the error that occurred. Only use this code when comparing errors, as codes are part of the API. See the Errors section for more details",
                "type": "int"
              },
              {
                "fieldName": "› message",
                "descriptionText": "A short error message describing the error. Do not compare or parse the message, it is not part of the API.",
                "type": "string"
              },
              {
                "fieldName": "› data",
                "descriptionText": "A longer description of the error wherever applicable. Can be omitted. Do not compare or parse data, it is not part of the API.",
                "type": "string"
              }
            ],
            "notificationsListDescription": "A notification is a request message without an \"id\" field. Notifications will be sent by the server to the client after a successful confirmation. The client must not confirm the receipt of notifications.",
            "notificationsList": [
              {
                "fieldName": "jsonrpc",
                "descriptionText": "Must be set to 2.0.",
                "type": "string"
              },
              {
                "fieldName": "method",
                "descriptionText": "Must be a valid method name as highlighted by this documentation.",
                "type": "string"
              },
              {
                "fieldName": "params",
                "descriptionText": "A structured value of method arguments as highlighted by this documentation.",
                "type": "object"
              }
            ],
            "httpDescription": "Some of the unary API methods are also available via JSON-RPC over HTTP. If a method supports this calling method its section will have a hint.\n\n  When using JSON-RPC over HTTP, the request and response structure will stay the same as documented.\n      \n  This API only supports JSON-RPC over HTTP using POST requests. The `Content-Type` needs to be of type `application/json`.\n      \n  If the method being called requires authentication, authentication headers need to be added:\n  \n  * API keys need to be added as a `X-Api-Key` header\n  \n  * API tokens need to be added as a `Authorization` header following the Bearer-Scheme\n  \n  The HTTP response code will always be `200`, even if an error occurred."
          },
          "examplesList": [
            {
              "title": "Request",
              "json": "{\n            \"jsonrpc\": \"2.0\",\n            \"id\": 6712,\n            \"method\": \"servicename_methodname\",\n            \"params\": {\n              \"parameter_1\": 42,\n              \"parameter_2\": \"string\"\n            }\n          }"
            },
            {
              "title": "Response (OK)",
              "json": "{\n            \"jsonrpc\": \"2.0\",\n            \"id\": 6712,\n            \"result\": {\n              \"result_parameter\": \"string\"\n            }\n          }"
            },
            {
              "title": "Response (Error)",
              "json": "{\n            \"jsonrpc\": \"2.0\",\n            \"id\": 6712,\n            \"error\": {\n              \"code\": -32602,\n              \"message\": \"invalid params\"\n            }\n          }"
            },
            {
              "title": "Notification Message",
              "json": "{\n            \"jsonrpc\": \"2.0\",\n            \"method\": \"servicename_subscription\",\n            \"params\": {\n              \"datapoint_1\": 23.78,\n              \"datapoint_2\": \"data\"\n            }\n          }"
            },
            {
              "title": "",
              "json": "\n\n    curl --request POST 'https://data.blocksize.capital/marketdata/v1/api' \\\n    --header 'Content-Type: application/json' \\\n    --header 'X-API-Key: Xavv9doDyT8NzX45XXclNqi26PRyaaVxWhbXciazVerZwy8Kz1uXGf54oC93h0UwcUzw458ebh4a4Iz2' \\\n    --data-raw '{\n      \"jsonrpc\": \"2.0\",\n      \"id\": 6712,\n      \"method\": \"servicename_methodname\",\n      \"params\": {\n        \"parameter_1\": 42,\n        \"parameter_2\": \"string\"\n      }\n    }'"
            },
            {
              "title": "The above command returns JSON structured like this:",
              "json": "{\n            \"jsonrpc\": \"2.0\",\n            \"id\": 6712,\n            \"result\": {\n              \"result_parameter\": \"string\"\n            }\n          }"
            }
          ]
        }
      ]
    }
  }
}
