curl --request GET \
--url https://api.blockworks.com/query/tabular/markets \
--header 'X-Blockworks-API-Key: <api-key>'import requests
url = "https://api.blockworks.com/query/tabular/markets"
headers = {"X-Blockworks-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Blockworks-API-Key': '<api-key>'}};
fetch('https://api.blockworks.com/query/tabular/markets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockworks.com/query/tabular/markets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Blockworks-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.blockworks.com/query/tabular/markets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Blockworks-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.blockworks.com/query/tabular/markets")
.header("X-Blockworks-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockworks.com/query/tabular/markets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Blockworks-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"baseAssetID": "<baseAssetID>",
"baseAssetName": "<baseAssetName>",
"baseAssetSector": "<baseAssetSector>",
"baseAssetSlug": "<baseAssetSlug>",
"baseAssetSymbol": "<baseAssetSymbol>",
"exchangeID": "<exchangeID>",
"exchangeName": "<exchangeName>",
"exchangeSlug": "<exchangeSlug>",
"exchangeVolumePercentage24h": 123.45,
"firstTradeAt": "2024-01-01T00:00:00Z",
"isNewMarket": true,
"isRecentlyListed": true,
"lastTradeAt": "2024-01-01T00:00:00Z",
"latestPrice24hClose": 123.45,
"latestPrice24hHigh": 123.45,
"latestPrice24hLow": 123.45,
"latestPrice24hOpen": 123.45,
"liveness": "<liveness>",
"marketID": "<marketID>",
"networkID": "<networkID>",
"networkName": "<networkName>",
"networkSlug": "<networkSlug>",
"premiumDiscount": 123.45,
"quoteAssetID": "<quoteAssetID>",
"quoteAssetName": "<quoteAssetName>",
"quoteAssetSector": "<quoteAssetSector>",
"quoteAssetSlug": "<quoteAssetSlug>",
"quoteAssetSymbol": "<quoteAssetSymbol>",
"sectors": [
"<sectors>"
],
"tradeCount24h": 123,
"volume24hUSD": 123.45
}
],
"error": null,
"metadata": {
"totalPages": 1,
"totalRows": 1
}
}{
"data": null,
"error": "unknown query parameter \"marketID\""
}{
"data": null,
"error": "this model requires authentication"
}{
"data": null,
"error": "this model requires the \"markets-dataset\" permission; see https://app.blockworks.com/account/api for the public API permissions you hold"
}{
"data": null,
"error": "tabular model \"unknown-model\" not found"
}List Markets
Every trading pair with its base asset, quote asset, exchange and network, plus trailing 24-hour price and volume. The id is the series key of the bqen and markets timeseries models, so this is where you find the market whose candles you want: filter by base asset, quote asset or exchange.
curl --request GET \
--url https://api.blockworks.com/query/tabular/markets \
--header 'X-Blockworks-API-Key: <api-key>'import requests
url = "https://api.blockworks.com/query/tabular/markets"
headers = {"X-Blockworks-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Blockworks-API-Key': '<api-key>'}};
fetch('https://api.blockworks.com/query/tabular/markets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockworks.com/query/tabular/markets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Blockworks-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.blockworks.com/query/tabular/markets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Blockworks-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.blockworks.com/query/tabular/markets")
.header("X-Blockworks-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockworks.com/query/tabular/markets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Blockworks-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"baseAssetID": "<baseAssetID>",
"baseAssetName": "<baseAssetName>",
"baseAssetSector": "<baseAssetSector>",
"baseAssetSlug": "<baseAssetSlug>",
"baseAssetSymbol": "<baseAssetSymbol>",
"exchangeID": "<exchangeID>",
"exchangeName": "<exchangeName>",
"exchangeSlug": "<exchangeSlug>",
"exchangeVolumePercentage24h": 123.45,
"firstTradeAt": "2024-01-01T00:00:00Z",
"isNewMarket": true,
"isRecentlyListed": true,
"lastTradeAt": "2024-01-01T00:00:00Z",
"latestPrice24hClose": 123.45,
"latestPrice24hHigh": 123.45,
"latestPrice24hLow": 123.45,
"latestPrice24hOpen": 123.45,
"liveness": "<liveness>",
"marketID": "<marketID>",
"networkID": "<networkID>",
"networkName": "<networkName>",
"networkSlug": "<networkSlug>",
"premiumDiscount": 123.45,
"quoteAssetID": "<quoteAssetID>",
"quoteAssetName": "<quoteAssetName>",
"quoteAssetSector": "<quoteAssetSector>",
"quoteAssetSlug": "<quoteAssetSlug>",
"quoteAssetSymbol": "<quoteAssetSymbol>",
"sectors": [
"<sectors>"
],
"tradeCount24h": 123,
"volume24hUSD": 123.45
}
],
"error": null,
"metadata": {
"totalPages": 1,
"totalRows": 1
}
}{
"data": null,
"error": "unknown query parameter \"marketID\""
}{
"data": null,
"error": "this model requires authentication"
}{
"data": null,
"error": "this model requires the \"markets-dataset\" permission; see https://app.blockworks.com/account/api for the public API permissions you hold"
}{
"data": null,
"error": "tabular model \"unknown-model\" not found"
}Authorizations
API key sent in the X-Blockworks-API-Key header; x-messari-api-key is accepted for existing integrations. The catalog endpoints and models open to everyone need no key.
Query Parameters
Market ID equals.
Market ID is one of (comma-separated).
Base Asset ID equals.
Base Asset ID is one of (comma-separated).
Base Asset Slug equals.
Base Asset Slug is one of (comma-separated).
Quote Asset ID equals.
Quote Asset ID is one of (comma-separated).
Quote Asset Slug equals.
Quote Asset Slug is one of (comma-separated).
Exchange ID equals.
Exchange ID is one of (comma-separated).
Exchange Slug equals.
Exchange Slug is one of (comma-separated).
Last Trade At is greater than.
Last Trade At is greater than or equal to.
Liveness equals.
Liveness is one of (comma-separated).
Volume 24H USD is greater than.
Volume 24H USD is greater than or equal to.
Volume 24H USD is less than.
Volume 24H USD is less than or equal to.
Field to sort by; defaults to the model's default sort column.
firstTradeAt, lastTradeAt, latestPrice24hOpen, latestPrice24hHigh, latestPrice24hLow, latestPrice24hClose, premiumDiscount, exchangeVolumePercentage24h, volume24hUSD, tradeCount24h Sort direction.
asc, desc 1-based page number.
Rows per page (max 1000, default 100).
Comma-separated fields to return; defaults to all fields.
marketID, baseAssetID, baseAssetName, baseAssetSlug, baseAssetSymbol, baseAssetSector, quoteAssetID, quoteAssetName, quoteAssetSlug, quoteAssetSymbol, quoteAssetSector, exchangeID, exchangeName, exchangeSlug, networkID, networkName, networkSlug, sectors, firstTradeAt, lastTradeAt, isNewMarket, isRecentlyListed, liveness, latestPrice24hOpen, latestPrice24hHigh, latestPrice24hLow, latestPrice24hClose, premiumDiscount, exchangeVolumePercentage24h, volume24hUSD, tradeCount24h Response format, overriding the Accept header: json (default), csv, or jsonl (NDJSON). csv and jsonl return the rows as a downloadable file.
json, csv, jsonl