Sending Authenticated Requests
To place orders and perform trading operations, you need to sign transactions with your private key and broadcast them on-chain. Decibel uses on-chain transactions that are signed with your private key and submitted to the Aptos blockchain.Generate an API Key
First, generate an API key from the Decibel platform:- Visit https://app.decibel.trade/api
- Connect your wallet
- Click “Create API Wallet” to generate a new API key
- Copy and securely store your API key
API Key Security: Your API key is used to authenticate requests to
Decibel’s services. Keep it secure and never share it publicly. The API key is
used alongside your private key to sign and submit transactions.
How Authenticated Requests Work
Authenticated requests in Decibel follow this general workflow:- Transaction Building: Build an Aptos transaction calling the appropriate Move function with your parameters
- Signing: Your private key signs the transaction, creating a cryptographic signature
- Submission: The signed transaction is submitted directly to the Aptos blockchain
- Confirmation: Wait for the transaction to be confirmed on-chain and extract relevant information from transaction events
Gas Fees: By default, you need APT in your account for transaction gas fees.
To remove this requirement, set up Geomi Gas Station to sponsor
gas fees on behalf of your users.
Transaction Documentation
For detailed information on how to build and submit specific transactions, see the following documentation:Account Management
- Create Trading Account - Create a new Trading Account
- Deposit - Deposit funds to a Trading Account
- Withdraw - Withdraw funds from a Trading Account
- Delegate Trading - Delegate trading permissions
- Revoke Delegation - Revoke trading delegation
Order Management
- Place Order - Place a new order
- Cancel Order - Cancel an order by order ID
- Cancel Client Order - Cancel an order by client order ID
- Place TWAP Order - Place a time-weighted average price order
- Cancel TWAP Order - Cancel a TWAP order
Position Management
- Place TP/SL Order - Place take profit and stop loss orders
- Update TP Order - Update take profit order
- Update SL Order - Update stop loss order
- Cancel TP/SL Order - Cancel take profit or stop loss order
Vault Operations
- Create and Fund Vault - Create a new vault and fund it
- Activate Vault - Activate a vault
- Contribute - Contribute funds to a vault
- Redeem - Redeem vault shares
- Delegate DEX Actions - Delegate vault trading permissions
Builder Fee
- Approve Max Builder Fee - Approve maximum builder fee
- Revoke Max Builder Fee - Revoke builder fee approval
Advanced Topics
For more advanced transaction building techniques, see:- Optimized Transaction Building - Learn how to build transactions synchronously using ABI data and replay protection nonces for better performance
- Formatting Prices and Sizes - Learn how to format prices and sizes for order-based transactions using market configuration parameters

