sets is SDK-side pagination. The direct Builder API response includes lastRequestTimestamp; the SDK handles repeated requests and returns one flattened candle array.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Fetch OHLC candles directly from the Builder API.
curl https://builder.prod.bedrock.ostium.io/v1/ohlc \
-H 'Content-Type: application/json' \
-d '{
"pair": "BTC-USD",
"fromTimestampSeconds": 1711929600,
"toTimestampSeconds": 1714521600,
"resolution": "1D"
}'
const candles = await client.getCandles({
pairId: 0,
from: Date.now() - 30 * 24 * 60 * 60 * 1000,
resolution: '1D',
sets: 3,
});
sets is SDK-side pagination. The direct Builder API response includes lastRequestTimestamp; the SDK handles repeated requests and returns one flattened candle array.
interface Request {
pair: string;
fromTimestampSeconds: number;
toTimestampSeconds: number;
resolution: '1' | '5' | '15' | '60' | '240' | '1D';
}
interface Response {
data: Array<{
from: string;
to: string;
time: number;
open: number;
high: number;
low: number;
close: number;
}>;
lastRequestTimestamp: number | null;
}