Quickstart

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

Step 01

Get an API key

Register at merx.exchange, open the dashboard, and navigate to API Keys. Create a new key. You will receive a secret key starting with sk_live_. Store it securely — it will not be shown again.

Step 02

Check current prices

The prices endpoint is public and does not require authentication.

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

Create an order

curlbash
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"
  }'
JavaScriptjavascript
import { MerxClient } from '@merx/sdk'

const merx = new MerxClient({ apiKey: 'sk_live_your_key_here' })
const order = await merx.createOrder({
  resourceType: 'ENERGY',
  amount: 65000,
  durationSec: 86400,
  targetAddress: 'TYourTargetAddressHere',
})
Pythonpython
from merx_sdk import MerxClient

merx = MerxClient(api_key="sk_live_your_key_here")
order = merx.create_order(
    resource_type="ENERGY",
    amount=65000,
    duration_sec=86400,
    target_address="TYourTargetAddressHere",
)
Step 04

Check order status

Requestbash
curl https://merx.exchange/api/v1/orders/ord_abc123 \
  -H "X-API-Key: sk_live_your_key_here"
Responsejson
{
  "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 }
  ]
}