Paradex MCP Server for Native Trading APIs
Connect to the Paradex MCP server to access native trading APIs for fast, fully featured trading, orders, and account management.
npx -y @sv/mcp-paradex-pyOverview
The Paradex MCP Server implements a local MCP (Model Context Protocol) adapter that exposes Paradex native trading APIs to developer tools and trading systems. It acts as a lightweight bridge between your application and Paradex, translating MCP-style requests into Paradex-native operations so you can place orders, stream market data, and manage accounts with low latency and a familiar interface.
This server is useful when you need programmatic access to Paradex trading functionality from algorithmic strategies, backtests, or third‑party services that understand MCP-style endpoints. Running the server locally (or in a private cloud) centralizes credential handling, provides connection pooling, and supplies a consistent API surface for order lifecycle and account management.
Features
- Exposes Paradex native trading endpoints through a simple REST + WebSocket MCP-compatible interface
- Fast order submission and cancellation with order state synchronization
- Real-time market data and order-fill notifications via WebSocket streams
- Secure credential management via environment variables or config files
- Lightweight Python implementation that can run on a developer machine, CI, or a server
- Basic request logging and error mapping from Paradex responses to MCP-style errors
Installation / Configuration
Requirements: Python 3.8+ and pip.
Clone the repository and install dependencies:
Configuration can be provided either as environment variables or a YAML file. Example environment variables:
Example YAML config (config.yaml):
paradex:
api_key: "your_paradex_api_key"
api_secret: "your_paradex_api_secret"
server:
host: "0.0.0.0"
port: 8080
logging:
level: "INFO"
Start the server (example using uvicorn if an ASGI app is provided):
Or run the provided entrypoint script:
(Adjust commands to the actual entrypoint in the repository — see the project’s README for the precise module name.)
Available Resources
- GitHub repository: https://github.com/sv/mcp-paradex-py
- Issue tracker and contribution guidelines: check the repo Issues and CONTRIBUTING files
- Example configs and scripts: look in the repo’s examples/ directory
API Surface (typical endpoints)
The server exposes a small set of endpoints designed to cover typical trading workflows. Exact paths can vary by release — check the repo for the current routes.
REST endpoints (JSON):
- GET /account — returns account balances and margin info
- GET /orders — list active and recent orders
- POST /orders — submit a new order (limit/market)
- DELETE /orders/{order_id} — cancel an order
- GET /markets/{symbol}/book — snapshot order book
WebSocket streams:
- /ws/market — real-time market data (ticks, order book deltas)
- /ws/orders — live order status updates and fills
Example request/response shapes are JSON objects with fields such as symbol, side, price, size, order_id, status, and fills.
Use Cases
Algorithmic trading bot
- Deploy the MCP server near your strategy runtime to reduce latency to Paradex and to centralize API credentials.
- Submit limit and market orders via the REST endpoint and subscribe to /ws/orders for fills and partial fills.
Market making
- Stream order book deltas from /ws/market to keep quoting logic in sync.
- Use fast cancel/replace cycles through the /orders endpoints with immediate state reconciliation.
Back-office reconciliation and accounting
- Poll /account and /orders periodically to reconcile on-chain activity and Paradex order history.
- Use order fills stream to generate trade blotters or trigger downstream accounting processes.
Mobile / frontend order routing
- Expose a single MCP-compatible gateway to multiple frontends so they don’t need to embed Paradex credentials directly.
- Provide role-based access in front of the MCP server (e.g., proxy with API keys / JWT tokens).
Example snippets
Place a limit order (curl):
Subscribe to order updates (Python websockets):
=
= await
=
Tips and Best Practices
- Keep credentials out of source control: prefer environment variables or a secrets manager.
- Rate-limit and retry: account for transient network errors and Paradex rate limits; implement exponential backoff for retryable failures.
- Monitor latency and logs: if you rely on low-latency order execution, monitor the server and host networking closely.
- Use WebSocket subscriptions for fills and order state instead of polling when possible — it reduces load and improves responsiveness.
Troubleshooting
- Check logs for mapped Paradex errors — many API errors are translated to MCP-style error objects for easier handling.
- Ensure your API key has the necessary trading permissions and sufficient account balance.
- If market streams are missing data, verify network connectivity and that the server is connected to Paradex (look for “connected” or “authenticated” log entries).
For detailed examples, contribution notes, and the exact runtime entrypoints, see the repository at https://github.com/sv/mcp-paradex-py.