Get Order Book (L2)
curl --request GET \
--url https://testnet.derivadex.io/stats/api/v1/order_book_l2import requests
url = "https://testnet.derivadex.io/stats/api/v1/order_book_l2"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.derivadex.io/stats/api/v1/order_book_l2', 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://testnet.derivadex.io/stats/api/v1/order_book_l2",
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://testnet.derivadex.io/stats/api/v1/order_book_l2"
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://testnet.derivadex.io/stats/api/v1/order_book_l2")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.derivadex.io/stats/api/v1/order_book_l2")
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{
"value": [
{
"symbol": "ETHP",
"amount": "0.1",
"price": 1000,
"side": 0
}
],
"success": true,
"timestamp": 1673031089
}{
"success": false,
"errorMsg": "<string>"
}{
"success": false,
"errorMsg": "<string>"
}Market
Get Order Book (L2)
Get current L2 aggregated order book
GET
/
stats
/
api
/
v1
/
order_book_l2
Get Order Book (L2)
curl --request GET \
--url https://testnet.derivadex.io/stats/api/v1/order_book_l2import requests
url = "https://testnet.derivadex.io/stats/api/v1/order_book_l2"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.derivadex.io/stats/api/v1/order_book_l2', 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://testnet.derivadex.io/stats/api/v1/order_book_l2",
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://testnet.derivadex.io/stats/api/v1/order_book_l2"
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://testnet.derivadex.io/stats/api/v1/order_book_l2")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.derivadex.io/stats/api/v1/order_book_l2")
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{
"value": [
{
"symbol": "ETHP",
"amount": "0.1",
"price": 1000,
"side": 0
}
],
"success": true,
"timestamp": 1673031089
}{
"success": false,
"errorMsg": "<string>"
}{
"success": false,
"errorMsg": "<string>"
}Query Parameters
The symbol
The best N bids and asks to return, where N = depth
The side of the order. Values include: 0: Bid, 1: Ask
Available options:
0, 1 The price aggregation to use for the L2 orderbook. Valid values for each symbol include: ETHP: 0.1, 1, 10 BTCP: 1, 10, 100
Available options:
0.1, 1, 10, 100 Last modified on June 23, 2026