Documentation Index
Fetch the complete documentation index at: https://docs.decibel.trade/llms.txt
Use this file to discover all available pages before exploring further.
Do You Need Gas Station?
Every Decibel transaction requires gas. There are two ways to handle this:| Approach | When to use | Setup |
|---|---|---|
| Self-funded (default) | Your wallet already holds APT (e.g., Petra wallet users) | No extra setup — just have APT in your account |
| Gas Station (sponsored) | You want to remove the APT requirement for your users — useful for cross-chain wallets or smoother onboarding | Create a Gas Station on Geomi (see below) |
What Is Gas Station?
Geomi Gas Station sponsors gas fees on behalf of your users. Your project covers the cost so users can trade without acquiring APT first. Geomi gives you free credits to start, and you can pay with USD after those run out. The Decibel SDK has built-in Gas Station support. You provide agasStationApiKey in your config and the SDK handles sponsored transaction submission automatically.
Setup
1. Create a Gas Station on Geomi
- Go to geomi.dev and sign in (or create an account)
- Select your project (or create one)
- Navigate to the Gas Station resource
- Create a new Gas Station by importing our template:
- Download one of our templates linked below for the network you’re targeting (Mainnet or Testnet)
- In Geomi, click the “Import Template” button and select the template you downloaded
- Click “Next” and review the rules configured by the template
- When you are ready to continue, click “Create gas station”
- Copy the Gas Station API Key from your dashboard
Decibel Testnet Gas Station Template
Download the Testnet Gas Station Template (JSON)
Decibel Mainnet Gas Station Template
Download the Mainnet Gas Station Template (JSON)
For detailed Gas Station configuration options (allowlists, rate limits, CAPTCHA),
see the Geomi documentation.
2. Integrate with the Decibel SDK
Pass your Gas Station API key when constructingDecibelWriteDex:
@aptos-labs/gas-station-client package under the hood. When gasStationApiKey is set, every transaction is automatically built with withFeePayer: true and submitted through the Gas Station for fee sponsorship.
3. Environment Variables
Add these to your.env:
How It Works
- SDK builds the transaction with
withFeePayer: true, setting the fee payer to a placeholder address - User signs the transaction with their private key (sender-only signature)
- SDK submits the transaction to the Gas Station API via
GasStationClient - Gas Station signs as fee payer and submits the fully-signed transaction on-chain
- Gas fees are charged to the Gas Station’s funding account, not the user
Network Configuration
Each pre-built SDK config already includes the correctgasStationUrl for its network. You only need to add your gasStationApiKey:
| Network | gasStationUrl (pre-configured) |
|---|---|
| Mainnet | https://api.mainnet.aptoslabs.com/gs/v1 |
| Testnet | https://api.testnet.aptoslabs.com/gs/v1 |
Opting Out
If a user wants to pay their own gas (e.g., they already hold APT), simply omitgasStationApiKey from the config:
gasStationApiKey, the SDK submits transactions directly without Gas Station sponsorship.
Troubleshooting
Transaction Rejected by Gas Station
- Verify your Gas Station API key is valid and not expired
- Check that the on-chain function being called is in your Gas Station’s allowlist
- Confirm your Gas Station has sufficient funding on the target network
Rate Limit Errors
- Check your per-wallet and global rate limits on the Geomi dashboard
- The same rate limiting rules that apply to Decibel endpoints also apply to Gas Station requests
Next Steps
- Client API Key Setup — Set up a Node API key for higher rate limits
- Authenticated Requests — How transaction signing works
- SDK Configuration — Full SDK configuration reference

