curl --request GET \
--url https://apimonaco.xyz/api/v1/orderbook/{tradingPairId}import requests
url = "https://apimonaco.xyz/api/v1/orderbook/{tradingPairId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://apimonaco.xyz/api/v1/orderbook/{tradingPairId}', 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://apimonaco.xyz/api/v1/orderbook/{tradingPairId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://apimonaco.xyz/api/v1/orderbook/{tradingPairId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apimonaco.xyz/api/v1/orderbook/{tradingPairId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimonaco.xyz/api/v1/orderbook/{tradingPairId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"baseDecimals": 8,
"baseToken": "BTC",
"data": {
"bids": [
{
"price": "35000.5",
"quantity": "1.5",
"orderCount": 3
}
],
"asks": [
{
"price": "35000.5",
"quantity": "1.5",
"orderCount": 3
}
],
"bestBid": "34900",
"bestAsk": "35100",
"bidVolume": "15.5",
"askVolume": "12.3",
"priceChange": {
"price24hAgo": "34500.00",
"priceChange24h": "500.00",
"priceChangePercent24h": "1.45"
}
},
"eventType": "orderbook_snapshot",
"symbol": "BTC/USDC",
"tradingPairId": "123e4567-e89b-12d3-a456-426614174000",
"quoteDecimals": 6,
"quoteToken": "USDC",
"sequenceNumber": 0,
"timestamp": "2023-11-13T10:30:00Z",
"tradingMode": "Spot",
"bookSeq": "184467"
}Orderbook Snapshot
Orderbook Snapshot
Get a point-in-time orderbook snapshot for a trading pair: the top bid and ask price levels, up to 1000 per side. Every snapshot carries bookSeq, the sequence it is exact as of, and reads the book the WebSocket orderbook and depth channels stream, which follows order acknowledgements by a short interval. This is a public endpoint that does not require authentication.
curl --request GET \
--url https://apimonaco.xyz/api/v1/orderbook/{tradingPairId}import requests
url = "https://apimonaco.xyz/api/v1/orderbook/{tradingPairId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://apimonaco.xyz/api/v1/orderbook/{tradingPairId}', 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://apimonaco.xyz/api/v1/orderbook/{tradingPairId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://apimonaco.xyz/api/v1/orderbook/{tradingPairId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apimonaco.xyz/api/v1/orderbook/{tradingPairId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimonaco.xyz/api/v1/orderbook/{tradingPairId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"baseDecimals": 8,
"baseToken": "BTC",
"data": {
"bids": [
{
"price": "35000.5",
"quantity": "1.5",
"orderCount": 3
}
],
"asks": [
{
"price": "35000.5",
"quantity": "1.5",
"orderCount": 3
}
],
"bestBid": "34900",
"bestAsk": "35100",
"bidVolume": "15.5",
"askVolume": "12.3",
"priceChange": {
"price24hAgo": "34500.00",
"priceChange24h": "500.00",
"priceChangePercent24h": "1.45"
}
},
"eventType": "orderbook_snapshot",
"symbol": "BTC/USDC",
"tradingPairId": "123e4567-e89b-12d3-a456-426614174000",
"quoteDecimals": 6,
"quoteToken": "USDC",
"sequenceNumber": 0,
"timestamp": "2023-11-13T10:30:00Z",
"tradingMode": "Spot",
"bookSeq": "184467"
}Query Parameters
Response
OK
Orderbook snapshot with token metadata and sequence number.
Durable-log sequence this snapshot is exact as of, as a decimal string; set on every snapshot, and the watermark the orderbook and depth WebSocket channels carry. A point-in-time read and staleness check, not a base for applying WebSocket deltas: for a live local book use the depth WebSocket channel, whose snapshot is the handoff base. A side that returns as many levels as requested may hold more.
"184467"
Was this page helpful?

