curl --request GET \
--url https://builder.prod.bedrock.ostium.io/v1/tradesimport requests
url = "https://builder.prod.bedrock.ostium.io/v1/trades"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://builder.prod.bedrock.ostium.io/v1/trades', 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/trades",
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/trades"
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/trades")
.asString();require 'uri'
require 'net/http'
url = URI("https://builder.prod.bedrock.ostium.io/v1/trades")
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{
"trader": "0x98279066957a9eaf627d33983409a548cf3e2207",
"chainId": 421614,
"first": 100,
"skip": 0,
"count": 1,
"trades": [
{
"id": "151146",
"tradeID": "151146",
"tradeType": "Market",
"index": "3",
"trader": "0x98279066957a9eaf627d33983409a548cf3e2207",
"isBuy": true,
"isOpen": true,
"isDayTrade": false,
"openPrice": 77498.43216816566,
"stopLossPrice": 0,
"takeProfitPrice": 147247.02111951474,
"collateral": 49.2,
"notionalInUsd": 492,
"notionalInUnits": 0.006348515527803165,
"leverage": 10,
"openingFee": 0.8,
"builder": "0x0000000000000000000000000000000000000000",
"builderFee": 0,
"closeInitiated": "0",
"timestamp": "1787942238",
"pair": {
"id": "0",
"from": "BTC",
"to": "USD"
}
}
]
}{
"error": "Bad Request",
"message": "Validation failed",
"issues": []
}{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Try again in 7s."
}{
"error": "Bad Gateway",
"message": "Failed to reach the Ostium subgraph."
}Open positions for a wallet
What the wallet is holding right now, newest first. A position appears the moment it fills and disappears the moment it closes — its closing fill then shows up in GET /v1/orders.
Reading a position
{
"tradeID": "151146",
"isBuy": true,
"openPrice": 77498.43,
"collateral": 49.2,
"notionalInUsd": 492,
"notionalInUnits": 0.00634851,
"leverage": 10,
"openingFee": 0.8,
"pair": { "id": "0", "from": "BTC", "to": "USD" }
}
A 10x long on BTC-USD: 49.2 USDC of margin controlling 492 USD of exposure, which at an entry of 77,498.43 is 0.00634851 BTC. It cost 0.80 USDC to open.
| Field | Means |
|---|---|
notionalInUsd | Position size in USD — collateral × leverage |
notionalInUnits | The same size as a quantity of the base asset |
openingFee | Total charged at open, in USDC |
builder / builderFee | The builder code the trade was opened with, and its fee |
isDayTrade | Opened under day-trade margin, which closes at session end |
tradeID is the handle you pass back to POST /v1/orders to close it.
Rate limit: 60 requests per 10 seconds per IP. This budget is shared across /v1/pairs, /v1/trades, /v1/limits and GET /v1/orders, not counted per path. Read x-ratelimit-* for the live budget rather than assuming this figure.
curl --request GET \
--url https://builder.prod.bedrock.ostium.io/v1/tradesimport requests
url = "https://builder.prod.bedrock.ostium.io/v1/trades"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://builder.prod.bedrock.ostium.io/v1/trades', 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/trades",
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/trades"
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/trades")
.asString();require 'uri'
require 'net/http'
url = URI("https://builder.prod.bedrock.ostium.io/v1/trades")
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{
"trader": "0x98279066957a9eaf627d33983409a548cf3e2207",
"chainId": 421614,
"first": 100,
"skip": 0,
"count": 1,
"trades": [
{
"id": "151146",
"tradeID": "151146",
"tradeType": "Market",
"index": "3",
"trader": "0x98279066957a9eaf627d33983409a548cf3e2207",
"isBuy": true,
"isOpen": true,
"isDayTrade": false,
"openPrice": 77498.43216816566,
"stopLossPrice": 0,
"takeProfitPrice": 147247.02111951474,
"collateral": 49.2,
"notionalInUsd": 492,
"notionalInUnits": 0.006348515527803165,
"leverage": 10,
"openingFee": 0.8,
"builder": "0x0000000000000000000000000000000000000000",
"builderFee": 0,
"closeInitiated": "0",
"timestamp": "1787942238",
"pair": {
"id": "0",
"from": "BTC",
"to": "USD"
}
}
]
}{
"error": "Bad Request",
"message": "Validation failed",
"issues": []
}{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Try again in 7s."
}{
"error": "Bad Gateway",
"message": "Failed to reach the Ostium subgraph."
}Query Parameters
Trader wallet address (0x-prefixed, 40 hex characters)
^0x[a-fA-F0-9]{40}$Chain to read from: 42161 (Arbitrum One) or 421614 (Arbitrum Sepolia)
42161, 421614 Maximum rows to return (1-1000)
1 <= x <= 1000Rows to skip, for paging (0-5000; use since to page deeper)
0 <= x <= 5000