Get the order book
curl --request GET \
--url https://testnet.edel-api.xyz/v1/markets/{marketId}/bookimport requests
url = "https://testnet.edel-api.xyz/v1/markets/{marketId}/book"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.edel-api.xyz/v1/markets/{marketId}/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://testnet.edel-api.xyz/v1/markets/{marketId}/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://testnet.edel-api.xyz/v1/markets/{marketId}/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://testnet.edel-api.xyz/v1/markets/{marketId}/book")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.edel-api.xyz/v1/markets/{marketId}/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{
"version": "external-book-snapshot/v1",
"marketId": "<string>",
"snapshotSequence": 1,
"readModelDigest": "<string>",
"bids": [
{
"priceAtoms": "<string>",
"price": "<string>",
"sizeAtoms": "<string>",
"size": "<string>"
}
],
"asks": [
{
"priceAtoms": "<string>",
"price": "<string>",
"sizeAtoms": "<string>",
"size": "<string>"
}
],
"checksum": "<string>",
"resync": {
"stream": "market.book",
"fromSequence": 123
}
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}Markets
Get the order book
Returns the current order-book snapshot (aggregated levels) for a market.
Method and path: GET /v1/markets//book
Authentication: none.
Request schema: none.
Response schema: ExternalBookSnapshotResponse.
Error envelope: ExternalRestError (external-rest-error/v1).
GET
/
v1
/
markets
/
{marketId}
/
book
Get the order book
curl --request GET \
--url https://testnet.edel-api.xyz/v1/markets/{marketId}/bookimport requests
url = "https://testnet.edel-api.xyz/v1/markets/{marketId}/book"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.edel-api.xyz/v1/markets/{marketId}/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://testnet.edel-api.xyz/v1/markets/{marketId}/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://testnet.edel-api.xyz/v1/markets/{marketId}/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://testnet.edel-api.xyz/v1/markets/{marketId}/book")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.edel-api.xyz/v1/markets/{marketId}/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{
"version": "external-book-snapshot/v1",
"marketId": "<string>",
"snapshotSequence": 1,
"readModelDigest": "<string>",
"bids": [
{
"priceAtoms": "<string>",
"price": "<string>",
"sizeAtoms": "<string>",
"size": "<string>"
}
],
"asks": [
{
"priceAtoms": "<string>",
"price": "<string>",
"sizeAtoms": "<string>",
"size": "<string>"
}
],
"checksum": "<string>",
"resync": {
"stream": "market.book",
"fromSequence": 123
}
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}Path Parameters
Minimum string length:
1Response
Success
Allowed value:
"external-book-snapshot/v1"Minimum string length:
1Required range:
x >= 0Covers the book content published here -- marketId, snapshotSequence, bids and asks. Recomputable by a client from this payload.
Pattern:
^sha256:[0-9a-f]{64}$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Pattern:
^sha256:[0-9a-f]{64}$Show child attributes
Show child attributes