Get Market
curl --request GET \
--url https://api.blockworks.com/query/tabular/markets/{marketID} \
--header 'X-Blockworks-API-Key: <api-key>'import requests
url = "https://api.blockworks.com/query/tabular/markets/{marketID}"
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/{marketID}', 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/{marketID}",
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/{marketID}"
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/{marketID}")
.header("X-Blockworks-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockworks.com/query/tabular/markets/{marketID}")
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": {
"matchedField": "marketID"
}
}{
"data": null,
"error": "unknown selection field \"nope\""
}{
"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": "no row found matching \"unknown\""
}Market (BQEN)
Get Market
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.
GET
/
query
/
tabular
/
markets
/
{marketID}
Get Market
curl --request GET \
--url https://api.blockworks.com/query/tabular/markets/{marketID} \
--header 'X-Blockworks-API-Key: <api-key>'import requests
url = "https://api.blockworks.com/query/tabular/markets/{marketID}"
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/{marketID}', 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/{marketID}",
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/{marketID}"
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/{marketID}")
.header("X-Blockworks-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockworks.com/query/tabular/markets/{marketID}")
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": {
"matchedField": "marketID"
}
}{
"data": null,
"error": "unknown selection field \"nope\""
}{
"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": "no row found matching \"unknown\""
}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.
Path Parameters
The Market ID identifying the row.
Query Parameters
Comma-separated fields to return; defaults to all fields.
Available options:
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