Rank pairs by market data (JSON body)
curl --request POST \
--url https://api.glassmarkets.io/v2/leaderboard/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"assets": [
"<string>"
],
"time_start": "2023-11-07T05:31:56Z",
"time_end": "2023-11-07T05:31:56Z",
"market_hours_days": "<string>",
"market_hours_timezone": "America/New_York",
"exchanges": [
"<string>"
],
"page": 1,
"bps": [
200
],
"sort_by": "volume",
"sort_direction": "desc"
}
'import requests
url = "https://api.glassmarkets.io/v2/leaderboard/"
payload = {
"assets": ["<string>"],
"time_start": "2023-11-07T05:31:56Z",
"time_end": "2023-11-07T05:31:56Z",
"market_hours_days": "<string>",
"market_hours_timezone": "America/New_York",
"exchanges": ["<string>"],
"page": 1,
"bps": [200],
"sort_by": "volume",
"sort_direction": "desc"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assets: ['<string>'],
time_start: '2023-11-07T05:31:56Z',
time_end: '2023-11-07T05:31:56Z',
market_hours_days: '<string>',
market_hours_timezone: 'America/New_York',
exchanges: ['<string>'],
page: 1,
bps: [200],
sort_by: 'volume',
sort_direction: 'desc'
})
};
fetch('https://api.glassmarkets.io/v2/leaderboard/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.glassmarkets.io/v2/leaderboard/"
payload := strings.NewReader("{\n \"assets\": [\n \"<string>\"\n ],\n \"time_start\": \"2023-11-07T05:31:56Z\",\n \"time_end\": \"2023-11-07T05:31:56Z\",\n \"market_hours_days\": \"<string>\",\n \"market_hours_timezone\": \"America/New_York\",\n \"exchanges\": [\n \"<string>\"\n ],\n \"page\": 1,\n \"bps\": [\n 200\n ],\n \"sort_by\": \"volume\",\n \"sort_direction\": \"desc\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.glassmarkets.io/v2/leaderboard/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assets\": [\n \"<string>\"\n ],\n \"time_start\": \"2023-11-07T05:31:56Z\",\n \"time_end\": \"2023-11-07T05:31:56Z\",\n \"market_hours_days\": \"<string>\",\n \"market_hours_timezone\": \"America/New_York\",\n \"exchanges\": [\n \"<string>\"\n ],\n \"page\": 1,\n \"bps\": [\n 200\n ],\n \"sort_by\": \"volume\",\n \"sort_direction\": \"desc\"\n}")
.asString();[
{
"asset": "<string>",
"exchange": {
"slug": "<string>",
"name": "<string>",
"icon_url": "<string>"
},
"pair": "<string>",
"price_change": 123,
"volume": 123,
"usd_open_interest": 123,
"funding_rate_8h": 123,
"tick_bps": 123,
"tick_bps_status": "<string>",
"tick_bps_samples": 123,
"bid_0bps": 123,
"bid_0.05bps": 123,
"bid_0.1bps": 123,
"bid_0.15bps": 123,
"bid_0.25bps": 123,
"bid_0.5bps": 123,
"bid_0.75bps": 123,
"bid_1bps": 123,
"bid_2bps": 123,
"bid_3bps": 123,
"bid_5bps": 123,
"bid_10bps": 123,
"bid_15bps": 123,
"bid_20bps": 123,
"bid_25bps": 123,
"bid_30bps": 123,
"bid_40bps": 123,
"bid_50bps": 123,
"bid_60bps": 123,
"bid_75bps": 123,
"bid_100bps": 123,
"bid_150bps": 123,
"bid_200bps": 123,
"bid_300bps": 123,
"bid_500bps": 123,
"ask_0bps": 123,
"ask_0.05bps": 123,
"ask_0.1bps": 123,
"ask_0.15bps": 123,
"ask_0.25bps": 123,
"ask_0.5bps": 123,
"ask_0.75bps": 123,
"ask_1bps": 123,
"ask_2bps": 123,
"ask_3bps": 123,
"ask_5bps": 123,
"ask_10bps": 123,
"ask_15bps": 123,
"ask_20bps": 123,
"ask_25bps": 123,
"ask_30bps": 123,
"ask_40bps": 123,
"ask_50bps": 123,
"ask_60bps": 123,
"ask_75bps": 123,
"ask_100bps": 123,
"ask_150bps": 123,
"ask_200bps": 123,
"ask_300bps": 123,
"ask_500bps": 123
}
]
Leaderboard
Rank pairs by market data (JSON body)
Same as GET /v2/leaderboard/, with the parameters in a JSON body instead of the query string. List parameters accept a JSON array or a comma-separated string. type and filename stay in the query string.
POST
/
v2
/
leaderboard
/
Rank pairs by market data (JSON body)
curl --request POST \
--url https://api.glassmarkets.io/v2/leaderboard/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"assets": [
"<string>"
],
"time_start": "2023-11-07T05:31:56Z",
"time_end": "2023-11-07T05:31:56Z",
"market_hours_days": "<string>",
"market_hours_timezone": "America/New_York",
"exchanges": [
"<string>"
],
"page": 1,
"bps": [
200
],
"sort_by": "volume",
"sort_direction": "desc"
}
'import requests
url = "https://api.glassmarkets.io/v2/leaderboard/"
payload = {
"assets": ["<string>"],
"time_start": "2023-11-07T05:31:56Z",
"time_end": "2023-11-07T05:31:56Z",
"market_hours_days": "<string>",
"market_hours_timezone": "America/New_York",
"exchanges": ["<string>"],
"page": 1,
"bps": [200],
"sort_by": "volume",
"sort_direction": "desc"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assets: ['<string>'],
time_start: '2023-11-07T05:31:56Z',
time_end: '2023-11-07T05:31:56Z',
market_hours_days: '<string>',
market_hours_timezone: 'America/New_York',
exchanges: ['<string>'],
page: 1,
bps: [200],
sort_by: 'volume',
sort_direction: 'desc'
})
};
fetch('https://api.glassmarkets.io/v2/leaderboard/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.glassmarkets.io/v2/leaderboard/"
payload := strings.NewReader("{\n \"assets\": [\n \"<string>\"\n ],\n \"time_start\": \"2023-11-07T05:31:56Z\",\n \"time_end\": \"2023-11-07T05:31:56Z\",\n \"market_hours_days\": \"<string>\",\n \"market_hours_timezone\": \"America/New_York\",\n \"exchanges\": [\n \"<string>\"\n ],\n \"page\": 1,\n \"bps\": [\n 200\n ],\n \"sort_by\": \"volume\",\n \"sort_direction\": \"desc\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.glassmarkets.io/v2/leaderboard/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assets\": [\n \"<string>\"\n ],\n \"time_start\": \"2023-11-07T05:31:56Z\",\n \"time_end\": \"2023-11-07T05:31:56Z\",\n \"market_hours_days\": \"<string>\",\n \"market_hours_timezone\": \"America/New_York\",\n \"exchanges\": [\n \"<string>\"\n ],\n \"page\": 1,\n \"bps\": [\n 200\n ],\n \"sort_by\": \"volume\",\n \"sort_direction\": \"desc\"\n}")
.asString();[
{
"asset": "<string>",
"exchange": {
"slug": "<string>",
"name": "<string>",
"icon_url": "<string>"
},
"pair": "<string>",
"price_change": 123,
"volume": 123,
"usd_open_interest": 123,
"funding_rate_8h": 123,
"tick_bps": 123,
"tick_bps_status": "<string>",
"tick_bps_samples": 123,
"bid_0bps": 123,
"bid_0.05bps": 123,
"bid_0.1bps": 123,
"bid_0.15bps": 123,
"bid_0.25bps": 123,
"bid_0.5bps": 123,
"bid_0.75bps": 123,
"bid_1bps": 123,
"bid_2bps": 123,
"bid_3bps": 123,
"bid_5bps": 123,
"bid_10bps": 123,
"bid_15bps": 123,
"bid_20bps": 123,
"bid_25bps": 123,
"bid_30bps": 123,
"bid_40bps": 123,
"bid_50bps": 123,
"bid_60bps": 123,
"bid_75bps": 123,
"bid_100bps": 123,
"bid_150bps": 123,
"bid_200bps": 123,
"bid_300bps": 123,
"bid_500bps": 123,
"ask_0bps": 123,
"ask_0.05bps": 123,
"ask_0.1bps": 123,
"ask_0.15bps": 123,
"ask_0.25bps": 123,
"ask_0.5bps": 123,
"ask_0.75bps": 123,
"ask_1bps": 123,
"ask_2bps": 123,
"ask_3bps": 123,
"ask_5bps": 123,
"ask_10bps": 123,
"ask_15bps": 123,
"ask_20bps": 123,
"ask_25bps": 123,
"ask_30bps": 123,
"ask_40bps": 123,
"ask_50bps": 123,
"ask_60bps": 123,
"ask_75bps": 123,
"ask_100bps": 123,
"ask_150bps": 123,
"ask_200bps": 123,
"ask_300bps": 123,
"ask_500bps": 123
}
]
Authorizations
Query Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Relative window ending now. Can't be combined with time_start/time_end.
30-minutes- 30-minutes1-hour- 1-hour3-hours- 3-hours6-hours- 6-hours12-hours- 12-hours1-day- 1-day7-days- 7-days1-month- 1-month3-months- 3-months6-months- 6-months1-year- 1-year
Available options:
30-minutes, 1-hour, 3-hours, 6-hours, 12-hours, 1-day, 7-days, 1-month, 3-months, 6-months, 1-year 1M- Aggregated in 1 month periods.1w- Aggregated in 1 week periods.1d- Aggregated in 1 day periods.4h- Aggregated in 4 hour periods.1h- Aggregated in 1 hour periods.30m- Aggregated in 30 minute periods.15m- Aggregated in 15 minute periods.5m- Aggregated in 5 minute periods.1m- Aggregated in 1 minute periods.c- Will return all the data for the specified time range using the biggest periods possible.a- Will return the aggregate of the data for the specified time range.
Available options:
1M, 1w, 1d, 4h, 1h, 30m, 15m, 5m, 1m, c, a Trading session to restrict the window to. Requires market_hours_days; can't be combined with time_start/time_end or lookback.
pre-market- pre-marketopening-bell- opening-bellmarket-hours- market-hoursclosing-bell- closing-bellafter-hours- after-hoursblue-ocean- blue-oceanweekend-hours- weekend-hours
Available options:
pre-market, opening-bell, market-hours, closing-bell, after-hours, blue-ocean, weekend-hours 
