Latest Futures Depth
curl --request GET \
--url https://api.polyhistorical.com/v1/{coin}/future/latest \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://api.polyhistorical.com/v1/{coin}/future/latest"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://api.polyhistorical.com/v1/{coin}/future/latest', 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.polyhistorical.com/v1/{coin}/future/latest",
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-API-Key: <x-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.polyhistorical.com/v1/{coin}/future/latest"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-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.polyhistorical.com/v1/{coin}/future/latest")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polyhistorical.com/v1/{coin}/future/latest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"data.coin_price": 123,
"data.bids": [
{}
],
"data.asks": [
{}
]
}Binance Futures
Latest Futures Depth
Get the latest Binance Futures price and order book depth
GET
/
v1
/
{coin}
/
future
/
latest
Latest Futures Depth
curl --request GET \
--url https://api.polyhistorical.com/v1/{coin}/future/latest \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://api.polyhistorical.com/v1/{coin}/future/latest"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://api.polyhistorical.com/v1/{coin}/future/latest', 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.polyhistorical.com/v1/{coin}/future/latest",
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-API-Key: <x-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.polyhistorical.com/v1/{coin}/future/latest"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-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.polyhistorical.com/v1/{coin}/future/latest")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polyhistorical.com/v1/{coin}/future/latest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"data.coin_price": 123,
"data.bids": [
{}
],
"data.asks": [
{}
]
}Latest Futures Depth
Returns the latest Binance Futures coin price with order book bids and asks.Requires a Pro or Enterprise plan.
Request
https://api.polyhistorical.com/v1/{coin}/future/latest
Headers
string
required
Your API key. See Authentication.
Path parameters
string
required
Coin symbol. Supported values:
btc, eth, sol.Response
number
Current futures coin price rounded to 2 decimal places.
array
Bid levels. Each item contains
price rounded to 2 decimal places and quantity rounded to 5 decimal places.array
Ask levels. Each item contains
price rounded to 2 decimal places and quantity rounded to 5 decimal places.Example
cURL
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.polyhistorical.com/v1/btc/future/latest"
Response
{
"data": {
"coin_price": 77593.69,
"bids": [
{ "price": 77593.68, "quantity": 0.64379 }
],
"asks": [
{ "price": 77593.70, "quantity": 0.20000 }
]
}
}