Get order book
curl --request GET \
--url https://api.example.com/exchange/books/{symbol}import requests
url = "https://api.example.com/exchange/books/{symbol}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/exchange/books/{symbol}', 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.example.com/exchange/books/{symbol}",
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.example.com/exchange/books/{symbol}"
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.example.com/exchange/books/{symbol}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/exchange/books/{symbol}")
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{
"data": {
"asks": [
{
"business_id": "ce8331b2-a396-46c1-9638-5db5e9cf5b2e",
"created_at": "2023-12-23T19:11:23.215",
"id": "0fe2d322-a1c7-11ee-9c0e-560f156a658b",
"percent_filled": 0,
"price": 80000,
"price_type": "limit",
"status": "open",
"time_in_force": "gtc",
"total_qty": "1",
"unfilled_qty": "1.0",
"user_id": null
}
],
"bids": [
{
"business_id": "ce8331b2-a396-46c1-9638-5db5e9cf5b2e",
"created_at": "2023-12-23T19:11:23.097",
"id": "0fd0baf2-a1c7-11ee-ae88-560f156a658b",
"percent_filled": 0,
"price": 75000,
"price_type": "limit",
"status": "open",
"time_in_force": "gtc",
"total_qty": "1",
"unfilled_qty": "1.0",
"user_id": "82dde615-d181-4f3e-8d3f-53ac7962feb7"
}
],
"max_bid": 75000,
"min_ask": 80000,
"symbol": "USD-NGN"
}
}exchange
Get order book
GET
/
exchange
/
books
/
{symbol}
Get order book
curl --request GET \
--url https://api.example.com/exchange/books/{symbol}import requests
url = "https://api.example.com/exchange/books/{symbol}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/exchange/books/{symbol}', 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.example.com/exchange/books/{symbol}",
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.example.com/exchange/books/{symbol}"
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.example.com/exchange/books/{symbol}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/exchange/books/{symbol}")
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{
"data": {
"asks": [
{
"business_id": "ce8331b2-a396-46c1-9638-5db5e9cf5b2e",
"created_at": "2023-12-23T19:11:23.215",
"id": "0fe2d322-a1c7-11ee-9c0e-560f156a658b",
"percent_filled": 0,
"price": 80000,
"price_type": "limit",
"status": "open",
"time_in_force": "gtc",
"total_qty": "1",
"unfilled_qty": "1.0",
"user_id": null
}
],
"bids": [
{
"business_id": "ce8331b2-a396-46c1-9638-5db5e9cf5b2e",
"created_at": "2023-12-23T19:11:23.097",
"id": "0fd0baf2-a1c7-11ee-ae88-560f156a658b",
"percent_filled": 0,
"price": 75000,
"price_type": "limit",
"status": "open",
"time_in_force": "gtc",
"total_qty": "1",
"unfilled_qty": "1.0",
"user_id": "82dde615-d181-4f3e-8d3f-53ac7962feb7"
}
],
"max_bid": 75000,
"min_ask": 80000,
"symbol": "USD-NGN"
}
}Path Parameters
Currency pair
Response
Order book
Response schema for an order book
An order book
Show child attributes
Show child attributes
Example:
{
"asks": [
{
"business_id": "ce8331b2-a396-46c1-9638-5db5e9cf5b2e",
"created_at": "2023-12-23T19:11:23.215",
"id": "0fe2d322-a1c7-11ee-9c0e-560f156a658b",
"percent_filled": 0,
"price": 80000,
"price_type": "limit",
"status": "open",
"time_in_force": "gtc",
"total_qty": "1",
"unfilled_qty": "1.0",
"user_id": null
}
],
"bids": [
{
"business_id": "ce8331b2-a396-46c1-9638-5db5e9cf5b2e",
"created_at": "2023-12-23T19:11:23.097",
"id": "0fd0baf2-a1c7-11ee-ae88-560f156a658b",
"percent_filled": 0,
"price": 75000,
"price_type": "limit",
"status": "open",
"time_in_force": "gtc",
"total_qty": "1",
"unfilled_qty": "1.0",
"user_id": "82dde615-d181-4f3e-8d3f-53ac7962feb7"
}
],
"max_bid": 75000,
"min_ask": 80000,
"symbol": "USD-NGN"
}
⌘I