Authentication.
Public endpoints (market data) require no authentication. Private endpoints (account, orders) require an X-Signature header containing an Ed25519 signature of the request body, signed by the trader's Solana wallet. Include X-Public-Key and X-Timestamp headers. Requests older than 30 seconds are rejected.
Rate limits.
100 requests per second per IP for public endpoints. 50 per second per public key for authenticated endpoints. Burst capacity of 2x for 5 seconds. WebSocket: 5 concurrent connections per IP. Returns 429 with a Retry-After header when exceeded.
Markets.
Public market data endpoints. No authentication required.
/v1/marketsList all markets with current mark, OI, funding, max leverage.
{
"markets": [
{
"symbol": "BONK-PERP",
"mark": 0.0000218,
"index": 0.0000217,
"open_interest": 8723421.50,
"volume_24h": 42103882.10,
"funding_8h": 0.00011,
"max_leverage": 50,
"tier": 1
}
]
}/v1/markets/{symbol}Single market details including mark, index, OI, volume, funding, and tier.
/v1/markets/{symbol}/candles?interval=1m&limit=100OHLCV candles for the specified market and interval.
/v1/markets/{symbol}/trades?limit=50Recent trades for the specified market.
/v1/markets/{symbol}/orderbook?depth=20Order book snapshot at the specified depth.
Account.
Authenticated endpoints for account state.
/v1/accountAccount summary: equity, margin used, free collateral, current H ratio applied.
{
"equity_usdc": 12483.22,
"free_collateral_usdc": 8201.10,
"margin_used_usdc": 4282.12,
"h_current": 1.0,
"epoch": 41
}/v1/account/positionsOpen positions with entry price, size, unrealized PnL, and liquidation price.
/v1/account/fillsRecent fills with timestamp, price, size, and side.
/v1/account/withdrawalsWithdrawal history with H applied per row.
Orders.
Authenticated endpoints for order management.
/v1/ordersPlace an order. Supports market and limit types.
{
"symbol": "WIF-PERP",
"side": "long",
"size": 1000,
"leverage": 10,
"type": "market"
}/v1/orders/{id}Cancel a specific order by ID.
/v1/ordersCancel all orders, optionally filtered by symbol query parameter.
/v1/ordersList open orders.
WebSocket streams.
Connect to wss://stream.perconaries.com/v1. Subscribe with a JSON message. Public streams need no auth. Private streams require the same signed handshake as authenticated REST.
Available streams:
markets— All market updates, 100ms throttled.markets.{symbol}.trades— Trade prints.markets.{symbol}.orderbook— Incremental order book.account— Account state changes (private).account.positions— Position updates (private).account.fills— Fill notifications (private).risk— Live H ratio and per-side A/K state. Public.
{
"op": "subscribe",
"channels": ["markets.BONK-PERP.trades", "risk"]
}Errors.
| Code | Meaning |
|---|---|
| 400 | Malformed request |
| 401 | Invalid or missing signature |
| 403 | Action not permitted in current market state (e.g. DrainOnly) |
| 404 | Market or resource not found |
| 409 | Order conflicts with existing state |
| 429 | Rate limit exceeded |
| 503 | Market in ResetPending phase, retry after epoch advances |