Market data API

Look up symbols, see what is using your streaming slots, and stream from your own code. Your symbols are also on the market data page, and what you hold is on your subscription.

Quick start

Find a symbol. This needs no key:

curl "https://quincy.news/api/market-data/v1/symbols?q=gold"

Ask whether you could stream ES and gold now. This takes nothing and changes nothing:

curl "https://quincy.news/api/market-data/v1/check?symbols=ES,GC" -H "X-API-Key: $QUINCY_API_KEY"

See what is using your slots:

curl "https://quincy.news/api/market-data/v1/sessions" -H "X-API-Key: $QUINCY_API_KEY"

Nothing is set up ahead of time. A slot is taken when a stream is asked for and is free again when it stops.

API keys

Create a key on the portal, under API keys. It is shown once, so store it somewhere safe. Send it with every request that needs one:

X-API-Key: <your key>

A key acts as you. Anyone holding it can use your slots and end your streams, so keep it out of web pages, shared scripts, and source control. If one leaks, revoke it on the portal and create another.

This API chooses what streams. It does not carry market data. Quotes are shown on the market data page, under the exchange license you hold for display.

Symbols

GET /symbols?q=

The symbols we carry: each with its exchange, the group that operates the exchange, and the licenses that cover it. q is optional and matches a symbol, a name, an exchange, or a common word such as "gold" or "crude". No key is needed.

curl "https://quincy.news/api/market-data/v1/symbols?q=crude"
{
  "symbols": [
    {
      "symbol": "CL",
      "name": "WTI crude oil futures",
      "kind": "future",
      "asset_class": "Energy",
      "description": "Futures on West Texas Intermediate crude oil",
      "exchange": "NYMEX",
      "exchange_code": "XNYM",
      "exchange_name": "NEW YORK MERCANTILE EXCHANGE",
      "operator": "CME Group Inc.",
      "streaming": true,
      "licenses": [
        { "package_code": "CME_BUNDLE_NON_PROFESSIONAL_DEPTH", "name": "CME, CBOT, NYMEX, and COMEX real time, non-professional, depth of market", "on_sale": true },
        { "package_code": "CME_XNYM_NON_PROFESSIONAL_DEPTH", "name": "NYMEX real time, non-professional, depth of market", "on_sale": true }
      ]
    }
  ]
}

A contract code finds its product: q=GCZ7 answers with GC, "matched_as": "contract", and a contract object naming the month. Otherwise matched_as is "direct", or "none" when nothing was found. Searches are recorded, without your address, so we can see what to add.

streaming says whether we are sending that symbol now. licenses lists every license that covers it; you need one of them. Send your key and each symbol also carries licensed (you hold a license for it this month) and watching(it is on your market data page's list).

Account

GET /account

Your licenses by month, how many slots you have paid for, and what is using them now.

{
  "licenses": [
    { "month": "2026-12-01", "package_code": "CME_XCME_NON_PROFESSIONAL_DEPTH", "name": "CME real time, non-professional, depth of market" }
  ],
  "slots": { "paid": 2, "paid_next_month": 2, "in_use": 1 },
  "sessions": [
    {
      "session_id": 41,
      "friendly_name": "Viewer, Chrome on Windows",
      "kind": "viewer",
      "slot": "floating",
      "floating_slots": 1,
      "ip_address": "203.0.113.7",
      "streams": [{ "stream_id": 1001, "name": "ES", "slot": "floating" }],
      "started_at": "2026-12-01T14:30:02.000Z",
      "expires_at": "2026-12-01T14:35:02.000Z"
    }
  ]
}

Slots and sessions

A slot is one symbol to one consumer: your open market data page, or one program. You do not put a symbol in a slot ahead of time. Asking for a stream takes a slot, asking again keeps it, and stopping frees it. Each consumer holding a slot is a session.

Your license shows one symbol at a time on your market data page, on a slot of its own. Everything else takes a streaming slot you have bought: each symbol more on the page at the same time, and every symbol through the API. In /account, slots.paid and slots.in_use count the bought ones.

GET /check?symbols=

Whether your license covers each symbol and it is streaming now, and if not, the one reason. It takes no slot, so it does not say whether one is free: /account does.

curl "https://quincy.news/api/market-data/v1/check?symbols=ES,GC,ZZZ" -H "X-API-Key: $QUINCY_API_KEY"
{
  "symbols": [
    { "symbol": "ES", "exchange": "XCME", "can_stream": true },
    { "symbol": "GC", "can_stream": false, "reason": "no_license", "message": "You hold no license for this symbol's exchange." },
    { "symbol": "ZZZ", "can_stream": false, "reason": "unknown_symbol", "message": "We have no such symbol." }
  ],
  "slots": { "paid": 2 }
}

GET /sessions

Every session using your slots now: the viewer and your programs alike. The same list as in /account. Each stream says the slot it is on: page is your market data page's own slot, pinned is one that comes with a product such as the news viewer, and floating is a streaming slot you bought.

DELETE /sessions/{session_id}

End a session from anywhere. Its slot is free at once. An open page stops at once; a program's stream stops when its token runs out, within five minutes.

curl -X DELETE "https://quincy.news/api/market-data/v1/sessions/41" -H "X-API-Key: $QUINCY_API_KEY"

POST /sessions/release

Your program is done. Every slot this key holds is free at once. Call it when you stop, so the slot does not wait for your token to run out.

curl -X POST "https://quincy.news/api/market-data/v1/sessions/release" -H "X-API-Key: $QUINCY_API_KEY"

Name a symbol as it appears in the directory, in any letter case. If a symbol is listed on more than one exchange, put the exchange first: XCME:ES or CME:ES.

Streaming

To stream, name what you want and you get a token for each. A stream is one thing you ask for by name: a symbol such as ES, or the news as news-headlines. Each stream you receive is one session on one of your streaming slots.

curl -X POST "https://quincy.news/api/news-gw/token" \
  -d grant_type=client_credentials \
  -d client_secret=$QUINCY_API_KEY \
  -d streams=ES,NQ,news-headlines \
  -d friendly_name="risk model"
{
  "token_type": "Bearer",
  "expires_in": 300,
  "gateways": ["wss://relay.quincy.news/"],
  "streams": [
    { "stream": "ES", "symbol": "ES", "exchange": "XCME", "stream_id": 1001, "session_id": 3391820471820934,
      "access_token": "eyJ...", "relay_url": "wss://relay.quincy.news/", "group": "239.10.1.1", "port": 41001, "method": "udp" },
    { "stream": "news-headlines", "stream_id": 2001, "session_id": 8120447193350211,
      "access_token": "eyJ...", "relay_url": "wss://relay.quincy.news/", "port": 40200, "method": "tcp" }
  ],
  "refused": [
    { "stream": "NQ", "symbol": "NQ", "reason": "no_free_slot", "message": "No free slot. ...", "in_use": [ ... ] }
  ]
}
  • One token for each stream. Open one connection to relay_url with each access_token. The group, port, and method are the channel: where the stream is found on the relay.
  • session_id names the session. It stays the same each time you renew, and it is the id to end that session by.
  • refused lists anything you asked for and did not get, each with one reason.
  • Ask again before the tokens expire, naming the same streams, and hand each connection its new token. Half the token's life is a good interval. The sessions carry on; nothing reconnects.
  • Each request names everything this key wants. A stream you held and do not name is let go of, and its slot is free. Ask for NQ in place of ES and the slot ES had is used for NQ.
  • The news through the API is the feed's license and a streaming slot. Subscribe to the feed, buy a slot, and ask for news-headlines.
  • friendly_name is optional. It is shown wherever your sessions are listed, so you can tell your programs apart. Without one, the session goes by the name you gave the key.
  • Use one key for each program. A key is one consumer: two programs on the same key would each replace the streams the other asked for. You can have as many keys as you like, and they all draw on the same slots.
  • If nothing you asked for can be received, the answer is 409 no_streams with the refused list.
  • Older forms still work. symbols= is read as streams=. feed=news-headlines asks for that one stream, leaves your others alone, and also returns its token at the top as access_token.

The reasons a stream is refused:

reasonMeaning
unknown_symbolWe have no such symbol.
ambiguous_symbolIt is listed on more than one exchange. Name one, as XCME:ES.
no_licenseYou hold no license for its exchange. The answer names the exchange, in exchange.
not_startedPaid for, and starts on the 1st.
not_started_needs_slotYour license starts on the 1st, and you will have no slot free for this one then.
screening_in_reviewHeld while your account is reviewed.
on_holdPaid for, and streaming for that exchange is switched off for now.
not_liveWe do not stream that symbol yet.
no_free_slotEvery streaming slot you have bought is in use. in_use lists what holds them. End one, or buy another.

The API is one more way to receive what your license covers. What you may do with the data is a term of that license: a non-professional license is for viewing it yourself, in our page or in a program of your own that shows it to you. It does not cover a program that trades or acts on the data without your viewing it.

Errors

A request that fails answers with an HTTP status and a body like this. error is stable and safe to test for; message is for people.

{ "error": "invalid_key", "message": "That API key is unknown or has been revoked." }
StatuserrorMeaning
400bad_requestThe request is not what the endpoint takes.
401missing_keyNo API key was sent.
401invalid_keyThe key is unknown or revoked.
404not_foundNo such session of yours is running.
409no_streamsNothing asked for can be streamed now. refused says why, symbol by symbol.
410goneThe calls that put a symbol in a slot ahead of time. Name the symbols when you ask for a token.
429rate_limitedToo many requests. Wait for the Retry-After seconds.

Limits

60 requests a minute and 1,000 an hour for each key. Without a key, the symbol directory allows 60 a minute for each address. A request over the limit answers 429 with a Retry-After header.

Python example

Say what you could stream and what is using your slots. It uses only the standard library.

import json, os, urllib.request

BASE = "https://quincy.news/api/market-data/v1"
KEY = os.environ["QUINCY_API_KEY"]

def call(method, path):
    request = urllib.request.Request(BASE + path, method=method, headers={"X-API-Key": KEY})
    with urllib.request.urlopen(request) as response:
        return json.load(response)

account = call("GET", "/account")
slots = account["slots"]
print(f"{slots['in_use']} of {slots['paid']} slots in use")
for session in account["sessions"]:
    names = ", ".join(stream["name"] for stream in session["streams"])
    print(f"  {session['friendly_name'] or session['kind']}: {names} (session {session['session_id']})")

# Which of the symbols you are licensed for could a program stream now, and why not the rest?
licensed = [s["symbol"] for s in call("GET", "/symbols")["symbols"] if s["licensed"]]
if licensed:
    for symbol in call("GET", "/check?symbols=" + ",".join(licensed))["symbols"]:
        print(symbol["symbol"], "yes" if symbol["can_stream"] else symbol["message"])

Questions: contact us.