Latest price for one pair
curl --request GET \
--url https://builder.prod.bedrock.ostium.io/v1/prices/{pair}import requests
url = "https://builder.prod.bedrock.ostium.io/v1/prices/{pair}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://builder.prod.bedrock.ostium.io/v1/prices/{pair}', 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/prices/{pair}",
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/prices/{pair}"
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/prices/{pair}")
.asString();require 'uri'
require 'net/http'
url = URI("https://builder.prod.bedrock.ostium.io/v1/prices/{pair}")
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{
"price": {
"feed_id": "1",
"pair": "BTC-USD",
"from": "BTC",
"to": "USD",
"bid": 97421.5,
"mid": 97422,
"ask": 97422.5,
"isMarketOpen": true,
"isDayTradingClosed": false,
"secondsToToggleIsDayTradingClosed": 3600,
"timestampSeconds": 1710000000,
"schedule": {
"id": 1,
"alwaysOpen": true
}
},
"stale": false,
"generatedAt": 1710000000123
}{
"error": "Bad Request",
"message": "Validation failed",
"issues": []
}{
"error": "Not Found",
"message": "Price not found for pair BTC-USD"
}{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Try again in 7s."
}{
"error": "Internal Server Error",
"message": "Internal Server Error"
}Prices
Latest price for one pair
The most recent bid/mid/ask for a single pair, given as BASE-QUOTE (e.g. BTC-USD). Identical to /v1/prices but scoped to one symbol — use it for a single-market view, or for a quick quote before submitting an order, rather than fetching every pair and discarding the rest.
A 404 means no price is available for that pair: either the symbol is wrong, or it has not traded since the service started. Check timestampSeconds on the tick to judge how fresh the quote is.
Rate limit: 100 requests per 10 seconds per IP. Read x-ratelimit-* for the live budget rather than assuming this figure.
GET
/
v1
/
prices
/
{pair}
Latest price for one pair
curl --request GET \
--url https://builder.prod.bedrock.ostium.io/v1/prices/{pair}import requests
url = "https://builder.prod.bedrock.ostium.io/v1/prices/{pair}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://builder.prod.bedrock.ostium.io/v1/prices/{pair}', 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/prices/{pair}",
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/prices/{pair}"
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/prices/{pair}")
.asString();require 'uri'
require 'net/http'
url = URI("https://builder.prod.bedrock.ostium.io/v1/prices/{pair}")
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{
"price": {
"feed_id": "1",
"pair": "BTC-USD",
"from": "BTC",
"to": "USD",
"bid": 97421.5,
"mid": 97422,
"ask": 97422.5,
"isMarketOpen": true,
"isDayTradingClosed": false,
"secondsToToggleIsDayTradingClosed": 3600,
"timestampSeconds": 1710000000,
"schedule": {
"id": 1,
"alwaysOpen": true
}
},
"stale": false,
"generatedAt": 1710000000123
}{
"error": "Bad Request",
"message": "Validation failed",
"issues": []
}{
"error": "Not Found",
"message": "Price not found for pair BTC-USD"
}{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Try again in 7s."
}{
"error": "Internal Server Error",
"message": "Internal Server Error"
}