Skip to content
SwapWalletDocs
فارسیGet an API key

Market prices

Market prices are the last traded price of each SwapWallet market, in two quote currencies: USDT (tether) and IRT (Toman). A pair is written TOKEN/QUOTE, so TON/USDT is the price of one TON in tether.

These are reference prices. A swap is priced from the order book at the moment you ask, with the fee included, so use Swaps to get the amount you'd actually receive.

List market prices

GET/v1/market/prices

Returns the latest price of every tradable market in one call. Each token is listed against USDT and against IRT; USDT itself appears only as USDT/IRT. A market that is temporarily unavailable is left out.

This endpoint is public and needs no API key. If you do send an Authorization header, the key in it must be valid.

Parameters

No parameters.

Returns

Returns an object in result that maps each pair to its last price, as a decimal string.

GET/v1/market/prices
curl https://swapwallet.app/api/v1/market/prices \
  -H "Authorization: Bearer $SWAPWALLET_API_KEY"
Response
{
  "status": "OK",
  "result": {
    "ETH/USDT": "2850.4",
    "ETH/IRT": "776449000",
    "TON/USDT": "0.98",
    "TON/IRT": "266950",
    "TRX/USDT": "0.2401",
    "TRX/IRT": "65400",
    "BTC/USDT": "84630.5",
    "BTC/IRT": "23053348000",
    "USDT/IRT": "272400"
  }
}