Get order book
curl --request GET \
--url https://api.numofx.com/v1/bookimport requests
url = "https://api.numofx.com/v1/book"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.numofx.com/v1/book', 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://api.numofx.com/v1/book",
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://api.numofx.com/v1/book"
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://api.numofx.com/v1/book")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numofx.com/v1/book")
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{
"market_presentation": {
"market": "<string>",
"contract_type": "<string>",
"settlement_type": "<string>",
"base_asset_symbol": "<string>",
"quote_asset_symbol": "<string>",
"expiry_timestamp": 123,
"display_name": "<string>",
"display_label": "<string>",
"tick_size": "<string>",
"settlement_note": "<string>",
"asset_address": "<string>",
"sub_id": "<string>",
"order_entry_spec": "<string>"
},
"bids": [
{
"order_id": "<string>",
"owner_address": "<string>",
"signer_address": "<string>",
"subaccount_id": "<string>",
"recipient_id": "<string>",
"nonce": "<string>",
"asset_address": "<string>",
"sub_id": "<string>",
"desired_amount": "<string>",
"filled_amount": "<string>",
"limit_price": "<string>",
"worst_fee": "<string>",
"expiry": 123,
"action_json": "<unknown>",
"signature": "<string>",
"status": "<string>",
"market": "<string>"
}
],
"asks": [
{
"order_id": "<string>",
"owner_address": "<string>",
"signer_address": "<string>",
"subaccount_id": "<string>",
"recipient_id": "<string>",
"nonce": "<string>",
"asset_address": "<string>",
"sub_id": "<string>",
"desired_amount": "<string>",
"filled_amount": "<string>",
"limit_price": "<string>",
"worst_fee": "<string>",
"expiry": 123,
"action_json": "<unknown>",
"signature": "<string>",
"status": "<string>",
"market": "<string>"
}
]
}{
"error": "<string>"
}Markets service
Get order book
GET
/
v1
/
book
Get order book
curl --request GET \
--url https://api.numofx.com/v1/bookimport requests
url = "https://api.numofx.com/v1/book"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.numofx.com/v1/book', 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://api.numofx.com/v1/book",
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://api.numofx.com/v1/book"
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://api.numofx.com/v1/book")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numofx.com/v1/book")
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{
"market_presentation": {
"market": "<string>",
"contract_type": "<string>",
"settlement_type": "<string>",
"base_asset_symbol": "<string>",
"quote_asset_symbol": "<string>",
"expiry_timestamp": 123,
"display_name": "<string>",
"display_label": "<string>",
"tick_size": "<string>",
"settlement_note": "<string>",
"asset_address": "<string>",
"sub_id": "<string>",
"order_entry_spec": "<string>"
},
"bids": [
{
"order_id": "<string>",
"owner_address": "<string>",
"signer_address": "<string>",
"subaccount_id": "<string>",
"recipient_id": "<string>",
"nonce": "<string>",
"asset_address": "<string>",
"sub_id": "<string>",
"desired_amount": "<string>",
"filled_amount": "<string>",
"limit_price": "<string>",
"worst_fee": "<string>",
"expiry": 123,
"action_json": "<unknown>",
"signature": "<string>",
"status": "<string>",
"market": "<string>"
}
],
"asks": [
{
"order_id": "<string>",
"owner_address": "<string>",
"signer_address": "<string>",
"subaccount_id": "<string>",
"recipient_id": "<string>",
"nonce": "<string>",
"asset_address": "<string>",
"sub_id": "<string>",
"desired_amount": "<string>",
"filled_amount": "<string>",
"limit_price": "<string>",
"worst_fee": "<string>",
"expiry": 123,
"action_json": "<unknown>",
"signature": "<string>",
"status": "<string>",
"market": "<string>"
}
]
}{
"error": "<string>"
}Was this page helpful?
⌘I

