Orderbook snapshot
curl --request GET \
--url https://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook \
--header 'x-api-key: <api-key>'import requests
url = "https://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook', 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://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook",
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: <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://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"estimated": true,
"source": "<string>",
"stale": true,
"asks": [
{
"price": 123,
"size": 123
}
],
"bids": [
{
"price": 123,
"size": 123
}
],
"exchange": "polymarket",
"marketId": "<string>",
"timestamp": "<string>",
"indexedAt": "<string>",
"sourceUpdatedAt": "<string>",
"unavailableReason": "<string>",
"midpoint": 123,
"spread": 123
}{
"code": 1,
"error": "<string>",
"errorCode": "<string>"
}{
"code": 1,
"error": "<string>",
"errorCode": "<string>"
}{
"code": 1,
"error": "<string>",
"errorCode": "<string>"
}{
"code": 1,
"error": "<string>",
"errorCode": "<string>"
}{
"code": 1,
"error": "<string>",
"errorCode": "<string>"
}Markets
Orderbook snapshot
GET
/
v1
/
markets
/
{ticker}
/
orderbook
Orderbook snapshot
curl --request GET \
--url https://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook \
--header 'x-api-key: <api-key>'import requests
url = "https://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook', 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://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook",
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: <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://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prediction-market-api.solanatracker.io/v1/markets/{ticker}/orderbook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"estimated": true,
"source": "<string>",
"stale": true,
"asks": [
{
"price": 123,
"size": 123
}
],
"bids": [
{
"price": 123,
"size": 123
}
],
"exchange": "polymarket",
"marketId": "<string>",
"timestamp": "<string>",
"indexedAt": "<string>",
"sourceUpdatedAt": "<string>",
"unavailableReason": "<string>",
"midpoint": 123,
"spread": 123
}{
"code": 1,
"error": "<string>",
"errorCode": "<string>"
}{
"code": 1,
"error": "<string>",
"errorCode": "<string>"
}{
"code": 1,
"error": "<string>",
"errorCode": "<string>"
}{
"code": 1,
"error": "<string>",
"errorCode": "<string>"
}{
"code": 1,
"error": "<string>",
"errorCode": "<string>"
}授权
Solana Tracker Data API key
路径参数
Market ticker or condition id
查询参数
Auto-detect if omitted
响应
Orderbook
Orderbook snapshot for a market.
True when the value is derived/estimated rather than authoritative.
Serving source: indexed, upstream, unavailable.
True when the payload is older than the freshness SLO.
Best ask levels.
Show child attributes
Show child attributes
Best bid levels.
Show child attributes
Show child attributes
Source exchange.
可用选项:
polymarket, kalshi Market identifier.
ISO-8601 timestamp of the snapshot.
Local index timestamp when known.
Upstream/source event timestamp when known.
Why the payload is missing or incomplete.
Mid-price: (best_bid + best_ask) / 2.
Spread: best ask - best bid.
此页面对您有帮助吗?