Skip to main content
Glama

get_orderbook

Fetch current order book data for financial instruments to analyze market depth and liquidity. This tool provides institutional-grade quantitative finance capabilities for trading strategy development.

Instructions

Fetches the current order book. NOTE: yfinance does not provide Level 2 data. This is a placeholder to demonstrate tool registration. Args: symbol: The ticker symbol. Returns: Message indicating unavailability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Implementation Reference

  • The handler function that implements the get_orderbook tool. It serves as a placeholder since yfinance does not provide Level 2 order book data.
    def get_orderbook(symbol: str) -> str: """ Fetches the current order book. NOTE: yfinance does not provide Level 2 data. This is a placeholder to demonstrate tool registration. Args: symbol: The ticker symbol. Returns: Message indicating unavailability. """ return f"Order book data (Level 2) is not available via free API for {symbol}."
  • server.py:370-373 (registration)
    Registration of the get_orderbook tool (with other market data tools) in the main MCP server using the register_tools helper.
    register_tools( [get_price, get_fundamentals, get_orderbook], "Market Data" )
  • app.py:286-286 (registration)
    Inclusion of get_orderbook in the tools_map dictionary used for organizing tools in the Gradio UI interface, which also supports MCP.
    "Market Data": [get_price, get_fundamentals, get_orderbook],

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/N-lia/MonteWalk'

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