# blinkxmcp

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…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add ai/blinkxmcp

# Browse available tools
npx -y @smithery/cli@latest tool list ai/blinkxmcp

# Get full schema for a tool
npx -y @smithery/cli@latest tool get ai/blinkxmcp login

# Call a tool
npx -y @smithery/cli@latest tool call ai/blinkxmcp login '{}'
```

## Direct MCP Connection

Endpoint: `https://blinkxmcp--ai.run.tools`

## Tools (12)

- `login` — Open the BlinkX device login flow (clickable link).
- `get_holdings` — Fetch user holdings after successful login.
- `get_user_profile` — Fetch the BlinkX user profile using the stored session token.
- `get_user_margins` — Fetch the BlinkX user margin details using the stored session token.
- `get_ltp` — Retrieve BlinkX quotes for one or more instruments.
- `get_instruments` — Fetch and parse the BlinkX instruments list (CSV format).
- `get_historical_candles` — Fetch historical candle data for a specific instrument from BlinkX SmartAPI.
- `place_order` — Place an order using BlinkX SmartAPI (regular order).
- `get_orders` — Fetch all orders or a specific order by ID from BlinkX SmartAPI.
- `listen`
- `run_strategy` — Execute a Python strategy code asynchronously. The code can:
- `run_backtest` — Run a custom BACKTEST strategy provided by the AI agent using historical data fetched from BlinkX SmartAPI.

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get ai/blinkxmcp <tool-name>
```
