Market Info
Public market data endpoints. No SIWE authentication required, but every /api/* endpoint is gated by an _idx_session cookie — see Session Cookie before your first call.
Base URL: https://api.t.synchronicity.xyz/indexer
All /api/* endpoints return 503 Service Unavailable while the indexer is syncing. Use /status to check sync progress — /status bypasses the session cookie, so you can probe it without priming the cookie first.
Status & Health
GET /status
Returns current sync progress. Always available.
Response
{
"state": "syncing",
"phase": "http_sync",
"is_syncing": true,
"progress": 45.2,
"checkpoint": 150000,
"target": 332000,
"gap": 182000,
"started_at": "2025-01-01T00:00:00Z",
"last_updated": "2025-01-01T00:05:00Z",
"live_at": ""
}| Field | Type | Description |
|---|---|---|
state | string | "syncing", "buffering", or "live" |
phase | string | "http_sync", "buffer_drain", or "live" |
is_syncing | bool | true if not yet live |
progress | float | 0–100 percentage |
checkpoint | int | Current event number |
target | int | Target event number |
gap | int | Events remaining |
started_at | string | RFC 3339 timestamp |
last_updated | string | RFC 3339 timestamp |
live_at | string | RFC 3339 timestamp (empty until live) |
GET /health
Health check. Returns 200 if the server is running.
Orderbooks
GET /api/orderbooks
Returns metadata for all orderbooks.
Response
[
{
"orderbook_id": 1,
"asset_quote_name": "BTC-USDT",
"size_decimals": 5,
"price_decimals": 1,
"index_price_oracle_id": "...",
"mark_price_oracle_id": "...",
"mmr_brackets": [
{
"notional_max": "50000",
"rate_centibips": "50",
"max_leverage": 50,
"mm_deduction": "0"
}
]
}
]| Field | Type | Description |
|---|---|---|
orderbook_id | number | The orderbook/market identifier |
asset_quote_name | string | Trading pair name (e.g. "BTC-USDT") |
size_decimals | number | Number of decimals allowed for order sizes |
price_decimals | number | Number of decimals allowed for order prices |
index_price_oracle_id | string | Oracle ID for the index price |
mark_price_oracle_id | string | Oracle ID for the mark price |
mmr_brackets | array | Tiered maintenance margin requirements |
GET /api/orderbooks/summary
Returns a compact market snapshot for every orderbook.
Response
[
{
"orderbook_id": 1,
"asset_quote_name": "BTC-USDT",
"mark_price": "50000.0",
"index_price": "50010.0",
"mid_price": "50005.0",
"size_decimals": 5,
"price_decimals": 1
}
]| Field | Type | Description |
|---|---|---|
orderbook_id | number | The orderbook/market identifier |
asset_quote_name | string | Trading pair name |
mark_price | string | Current mark price formatted with orderbook price decimals |
index_price | string | Current index price formatted with orderbook price decimals |
mid_price | string | Current midpoint derived from best bid and best ask |
size_decimals | number | Number of decimals allowed for order sizes |
price_decimals | number | Number of decimals allowed for order prices |
Responses are returned in ascending orderbook_id order.
GET /api/mids
Returns the current midpoint for every orderbook as a map keyed by orderbook ID.
Response
{
"1": "50005.0",
"2": "3000.03"
}| Field | Type | Description |
|---|---|---|
| object key | string | Orderbook ID |
| object value | string | Mid price formatted with the orderbook’s price decimals |
GET /api/orderbook/:orderbookId/decimals
Returns decimal configuration for a specific orderbook.
Path Parameters
| Param | Type | Description |
|---|---|---|
orderbookId | int | Orderbook ID |
Response
{
"orderbook_id": 1,
"size_decimals": 4,
"price_decimals": 2
}| Field | Type | Description |
|---|---|---|
orderbook_id | number | Echo of the requested order book ID |
size_decimals | number | Number of decimals allowed for order sizes (lot_decimals) |
price_decimals | number | Number of decimals allowed for order prices (tick_decimals) |
Usage Notes
If more than the maximum number of expected decimals are used, the API will generally round in the direction safer to the user. (e.g., if an order to go long (short) is created with too many price decimals, it will round the price down (up)).
- size_decimals: Maximum number of decimal places for order size. Example: If
size_decimals = 5, “1.12345” is expected but not “1.123456” - price_decimals: Maximum number of decimal places for order price. Example: If
price_decimals = 1, “100000.0” is expected but not “100000.05”
Error Responses
400 Bad Request - Missing or invalid order book ID:
{
"error": "order book ID required"
}404 Not Found - Order book does not exist:
{
"error": "Order book not found"
}Funding
GET /api/funding-rates
Returns historical funding rate entries for a single orderbook.
Query Parameters
| Param | Type | Required | Description |
|---|---|---|---|
orderbook_id | int | yes | Numeric orderbook ID |
startTime | int | no | Start time in milliseconds |
endTime | int | no | End time in milliseconds |
limit | int | no | Max rows to return, default 500, max 5000 |
startTime and endTime, when provided, must be millisecond timestamps. startTime must be less than or equal to endTime.
Response
[
{
"orderbook_id": 1,
"funding_rate": "0.0001",
"timestamp": 1700000000000
}
]| Field | Type | Description |
|---|---|---|
orderbook_id | number | The orderbook/market identifier |
funding_rate | string | Funding rate value |
timestamp | number | Funding timestamp in milliseconds |
Candles
GET /api/candles
Returns trade candles (OHLCV) for an orderbook.
Query Parameters
| Param | Type | Required | Description |
|---|---|---|---|
orderbook_id | int | one of orderbook_id or symbol | Numeric orderbook ID |
symbol | string | one of orderbook_id or symbol | e.g. "BTC-USDT" |
interval | string | yes | 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w, 1M |
limit | int | no | Max candles (max 5000) |
startTime | int | no | Start time in milliseconds |
endTime | int | no | End time in milliseconds |
Response
[
{
"t": 1700000000000,
"T": 1700000060000,
"s": "BTC-USDT",
"i": "1m",
"o": "42000.00",
"h": "42100.00",
"l": "41900.00",
"c": "42050.00",
"v": "12.5000",
"n": 45
}
]| Field | Description |
|---|---|
t | Open time (ms) |
T | Close time (ms) |
s | Symbol |
i | Interval |
o | Open price |
h | High price |
l | Low price |
c | Close price |
v | Volume |
n | Trade count |
GET /api/markCandles
Returns mark price candles. Same response shape as /api/candles.
Query Parameters — same as /api/candles.
GET /api/indexCandles
Returns index price candles. Same response shape as /api/candles.
Query Parameters — same as /api/candles.
Data Types
- All numeric values (prices, volumes, balances) are strings to preserve precision.
- Timestamps are milliseconds (Unix epoch) unless otherwise noted.
orderbook_id: uint64.