HTTP API · Pricing

Spot prices

Open in Claude

USD spot prices for up to 100 assets in one call, keyed by CAIP-19 id.

GET/api/sdk/v1/prices
queryREQUIRED
curl "https://www.swaps.pro/api/sdk/v1/prices?tokens=eip155%3A8453%2Fslip44%3A60%2Ceip155%3A8453%2Ferc20%3A0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
rate limitedcached · 60s at the edgeno API keyCORS open

Two lists come back: prices for what was priced and unpriced for what was not. An asset in unpriced has no price at the source right now; it is not a statement that the asset is worthless.

More than 100 ids is refused outright rather than truncated: a caller who asks for 200 and silently gets 100 back has a portfolio missing half its value with nothing saying so.

When the price source cannot be reached at all the route answers 502, not an empty prices — an outage of ours must never read as a claim about somebody's holdings.

Parameters#

NameInTypeDescription
tokensREQUIREDqueryCAIP-19 listComma-separated CAIP-19 asset ids, at most 100. Get them from /tokens (caip).

Responses#

Success is the body below. Every error is { "error": string, "code": string } with a matching HTTP status — never a 200 that says no.

When: at least the request was well-formed; see `unpriced`.

{
  "prices": [
    {
      "caip": "eip155:8453/slip44:60",
      "usd": 2458.35662985502,
      "symbol": "ETH",
      "confidence": 0.99,
      "asOf": "2026-09-03T14:42:50.000Z"
    },
    {
      "caip": "eip155:8453/erc20:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
      "usd": 1.000011030039417,
      "symbol": "USDC",
      "confidence": 0.99,
      "asOf": "2026-09-03T14:42:50.000Z"
    }
  ],
  "unpriced": [],
  "requested": 2
}

Fields worth knowing#

FieldMeaning
pricesobject keyed by CAIP-19 id → USD price
unpricedids the source had no price for
requestedhow many ids were asked for

For agents#

The brief below is what Copy for agents puts on the clipboard: the parameters, one example, the 200 body and the rules. It is Markdown, and it is short on purpose — everything in it is load-bearing.

  • Never treat unpriced or a 502 as a zero price. Show the asset as unpriced, and keep any total it belongs to marked incomplete.
  • Prices are USD floats, cached for a minute at the edge. Do not use them as execution prices; /quote is the execution price.