API Overview
Getting started with the NexusTrade REST API and MCP Server
# NexusTrade API & MCP Server
The NexusTrade API gives you programmatic access to all platform features — from creating and backtesting portfolios to running Aurora AI agents. You can use it via **REST API** or **MCP (Model Context Protocol)** for AI tool integration.
## Step 1: Generate an API Key
1. Go to your [Developers](/developers) page
2. Enter a name and click **Create**
3. Copy the key immediately — it won't be shown again
## Step 2: Connect
### Option A: MCP Server (Claude Code, Claude Desktop, Cursor)
NexusTrade provides an MCP server that exposes Aurora's tools (stock screening, portfolio creation, backtesting, deep research, etc.) directly to your AI assistant.
### Option B: REST API
Use your API key in the `Authorization` header:
```bash
curl -H "Authorization: Bearer sk-your-key" https://nexustrade.io/api/chat/prompts
```
## Base URL
All endpoints are relative to:
```
https://nexustrade.io
```
## Rate Limits
API requests are rate-limited to **60 requests per minute** per user.
## Response Format
All responses are JSON. Successful responses return a `200` (or `201` for creation) status code. Errors include a `message` field:
```json
{ "message": "Error description" }
```
## Endpoint Reference
- [Authentication](/docs/api-reference/authentication)
- [Chat](/docs/api-reference/chat)
- [Portfolios](/docs/api-reference/portfolios)
- [Backtesting](/docs/api-reference/backtesting)
- [Watchlists](/docs/api-reference/watchlists)
- [Agents](/docs/api-reference/agents)
- [Market Data](/docs/api-reference/market-data)
## MCP Tools Reference
- [MCP Tools — Utility](/docs/api-reference/mcp-tools-utility)
- [MCP Tools — Aurora](/docs/api-reference/mcp-tools-aurora)