Get hourly aggregated token flows for a specific segment of holders over a date range. The segments are Top 100 holders, Whale, Public Figure, Smart Money and Exchange. Note: Using holder_segment: smart_money is not a good proxy for an overall market view. Use it only if user explicitly requests ...
Part of the Nansen-MCP server.
Free to start. No card required.
AI agents use token_flows to create or modify resources in Nansen-MCP. Write operations carry medium risk because an autonomous agent could trigger bulk unintended modifications. Rate limits prevent a single agent session from making hundreds of changes in rapid succession. Argument validation ensures the agent passes expected values.
Without a policy, an AI agent could call token_flows repeatedly, creating or modifying resources faster than any human could review. PolicyLayer's rate limiting ensures write operations happen at a controlled pace, and argument validation catches malformed or unexpected inputs before they reach Nansen-MCP.
Write tools can modify data. A rate limit prevents runaway bulk operations from AI agents.
{
"version": "1",
"default": "deny",
"tools": {
"token_flows": {
"limits": [
{
"counter": "token_flows_rate",
"window": "minute",
"max": 30,
"scope": "grant"
}
]
}
}
} See the full Nansen-MCP policy for all 24 tools.
These attack patterns abuse exactly the kind of access token_flows gives an agent. Each links to the full case and the policy that stops it:
Other write tools across the catalogue. The same approach applies to each: rate-limit and validate the arguments.
Get hourly aggregated token flows for a specific segment of holders over a date range. The segments are Top 100 holders, Whale, Public Figure, Smart Money and Exchange. Note: Using holder_segment: smart_money is not a good proxy for an overall market view. Use it only if user explicitly requests it, or to combine it with other non smart money data. This is a more granular tool than token_recent_flows_summary and provides the TOTAL flows over the entire time frame broken down by segment. NOTE: This tool does not support native tokens (so11111111111111111111111111111111111111112, 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee) in onchain_tokens mode. Modes: - onchain_tokens (default): Analyze on-chain tokens by contract address - perps: Analyze Hyperliquid perpetual futures by symbol (chain auto-set to "hyperliquid") Args: request: TokenFlowsRequest containing parameters and pagination settings Returns: Token flow statistics as markdown. Columns returned: - Hour Timestamp: Timestamp of the hour that the flow is calculated for (datetime: YYYY-MM-DD HH:MM:SS) - Price USD: Token price in USD on this date (currency formatted) - Total Balance: Aggregate token balance held by tracked addresses (numeric) - Balance USD: USD value of the total tracked balance (currency formatted) - Holders: Number of unique addresses in the tracked group - Inflows/Longs: Total tokens flowing into tracked addresses (onchain_tokens mode) or Long positions (perps mode) (numeric) - Outflows/Shorts: Total tokens flowing out of tracked addresses (onchain_tokens mode) or Short positions (perps mode) (numeric) Notes: - Tracks *Smart Money* holders and their collective behavior - Label parameter determines which group of holders to track - In perps mode: Shorts that are added will show with a negative sign - this indicates new short positions, not closed positions. It is categorised as a Write tool in the Nansen-MCP MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
Register the Nansen- MCP server in PolicyLayer and add a rule for token_flows: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Nansen-MCP. Nothing to install.
token_flows is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the token_flows rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for token_flows. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
token_flows is provided by the Nansen- MCP server (nansen-ai/Nansen-MCP). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Deterministic rules across all 24 Nansen-MCP tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.
Free to start. No card required.
4,600+ MCP servers and 31,000+ tools scanned and risk-classified.