Quickstart

From zero to your first TRON energy order in four steps.

Step 01

Get an API key

Sign in at merx.exchange, open the dashboard, and navigate to API Keys. Create a new key with the create_orders and view_orders permissions. Store the returned sk_live_ key securely -- it will not be shown again.

Step 02

Check current prices

The prices endpoint is public and does not require authentication.

GET /api/v1/prices
curl https://merx.exchange/api/v1/prices
200Prices response
{
  "prices": [
    {
      "provider": "catfee",
      "energy_prices": [
        { "duration_sec": 86400, "price_sun": 84, "min_amount": 32000 }
      ]
    }
  ],
  "updated_at": "2026-03-29T12:00:00Z"
}
Step 03

Create an order

Post an order specifying the resource type, amount in energy units, duration, and the target TRON address.

POST /api/v1/orders
curl -X POST https://merx.exchange/api/v1/orders \
  -H "X-API-Key: sk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unique-request-id" \
  -d '{
    "resource_type": "ENERGY",
    "amount": 65000,
    "duration_sec": 86400,
    "target_address": "TYourTargetAddressHere"
  }'
TIP

Always include an Idempotency-Key header to prevent duplicate orders if your request is retried.

Step 04

Verify the order

Poll the order endpoint or listen for the order.filled webhook event.

GET /api/v1/orders/:id
curl https://merx.exchange/api/v1/orders/ord_abc123 \
  -H "X-API-Key: sk_live_your_key_here"
200Filled order
{
  "id": "ord_abc123",
  "status": "FILLED",
  "resource_type": "ENERGY",
  "amount": 65000,
  "duration_sec": 86400,
  "total_cost_sun": "5460000",
  "fills": [
    { "provider": "catfee", "amount": 65000, "price_sun": 84 }
  ]
}

Your first order is complete. Next, explore the full API reference, set up webhooks for real-time notifications, or connect via WebSocket for live price streaming.