Skip to main content
Glama

get_open_orders

Retrieve a list of open orders for a specific trading pair on Binance using the MCP server. Input the symbol to access active orders for efficient trading management.

Instructions

Get open orders for a symbol.

Args: symbol: The trading pair.

Returns: List of open orders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the get_open_orders tool by querying the Binance API for open orders of a given symbol.
    @mcp.tool() def get_open_orders(symbol: str) -> Any: """ Get open orders for a symbol. Args: symbol: The trading pair. Returns: List of open orders. """ url = "https://api.binance.com/api/v3/openOrders" timestamp = int(time.time() * 1000) params = { "symbol": symbol, "timestamp": timestamp } query_string = "&".join([f"{k}={v}" for k, v in params.items()]) signature = hmac.new(BINANCE_SECRET_KEY.encode(), query_string.encode(), hashlib.sha256).hexdigest() params["signature"] = signature headers = {"X-MBX-APIKEY": BINANCE_API_KEY} response = requests.get(url, headers=headers, params=params) if response.status_code == 200: return [ { "side": order["side"], "quantity": order["origQty"], "price": order["price"] } for order in response.json() ] return {"error": response.text}

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mixuechu/binance-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server