DocumentationBrowse sections

Preview Order

Ranks current published offers without placing an order. Include a target address to receive the exact executable MERX quote; without one, the response is an indicative resource-only estimate. POST /orders checks the target, activation, capacity, and price again before reserving funds.

GET/api/v1/orders/preview

Query parameters

resourcestringREQUIRED
Resource type to purchaseOne of: ENERGYBANDWIDTH
amountnumberREQUIRED
Amount of resource units to purchaseMinimum 65000 for energy
durationnumberREQUIRED
Rental duration in seconds
target_addressstringOPTIONAL
TRON recipient. Required for an exact executable quote; omit it for an indicative resource-only estimate.
max_price_sunnumberOPTIONAL
Optional offered price per unit in SUN, with precision up to 0.001 SUN. A lower-than-current offer is rejected; an equal or higher offer is shown at the submitted price.
TIP
A targetless preview excludes activation cost and target-specific execution checks. Use a target address before displaying a final total. POST /orders always reprices the exact request before reserving funds.

Request examples

curl "https://merx.exchange/api/v1/orders/preview?resource=ENERGY&amount=100000&duration=86400"

Response

200Preview result
{
  "best": {
    "resource_type": "ENERGY",
    "amount": 100000,
    "requested_duration_sec": 86400,
    "duration_sec": 86400,
    "duration_minutes": 1440,
    "price_duration_sec": 86400,
    "total_cost_sun": "3200000",
    "commission_sun": "0",
    "execution_provider": "powersun",
    "reference_provider": "catfee",
    "external_total_sun": "3200000",
    "powersun_total_sun": "6000000",
    "target_address": null,
    "max_activation_fee_sun": "0",
    "max_total_cost_sun": "3200000",
    "quote_id": "8ff52c20-9e16-4a88-b7d9-c1382157c927",
    "expires_at": "2026-10-22T12:01:30.000Z",
    "provider": "catfee",
    "displayName": "CatFee",
    "price_sun": 32,
    "cost_trx": "3.200000"
  },
  "fallbacks": [],
  "no_providers": false
}

Response fields

bestobject | nullBest matching provider, or null if none available
best.providerstringProvider represented by the current quote
best.displayNamestringHuman-readable provider name
best.price_sunnumberPrice per unit in SUN
best.total_cost_sunstringQuoted resource cost in SUN
best.cost_trxstringQuoted cost in TRX; includes the activation allowance when a target is supplied
best.duration_secnumberMatched duration in seconds
best.execution_providerstringPowerSun, which fulfils accepted MERX orders
best.target_addressstring | nullRequested recipient, or null for a targetless preview
best.max_activation_fee_sunstringMaximum activation allowance; "0" when target_address is omitted
best.max_total_cost_sunstringMaximum resource and activation total in SUN
best.quote_idstringCompatibility quote UUID; POST /orders still validates the current price at submission
best.expires_atstringQuote correlation expiry in ISO 8601 format
fallbacksarrayReserved compatibility field; currently always empty
no_providersbooleanFalse when a matching published offer or exact quote is available