ZANSHIN Sign in

zanshinflow.com/api · v1

The Zanshin Flow API

One request, one symbol, the levels the app is showing right now: the gamma flip and regime, the call and put walls, the king strike and max pain, with the dealer gamma at each. JSON, or one level per line for tools without a JSON reader. It's what the TradingView extension and the MotiveWave and NinjaTrader studies run on, and it's included in the subscription.

Authentication

Every request carries a key: Authorization: Bearer zsmw_…. Make one on the TradingView page while signed in (it's the same key the studies use; three devices at a time). The key works while the subscription or trial is active and is checked every five minutes.

GEThttps://www.zanshinflow.com/api/v1/levels?sym=ES
parametervalues
symSPX SPY QQQ NDX IWM ES NQ RTY GC CLrequired. Each futures symbol is its own options book, live overnight.
formatlinesplain text, one NAME,price per line, instead of JSON.
pricesfutwith format=lines: the mapped future's prices (SPX → ES, NDX / QQQ → NQ, IWM → RTY). In JSON both are always present.

The answer

{
  "sym": "SPX", "as_of": 1794150000, "session": "RTH", "stale": false,
  "spot": 7376.86, "regime": "SHORT_GAMMA",           // LONG_GAMMA, SHORT_GAMMA or AT_FLIP
  "flip": 7400, "king": 7410, "max_pain": 7390,
  "call_walls": [7430, 7450, 7475],                   // biggest call gamma above price, nearest first
  "put_walls":  [7375, 7360, 7340],
  "king_gex": 2410000000,                             // net dealer gamma at the strike, signed dollars
  "call_wall_gex": [1620000000, 910000000, 440000000],
  "put_wall_gex":  [-1870000000, -940000000, -510000000],
  "net_gex": -1200000000,
  "fut": {                                            // the same levels on the mapped future, with its spot
    "sym": "ES", "spot": 7402.25, "flip": 7425.5, "king": 7435.5, "max_pain": 7415.5,
    "call_walls": [7455.5, 7475.5, 7500.5], "put_walls": [7400.5, 7385.5, 7365.5],
    "king_gex": 2410000000, "call_wall_gex": [...], "put_wall_gex": [...]
  }
}

Prices are strikes in the book's own terms; fut moves them with the live basis. stale is true when the book is older than three minutes (a weekend, an outage). Errors: 403 with a reason when the key is unknown, revoked or the subscription has ended; 400 for a symbol not listed; 503 while a symbol has no book yet.

GET…/api/v1/levels?sym=SPX&format=lines&prices=fut
SYM,ES
AS_OF,1794150000
STALE,0
REGIME,SHORT_GAMMA
SPOT,7402.25
KING,7435.5
FLIP,7425.5
MP,7415.5
CW1,7455.5
CW2,7475.5
CW3,7500.5
PW1,7400.5
PW2,7385.5
PW3,7365.5

Freshness and limits

The engine publishes about every 30 seconds; the API caches each symbol for 10 seconds, so polling faster returns the same answer. There's no request quota beyond that, but a tool that polls every 10–30 seconds per symbol is the intended use; anything that fans out across every symbol every second will be rate-limited. The answer is a few hundred bytes.

Examples

# curl
curl -H "Authorization: Bearer $ZANSHIN_KEY" "https://www.zanshinflow.com/api/v1/levels?sym=NQ"

# Python
import requests
r = requests.get("https://www.zanshinflow.com/api/v1/levels", params={"sym": "ES"},
                 headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
L = r.json(); print(L["regime"], L["flip"], L["call_walls"], L["put_walls"])

// JavaScript
const r = await fetch("https://www.zanshinflow.com/api/v1/levels?sym=SPX", { headers: { Authorization: `Bearer ${KEY}` } });
const L = await r.json();

Ready-made clients

Questions

Does Zanshin Flow have an API?
Yes. The levels API returns the current gamma flip, call and put walls, king strike and max pain, with the dealer gamma at each, for one symbol per request, as JSON or one level per line. It is included in the $15 a month subscription; a key is made on the TradingView page.
How fresh are the levels?
The engine publishes about every 30 seconds and the API caches each symbol for 10 seconds, so polling more often than every 10 seconds returns the same answer. as_of says when the book was computed; stale is true after 3 minutes without a new one.
Can I get the whole gamma profile?
Not yet. The API serves levels, which is what charting tools draw. The whole profile, the options tape and the hedging flow are in the app.

Not financial advice. The levels are Zanshin Flow's estimates of dealer positioning; nothing here is a recommendation to buy or sell anything. Use of the API is under the terms.

Start free trial3 market days free