xo-orderbook-client-rs
// Alias of GET /trades — same SDK call.
use xo_orderbook_client::orderbook::types::request::TradesRequest;
let page = client.trades(&TradesRequest::default(), None).await?;
curl --request GET \
--url https://orderbooks.xo.market/data/trades \
--header 'XO_API_KEY: <api-key>'import requests
url = "https://orderbooks.xo.market/data/trades"
headers = {"XO_API_KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {XO_API_KEY: '<api-key>'}};
fetch('https://orderbooks.xo.market/data/trades', 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://orderbooks.xo.market/data/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"XO_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://orderbooks.xo.market/data/trades"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("XO_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://orderbooks.xo.market/data/trades")
.header("XO_API_KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://orderbooks.xo.market/data/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["XO_API_KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"limit": 100,
"count": 0,
"next_cursor": "LTE=",
"data": []
}Trade
Get trades (alias)
Alias of GET /trades.
GET
/
data
/
trades
xo-orderbook-client-rs
// Alias of GET /trades — same SDK call.
use xo_orderbook_client::orderbook::types::request::TradesRequest;
let page = client.trades(&TradesRequest::default(), None).await?;
curl --request GET \
--url https://orderbooks.xo.market/data/trades \
--header 'XO_API_KEY: <api-key>'import requests
url = "https://orderbooks.xo.market/data/trades"
headers = {"XO_API_KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {XO_API_KEY: '<api-key>'}};
fetch('https://orderbooks.xo.market/data/trades', 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://orderbooks.xo.market/data/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"XO_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://orderbooks.xo.market/data/trades"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("XO_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://orderbooks.xo.market/data/trades")
.header("XO_API_KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://orderbooks.xo.market/data/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["XO_API_KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"limit": 100,
"count": 0,
"next_cursor": "LTE=",
"data": []
}Authorizations
L2 HMAC request signature. See Authentication.