xo-orderbook-client-rs
// Alias of GET /orders — same SDK call.
use xo_orderbook_client::orderbook::types::request::OrdersRequest;
let page = client.orders(&OrdersRequest::default(), None).await?;
curl --request GET \
--url https://orderbooks.xo.market/data/ordersimport requests
url = "https://orderbooks.xo.market/data/orders"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://orderbooks.xo.market/data/orders', 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/orders",
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://orderbooks.xo.market/data/orders"
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://orderbooks.xo.market/data/orders")
.asString();require 'uri'
require 'net/http'
url = URI("https://orderbooks.xo.market/data/orders")
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{
"limit": 100,
"count": 1,
"next_cursor": "LTE=",
"data": [
{
"id": "101",
"market": "0x39a12d52b63969654926e095ddd96f5c459112714da03edca769aa58173c78fb",
"asset_id": "26516164265702901957933644848127860370782874751279270726689263951695181556943",
"outcome": "Yes",
"side": "BUY",
"price": "0.547",
"original_size": "100000000",
"size_matched": "0",
"status": "live",
"created_at": 1779355800,
"order_hash": "0x0011223344556677889900aabbccddeeff00112233445566778899aabbccddee",
"maker_address": "0xCAFE000000000000000000000000000000000A11",
"owner": "346629a1-8226-5a85-823f-3a25ae818e10",
"expiration": "0",
"order_type": "GTC"
}
]
}Trade
Get user orders (alias)
Alias of GET /orders.
GET
/
data
/
orders
xo-orderbook-client-rs
// Alias of GET /orders — same SDK call.
use xo_orderbook_client::orderbook::types::request::OrdersRequest;
let page = client.orders(&OrdersRequest::default(), None).await?;
curl --request GET \
--url https://orderbooks.xo.market/data/ordersimport requests
url = "https://orderbooks.xo.market/data/orders"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://orderbooks.xo.market/data/orders', 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/orders",
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://orderbooks.xo.market/data/orders"
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://orderbooks.xo.market/data/orders")
.asString();require 'uri'
require 'net/http'
url = URI("https://orderbooks.xo.market/data/orders")
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{
"limit": 100,
"count": 1,
"next_cursor": "LTE=",
"data": [
{
"id": "101",
"market": "0x39a12d52b63969654926e095ddd96f5c459112714da03edca769aa58173c78fb",
"asset_id": "26516164265702901957933644848127860370782874751279270726689263951695181556943",
"outcome": "Yes",
"side": "BUY",
"price": "0.547",
"original_size": "100000000",
"size_matched": "0",
"status": "live",
"created_at": 1779355800,
"order_hash": "0x0011223344556677889900aabbccddeeff00112233445566778899aabbccddee",
"maker_address": "0xCAFE000000000000000000000000000000000A11",
"owner": "346629a1-8226-5a85-823f-3a25ae818e10",
"expiration": "0",
"order_type": "GTC"
}
]
}