What is Shoonya MCP Server (Mock)?
A mock Market Connectivity Protocol (MCP) server designed to simulate interactions with a Shoonya‑like trading API. It provides a basic framework for testing client applications that would connect to Shoonya for order placement and market data. This is a mock server – all interactions are simulated; no real trading or connection to live Shoonya systems occurs.
How to use Shoonya MCP Server (Mock)?
Install Python 3.x and pip, clone the repository, then run pip install -r requirements.txt. Start the server with python mcp_server/app.py; it typically runs on http://127.0.0.1:5000/. Use the provided endpoints (/connect, /order, /marketdata/subscribe, /marketdata/fetch) to simulate authentication, order placement, and market data retrieval.
Key features of Shoonya MCP Server (Mock)
/connect endpoint for simulated Shoonya authentication and session token generation.
/order endpoint with comprehensive order parameter validation and pre‑trade risk checks.
/marketdata/subscribe and /marketdata/fetch endpoints for simulated market data (LTP, volume, OHLC).
- Mock responses from the “broker,” including order status.
- Returns an MCP‑specific session token after simulated login.
Use cases of Shoonya MCP Server (Mock)
- Testing client applications that would normally connect to the Shoonya platform.
- Developing and debugging order‑management workflows without risking real capital.
- Simulating market data feeds for front‑end or analytics development.
- Validating order parameter formats and risk‑check logic in a safe environment.
评论