a table rebuilt about every 75 s
The router's price table in one call: each token's price and depth, or only the mints you name.
# Prices the whole table, or the mints you name.curl https://services.carbium.sh -H 'content-type: application/json' -H 'x-api-key: <YOUR_KEY>' \ -d '{"jsonrpc":"2.0","id":1,"method":"prices","params":[{ "mints":["So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]}]}'# -> HTTP 200, x-request-id 9f88dd7e228b4ce9e04556b87d471abf# {"jsonrpc":"2.0","id":1,"result":{"solUsd":118.927290,"builtUnix":1790033392,# "priced":4202,"stale":0,"noroute":0,"total":4202,"rows":[# ["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",1.000000,46980639,"So11111111111111111111111111111111111111112"],# ["So11111111111111111111111111111111111111112",118.960000,601543324,"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]]}}## Omit params for the whole table, one large body. Ask for it on a timer, not on every request.
request and result
| field | type | meaning |
|---|---|---|
| params · optional; send none, {}, or the subset | ||
| mints[] | array of base58 pubkeys | up to 64: only those rows; omit for the whole table. A mint not in the table is absent, no error |
| result | ||
| solUsd | number | SOL price this table build used |
| builtUnix | number | unix seconds the build finished |
| priced | number | rows with a price |
| stale | number | rows marked stale |
| noroute | number | rows with no route to price |
| total | number | rows in the table |
| rows[] | array | [mint, priceUsd or null, tvlUsd, quoteMint] per token, in the router's order |
refusals
| http | code | message | what to do |
|---|---|---|---|
| 400 | -32602 | params accepts only mints, or no params at all | send no params, {} or {"mints":[...]} |
| 400 | -32602 | mints must be an array of at most 64 base58 32-byte pubkeys | past 64 mints, take the whole table |
| 400 | -32600 | quote is not batchable | one call per request; a batch holding any quote plan call but health is refused before it runs |
| 503 | -32011 | prices upstream unreachable / timed out / read failed / response too large | router did not answer, or answered over 4 MiB |
| 503 | -32011 | prices upstream response shape / prices upstream row shape | the table's columns changed |
methods
pricesreturns {solUsd, builtUnix, priced, stale, noroute, total, rows: [[mint, price, tvl, quote_mint]]}