Guides
Use Market Data
Show a live quote and a 30-day chart from Thrive.
Fetch quote and history together
javascript
const h = { Authorization: `Bearer ${process.env.THRIVE_API_KEY}` };
const base = "https://jointhrive.org/api/public/v1";
const [quote, history] = await Promise.all([
fetch(`${base}/markets/quote?symbol=NVDA`, { headers: h }).then((r) => r.json()),
fetch(`${base}/markets/history?symbol=NVDA&days=30`, { headers: h }).then((r) => r.json()),
]);
console.log(quote.price, history.data.length);Stay under the limit
Cache quotes for a few seconds on your side; each key allows 60 requests per minute.