🍋 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

GraphQL API

Authorization

General

Using your API keys to gain access to the GraphQL API is a breeze. Yuzu's GraphQL API performs authorization using standard HTTP bearer authorization. Here's an example using cURL:

Terminal
$




curl -H "Authorization: Bearer demo-kEkQZHKCoAf" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{"query": "query { usMarketHours { openNow } }" }' \
  https://graph.yuzu.dev/graphql
Copy

Required Headers


Every GraphQL request requires two headers:

Header Name Format
Authorization Bearer $YOUR_API_KEY
Content-Type application/json

Request Body


The body of the request should be a json object with up to two parameters:

Parameter Required? Description
query Yes The GraphQL string describing your query
variables No An object containing one or more variables that correspond to variables in your query

Sample

GraphQL Request
1
2
3
4
5
6
7
8
9
10
11
12
13
POST /graphql HTTP/2
Host: graph.yuzu.dev
user-agent: curl/7.79.1
accept: */*
authorization: Bearer demo-kEkQZHKCoAf
content-type: application/json

{
  "query": "query TestQuery($symbols: [String!]!) { securities(input: { symbols: $symbols }) { symbol figiComposite } }"
  "variables": {
    "symbols": ["FAN", "TAN", "ICLN"]
  }
}
Copy

Making GraphQL Requests

Pagination