Skip to content
Delta Exchange MCP
Tool Reference

Trading

Tools to place, edit, and cancel orders and manage brackets, leverage, margin, and positions. Registered with any API key; a Trading key is what lets them execute.

These tools place and change real orders and positions. They register whenever credentials are present, alongside the account tools. Whether a call executes is decided by your key: Delta accepts what a Trading key sends and rejects what a Read Data key sends (see Authentication).

These tools move real money

There is no rehearsal step. A call with a Trading key goes to Delta as sent, with no size cap and no confirmation prompt, sized in contracts rather than coins. Prices are sent exactly as typed, and Delta moves an off-tick price onto the product's tick. Mutations are never auto-retried, because re-sending an order can place it twice. Rehearse on india_testnet.

What the server still checks

Three request-shape checks remain, and they fail before anything is sent:

  • Exactly one of product_id / product_symbol on every tool that names a product.
  • Exactly one of id / client_order_id on cancel_order.
  • At least one leg on place_bracket_order.

Everything else is Delta's answer, returned as given.

place_order

Place a single limit, market, or stop order. Supports attached brackets.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
sizeintyesorder size in contracts (positive)
sidestringyesbuy or sell
order_typestringyeslimit_order or market_order
product_idintnopass exactly one of product_id / product_symbol
product_symbolstringnoe.g. BTCUSD
limit_pricestringnorequired for limit_order; ignored on market_order
stop_order_typestringnostop_loss_order or take_profit_order
stop_pricestringnotrigger price for stop orders
trail_amountstringnotrailing-stop amount
stop_trigger_methodstringnomark_price, last_traded_price, spot_price
time_in_forcestringnogtc or ioc
post_onlyboolnoreject if it would take liquidity
reduce_onlyboolnoonly reduce an existing position
client_order_idstringnoyour id, max 32 chars
bracket_stop_loss_pricestringnoattached-bracket SL trigger
bracket_stop_loss_limit_pricestringnoattached-bracket SL limit
bracket_take_profit_pricestringnoattached-bracket TP trigger
bracket_take_profit_limit_pricestringnoattached-bracket TP limit
bracket_trail_amountstringnoattached-bracket trailing amount
bracket_stop_trigger_methodstringnotrigger method for the bracket

Passing the bracket_* params here creates an entry-order bracket whose id (the returned order id) is what edit_bracket_order later expects. (That differs from place_bracket_order, which attaches a bracket to an open position.)

Prices are sent exactly as given. Delta moves an off-tick price onto the product's tick, so the limit_price in the response is the one that applies.

Place a GTC limit buy of 5 ETHUSD at 3400 with a take-profit at 3600 and a
stop-loss at 3250.

edit_order

Edit an open order's size or price.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
idintyesorder id to edit
sizeintyestotal size after the edit
product_idintnopass exactly one of product_id / product_symbol
product_symbolstringnoe.g. BTCUSD
limit_pricestringnonew limit price
stop_pricestringnonew stop trigger price
trail_amountstringnonew trailing-stop amount
post_onlyboolnoreject if it would take liquidity

Prices are sent exactly as given. Delta moves an off-tick price onto the product's tick, so the limit_price in the response is the one that applies.

Move my open BTCUSD order 123456789 to a limit price of 71500.

cancel_order

Cancel a single order by id or client order id.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
product_idintyesproduct the order belongs to
idintnoorder id to cancel
client_order_idstringnoyour client order id

Pass exactly one of id or client_order_id.

Cancel my open BTCUSD order 123456789.

cancel_all_orders

Cancel open orders, optionally scoped by product or contract type.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
product_idintnolimit to one product
contract_typesstring[]nolimit to contract types (ignored if product_id set)

Limit orders, stop orders and reduce-only orders are all cancelled. There is no flag to exclude a kind.

With no filters this cancels everything

Called bare, this cancels every open order on the account. product_id and contract_types are the only way to narrow it.

Cancel all my open orders on BTCUSD.

place_batch_orders

Place several orders on one contract in a single request.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
ordersobject[]yeseach {size, side, order_type, limit_price?, time_in_force?, post_only?, client_order_id?}. Same contract. No IOC/stop.
product_idintnopass exactly one of product_id / product_symbol
product_symbolstringnoe.g. BTCUSD

client_order_id must be unique within the batch. Delta's response is returned as given, and nothing annotates it. When it comes back with fewer orders than you sent, the missing ones were not accepted: compare the two lists before you resend anything, because resending a leg that did go live places it twice.

Place a ladder of 5 BTCUSD limit buys: 2 contracts each at 70000, 69500, 69000,
68500, 68000.

edit_batch_orders

Edit several orders on one contract in a single request.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
ordersobject[]yeseach {id, size, order_type, limit_price?, post_only?}
product_idintnopass exactly one of product_id / product_symbol
product_symbolstringnoe.g. BTCUSD
Reprice all my open ETHUSD ladder orders down by 50.

cancel_batch_orders

Cancel several orders on one contract in a single request.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
ordersobject[]yeseach {id} or {client_order_id}
product_idintnopass exactly one of product_id / product_symbol
product_symbolstringnoe.g. BTCUSD
Cancel orders 111, 222, and 333 on BTCUSD in one request.

place_bracket_order

Attach a take-profit / stop-loss bracket to an open position. Provide at least one leg.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
product_idintnopass exactly one of product_id / product_symbol
product_symbolstringnoe.g. BTCUSD
stop_loss_orderobjectno{order_type, stop_price, limit_price?, trail_amount?}
take_profit_orderobjectno{order_type, stop_price, limit_price?}
bracket_stop_trigger_methodstringnomark_price, last_traded_price, spot_price

These position-bracket legs are not editable via edit_bracket_order — cancel and re-place to change them. (edit_bracket_order only edits entry-order brackets created through place_order.)

On my open BTCUSD position, attach a stop-loss at 68000 and a take-profit at
75000.

edit_bracket_order

Edit the bracket (TP/SL) params on an existing entry order.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
idintyesentry-order id whose bracket to update
product_idintnopass exactly one of product_id / product_symbol
product_symbolstringnoe.g. BTCUSD
bracket_stop_loss_pricestringnostop-loss trigger price
bracket_stop_loss_limit_pricestringnostop-loss limit price
bracket_take_profit_pricestringnotake-profit trigger price
bracket_take_profit_limit_pricestringnotake-profit limit price
bracket_trail_amountstringnotrailing-stop amount
bracket_stop_trigger_methodstringnomark_price, last_traded_price, spot_price

id is the entry-order id (an order created with bracket_* params via place_order). It does not accept the leg ids of a position bracket from place_bracket_order.

On entry order 123456789, raise the take-profit to 76000.

set_product_leverage

Set order leverage for a product.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
product_idintyesproduct to set leverage for
leveragestringyesleverage multiplier, e.g. '10'
Set my BTCUSD order leverage to 10x.

adjust_position_margin

Add or remove isolated margin on a position.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
product_idintyesproduct id of the position
delta_marginstringyesmargin to add (positive) or remove (negative), e.g. '5.0'
Add 5 USDT of isolated margin to my BTCUSD position.

close_all_positions

Close every open position on the account, both cross / portfolio-margined and isolated.

Auth: API key; a Trading key to execute

No parameters.

This closes your entire account

There is no narrower call. Both margin scopes are closed, and there is no flag that limits it to a product or a scope. The server looks up your user_id itself. To close less than everything, cancel and close by product instead.

Close every open position on my account.

configure_auto_topup

Override auto top-up for a single position.

Auth: API key; a Trading key to execute

ParamTypeRequiredNotes
product_idintyesproduct id of the position
auto_topupboolyesenable or disable auto top-up for this position
Turn on auto top-up for my BTCUSD position.

On this page