curl --request GET \
--url https://api.blockworks.com/query/tabular/perpetual-markets \
--header 'X-Blockworks-API-Key: <api-key>'import requests
url = "https://api.blockworks.com/query/tabular/perpetual-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/perpetual-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/perpetual-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/perpetual-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/perpetual-markets")
.header("X-Blockworks-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockworks.com/query/tabular/perpetual-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": "<string>",
"baseAssetName": "<string>",
"baseAssetSerialID": 123,
"baseAssetSlug": "<string>",
"baseAssetSymbol": "<string>",
"contractType": "<string>",
"exchange": "<string>",
"exchangeID": "<string>",
"exchangeName": "<string>",
"exchangeSerialID": 123,
"id": "<string>",
"marginType": "<string>",
"name": "<string>",
"quoteAssetSerialID": 123,
"quoteCurrency": "<string>",
"settleAssetSerialID": 123,
"settleCurrency": "<string>",
"slug": "<string>",
"symbol": "<string>",
"symbolNormalized": "<string>"
}
],
"metadata": {
"totalPages": 123,
"totalRows": 123
},
"error": "<string>"
}{
"data": null,
"error": "unknown query parameter \"id\""
}{
"data": null,
"error": "this model requires authentication"
}{
"data": null,
"error": "this model requires the \"market_data_unified\" permission"
}{
"data": null,
"error": "tabular model \"unknown-model\" not found"
}List Perpetual Markets
One row per perpetual futures contract on a centralized exchange, keyed by exchange and contract symbol: exchange, symbol, base asset, quote and settle currency, contract type and margin type. The id is the series key of the perpetual-markets timeseries model; filter by base asset to find every venue listing an asset’s perpetual.
curl --request GET \
--url https://api.blockworks.com/query/tabular/perpetual-markets \
--header 'X-Blockworks-API-Key: <api-key>'import requests
url = "https://api.blockworks.com/query/tabular/perpetual-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/perpetual-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/perpetual-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/perpetual-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/perpetual-markets")
.header("X-Blockworks-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockworks.com/query/tabular/perpetual-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": "<string>",
"baseAssetName": "<string>",
"baseAssetSerialID": 123,
"baseAssetSlug": "<string>",
"baseAssetSymbol": "<string>",
"contractType": "<string>",
"exchange": "<string>",
"exchangeID": "<string>",
"exchangeName": "<string>",
"exchangeSerialID": 123,
"id": "<string>",
"marginType": "<string>",
"name": "<string>",
"quoteAssetSerialID": 123,
"quoteCurrency": "<string>",
"settleAssetSerialID": 123,
"settleCurrency": "<string>",
"slug": "<string>",
"symbol": "<string>",
"symbolNormalized": "<string>"
}
],
"metadata": {
"totalPages": 123,
"totalRows": 123
},
"error": "<string>"
}{
"data": null,
"error": "unknown query parameter \"id\""
}{
"data": null,
"error": "this model requires authentication"
}{
"data": null,
"error": "this model requires the \"market_data_unified\" permission"
}{
"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 on the public access tier need no key.
Query Parameters
Perpetual Market ID equals.
Perpetual Market ID is one of (comma-separated).
Name equals.
Name is one of (comma-separated).
Name contains (case-insensitive substring).
Slug equals.
Slug is one of (comma-separated).
Exchange equals.
Exchange is one of (comma-separated).
Symbol equals.
Symbol is one of (comma-separated).
Symbol contains (case-insensitive substring).
Normalized Symbol equals.
Normalized Symbol is one of (comma-separated).
Normalized Symbol contains (case-insensitive substring).
Base Asset ID equals.
Base Asset ID is one of (comma-separated).
Base Asset Name equals.
Base Asset Name is one of (comma-separated).
Base Asset Name contains (case-insensitive substring).
Base Asset Slug equals.
Base Asset Slug is one of (comma-separated).
Base Asset Symbol equals.
Base Asset Symbol is one of (comma-separated).
Base Asset Symbol contains (case-insensitive substring).
Base Asset Serial ID equals.
Base Asset Serial ID is one of (comma-separated).
Quote Asset Serial ID equals.
Quote Asset Serial ID is one of (comma-separated).
Settle Asset Serial ID equals.
Settle Asset Serial ID is one of (comma-separated).
Exchange Serial ID equals.
Exchange Serial ID is one of (comma-separated).
Quote Currency equals.
Quote Currency is one of (comma-separated).
Settle Currency equals.
Settle Currency is one of (comma-separated).
Contract Type equals.
Contract Type is one of (comma-separated).
Margin Type equals.
Margin Type is one of (comma-separated).
Exchange ID equals.
Exchange ID is one of (comma-separated).
Exchange Name equals.
Exchange Name is one of (comma-separated).
Exchange Name contains (case-insensitive substring).
Field to sort by; defaults to the model's default sort column.
name, slug, exchange, symbol, baseAssetName, baseAssetSlug, baseAssetSymbol, quoteCurrency Sort direction.
asc, desc 1-based page number.
Rows per page (max 1000, default 100).
Comma-separated fields to return; defaults to all fields.
id, name, slug, exchange, symbol, symbolNormalized, baseAssetID, baseAssetName, baseAssetSlug, baseAssetSymbol, baseAssetSerialID, quoteAssetSerialID, settleAssetSerialID, exchangeSerialID, quoteCurrency, settleCurrency, contractType, marginType, exchangeID, exchangeName 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