Skip to main content

Decibel Taker Trade Connector

Features​

crypto-decibelConnector Key
Instruments
FUTURE
Request Types
SUBMITCANCEL
Order Types
LIMITSTOP_LIMIT
Time In Force
GTCIOC
Order ID Mapper
COMPOSITE
✗
Order Status Request
✗
Cancel On Disconnect
✓
Commission
✓
Post Only
✓
Fast Cancel
✗
Fast Replace

Notes​

Market Orders​

Market orders are not supported.

You can set a very low price for sell order and very high for buy order.
You still have to ensure the price respects the tick size also set the order type to IOC so in the UI,
when a user places a market order we allow a maximum slippage from mid price and calculate the price based on that.
This is a slippage protection mechanism for the user

Symbology​

Symbol list available via the following request (testnet):

curl --request GET \
-o decibel-symbols-testnet.json \
--url https://api.testnet.aptoslabs.com/decibel/api/v1/markets \
-H "authorization: Bearer <TESTNET_API_KEY>"

Configuration​

Connector settings​

ParameterDefault ValueDescription
accountPrimary Sub Account.
contractModuledex_accounts_entryThe user contract module.
deploymentPackageDeployment package.
chainIdChain ID.
maxGasAmount1000000The maximum number of gas units that the transaction sender is willing to spend to execute the transaction. This determines the maximum computational and storage resources that can be consumed by the transaction.
gasUnitPrice100The price per gas unit the transaction sender is willing to pay. It is expressed in Octas.
submitExpireInterval20sSubmit order transaction expiration interval.
cancelExpireInterval20sCancel order transaction expiration interval.

Supported order attributes​

KeyDescription
186 value used for post only orders submission

Config sample​

connectors {
DECIBEL: ${template.connector.crypto.decibel} {
settings {
restUrl = "https://api.testnet.aptoslabs.com"
websocketUrl = "wss://api.testnet.aptoslabs.com/decibel/ws"

apiKeys: [{
apiKey = "<API_KEY>"
apiSecret = "<PRIVATE_KEY>"
}]

account = "<PRIMARY_SUB_ACCOUNT>"

chainId = <CHAIN_ID>
deploymentPackage = "<DEPLOYMENT_PACKAGE>"
}
}
}