Skip to main content
The Decibel REST API provides read-only access to market data and user data. Use it to fetch prices, orderbook snapshots, positions, and historical data. All endpoints require authentication. See Authentication for how to get and use your API key.

Base URL

NetworkBase URL
Testnethttps://api.testnet.aptoslabs.com/decibel
Mainnethttps://api.mainnet.aptoslabs.com/decibel

Request Format

All endpoints are GET requests under /api/v1/ with query parameters. No request body is needed.

Example Request

curl -H "Origin: https://netna-app.decibel.trade/trade" \
     -H "Authorization: Bearer <KEY>" \
     "https://api.testnet.aptoslabs.com/decibel/api/v1/prices"

Example Response

[
  {
    "market": "0x...",
    "oracle_px": 97250.5,
    "mark_px": 97248.3,
    "mid_px": 97249.0,
    "funding_rate_bps": 0.12,
    "is_funding_positive": true,
    "transaction_unix_ms": 1718000000000,
    "open_interest": 5200000.0
  }
]

Available Endpoints

Market Data

EndpointDescription
GET /api/v1/marketsList all available markets
GET /api/v1/candlesticksOHLCV candlestick data
GET /api/v1/pricesCurrent prices, funding rates, and open interest
GET /api/v1/tradesRecent trades for a market
GET /api/v1/dexDEX-level summary

Account Data

EndpointDescription
GET /api/v1/account_positionsOpen positions for an account
GET /api/v1/open_ordersCurrently open orders
GET /api/v1/ordersOrders (open and recent)
GET /api/v1/account_overviewsAccount equity, margin, and balances
GET /api/v1/subaccountsTrading Accounts for a user

History

EndpointDescription
GET /api/v1/trade_historyHistorical trades
GET /api/v1/order_historyHistorical orders
GET /api/v1/funding_rate_historyHistorical funding rates
GET /api/v1/account_fund_historyDeposit and withdrawal history
GET /api/v1/asset_contextsAsset context snapshots

TWAP

EndpointDescription
GET /api/v1/active_twapsActive TWAP orders
GET /api/v1/twap_historyTWAP order history

Bulk Orders

EndpointDescription
GET /api/v1/bulk_ordersActive bulk orders
GET /api/v1/bulk_order_fillsBulk order fill history
GET /api/v1/bulk_order_statusBulk order status

Vaults

EndpointDescription
GET /api/v1/vaultsList all vaults
GET /api/v1/account_owned_vaultsVaults owned by an account
GET /api/v1/account_vault_performanceVault performance for an account

Analytics

EndpointDescription
GET /api/v1/leaderboardTrading leaderboard
GET /api/v1/portfolio_chartPortfolio value over time
GET /api/v1/delegationsDelegation information

SDK Alternative

For most use cases, the TypeScript SDK provides a more ergonomic interface. See TypeScript SDK Overview.

Next Steps

Authentication

Required for all API access

Error Handling

Common errors and how to handle them