Skip to main content
Glama

Place a market order

place_market_order

Place an IOC market order. It executes as an IOC limit at a worst-acceptable price mirrored around the oracle by side — BUY caps ABOVE the oracle, SELL below — at slippageBps distance (default 500 = 5%). Fills happen at book prices; the cap only limits how deep the sweep goes. reduceOnly closes an existing position. Returns confirmation with the REAL outcome verified via the indexer (filled / partially_filled / unfilled / pending): broadcast code: 0 only means the tx was accepted — an IOC order cancels UNFILLED when the book is entirely beyond the slippage cap (thin/spread market). Always report from confirmation.outcome, not code; if unfilled or partially_filled, retry with a larger slippageBps to sweep deeper; if pending, the indexer is lagging — wait a few seconds and re-check before concluding.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYes
sizeYesSize in base units
marketYesMarket ticker, e.g. BTC-USD
confirmNoVerify the real fill via the indexer after broadcast (default true).
clientIdNo
reduceOnlyNo
slippageBpsNoMax slippage vs oracle, in bps (default 500). BUY bounds above the oracle, SELL below; raise to sweep a thin book.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / market / pattern
      Added value: +"^[A-Z0-9]{1,20}-[A-Z0-9]{1,20}$"
  2. Changed1 schema field changed
    • changedInput schema / properties / slippageBps / description
      Previous value: -"Max slippage vs oracle, in bps"New value: +"Max slippage vs oracle, in bps (default 500). BUY bounds above the oracle, SELL below; raise to sweep a thin book."
  3. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources