blinkxmcp
平台与服务by ai
Connect your BlinkX account to view holdings, margins, and profile. Monitor markets with quotes, instrument search, and historical candles. Place and track orders, or backtest strategies and even run strategies real time.
Tools (12)
loginOpen the BlinkX device login flow (clickable link).
get_holdingsFetch user holdings after successful login.
get_user_profileFetch the BlinkX user profile using the stored session token.
get_user_marginsFetch the BlinkX user margin details using the stored session token.
get_ltpRetrieve BlinkX quotes for one or more instruments. Supported quote types: - "" (or None): full market quote (`/quote`) - "full": alias for full market quote (`/quote`) - "ohlc": OHLC quote (`/quote/ohlc`) - "ltp": last traded price quote (`/quote/ltp`) Instruments format: NSE:NIFTY,BSE:BANKNIFTY no suffix like -EQ or prefix like a number Example: get_ltp(instruments=["NSE:NIFTY", "BSE:BANKNIFTY"], quote_type="ltp")
get_instrumentsFetch and parse the BlinkX instruments list (CSV format). Example: get_instruments(search="RELIANCE")
get_historical_candlesFetch historical candle data for a specific instrument from BlinkX SmartAPI. use get_instruments to get the instrument_token Example: get_historical_candles( instrument_token="1594_NSE", from_time="2025-10-29+10:02:03", to_time="2025-10-29+15:00:00", interval="minute" )
place_orderPlace an order using BlinkX SmartAPI (regular order). Always Confirm from user before placing order Example: place_order(tradingsymbol="RELIANCE-EQ", quantity=5, price=2800)
get_ordersFetch all orders or a specific order by ID from BlinkX SmartAPI. Example: get_orders() → Fetch all orders get_orders(order_id="251107000000021") → Fetch specific order
listenrun_strategyExecute a Python strategy code asynchronously. The code can: - Read live prices from LTP_STORE using: key = f"{scrip_code}_{exchange}" - Place orders using the async function func_place_order: - subscribe(scrip_code, exchange) → async function to subscribe to a symbol - unsubscribe(scrip_code, exchange) → async function to unsubscribe from a symbol - get_token(session_id: str) -> to get token for order placement, session id always to be sent by ai agent, possible output {"status": "ok", "access_token": access_token} or return {"status": "error", "access_token": None, "message": "Session ID not found in tokens file"} Arguments for func_place_order: - api_url: string, API endpoint (default: BlinkX regular order URL) - token: string, authentication token - tradingsymbol: string, symbol of the instrument (required) - exchange: string, exchange (e.g., NSE, BSE) - transaction_type: BUY or SELL - order_type: LIMIT or MARKET - quantity: int, number of shares/contracts - product: string, product type - validity: string, DAY or IOC - price: float, price for LIMIT orders Example strategy code: key = f'-1_NSE' ltp = LTP_STORE.get(key, 0) if ltp > 26100: await func_place_order(tradingsymbol='-1', exchange='NSE', transaction_type='BUY', price=ltp, quantity=1) always unsubscribe to symbol after placing order and always ensure proper logging for every iteration to get status of execution in format session ID: "Required logs" and use default logging ie already existing 'logger'
run_backtestRun a custom BACKTEST strategy provided by the AI agent using historical data fetched from BlinkX SmartAPI. historical data will be available in variable historical_data in format historical_data.append({ "timestamp": candle[0], # The timestamp is the first element "open": candle[1], # Open is the second element "high": candle[2], # High is the third element "low": candle[3], # Low is the fourth element "close": candle[4], # Close is the fifth element "volume": candle[5] # Volume is the sixth element }) and for recording trades call record_trade(side: str, price: float, qty: int) that stores trades in variable RESULTS = {"trades": [], "metrics": {}} this variable will already be defined and can be read as it is Inputs: --------- backtest_code : str The Python code written by the AI agent. The code will be wrapped inside an async function and executed. instrument_token : str The instrument token to fetch historical candle data. from_time : str The starting timestamp for fetching historical candles (e.g., "2025-10-29+10:02:03"). to_time : str The ending timestamp for fetching historical candles (e.g., "2025-10-29+15:00:00"). session_id : str The session ID for fetching the token needed to call the API. Returns: -------- dict : The result of the backtest, including trade records and metrics.
Related MCP Servers
AI-powered infrastructure monitoring with real-time metrics, logs, alerts, and ML anomaly detection.
78.3kWeb scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
34.5k