Public - Orderbook Level 2
curl --request GET \
--url https://api.ripio.com/trade/public/orders/level-2import requests
url = "https://api.ripio.com/trade/public/orders/level-2"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ripio.com/trade/public/orders/level-2', 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.ripio.com/trade/public/orders/level-2",
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.ripio.com/trade/public/orders/level-2"
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.ripio.com/trade/public/orders/level-2")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ripio.com/trade/public/orders/level-2")
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": {
"timestamp": 1675708481219,
"asks": [
{
"amount": 0.01187517,
"price": 14704.45
},
{
"amount": 1,
"price": 1873.48
}
],
"bids": [
{
"amount": 0.46097295,
"price": 14650.25
},
{
"amount": 1,
"price": 1610.15
}
],
"hash": "16757084812196786445"
},
"error_code": null,
"message": null
}Public
Orderbook Level 2
Returns the level 2 orderbook.
Authorization
- No API key required — this endpoint is public.
GET
/
trade
/
public
/
orders
/
level-2
Public - Orderbook Level 2
curl --request GET \
--url https://api.ripio.com/trade/public/orders/level-2import requests
url = "https://api.ripio.com/trade/public/orders/level-2"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ripio.com/trade/public/orders/level-2', 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.ripio.com/trade/public/orders/level-2",
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.ripio.com/trade/public/orders/level-2"
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.ripio.com/trade/public/orders/level-2")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ripio.com/trade/public/orders/level-2")
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": {
"timestamp": 1675708481219,
"asks": [
{
"amount": 0.01187517,
"price": 14704.45
},
{
"amount": 1,
"price": 1873.48
}
],
"bids": [
{
"amount": 0.46097295,
"price": 14650.25
},
{
"amount": 1,
"price": 1610.15
}
],
"hash": "16757084812196786445"
},
"error_code": null,
"message": null
}Query Parameters
Currency pair code
Example:
"BTC_BRL"
Maximum number of records to return per request. Can specify 'max' to use the service maximum.
⌘I