Skip to main content
Glama

Perp Flow (OI × Taker, Binance or Bybit)

derivatives_flow
Read-only

USDT-margined perpetual flow for one coin on a 5m/15m/1h grid, from one venue: Binance, or Bybit for coins Binance doesn't list (e.g. WAVES). Open interest (USD) at every bucket edge joined to taker buy and sell volume (USD), with each stretch read as new longs, new shorts, short covering or long unwind (OI direction × the aggressive side). Bybit publishes the taker split only for its last ~1000 trades, so older Bybit buckets are read from OI against price direction instead, and every read states its basis (taker or price). Reports the window, the open-interest swings of 1% or more with the price and taker flow inside them (flagging aggressors absorbed by passive orders, taker basis only), and the buckets where OI moved most. One venue, not the market-wide aggregate. Use it to say whether a move was positions opening or closing, and which side pushed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hoursNoTrailing window in hours, 1–72. Default 24. At 5m the window is capped at about 41h by the venue's 500-snapshot limit.
symbolYesCoin symbol, e.g. "ETH".
intervalNoBucket size. Default 15m.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleNo
venueYes
marketNo
symbolYes
windowNo
bucketsNo
caveatsNo
episodesNoOpen-interest swings of at least 1% between zigzag pivots, oldest first
intervalNo
windowHoursNo
largestOiBucketsNo
takerSplitFromMsNoWhen the venue covers only part of the window: the first bucket with a taker split

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedOutput schema / properties / episodes / items / properties / absorbed / description
      Previous value: -"Aggressors pushed one way, price went the other"New value: +"Aggressors pushed one way, price went the other (taker basis only)"
    • addedOutput schema / properties / episodes / items / properties / readBasis
      Added value: +{
      +  "enum": [
      +    "taker",
      +    "price"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / episodes / items / properties / takerCoveragePct
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / largestOiBuckets / items / properties / readBasis
      Added value: +{
      +  "enum": [
      +    "taker",
      +    "price"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / takerSplitFromMs
      Added value: +{
      +  "description": "When the venue covers only part of the window: the first bucket with a taker split",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / window / properties / readBasis
      Added value: +{
      +  "enum": [
      +    "taker",
      +    "price"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / window / properties / takerCoveragePct
      Added value: +{
      +  "description": "Share of volume whose taker split is known",
      +  "type": "number"
      +}
  2. Added

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Despite the readOnlyHint annotation, the description adds substantial behavioral context: the Bybit taker-split limitation (~1000 trades), the fallback to price-direction reading, and the explicit statement that every read declares its basis. This is rich disclosure well beyond the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and venue scoping, and every sentence is informative. It is dense and long for a three-parameter tool, but little is pure waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and full param coverage, the description need not explain returns; it still supplies venue-selection logic, the basis caveat, and reading semantics, so an agent has everything needed to call and interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents hours, symbol, and interval including defaults. The description reinforces the grid/venue semantics but does not add syntax or format detail beyond the schema; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (USDT-margined perpetual flow for one coin on a 5m/15m/1h grid from one venue) and explicitly distinguishes itself from the market-wide aggregate, which separates it from siblings like derivatives_open_interest and derivatives_liquidations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear use case ('to say whether a move was positions opening or closing, and which side pushed') and an implicit exclusion ('One venue, not the market-wide aggregate'), but never names an alternative sibling or state explicit when-not conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources