Skip to main content

Base URLs

Decibel API supports two environments: Mainnet:
Testnet:
Note about the API URL: The base URLs provide access to all Decibel markets and trading functionality. This includes perpetual futures markets, spot markets, and more.

Package Addresses

Each environment has its own package address: Mainnet Package Address:
Testnet Package Address:
No authentication required: The endpoints in this guide are public and don’t require authentication headers like OAuth or JWT. However, you do still need a Decibel Node API key to access the node; simply pass it as the Authorization header on your requests, in the format:
Authorization: Bearer <NODE_API_KEY>
Base URL Variable: In the code examples below, BASE_URL refers to either: - https://api.mainnet.aptoslabs.com/decibel for Mainnet - https://api.testnet.aptoslabs.com/decibel for Testnet Make sure to set this variable in your code before making requests.

Step 1: Get Available Markets

Let’s start by fetching the list of available markets. We’ll use the Get Markets endpoint to retrieve all active trading markets.

Step 2: Get Market Prices

After obtaining the list of markets, you can query price information for a specific market—including Oracle price, mark price, mid price, funding rate, and open interest—using its market address.

Step 3: Get Order Book Data

Now let’s retrieve the order book for a market, which shows the current buy and sell orders with their prices and sizes.

Step 4: Get Recent Trades

Finally, let’s fetch recent trades for a market to see the latest trading activity.

Step 5: Get User Fee Rates

Query a user’s current maker/taker fee rates, fee tier based on 30-day rolling volume, the full VIP fee schedule, and daily volume history. Fee-rate and discount fields are returned as decimal numbers (not strings).