Skip to main content
The Decibel REST API provides HTTP endpoints under /api/v1 for market data, account data, history, analytics, rewards, and referral workflows.

Authentication Scope

Most production traffic is expected to include:
  • Authorization: Bearer <KEY>
  • Origin: <your app origin>
See Authentication for credential setup. Implementation note: authentication and access control can be enforced at multiple layers (gateway and service). Treat endpoint-level access policy as deployment-configurable rather than assuming the same behavior in every environment.

Base URL

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

Request Format

  • Endpoints are rooted at /api/v1/...
  • Current public methods are GET and POST
  • Most endpoints use query/path parameters; no generic request body format applies globally

Example Request

curl -H "Origin: https://testnet-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

The list below is aligned to runtime routes in rust/trading-api/src/http/routes.rs.

Market Data

EndpointDescription
GET /api/v1/marketsList available markets
GET /api/v1/candlesticksOHLCV candlestick data
GET /api/v1/pricesLatest market prices/funding/open interest
GET /api/v1/tradesRecent trades
GET /api/v1/dexDEX registration/metadata
GET /api/v1/contractsContract metadata
GET /api/v1/contract_specsContract spec metadata
GET /api/v1/orderbookOrder book snapshot

Account and Trading

EndpointDescription
GET /api/v1/account_positionsAccount positions
GET /api/v1/open_ordersOpen orders
GET /api/v1/ordersOrders (open/recent)
GET /api/v1/account_overviewsAccount overview and margins
GET /api/v1/subaccountsSubaccounts
GET /api/v1/user_fee_ratesCurrent maker/taker rates, fee tier, full fee schedule, and 30-day daily volume history

History

EndpointDescription
GET /api/v1/trade_historyTrade history
GET /api/v1/order_historyOrder history
GET /api/v1/funding_rate_historyFunding rate history
GET /api/v1/account_fund_historyAccount funding history
GET /api/v1/asset_contextsAsset context snapshots
GET /api/v1/withdraw_queueWithdrawal queue history/state

TWAP and Bulk Orders

EndpointDescription
GET /api/v1/active_twapsActive TWAP orders
GET /api/v1/twap_historyTWAP order history
GET /api/v1/bulk_ordersBulk order states
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 account
GET /api/v1/account_vault_performanceVault performance for an account

Analytics and Points

EndpointDescription
GET /api/v1/leaderboardTrading leaderboard
GET /api/v1/points_leaderboardPoints leaderboard
GET /api/v1/portfolio_chartPortfolio chart
GET /api/v1/delegationsDelegation info
GET /api/v1/daily_statsDaily stats
GET /api/v1/predeposits/rewardsPredeposit rewards
GET /api/v1/points/trading/accountTrading points for account
GET /api/v1/points/trading/ampsTrading amps for account
GET /api/v1/points/tierUser tier info
GET /api/v1/points/ampsOwner amps summary
GET /api/v1/points/globalGlobal points stats
GET /api/v1/streaks/accountAccount streak stats

Referral and Affiliate

EndpointDescription
GET /api/v1/referrals/account/{account}Referral info by account
GET /api/v1/referrals/usersUser referrals
GET /api/v1/referrals/stats/{account}Referral stats by account
GET /api/v1/referrals/code/{code}Validate referral code
POST /api/v1/referrals/redeemRedeem referral code
GET /api/v1/affiliates/codes/{account}Affiliate codes owned by account
GET /api/v1/affiliates/earnings/{account}Affiliate earnings by account

Backward-Compatible Aliases

EndpointCanonical Endpoint
GET /api/v1/user_positions/api/v1/account_positions
GET /api/v1/user_fund_history/api/v1/account_fund_history
GET /api/v1/user_owned_vaults/api/v1/account_owned_vaults
GET /api/v1/user_vault_performance/api/v1/account_vault_performance

SDK Alternative

For most application use cases, prefer the TypeScript SDK. See TypeScript SDK Overview.

Authentication

Credential setup and auth headers

Error Handling

Status codes and error payloads