curl --request GET \
--url https://builder.prod.bedrock.ostium.io/v1/limitsimport requests
url = "https://builder.prod.bedrock.ostium.io/v1/limits"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://builder.prod.bedrock.ostium.io/v1/limits', 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/limits",
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/limits"
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/limits")
.asString();require 'uri'
require 'net/http'
url = URI("https://builder.prod.bedrock.ostium.io/v1/limits")
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": "0x609dfb78434525c766f439d61c205dff48c9a264",
"chainId": 42161,
"first": 100,
"skip": 0,
"count": 1,
"limits": [
{
"id": "0x609dfb78434525c766f439d61c205dff48c9a264_2_0",
"trader": "0x609dfb78434525c766f439d61c205dff48c9a264",
"isActive": true,
"isBuy": false,
"isDayTrade": false,
"limitType": "STOP",
"openPrice": 1.16064,
"stopLossPrice": 0,
"takeProfitPrice": 0,
"collateral": 302.77119,
"notionalInUsd": 1513.85595,
"notionalInUnits": 1304.3,
"leverage": 50,
"orderId": "2189730",
"initiatedAt": "1788164716",
"updatedAt": "1788164716",
"pair": {
"id": "2",
"from": "EUR",
"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."
}Limit/stop orders for a wallet
Orders the wallet has placed that have not filled or been cancelled — its resting book.
Nothing here has executed. These are not positions: when one fills it becomes a position in GET /v1/trades and a fill in GET /v1/orders, and leaves this list.
Reading a resting order
{
"limitType": "STOP",
"isBuy": false,
"openPrice": 1.16064,
"collateral": 302.77,
"leverage": 50,
"pair": { "id": "2", "from": "EUR", "to": "USD" }
}
A short on EUR-USD waiting to trigger at 1.16064, which will open with 302.77 USDC at 50x.
limitType | Triggers |
|---|---|
LIMIT | When price reaches openPrice from the favourable side |
STOP | When price breaks through openPrice |
stopLossPrice and takeProfitPrice are the exits that will be attached to the position once it opens, and are 0 when unset.
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/limitsimport requests
url = "https://builder.prod.bedrock.ostium.io/v1/limits"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://builder.prod.bedrock.ostium.io/v1/limits', 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/limits",
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/limits"
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/limits")
.asString();require 'uri'
require 'net/http'
url = URI("https://builder.prod.bedrock.ostium.io/v1/limits")
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": "0x609dfb78434525c766f439d61c205dff48c9a264",
"chainId": 42161,
"first": 100,
"skip": 0,
"count": 1,
"limits": [
{
"id": "0x609dfb78434525c766f439d61c205dff48c9a264_2_0",
"trader": "0x609dfb78434525c766f439d61c205dff48c9a264",
"isActive": true,
"isBuy": false,
"isDayTrade": false,
"limitType": "STOP",
"openPrice": 1.16064,
"stopLossPrice": 0,
"takeProfitPrice": 0,
"collateral": 302.77119,
"notionalInUsd": 1513.85595,
"notionalInUnits": 1304.3,
"leverage": 50,
"orderId": "2189730",
"initiatedAt": "1788164716",
"updatedAt": "1788164716",
"pair": {
"id": "2",
"from": "EUR",
"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