Fetch orderbook microstructure
curl --request GET \
--url https://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructureimport requests
url = "https://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure', 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://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure",
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://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure"
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://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure")
.asString();require 'uri'
require 'net/http'
url = URI("https://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure")
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{
"asset_id": "<string>",
"depth_buckets": {
"ask_within_100bps": 123,
"ask_within_10bps": 123,
"ask_within_50bps": 123,
"bid_within_100bps": 123,
"bid_within_10bps": 123,
"bid_within_50bps": 123
},
"level_count": {
"asks": 1,
"bids": 1
},
"max_gap": {
"ask_gap_bps": 123,
"bid_gap_bps": 123
},
"openpx_ts": "2023-11-07T05:31:56Z",
"ask_slope": 123,
"bid_slope": 123,
"exchange_ts": "2023-11-07T05:31:56Z"
}{
"kind": "Authentication",
"message": "<string>"
}Orderbook
fetch_orderbook_microstructure
Microstructure signals: depth within 10/50/100 bps, slope, max gap, and per-side level counts.
GET
/
v1
/
orderbook
/
fetch_orderbook_microstructure
Fetch orderbook microstructure
curl --request GET \
--url https://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructureimport requests
url = "https://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure', 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://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure",
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://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure"
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://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure")
.asString();require 'uri'
require 'net/http'
url = URI("https://github.com/openpx-trade/openpx/v1/orderbook/fetch_orderbook_microstructure")
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{
"asset_id": "<string>",
"depth_buckets": {
"ask_within_100bps": 123,
"ask_within_10bps": 123,
"ask_within_50bps": 123,
"bid_within_100bps": 123,
"bid_within_10bps": 123,
"bid_within_50bps": 123
},
"level_count": {
"asks": 1,
"bids": 1
},
"max_gap": {
"ask_gap_bps": 123,
"bid_gap_bps": 123
},
"openpx_ts": "2023-11-07T05:31:56Z",
"ask_slope": 123,
"bid_slope": 123,
"exchange_ts": "2023-11-07T05:31:56Z"
}{
"kind": "Authentication",
"message": "<string>"
}Microstructure signals: depth within 10/50/100 bps, slope, max gap, and per-side level counts.
Query Parameters
Response
Success.
Microstructure signals for one orderbook.
Orderable asset id (e.g. "KXBTCD-25APR1517").
Cumulative depth at 10/50/100 bps from mid.
Show child attributes
Show child attributes
Number of levels per side.
Show child attributes
Show child attributes
Largest consecutive-level price gap on each side, in basis points.
Show child attributes
Show child attributes
Wall-clock time OpenPX served the response (UTC).
OLS slope of cumulative ask size vs distance-from-mid (e.g. 12.5).
OLS slope of cumulative bid size vs distance-from-mid (e.g. 12.5).
Upstream snapshot time in UTC; null when not provided.

