Skip to main content
The Decibel MCP server exposes 25 tools. Each tool accepts a JSON input validated with Zod schemas and returns JSON results.

Trading tools

place_limit_order

Place a limit order on Decibel DEX. Returns order ID and transaction hash on success.
ParameterTypeRequiredDescription
sidestringYesbuy, sell, long, or short
sizenumberYesOrder size (quantity)
symbolstringYesMarket symbol (e.g., BTC/USD)
pricenumberYesLimit price
timeInForcestringNogtc (default), post-only, or ioc
reduceOnlybooleanNoReduce-only order (default: false)
clientOrderIdstringNoClient order ID for tracking

place_market_order

Place a market order. Executes immediately at current price with slippage tolerance.
ParameterTypeRequiredDescription
sidestringYesbuy, sell, long, or short
sizenumberYesOrder size
symbolstringYesMarket symbol
slippagenumberNoSlippage percentage (default: 1)
reduceOnlybooleanNoReduce-only order (default: false)
clientOrderIdstringNoClient order ID for tracking

place_stop_limit_order

Place a stop limit order. Triggers when the market reaches the stop price, then posts as a limit order at the specified price.
ParameterTypeRequiredDescription
sidestringYesbuy, sell, long, or short
sizenumberYesOrder size
symbolstringYesMarket symbol
pricenumberYesLimit price (execution price after trigger)
stopPricenumberYesStop trigger price
timeInForcestringNogtc (default), post-only, or ioc
reduceOnlybooleanNoReduce-only order (default: false)
clientOrderIdstringNoClient order ID for tracking

place_stop_market_order

Place a stop market order. Triggers when the market reaches the stop price, then executes immediately with slippage tolerance.
ParameterTypeRequiredDescription
sidestringYesbuy, sell, long, or short
sizenumberYesOrder size
symbolstringYesMarket symbol
stopPricenumberYesStop trigger price
slippagenumberNoSlippage percentage from stop price (default: 1)
reduceOnlybooleanNoReduce-only order (default: false)
clientOrderIdstringNoClient order ID for tracking

place_twap_order

Place a TWAP (Time-Weighted Average Price) order. Splits execution across a duration at regular intervals.
ParameterTypeRequiredDescription
sidestringYesbuy, sell, long, or short
sizenumberYesTotal order size
symbolstringYesMarket symbol
durationnumberYesTotal duration in seconds (min: 120, max: 86400)
frequencynumberYesExecution frequency in seconds (min: 60)
reduceOnlybooleanNoReduce-only order (default: false)
clientOrderIdstringNoClient order ID for tracking

Order management tools

close_position

Close an open position. Places a reduce-only market order in the opposite direction. Supports partial closes.
ParameterTypeRequiredDescription
symbolstringYesMarket symbol
slippagenumberNoSlippage percentage (default: 1)
sizenumberNoPartial close size (omit for full position)

cancel_order

Cancel an open order by order ID.
ParameterTypeRequiredDescription
orderIdstringYesOrder ID
symbolstringYesMarket symbol

cancel_all_orders

Cancel all open orders. Optionally filter by market.
ParameterTypeRequiredDescription
symbolstringNoMarket symbol to filter (cancels all if omitted)

cancel_twap_order

Cancel an active TWAP order by order ID.
ParameterTypeRequiredDescription
orderIdstringYesTWAP order ID
symbolstringYesMarket symbol

place_tp_sl

Set take-profit and/or stop-loss for an existing position. Omit size fields to apply to the full position.
ParameterTypeRequiredDescription
symbolstringYesMarket symbol
tpTriggerPricenumberNoTake-profit trigger price
tpLimitPricenumberNoTake-profit limit price (execution price)
tpSizenumberNoTake-profit size (omit for full position)
slTriggerPricenumberNoStop-loss trigger price
slLimitPricenumberNoStop-loss limit price (execution price)
slSizenumberNoStop-loss size (omit for full position)

cancel_tp_sl

Cancel a TP/SL order for a position.
ParameterTypeRequiredDescription
orderIdstringYesTP/SL order ID
symbolstringYesMarket symbol

Account query tools

get_positions

Get all open positions for the account. No parameters required.

get_orders

Get all open orders for the account. No parameters required.

get_balances

Get account balances including wallet USDC, trading account value, and margin info. No parameters required.

get_active_twaps

Get all active TWAP orders for the account. No parameters required.

get_trade_history

Get recent trade fill history.
ParameterTypeRequiredDescription
limitnumberNoNumber of trades to return (default: 20, max: 100)

get_order_history

Get order history for the account (all states including filled, cancelled, etc.).
ParameterTypeRequiredDescription
limitnumberNoNumber of orders to return (default: 20, max: 200)

get_twap_history

Get TWAP order history (completed and cancelled TWAPs).
ParameterTypeRequiredDescription
limitnumberNoNumber of TWAP orders to return (default: 20, max: 200)

get_funding_history

Get funding rate payment history.
ParameterTypeRequiredDescription
limitnumberNoNumber of records to return (default: 20, max: 200)

get_tp_sl

Get all TP/SL orders for a market position, including position-level and fixed-size TP/SL orders.
ParameterTypeRequiredDescription
symbolstringYesMarket symbol

Market data tools

get_markets

List all available markets on Decibel DEX with their configurations. No parameters required.

get_price

Get current price, funding rate, and open interest for a market.
ParameterTypeRequiredDescription
symbolstringYesMarket symbol

get_orderbook

Get the order book (bids and asks) for a market.
ParameterTypeRequiredDescription
symbolstringYesMarket symbol
depthnumberNoNumber of price levels (default: 10, max: 20)

Configuration tools

set_leverage

Set leverage for a market.
ParameterTypeRequiredDescription
symbolstringYesMarket symbol
leveragenumberYesLeverage value (1-100)
marginTypestringNocross (default) or isolated

set_margin_type

Switch margin type for a market between cross and isolated. Preserves current leverage.
ParameterTypeRequiredDescription
symbolstringYesMarket symbol
marginTypestringYescross or isolated