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. Free - no API key needed.
| Method | GET |
| Auth | none - no API key needed |
| Cost | Free |
Example
- JavaScript
- Python
const res = await fetch("https://sol.shrine.trade/sol-price"); // no key needed
const { priceUSD, time } = await res.json();
console.log(`SOL is $${priceUSD}`);
import requests
res = requests.get("https://sol.shrine.trade/sol-price") # no key needed
print(res.json())
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/poolargument. - Returns
503 unavailablein 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_priceWebSocket stream instead: it's free and pushes a new value on every move, versus polling this endpoint.