Skip to main content

GET /sol-price

The current SOL/USD price as a one-shot REST read - the same value the subscribe_sol_price stream pushes, derived from the deepest on-chain SOL/USDC market. Use this when you just need the rate once (to convert a WSOL-quoted price to dollars) and don't want to hold a WebSocket open. Takes no parameters. Auth via the x-api-key header or an ?api_key= query string.

MethodGET
Authx-api-key header, or ?api_key= query string
Cost5 calls/min/key free, then priced as metadata (see Pricing)

Example

const res = await fetch("https://api.shrine.trade/sol-price", {
headers: { "x-api-key": "pd_xxxxxxxx…" },
});
const { priceUSD, time } = await res.json();
console.log(`SOL is $${priceUSD}`);

Response

{
"priceUSD": 182.45,
"time": 1779812600
}

priceUSD is USD per SOL; time is the unix second of the underlying tick (0 if the gateway hasn't attached one yet).

Try it

Notes

  • One global value - there is no mint / pool argument.
  • Returns 503 unavailable in the brief window after a cold start, before the first SOL/USD tick has been observed - retry shortly.
  • Need it continuously? Use the subscribe_sol_price WebSocket stream instead: it's free and pushes a new value on every move, versus polling this endpoint.