🍋 Yuzu

Dashboard

Getting Started

The Yuzu Platform

Guides

Creating API Keys

Rate Limits

Usage with Apollo React/React Native

Recipes

Build a live-updating stock price badge

Show the latest exchange rates for your product

Streaming API

Subscription and Authorization

Available streams

Message reference

GraphQL API

Introduction to GraphQL

Making GraphQL Requests

Authorization

Pagination

Errors

Schema Reference

Getting Started

Getting Started

Yuzu makes it super easy to get up and running with financial data in no time. Build a stock tracking app, a portfolio-tracker, or a trading terminal in minutes with no data engineering required.

Guides

Get up and running quickly on any platform

Recipes

See some practical examples of Yuzu in the wild.

Streaming Reference

Learn how to get live prices in your app in minutes.

GraphQL Reference

Learn how to get started with GraphQL in your app.

Or, keep reading to make your first API call.

Making your first API call


The GraphQL API is the easiest way to start fetching market data. Check out the sample below to make a simple API request to fetch data about whether the market is currently open.

Terminal JS/TS
$




curl -H "Authorization: Bearer demo-gWymoxVsRS8" \
     -H "Content-Type: application/json" \
     -X POST \
     -d '{"query": "query { usMarketHours { openNow } }" }' \
     https://graph.yuzu.dev/graphql
Copy
1
2
3
4
5
6
7
8
9
10
11
fetch('https://graph.yuzu.dev/graphql', {
  method: 'POST',
  body: JSON.stringify({
    query: "query { usMarketHours { openNow } }"
  }),
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer demo-gWymoxVsRS8`
  }
}).then(r => r.json())
  .then(json => console.log(json))
Copy

Start streaming market data


Our streaming API makes it dead simple to start streaming real-time data for any asset. The Yuzu API supports both Websockets and Server-sent events. Here's an example:

Terminal JS/TS
$

curl --no-buffer \
  'https://sse.yuzu.dev/sse?token=demo-gWymoxVsRS8&streams=S:T:AAPL,C:T:ETH-USD'
Copy
1
2
3
4
5
6
7
8
const streams = ['S:BBO:AAPL', 'C:T:BTC-USD'];
const token = 'demo-gWymoxVsRS8';
const url = `wss://ws.yuzu.dev/ws?token=${token}&streams=${streams.join(',')}`;
const socket = new WebSocket(url);
socket.addEventListener('open', () => { console.log('Connected'); });
socket.addEventListener('message', event => {
  console.log(JSON.parse(event.data));
});
Copy

Get your API key


To get started, sign up for a free account, and head over to the API Keys section of your dashboard to create an API key.

You can read more about how API authorization works here.

What's Next?


Check out our guides

Authorization

Learn how authorization works and how to secure your API keys.

Setup Yuzu with Apollo Client

Get going on the web with Apollo + Yuzu


The Yuzu Platform