# Decibel ## Docs - [Decibel Documentation](https://docs.decibel.trade/index.md): Trader and developer documentation for integrating with Decibel's fully on-chain perpetuals exchange. - [What is Decibel?](https://docs.decibel.trade/for-traders/overview.md): A fully on-chain perpetual futures exchange with cross-chain deposits - [Perpetuals vs Spot](https://docs.decibel.trade/for-traders/perps-vs-spot.md): Understanding the difference between perpetual futures and spot trading - [Multi-Collateral](https://docs.decibel.trade/for-traders/multi-collateral.md): Use multiple asset types as margin from a single account - [Fees](https://docs.decibel.trade/for-traders/fees.md): Trading fees and fee structure on Decibel - [Margin](https://docs.decibel.trade/for-traders/margin.md): How cross-margin and leverage work on Decibel - [Funding Rates](https://docs.decibel.trade/for-traders/funding-rates.md): How continuous funding keeps perp prices aligned with spot - [Liquidations](https://docs.decibel.trade/for-traders/liquidations.md): How liquidations work on Decibel and what to expect - [Auto-Deleveraging (ADL)](https://docs.decibel.trade/for-traders/auto-deleveraging.md): Decibel's final circuit breaker for extreme market conditions - [Vaults](https://docs.decibel.trade/for-traders/vaults.md): Contribute to a trader's vault or launch your own. Managers trade with pooled capital and earn interval-based fees on profits. - [DLP Vault](https://docs.decibel.trade/for-traders/dlp-vault.md): The protocol-owned vault that provides exchange liquidity and serves as the backstop liquidator. Uses the same vault infrastructure as user-created vaults, continuously quoting bid/ask prices across all supported markets. - [Rewards Programs](https://docs.decibel.trade/rewards/overview.md): Everything you can earn on Decibel — from the Amps points program and referral rewards to targeted trading campaigns. - [Amps: Season 1](https://docs.decibel.trade/rewards/amps.md): Decibel's native points program. Amps accrue daily based on trading activity, liquidity provision, and ecosystem contributions — and are a primary input for TGE token distribution. - [Referral Program](https://docs.decibel.trade/rewards/referral-program.md): Invite traders to Decibel and earn 10% of their Amps from a dedicated daily emission pool. - [Live Campaigns](https://docs.decibel.trade/rewards/campaigns/live.md): Campaigns that are active today and distributing rewards — First Trade on Us; Global Warming, Home Cooling; Liquidation Rebate; and Maker Rebate. - [Upcoming Campaigns](https://docs.decibel.trade/rewards/campaigns/upcoming.md): Campaigns scheduled to launch on Decibel but not yet live. - [Potential Campaigns](https://docs.decibel.trade/rewards/campaigns/potential.md): Campaigns on Decibel's roadmap that may or may not launch — Trading Competitions and more. - [FAQ](https://docs.decibel.trade/rewards/faq.md): Common questions about Amps, campaigns, claiming rewards, referrals, and eligibility. - [Developer Hub](https://docs.decibel.trade/developer-hub/overview.md): Build automated trading systems on Decibel - [Core Concepts](https://docs.decibel.trade/quickstart/concepts.md): Mental model for building on Decibel: accounts, orderbook, perps, vaults, and APIs. - [TypeScript Starter Kit](https://docs.decibel.trade/quickstart/typescript-starter-kit.md): Place orders via REST API and stream market data via WebSocket. Get your first trade in under 10 minutes, then customize the bot for your strategy. - [Client API Key Setup](https://docs.decibel.trade/quickstart/node-api-key.md): Learn how to set up a Client API key from Geomi to access Decibel's GET APIs - [Placing Your First Order](https://docs.decibel.trade/quickstart/placing-your-first-order.md): Learn the minimum required code to build, sign, and submit your first order transaction - [Market Data](https://docs.decibel.trade/quickstart/market-data.md): Learn how to send unauthenticated requests to access public market data - [Authenticated Requests](https://docs.decibel.trade/quickstart/authenticated-requests.md): Learn how to send authenticated requests by signing and submitting on-chain transactions - [Vault Integration Guide](https://docs.decibel.trade/developer-hub/guides/vaults.md): Create and manage onchain vaults that pool capital under a single manager with interval-based performance fees and fungible share tokens. - [Bulk Orders](https://docs.decibel.trade/developer-hub/guides/bulk-orders.md): Efficient order management for market makers - [Builder Codes](https://docs.decibel.trade/quickstart/builder-codes.md): Learn about Decibel's technical architecture and how builders can leverage the platform - [TypeScript SDK Overview](https://docs.decibel.trade/typescript-sdk/overview.md): Decibel TypeScript SDK for reading market data and submitting transactions on Aptos - [Installation](https://docs.decibel.trade/typescript-sdk/installation.md): Install the Decibel TypeScript SDK and its peer dependencies - [Configuration](https://docs.decibel.trade/typescript-sdk/configuration.md): Network presets and configuration for the Decibel TypeScript SDK - [Read SDK](https://docs.decibel.trade/typescript-sdk/read-sdk.md): Query market data, account state, and subscribe to real-time updates - [Write SDK](https://docs.decibel.trade/typescript-sdk/write-sdk.md): Submit trades and manage Trading Accounts, positions, and vaults - [Error responses](https://docs.decibel.trade/typescript-sdk/error-responses.md): Error codes and handling for TypeScript SDK functions - [Advanced](https://docs.decibel.trade/typescript-sdk/advanced.md): Gas price management, fee payer behavior, and time synchronization - [CLI Overview](https://docs.decibel.trade/cli/overview.md): Decibel CLI for trading, account management, and market data from the terminal - [Installation](https://docs.decibel.trade/cli/installation.md): Install the Decibel CLI globally - [Configuration](https://docs.decibel.trade/cli/configuration.md): Configure accounts, networks, and environment variables for the Decibel CLI - [Command Reference](https://docs.decibel.trade/cli/reference.md): Complete reference for all Decibel CLI commands - [On-Chain Reference](https://docs.decibel.trade/developer-hub/on-chain/overview/index.md): Direct transaction reference for building on Decibel without the SDK - [Contract Addresses & Helpers](https://docs.decibel.trade/developer-hub/on-chain/overview/contract-reference.md): Package addresses and helper functions for building Decibel transactions - [Optimized Transaction Building](https://docs.decibel.trade/developer-hub/on-chain/overview/optimized-building.md): For better performance, you can build transactions synchronously using ABI data, a replay protection nonce, and the chain ID. This avoids network calls during transaction construction - [Formatting Prices and Sizes for Orders](https://docs.decibel.trade/developer-hub/on-chain/overview/formatting-prices-sizes.md): Learn how to convert decimal prices and sizes to chain units using market configuration from the v1/markets endpoint - [Market Parameters](https://docs.decibel.trade/developer-hub/on-chain/overview/market-parameters.md): Min order size, lot size, tick size, and precision for all live Decibel markets - [Create Trading Account](https://docs.decibel.trade/developer-hub/on-chain/account-management/create-subaccount.md): Create a new Trading Account - [Delegate Trading To](https://docs.decibel.trade/developer-hub/on-chain/account-management/delegate-trading.md): Delegate trading permissions to another account - [Revoke Delegation](https://docs.decibel.trade/developer-hub/on-chain/account-management/revoke-delegation.md): Revoke trading delegation from an account - [Deposit to Trading Account](https://docs.decibel.trade/developer-hub/on-chain/account-management/deposit.md): Deposit collateral to a Trading Account - [Withdraw from Trading Account](https://docs.decibel.trade/developer-hub/on-chain/account-management/withdraw.md): Withdraw collateral from a Trading Account - [Place Order](https://docs.decibel.trade/developer-hub/on-chain/order-management/place-order.md): Place a limit order on the exchange - [Cancel Order](https://docs.decibel.trade/developer-hub/on-chain/order-management/cancel-order.md): Cancel an order by order ID - [Cancel Client Order](https://docs.decibel.trade/developer-hub/on-chain/order-management/cancel-client-order.md): Cancel an order by client-assigned order ID - [Place TWAP Order](https://docs.decibel.trade/developer-hub/on-chain/order-management/place-twap-order.md): Place a Time-Weighted Average Price (TWAP) order - [Cancel TWAP Order](https://docs.decibel.trade/developer-hub/on-chain/order-management/cancel-twap-order.md): Cancel a TWAP order - [Place Bulk Order](https://docs.decibel.trade/developer-hub/on-chain/order-management/place-bulk-order.md): Place a post-only bulk order on the exchange - [Cancel Bulk Order](https://docs.decibel.trade/developer-hub/on-chain/order-management/cancel-bulk-order.md): Cancels a bulk order for the specified account. Equivalent to submitting a bulk order with no price levels. - [Place TP/SL Order for Position](https://docs.decibel.trade/developer-hub/on-chain/position-management/place-tp-sl-order.md): Place take-profit and/or stop-loss orders for an existing position - [Update TP Order for Position](https://docs.decibel.trade/developer-hub/on-chain/position-management/update-tp-order.md): Update an existing take-profit order for a position - [Update SL Order for Position](https://docs.decibel.trade/developer-hub/on-chain/position-management/update-sl-order.md): Update an existing stop-loss order for a position - [Cancel TP/SL Order for Position](https://docs.decibel.trade/developer-hub/on-chain/position-management/cancel-tp-sl-order.md): Cancel a take-profit or stop-loss order for a position - [Approve Max Builder Fee](https://docs.decibel.trade/developer-hub/on-chain/builder-fee/approve-max-builder-fee.md): Approve maximum builder fee for a Trading Account - [Revoke Max Builder Fee](https://docs.decibel.trade/developer-hub/on-chain/builder-fee/revoke-max-builder-fee.md): Revoke maximum builder fee approval for a Trading Account - [Create and Fund Vault](https://docs.decibel.trade/developer-hub/on-chain/vault/create-and-fund.md): Create a new vault with optional initial funding - [Activate Vault](https://docs.decibel.trade/developer-hub/on-chain/vault/activate.md): Activate a vault to accept contributions - [Contribute to Vault](https://docs.decibel.trade/developer-hub/on-chain/vault/contribute.md): Contribute funds to a vault in exchange for shares - [Redeem from Vault](https://docs.decibel.trade/developer-hub/on-chain/vault/redeem.md): Redeem shares from a vault for underlying assets - [Delegate DEX Actions To](https://docs.decibel.trade/developer-hub/on-chain/vault/delegate-dex-actions.md): Delegate trading actions to another account for a vault - [REST API Overview](https://docs.decibel.trade/api-reference/rest/overview.md): HTTP endpoints for Decibel market, account, history, rewards, and referral data - [Authentication](https://docs.decibel.trade/api-reference/rest/authentication.md): How to authenticate REST API requests - [Error Handling](https://docs.decibel.trade/api-reference/rest/errors.md): Common API errors and how to handle them - [Get user fund history (deposits and withdrawals)](https://docs.decibel.trade/api-reference/user/get-user-fund-history-deposits-and-withdrawals.md): Retrieve deposit and withdrawal history for a specific user. Returns chronological list of fund movements with amounts and timestamps. Supports filtering by timestamp range, sorting by timestamp, and pagination. Page size is capped at 200. - [Get delegations](https://docs.decibel.trade/api-reference/user/get-delegations.md): Retrieve active delegations for a specific subaccount. Shows delegated accounts and their associated permissions. - [Get apiv1orders](https://docs.decibel.trade/api-reference/user/get-apiv1orders.md): Get single order details - [Get user fund history (deprecated)](https://docs.decibel.trade/api-reference/user/get-user-fund-history-deprecated.md): **Deprecated:** This endpoint is deprecated. Please use `/api/v1/account_fund_history` instead. This endpoint is maintained for backwards compatibility only. - [Get user positions (deprecated)](https://docs.decibel.trade/api-reference/user/get-user-positions-deprecated.md): **Deprecated:** This perp-only endpoint is deprecated. Please use `/api/v1/account_positions` instead. This endpoint is maintained for backwards compatibility only. - [Get withdrawal queue entries for an account](https://docs.decibel.trade/api-reference/user/get-withdrawal-queue-entries-for-an-account.md): Returns all withdrawal queue entries for the specified account, optionally filtered by status. - [Get account overview](https://docs.decibel.trade/api-reference/account/get-account-overview.md): Retrieve comprehensive perp account information including equity, realized/unrealized PnL, margin utilization, and optional performance metrics. Use `include_performance=true` to get historical return metrics. - [Get account positions](https://docs.decibel.trade/api-reference/account/get-account-positions.md): Retrieve all open perp positions for a specific account with optional filtering by one perp market address. Includes position size, entry price, unrealized PnL, liquidation price, and margin details. - [Get aggregate account volume over a date range](https://docs.decibel.trade/api-reference/account/get-aggregate-account-volume-over-a-date-range.md): Returns the account's total, maker, and taker volume (in whole USD) for the requested inclusive date range. When `start_date` and `end_date` are omitted the range defaults to the past 30 days (today() - 29 .. today(), UTC). - [Get user funding rate history](https://docs.decibel.trade/api-reference/account/get-user-funding-rate-history.md): Retrieve perp funding rate payment history for a specific user. Shows funding payments including the direction, amount, and associated fees. Supports filtering by perp market, side, and timestamp range. Supports sorting and pagination. Page size is capped at 200. - [Get account's open orders](https://docs.decibel.trade/api-reference/account/get-accounts-open-orders.md): Retrieve all currently open perp and spot orders for a specific account. Each order row carries `asset_type`; use `?asset_type=perp|spot` to filter. Includes limit orders, stop orders, and TP/SL orders attached to positions. Supports pagination. - [Get user order history](https://docs.decibel.trade/api-reference/account/get-user-order-history.md): Retrieve paginated perp and spot order history for a specific user including filled, cancelled, and expired orders. Supports filtering by one concrete market address, order type, status, side, reduce-only, and timestamp range. Supports sorting by timestamp (default: descending). Page size is capped… - [Get subaccounts](https://docs.decibel.trade/api-reference/account/get-subaccounts.md): Retrieve all subaccounts for a specific owner address. Returns subaccount addresses and their associated metadata. - [Get user trade history](https://docs.decibel.trade/api-reference/account/get-user-trade-history.md): Retrieve perp trade history for a specific user with optional filtering by one perp market address, order ID, side, and timestamp range. Returns executed trades with price, size, PnL, and fee details. Supports sorting by timestamp (default: descending) and pagination. Page size is capped at 200. - [Get user fees and fee schedule](https://docs.decibel.trade/api-reference/account/get-user-fees-and-fee-schedule.md): Returns the user's current maker/taker fee rates, fee tier based on the on-chain fee window, the full fee schedule for all VIP tiers, and daily volume history for that same window. - [Get account-owned vaults](https://docs.decibel.trade/api-reference/vaults/get-account-owned-vaults.md): Retrieve paginated list of vaults owned by a specific account. Includes vault performance metrics, AUM, and depositor count. - [Get account vault performance for all vaults where account has deposits](https://docs.decibel.trade/api-reference/vaults/get-account-vault-performance-for-all-vaults-where-account-has-deposits.md): Retrieve performance metrics for all vaults where the account has deposits, including net deposits, current value, returns, and PnL. Results are ordered by net deposits (descending) and support pagination. - [Get user-owned vaults (deprecated)](https://docs.decibel.trade/api-reference/vaults/get-user-owned-vaults-deprecated.md): **Deprecated:** This endpoint is deprecated. Please use `/api/v1/account_owned_vaults` instead. This endpoint is maintained for backwards compatibility only. - [Get user vault performance (deprecated)](https://docs.decibel.trade/api-reference/vaults/get-user-vault-performance-deprecated.md): **Deprecated:** This endpoint is deprecated. Please use `/api/v1/account_vault_performance` instead. This endpoint is maintained for backwards compatibility only. - [Get public vaults](https://docs.decibel.trade/api-reference/vaults/get-public-vaults.md): Retrieve paginated list of public vaults with optional status, vault type, vault address, and search filtering. Use `vault_type` query parameter to filter by 'user' or 'protocol' vaults. Use `vault_address` query parameter to fetch a specific vault by its address (exact match). Use `search` query pa… - [Get active TWAP orders](https://docs.decibel.trade/api-reference/twap/get-active-twap-orders.md): Retrieve currently active TWAP (time-weighted average price) orders for a specific user. Shows orders that have remaining size to be executed. - [Get TWAP order history](https://docs.decibel.trade/api-reference/twap/get-twap-order-history.md): Retrieve TWAP order history for a specific user including completed and cancelled orders. Returns historical TWAP orders sorted by most recent first. Supports filtering by timestamp range, sorting by timestamp, and pagination. Page size is capped at 200. - [GET /api/v1/affiliates/codes/{account}](https://docs.decibel.trade/api-reference/affiliates/get-apiv1affiliatescodes.md): Returns referral codes owned by an account with per-code usage stats. Affiliate codes (is_affiliate = true) are always returned. Non-affiliate codes are only returned if the account has >= $1,000 all-time trade volume. Maps to the Affiliates dashboard. - [GET /api/v1/affiliates/codes/{account}/analytics](https://docs.decibel.trade/api-reference/affiliates/get-apiv1affiliatescodes-analytics.md): Internal only: requires the API Gateway `x-aptos-identifier` header to match an allowlisted application ID. Returns 403 otherwise. - [GET /api/v1/affiliates/earnings/{account} Returns affiliate earnings breakdown for an account, including per-user referral amps earned at L1 (10%/15%) and L2 (5%) rates.](https://docs.decibel.trade/api-reference/affiliates/get-apiv1affiliatesearnings-returns-affiliate-earnings-breakdown-for-an-account-including-per-userreferral-amps-earned-at-l1-10%15%-and-l2-5%-rates.md) - [Get asset contexts](https://docs.decibel.trade/api-reference/market-data/get-asset-contexts.md): Retrieve perp market contexts including current prices, 24h volume, 24h price change, funding rates, and open interest for all perp markets or one perp market address. - [Get candlestick (OHLC) data](https://docs.decibel.trade/api-reference/market-data/get-candlestick-ohlc-data.md): Retrieve perp candlestick data for one perp market address and time range. Spot candlesticks are available from the `market_candlestick:{marketAddr}:{interval}` WebSocket topic; spot and perp markets with the same base asset have different market addresses and must be requested separately. Supports… - [Get contract specifications](https://docs.decibel.trade/api-reference/market-data/get-contract-specifications.md): Returns contract specifications for all perpetual contracts, per the CoinGecko/CMC derivatives endpoint spec. - [Get contracts summary](https://docs.decibel.trade/api-reference/market-data/get-contracts-summary.md): Returns a summary of all perpetual contracts traded on the exchange, - [Get DEX registration](https://docs.decibel.trade/api-reference/market-data/get-dex-registration.md): Retrieve DEX configuration and registration details. - [Get all available markets](https://docs.decibel.trade/api-reference/market-data/get-all-available-markets.md): Returns a list of all trading markets (perp + spot) with their configuration details including leverage limits, tick sizes, decimal precision, and current market mode (Open, ReduceOnly, CloseOnly). Each row carries an `asset_type` discriminator (`"perp"` or `"spot"`). - [Get orderbook depth](https://docs.decibel.trade/api-reference/market-data/get-orderbook-depth.md): Returns bid/ask depth (50 levels each side) for one concrete market address. Supports both perp and spot market addresses; spot and perp markets with the same base asset are different markets with different addresses and are never combined. - [Get market prices](https://docs.decibel.trade/api-reference/market-data/get-market-prices.md): Retrieve current perp prices for one or all perp markets, including oracle price, mark price, funding rate, and open interest. Use `market=all` or omit the parameter to fetch all perp markets. Spot markets do not publish `/prices` rows; derive spot mid price from `/orderbook` or the `depth:{marketAd… - [Get spot asset contexts](https://docs.decibel.trade/api-reference/market-data/get-spot-asset-contexts.md): 24h stats (volume, high/low, last price, prev-day price) plus the live book mid for every registered spot market. The spot counterpart of `/asset_contexts`; perp-only concepts (funding, open interest, mark and oracle prices) are deliberately absent. 24h change = (last_price - prev_day_price) / prev_… - [Get trades](https://docs.decibel.trade/api-reference/market-data/get-trades.md): Retrieve recent trades for a specific market ordered by most recent first. Optionally filter by order ID to get trades for a specific order. Supports pagination. Spot markets return one row per fill from the taker's perspective (matching the `market_trades` WS topic); the order ID filter matches eit… - [Get bulk order fills](https://docs.decibel.trade/api-reference/bulk-orders/get-bulk-order-fills.md): Retrieve fills for bulk orders with optional filtering by one concrete market, sequence number, or range. By default returns both perp and spot fills together (each row tagged with `asset_type`); set `?asset_type=perp|spot` to filter. - [Get bulk order status](https://docs.decibel.trade/api-reference/bulk-orders/get-bulk-order-status.md): Retrieve the status of a specific bulk order (placed or rejected). Use `?asset_type=spot` to query the spot bulk-order tables; defaults to perp. The `market` parameter is one concrete market address, not a base-asset group. - [Get bulk orders](https://docs.decibel.trade/api-reference/bulk-orders/get-bulk-orders.md): Retrieve the latest bulk orders for a specific user with optional filtering by one concrete market address. Returns one bulk order per market (perp + spot together by default) with the current bid/ask levels and fills applied. Each row carries an `asset_type` discriminator (`"perp"` or `"spot"`) and… - [Get account's campaign locks](https://docs.decibel.trade/api-reference/campaigns/get-accounts-campaign-locks.md): Returns the latest state of each FFT campaign lock for the account, sorted by lock time descending. Optionally filtered by campaign and status. - [Aggregates sum over all campaigns; `claims` is paged by `limit` / `offset`.](https://docs.decibel.trade/api-reference/campaigns/aggregates-sum-over-all-campaigns;-`claims`-is-paged-by-`limit`-`offset`.md) - [Get apiv1campaignsactive](https://docs.decibel.trade/api-reference/campaigns/get-apiv1campaignsactive.md) - [Get account's protected (FFT) trials](https://docs.decibel.trade/api-reference/campaigns/get-accounts-protected-fft-trials.md): Returns the account's active protected trials plus a paginated terminal history (organic closes and admin resets). `limit`/`offset` apply to `history` only. An optional `campaign_addr` scopes the whole response. - [Get daily stats](https://docs.decibel.trade/api-reference/analytics/get-daily-stats.md): Returns perp daily volume, fees, revenue, and open interest for a given time range. Designed for DefiLlama integration. - [Get leaderboard](https://docs.decibel.trade/api-reference/analytics/get-leaderboard.md): Retrieve the trading leaderboard with rankings based on trading performance metrics. Results are paginated and can be sorted by account value, realized PnL, ROI, or trading volume. Use the `search_term` parameter to filter accounts by address prefix. - [Returns the total number of users with points and total amps distributed.](https://docs.decibel.trade/api-reference/analytics/returns-the-total-number-of-users-with-points-and-total-amps-distributed.md) - [Get points leaderboard](https://docs.decibel.trade/api-reference/analytics/get-points-leaderboard.md): Retrieve the Hz/Amps points leaderboard with rankings by total Hz or realized PnL. Results are paginated and can be sorted by total_amps or realized_pnl. Use the `search_term` parameter to filter by owner address prefix. - [Get portfolio chart data](https://docs.decibel.trade/api-reference/analytics/get-portfolio-chart-data.md): Returns time series data for PnL or account value over specified time range. PnL = Cumulative Realized PnL from completed trades. Account Value = Initial Deposits - Withdrawals + Realized PnL (excludes unrealized PnL). - [Get amps breakdown for an owner](https://docs.decibel.trade/api-reference/points/get-amps-breakdown-for-an-owner.md): Returns total amps with per-category breakdown (trading, streak, referral, vault). All values are sourced from the points leaderboard MV, guaranteeing consistency with the leaderboard rankings. - [Get tier info for a user based on percentile-based thresholds](https://docs.decibel.trade/api-reference/tier/get-tier-info-for-a-user-based-on-percentile-based-thresholds.md) - [Get aggregated trading points for an owner across all their active subaccounts Returns total points and per-subaccount breakdown](https://docs.decibel.trade/api-reference/trading-points/get-aggregated-trading-points-for-an-owner-across-all-their-active-subaccountsreturns-total-points-and-per-subaccount-breakdown.md) - [Get aggregated trading Hz for an owner across all their subaccounts](https://docs.decibel.trade/api-reference/trading-hz/get-aggregated-trading-hz-for-an-owner-across-all-their-subaccounts.md) - [Get S0 predeposit USDC reward for a user](https://docs.decibel.trade/api-reference/predeposit-rewards/get-s0-predeposit-usdc-reward-for-a-user.md) - [Handler to get referral info for an account (who referred them)](https://docs.decibel.trade/api-reference/referrals/handler-to-get-referral-info-for-an-account-who-referred-them.md) - [GET /api/v1/referrals/code/{code}](https://docs.decibel.trade/api-reference/referrals/get-apiv1referralscode.md): Pre-wallet-connect validation of a referral code. Returns whether the code exists and is still active (can accept new referrals). No auth needed. - [POST /api/v1/referrals/redeem](https://docs.decibel.trade/api-reference/referrals/post-apiv1referralsredeem.md): Redeems a referral code for an account. Validates the code in ClickHouse, then submits an `admin_create_new_subaccount` transaction on-chain to create the user's subaccount (bypassing invite-only gating). - [Handler to get referrer statistics. Non-affiliate referrers must meet the minimum trade volume threshold to see their referral codes. Affiliate referrers always see all codes.](https://docs.decibel.trade/api-reference/referrals/handler-to-get-referrer-statisticsnon-affiliate-referrers-must-meet-the-minimum-trade-volume-thresholdto-see-their-referral-codes-affiliate-referrers-always-see-all-codes.md) - [Handler to get users referred by a referrer](https://docs.decibel.trade/api-reference/referrals/handler-to-get-users-referred-by-a-referrer.md) - [Get account streak data including qualifying dates and grace days](https://docs.decibel.trade/api-reference/streaks/get-account-streak-data-including-qualifying-dates-and-grace-days.md) - [POST /api/v1/transfers](https://docs.decibel.trade/api-reference/transfers/post-apiv1transfers.md): Records a confirmed deposit or withdrawal for attribution analytics. Called by the web client (fire-and-forget) once a transfer confirms. This is an off-chain record — the on-chain UserMovement cannot distinguish a Mesh/CEX deposit, a bridge, and a direct wallet transfer. Generalizes the narrower /m… - [WebSocket API Overview](https://docs.decibel.trade/api-reference/websocket/overview.md): Real-time market and account streams via WebSocket - [Connection Management](https://docs.decibel.trade/api-reference/websocket/connection.md): Connect, authenticate, subscribe, and recover WebSocket sessions - [Account open orders](https://docs.decibel.trade/api-reference/websockets/accountopenorders.md): Account's currently open perp and spot orders. Each order row carries `asset_type` (`perp` or `spot`) so clients can demux mixed snapshots. Spot order rows use `time_in_force`, report `order_direction` as `Buy` or `Sell` (spot has no position to open or close, so perp's `Open Long` / `Close Short` v… - [Account overview](https://docs.decibel.trade/api-reference/websockets/accountoverview.md): User's perp account overview including equity, margin, and PnL - [Account positions](https://docs.decibel.trade/api-reference/websockets/accountpositions.md): Perp-only account positions with PnL and liquidation prices. Spot markets do not have positions. - [All market prices](https://docs.decibel.trade/api-reference/websockets/allmarketprices.md): Perp-only price updates for all markets. Spot markets do not publish price rows; derive spot mid price from `depth`. - [All spot mids](https://docs.decibel.trade/api-reference/websockets/allspotmids.md): Live mid + last trade price for every spot market (global topic). Display numbers only: spot has no oracle, and perp prices stay on all_market_prices. - [Bulk order fills](https://docs.decibel.trade/api-reference/websockets/bulkorderfills.md): User's perp and spot bulk-order fill events. Each fill row carries `asset_type`; spot rows use the same DTO shape with prices and sizes normalized by the spot market's quote/base decimals. - [Bulk orders](https://docs.decibel.trade/api-reference/websockets/bulkorders.md): User's perp and spot bulk-order status updates, including placed and rejected submissions. The nested bulk order carries `asset_type`; spot rows use the same DTO shape with prices and sizes normalized by the spot market's quote/base decimals. - [Market candlestick](https://docs.decibel.trade/api-reference/websockets/marketcandlestick.md): Real-time candlestick/OHLCV data for one Decibel market address and interval. The same topic pattern supports perp and spot markets, but spot BTC and perp BTC are different markets with different addresses and require separate subscriptions. Candlestick items do not carry `asset_type`; the subscribe… - [Market depth](https://docs.decibel.trade/api-reference/websockets/marketdepth.md): Order book depth for one Decibel market address, perp or spot, with aggregated price levels. Spot BTC and perp BTC are different markets with different addresses and require separate subscriptions. The depth payload does not carry `asset_type`; the subscribed market address identifies the product. O… - [Market price](https://docs.decibel.trade/api-reference/websockets/marketprice.md): Perp-only real-time price updates for a specific market (oracle, mark, mid prices, funding, open interest). Spot markets do not publish this topic; derive spot mid price from `depth`. - [Market trades](https://docs.decibel.trade/api-reference/websockets/markettrades.md): Real-time trade updates for one Decibel market address, perp or spot (not cached, updates only). Spot BTC and perp BTC are different markets with different addresses and require separate subscriptions. Each trade row carries `asset_type`. Spot rows use `action` values `Buy` or `Sell`, leave `client_… - [Notifications](https://docs.decibel.trade/api-reference/websockets/notifications.md): Real-time notifications for the user, covering perp and spot orders. The nested order carries `asset_type`; spot rows report `order_direction` as `Buy` or `Sell` (spot has no position to open or close, so perp's `Open Long` / `Close Short` vocabulary does not apply). - [Order update](https://docs.decibel.trade/api-reference/websockets/orderupdate.md): Perp and spot order update for a specific user. The nested order carries `asset_type`. Spot order rows use `time_in_force`, report `order_direction` as `Buy` or `Sell` (spot has no position to open or close, so perp's `Open Long` / `Close Short` vocabulary does not apply), and leave perp-only fields… - [Protected_trial_update](https://docs.decibel.trade/api-reference/websockets/protected_trial_update.md): Real-time protected trial updates for the user. Each push replaces the active set (absence = removal); terminal DTOs are advisory. Degraded reset DTOs omit open-sourced fields like market and opened_at_ms. - [User active twaps](https://docs.decibel.trade/api-reference/websockets/useractivetwaps.md): User's active TWAP (Time-Weighted Average Price) orders - [User trades](https://docs.decibel.trade/api-reference/websockets/usertrades.md): User's perp and spot trade fills. Each trade row carries `asset_type`. Spot rows use `action` values `Buy` or `Sell`, leave `client_order_id` empty, and zero `realized_pnl_amount`, `realized_funding_amount`, and `fee_amount` because spot has no positions/funding and per-side fee attribution is unava… - [Withdraw_queue](https://docs.decibel.trade/api-reference/websockets/withdraw_queue.md): Real-time withdrawal queue updates for the user - [LLMs.txt](https://docs.decibel.trade/agents/llms-txt.md): Machine-readable documentation files for LLMs and AI agents - [MCP Server Overview](https://docs.decibel.trade/agents/mcp/overview.md): Model Context Protocol server for AI agent integration with Decibel DEX - [Installation](https://docs.decibel.trade/agents/mcp/installation.md): Set up the Decibel MCP server with Claude Code, Claude Desktop, or other MCP clients - [Tool Reference](https://docs.decibel.trade/agents/mcp/reference.md): Complete reference for all Decibel MCP server tools - [Audits](https://docs.decibel.trade/security/audits.md): Third-party security audit reports for Decibel smart contracts. ## OpenAPI Specs - [openapi](https://docs.decibel.trade/api-reference/openapi.json) ## AsyncAPI Specs - [asyncapi](https://docs.decibel.trade/api-reference/asyncapi.json)