Merx Documentation
Merx is a TRON energy aggregator. One API that connects to multiple energy providers, compares prices every 30 seconds, and routes your order to the cheapest source with automatic fallback.
Quickstart
Get from zero to your first energy order in under 5 minutes. Create an API key, check prices, and place an order with curl, JavaScript, or Python.
- Quickstart guide - first API call in 5 minutes
- Authentication - API key usage and security
- Error handling - standard error format and codes
API Reference
Complete reference for all REST endpoints. Prices, orders, balance, withdrawals, history, and API key management.
- Prices - live quotes from all providers
- Orders - create and manage energy orders
- Balance - deposits, withdrawals, and history
- API Keys - create, list, and revoke keys
SDKs
Official client libraries with typed methods for every endpoint, automatic retries, and structured error handling.
- JavaScript / TypeScript - npm install merx-sdk
- Python - pip install merx-sdk
- MCP Server - AI agent integration for Claude, Cursor
Real-time Data
Stream live prices over WebSocket or embed a price widget on your website.
- WebSocket API - real-time price streaming
- Price Widget - embeddable price display
Webhooks
Receive HTTP POST notifications when orders are filled, deposits arrive, or withdrawals complete.
- Overview - events, retries, and best practices
- Events - payload format for each event type
- Signature Verification - HMAC-SHA256 verification
Guides
Step-by-step tutorials for common workflows.
- Buy Energy for a dApp - end-to-end from registration to on-chain verification
- Monitor Prices - polling, WebSocket, and widget approaches
- Set Up Webhooks - Express.js and Flask handlers with signature verification