Skip to main content
Glama

Bitquery: Crypto & Blockchain Data

Counterparties

counterparties
Read-only

COUNTERPARTIES / who an address set paid and was paid by, in one call: one row per counterparty with the USD value received from it and sent to it, the transfer counts each way, the first and last time they transacted, and how many of those transfers could not be priced. Counterparties are ranked by total USD (received plus sent) and the top ones are returned; everything below the cutoff is summed into one below_cutoff bucket, so the returned rows plus that bucket account for the whole flow. Pass one address or a set (up to 50); a transfer between two members of the set is left out. It can instead TOTAL the whole flow by the counterparty's label TYPE (group_by=label_type): the SHARE of inflow and outflow from exchanges, bridges, sanctioned or other entity types (e.g. "62% of inflow came from exchanges, 3% from sanctioned addresses"). Every counterparty row carries its on-chain LABELS. NOT a risk score -> use address_risk_report; NOT the labels of one address -> use labels_for_addresses; NOT a single address's asset totals -> use eth_address_flow_summary. USD is the value at the time of each transfer, from the chain's price store, and is null (never zero) for a side whose transfers could not be priced; a transfer in a token the price gate does not cover is counted but left unpriced. usd_total (received plus sent) is the ranking key, not a net balance: a pass-through counterparty counts on both sides. The window is the last 90 days by default; set after_time / before_time for a fixed period, which the answer echoes. format json (ask for it) returns the full object: every returned row with usd_total and the per-side unpriced-transfer counts, the below_cutoff bucket, how many addresses were requested and used (and invalid, when any were), and the cost - statements, rows and bytes read, and timing_ms. format markdown (the default) is a shorter summary and counterparty table to read - the counterparty, its USD in and out, the transfer counts, and first and last seen - without the cost or the per-row unpriced counts.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "addresses": "<addresses>",
      "chain": "<chain>"
    },
    "name": "counterparties"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesChain of the address set - ethereum, tron, solana, bitcoin or zcash (Zcash transparent addresses only).
limitNoHow many counterparties to return, largest total USD first. 1 to 1000 (default 100). Everything below is summed into below_cutoff.
tokenNoRestrict to one token. On Ethereum its contract address (0x followed by 40 hex characters); on Tron a TRC-20 contract (T followed by 33 characters) or a TRC-10 numeric asset id. Not applicable on Solana, Bitcoin or Zcash and rejected there. Empty (default) counts every token.
cursorNoPage token to continue past the returned counterparties. Take next_cursor from a previous call and pass it back with the SAME addresses, chain, window and filters to get the next page, until no next_cursor comes back. group_by=address only. Empty (default) returns the first page.
formatNomarkdown (default) returns a summary and a counterparty table to read (text); json returns every returned row as the object.markdown
max_txsNoBitcoin and Zcash only. How many of the address's most recent transactions to read on each side - its newest max_txs spends (who it paid) and newest max_txs receipts (who paid it). 1 to 2000 (default 1000). The counterparties and totals are computed over that window; raise it to look further back, at more cost. Ignored on Ethereum, Tron and Solana (they use after_time / before_time).
min_usdNoReturn only counterparties whose total USD (received plus sent) is at least this much. 0 (default) = no floor. Counterparties below it still count in below_cutoff.
group_byNoaddress (default) returns one row per counterparty. label_type returns the flow totalled by each counterparty's primary label type, with a (none) row for the unlabeled and a (below_cutoff) row for the counterparties past the limit, so the shares sum to 100%.address
addressesYesOne address or a set of up to 50, separated by spaces, commas or '|'. On Ethereum each is a 0x address (0x followed by 40 hex characters); on Tron a base58 address (T followed by 33 characters); on Solana a base58 address (32-44 characters, case-sensitive); on Bitcoin a 1.../3.../bc1 address; on Zcash a transparent t1.../t3 address. Bitcoin and Zcash take ONE address per call (send a set one at a time). An address that is not valid for the chain is reported as invalid and skipped, not fatal.
directionNoboth (default) counts what the set received and what it sent. in counts only inflows (who paid the set); out counts only outflows (who the set paid).both
after_timeNoOnly transfers at/after this UTC time. Empty = 90 days before before_time. Format: YYYY-MM-DD, YYYY-MM-DD HH:MM[:SS], ISO-8601 like 2026-09-20T00:00:00Z or 10-digit unix seconds.
label_typeNoKeep only counterparties that carry at least one label of these types, a comma-separated list. Empty (default) keeps all.
before_timeNoOnly transfers strictly before this UTC time. Empty = the moment the call starts. Same formats as after_time.
include_internalNoEVM only. 0 (default) counts top-level transfers only - the transfer a transaction makes itself, plus token transfers. 1 also counts value moved by contract code deeper inside a transaction (an internal transfer). Only 0 or 1; 1 is rejected on Tron, Solana, Bitcoin and Zcash.
exclude_label_typeNoDrop counterparties that carry any label of these types, a comma-separated list. Empty (default) drops none.
include_zero_valueNo0 (default) drops zero-amount transfers - an address-poisoning look-alike is planted as a 0-amount transfer. 1 keeps them. Only 0 or 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / addresses / description
      Previous value: -"One address or a set of up to 50, separated by spaces, commas or '|'. On Ethereum each is a 0x address (0x followed by 40 hex characters); on Tron a base58 address (T followed by 33 characters). An address that is not valid for the chain is reported as invalid and skipped, not fatal."New value: +"One address or a set of up to 50, separated by spaces, commas or '|'. On Ethereum each is a 0x address (0x followed by 40 hex characters); on Tron a base58 address (T followed by 33 characters); on Solana a base58 address (32-44 characters, case-sensitive); on Bitcoin a 1.../3.../bc1 address; on Zcash a transparent t1.../t3 address. Bitcoin and Zcash take ONE address per call (send a set one at a time). An address that is not valid for the chain is reported as invalid and skipped, not fatal."
    • changedInput schema / properties / chain / description
      Previous value: -"Chain of the address set - ethereum or tron."New value: +"Chain of the address set - ethereum, tron, solana, bitcoin or zcash (Zcash transparent addresses only)."
    • changedInput schema / properties / include_internal / description
      Previous value: -"EVM only. 0 (default) counts top-level transfers only - the transfer a transaction makes itself, plus token transfers. 1 also counts value moved by contract code deeper inside a transaction (an internal transfer). Only 0 or 1; 1 is rejected on Tron."New value: +"EVM only. 0 (default) counts top-level transfers only - the transfer a transaction makes itself, plus token transfers. 1 also counts value moved by contract code deeper inside a transaction (an internal transfer). Only 0 or 1; 1 is rejected on Tron, Solana, Bitcoin and Zcash."
    • addedInput schema / properties / max_txs
      Added value: +{
      +  "default": 1000,
      +  "description": "Bitcoin and Zcash only. How many of the address's most recent transactions to read on each side - its newest max_txs spends (who it paid) and newest max_txs receipts (who paid it). 1 to 2000 (default 1000). The counterparties and totals are computed over that window; raise it to look further back, at more cost. Ignored on Ethereum, Tron and Solana (they use after_time / before_time).",
      +  "type": "integer"
      +}
    • changedInput schema / properties / token / description
      Previous value: -"Restrict to one token. On Ethereum its contract address (0x followed by 40 hex characters); on Tron a TRC-20 contract (T followed by 33 characters) or a TRC-10 numeric asset id. Empty (default) counts every token."New value: +"Restrict to one token. On Ethereum its contract address (0x followed by 40 hex characters); on Tron a TRC-20 contract (T followed by 33 characters) or a TRC-10 numeric asset id. Not applicable on Solana, Bitcoin or Zcash and rejected there. Empty (default) counts every token."
  2. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. Beyond that the description adds genuinely useful behavior: USD is null (never zero) for unpriced transfers, usd_total is a ranking key not a net balance so pass-throughs count twice, and below_cutoff absorbs the tail so rows plus bucket reconcile to the whole flow. It stops short of describing pagination or failure behavior, so a 4 rather than a 5.

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 purpose and the negative routing before any detail, and every paragraph carries information. It is long, however, and some passages restate schema-documented specifics (max_txs ranges, token formats), which keeps it from a 5.

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?

There is no output schema, yet the description fully specifies what format=json returns (per-row usd_total, per-side unpriced counts, below_cutoff bucket, requested/used/invalid address counts, statements/rows/bytes/timing cost) and how markdown differs. For a 16-parameter analytical tool that is the completeness an agent needs.

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 description coverage is 100%, so the schema already documents every parameter's type, default and constraints; baseline is 3. The description adds meaning on how results are shaped (format json versus markdown, the 90-day default window echoed back) but much of the parameter prose mirrors what is already in the schema.

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?

Opens with a concrete verb and resource: 'who an address set paid and was paid by, in one call', then enumerates the row shape (USD received/sent, transfer counts each way, first/last time, unpriced counts). It also names three distinct sibling tools it is NOT, so it is distinguishable without opening any schema.

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

Usage Guidelines5/5

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

Explicit routing: 'NOT a risk score -> use address_risk_report; NOT the labels of one address -> use labels_for_addresses; NOT a single address's asset totals -> use eth_address_flow_summary.' It also states the when-to-use condition for group_by=label_type versus the default per-address mode.

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.