curl --request GET \
--url https://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quoteimport requests
url = "https://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote', 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://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote",
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://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote"
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://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote")
.asString();require 'uri'
require 'net/http'
url = URI("https://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote")
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{
"pair": "ADA-USD",
"sizeUsd": 50000,
"mid": 0.18299,
"bid": {
"price": 0.182888,
"impactBps": 5.6,
"availableNotionalUsd": 99851
},
"ask": {
"price": 0.183092,
"impactBps": 5.6,
"availableNotionalUsd": 99952
},
"topOfBook": {
"bid": 0.18291,
"ask": 0.18306
},
"priceTimestampMs": 1787198161000
}{
"error": "Bad Request",
"message": "Validation failed",
"issues": [
"<unknown>"
],
"details": "<unknown>"
}{
"error": "Bad Request",
"message": "Validation failed",
"issues": [
"<unknown>"
],
"details": "<unknown>"
}{
"error": "Bad Request",
"message": "Validation failed",
"issues": [
"<unknown>"
],
"details": "<unknown>"
}Price for a given trade size
Ostium has no central-limit order book. The price a trade actually gets comes from the dynamic price-impact model: quotes widen as net directional volume pushes past a per-pair threshold, and that volume decays over time. This prices a given size against the live model — the same one behind the trading UI’s depth chart — so you can show a fill price before submitting.
sizeUsd is USD notional, not collateral and not a quantity of the asset. There is no direction input: the model reads buy volume for a long and sell volume for a short, so the two sides can diverge after a large one-sided trade, and availableNotionalUsd differs between them at all times. Both are always returned.
Either pair spelling is accepted (US500-USD or the legacy SPX-USD); the response always echoes the public one.
A plain GET: read-only, idempotent, and safe to cache for a second or two.
A price is returned even when the size cannot fill. The impact curve stays defined beyond the open-interest cap, so compare sizeUsd against that side’s availableNotionalUsd before presenting a quote as executable.
When a pair has no dynamic impact configured, or the size stays under the pair’s volume threshold, price is exactly the top of book — the spread is the only cost.
Rate limit: 100 requests per 10 seconds per IP. Read x-ratelimit-* for the live budget rather than assuming this figure.
curl --request GET \
--url https://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quoteimport requests
url = "https://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote', 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://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote",
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://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote"
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://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote")
.asString();require 'uri'
require 'net/http'
url = URI("https://builder.prod.bedrock.ostium.io/v1/depth/{pair}/quote")
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{
"pair": "ADA-USD",
"sizeUsd": 50000,
"mid": 0.18299,
"bid": {
"price": 0.182888,
"impactBps": 5.6,
"availableNotionalUsd": 99851
},
"ask": {
"price": 0.183092,
"impactBps": 5.6,
"availableNotionalUsd": 99952
},
"topOfBook": {
"bid": 0.18291,
"ask": 0.18306
},
"priceTimestampMs": 1787198161000
}{
"error": "Bad Request",
"message": "Validation failed",
"issues": [
"<unknown>"
],
"details": "<unknown>"
}{
"error": "Bad Request",
"message": "Validation failed",
"issues": [
"<unknown>"
],
"details": "<unknown>"
}{
"error": "Bad Request",
"message": "Validation failed",
"issues": [
"<unknown>"
],
"details": "<unknown>"
}Path Parameters
Trading pair as BASE-QUOTE, e.g. BTC-USD or FTSE-GBP
^[A-Z0-9]+-[A-Z0-9]+$Query Parameters
Trade size as USD notional (not asset units)
0.000001 < x <= 1000000000000Response
Quote for both sides
Unimpacted mid from the live feed
One side of the book, named by the price a taker gets: ask is a taker buy — opening a long, or closing a short; bid is a taker sell — opening a short, or closing a long.
Show child attributes
Show child attributes
One side of the book, named by the price a taker gets: ask is a taker buy — opening a long, or closing a short; bid is a taker sell — opening a short, or closing a long.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Feed timestamp of the price this quote was derived from, in milliseconds — not the time the quote was served.