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/previewQuery parameters
resourcestringREQUIREDResource type to purchaseOne of:
ENERGYBANDWIDTHamountnumberREQUIREDAmount of resource units to purchaseMinimum 65000 for energy
durationnumberREQUIREDRental duration in seconds
target_addressstringOPTIONALTRON recipient. Required for an exact executable quote; omit it for an indicative resource-only estimate.
max_price_sunnumberOPTIONALOptional 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 availablebest.providerstringProvider represented by the current quotebest.displayNamestringHuman-readable provider namebest.price_sunnumberPrice per unit in SUNbest.total_cost_sunstringQuoted resource cost in SUNbest.cost_trxstringQuoted cost in TRX; includes the activation allowance when a target is suppliedbest.duration_secnumberMatched duration in secondsbest.execution_providerstringPowerSun, which fulfils accepted MERX ordersbest.target_addressstring | nullRequested recipient, or null for a targetless previewbest.max_activation_fee_sunstringMaximum activation allowance; "0" when target_address is omittedbest.max_total_cost_sunstringMaximum resource and activation total in SUNbest.quote_idstringCompatibility quote UUID; POST /orders still validates the current price at submissionbest.expires_atstringQuote correlation expiry in ISO 8601 formatfallbacksarrayReserved compatibility field; currently always emptyno_providersbooleanFalse when a matching published offer or exact quote is available