Best Price

Returns the single cheapest provider for a given resource type. Useful for quick lookups when you only need the best available offer.

GET/api/v1/prices/best

Query parameters

resourcestringREQUIRED
Resource type to queryOne of: ENERGYBANDWIDTH
amountnumberOPTIONAL
Desired amount of resource. Filters out providers without enough availability.
durationnumberOPTIONAL
Desired rental duration in seconds. Matches the closest available tier.

Request examples

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

Response

200Cheapest provider found
{
  "provider": "sohu",
  "price_sun": 32,
  "duration_sec": 86400,
  "available": 4200000,
  "fetched_at": "2026-03-29T12:00:30.000Z"
}

Response fields

providerstringProvider identifier
price_sunnumberPrice per unit in SUN for the matched duration tier
duration_secnumberDuration in seconds for this price tier
availablenumberAvailable resource units from this provider
fetched_atstringWhen the price was last updated
404No providers available for the given parameters
{
  "error": {
    "code": "NO_PROVIDERS",
    "message": "No providers available for the requested resource and amount"
  }
}