> For the complete documentation index, see [llms.txt](https://docs.nansen.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nansen.ai/api/backtesting-data/historical-token-flow-summary.md).

# Historical Token Flow Summary

## Get historical "Token God Mode" (TGM) token flow summary (Beta)

> \*\*Beta — subject to breaking changes.\*\*\
> \
> Aggregated token flow intelligence with temporally-correct segment labels.\
> Same response shape as \`/tgm/flow-intelligence\` plus a \`token\_symbol\` column.\
> \
> \*\*Key differences from \`/tgm/flow-intelligence\`:\*\*\
> \- Accepts an explicit \`date\_range\` (no rolling timeframe default)\
> \- Segment labels (Whale, Public Figure, Top PnL, Smart Trader) are resolved\
> &#x20; at \`date\_to\` from history tables to avoid forward-looking bias\
> \- Segment columns are NULL when temporal label coverage does not yet include\
> &#x20; \`date\_to\` (whale/public\_figure/top\_pnl/exchange coverage starts 2025-03-11;\
> &#x20; smart\_trader is available from 2020+

```json
{"openapi":"3.1.0","info":{"title":"Nansen API","version":"1.0.0"},"servers":[{"url":"https://api.nansen.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apiKey","description":"API key for authentication"}},"schemas":{"TGMHistoricalTokenFlowSummaryRequest":{"properties":{"chain":{"$ref":"#/components/schemas/TGMChain","description":"Blockchain chain. Currently base, bnb, ethereum, solana."},"token_address":{"type":"string","title":"Token Address","description":"Token contract address"},"date_range":{"$ref":"#/components/schemas/DateRange","description":"Historical date range with explicit from and to dates. date_to is the as-of date for label resolution; the (date_from, date_to) span determines bucket resolution and the lookback window for avg_flow_usd."},"apply_blacklist_filter":{"type":"boolean","title":"Apply Blacklist Filter","description":"When True, exclude blacklisted addresses from the results. Defaults to True.","default":true}},"additionalProperties":false,"type":"object","required":["chain","token_address","date_range"],"title":"TGMHistoricalTokenFlowSummaryRequest","description":"Request model for the historical token flow summary endpoint.\n\nReturns the same per-segment flow intelligence shape as\n`/tgm/flow-intelligence` but resolved against temporal label history so\nsegment classification reflects who held a label _at_ `date_to` rather\nthan today. Use this for backtests and as-of-date analysis."},"TGMChain":{"type":"string","enum":["arbitrum","avalanche","base","bnb","ethereum","hyperevm","hyperliquid","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","ronin","scroll","sei","solana","sonic","starknet","sui","ton","tron"],"title":"TGMChain","description":"Chains supported in TGM (Token God Mode) endpoints."},"DateRange":{"properties":{"from":{"anyOf":[{"type":"string"}],"title":"From","description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"},"to":{"anyOf":[{"type":"string"}],"title":"To","description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"}},"type":"object","title":"DateRange","description":"Date range model matching the API schema."},"TGMHistoricalTokenFlowSummaryResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TGMHistoricalTokenFlowSummary"},"type":"array","title":"Data","description":"List of historical token flow summary records. The endpoint returns a single aggregated row per (token_address, date_to)."},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"}],"title":"Warnings","description":"Optional warnings about the query results, e.g. when segment fields are NULL because temporal label data does not yet cover the requested date_to."}},"type":"object","required":["data"],"title":"TGMHistoricalTokenFlowSummaryResponse","description":"Response for the historical token flow summary endpoint."},"TGMHistoricalTokenFlowSummary":{"properties":{"token_symbol":{"anyOf":[{"type":"string"}],"title":"Token Symbol","description":"Symbol of the queried token, resolved from on-chain metadata."},"public_figure_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Public Figure Net Flow Usd","description":"Net flow (USD) for addresses labeled as Public Figure at date_to."},"public_figure_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Public Figure Avg Flow Usd","description":"Geometric mean of absolute flow for Public Figure addresses."},"public_figure_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Public Figure Wallet Count","description":"Unique wallet count for Public Figure addresses in the period."},"top_pnl_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Top Pnl Net Flow Usd","description":"Net flow (USD) for addresses labeled as Top PnL at date_to."},"top_pnl_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Top Pnl Avg Flow Usd","description":"Geometric mean of absolute flow for Top PnL addresses."},"top_pnl_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Top Pnl Wallet Count","description":"Unique wallet count for Top PnL addresses in the period."},"whale_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Whale Net Flow Usd","description":"Net flow (USD) for addresses labeled as Whale at date_to."},"whale_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Whale Avg Flow Usd","description":"Geometric mean of absolute flow for Whale addresses."},"whale_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Whale Wallet Count","description":"Unique wallet count for Whale addresses in the period."},"exchange_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Exchange Net Flow Usd","description":"Net exchange flow in USD (direction inverted: deposit-to-exchange is positive). Combines CEX transfers and DEX trades."},"exchange_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Exchange Avg Flow Usd","description":"Geometric mean of absolute exchange flow sizes."},"exchange_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Exchange Wallet Count","description":"Always 0 (matching production flow-intelligence — exchange wallet count is not tracked)."},"smart_trader_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Smart Trader Net Flow Usd","description":"Net flow (USD) for addresses labeled as Smart Trader at date_to. Available from 2020+; before 2025-03-11 covers DEX trades only."},"smart_trader_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Smart Trader Avg Flow Usd","description":"Geometric mean of absolute flow for Smart Trader addresses."},"smart_trader_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Smart Trader Wallet Count","description":"Unique wallet count for Smart Trader addresses in the period."},"fresh_wallets_net_flow_usd":{"anyOf":[{"type":"number"}],"title":"Fresh Wallets Net Flow Usd","description":"24h fresh-wallet inflow (USD) from the most recent snapshot taken on or before date_to."},"fresh_wallets_avg_flow_usd":{"anyOf":[{"type":"number"}],"title":"Fresh Wallets Avg Flow Usd","description":"7-day daily-average fresh-wallet inflow (USD) from the snapshot."},"fresh_wallets_wallet_count":{"anyOf":[{"type":"integer"}],"title":"Fresh Wallets Wallet Count","description":"Always 0 (matching production — fresh wallet count is not tracked separately)."}},"type":"object","title":"TGMHistoricalTokenFlowSummary","description":"Single historical token flow summary record.\n\nOutput schema mirrors `/tgm/flow-intelligence` (TGMFlowIntelligence) plus\na `token_symbol` convenience column. All segment columns are Nullable —\nNULL means the segment's temporal label data is not available for the\nqueried `date_to` (e.g. before 2025-03-11 for whale/public_figure/top_pnl/\nexchange), distinct from a zero net flow."}},"headers":{"XNansenCreditsUsed":{"description":"Number of credits consumed by this API request","schema":{"type":"string"}},"XNansenCreditsRemaining":{"description":"Total credits remaining in the user's account after this request","schema":{"type":"string"}},"PaymentReceipt":{"description":"Base64url-encoded MPP receipt returned on successful paid requests via Authorization: Payment","schema":{"type":"string"}},"RateLimitLimit":{"description":"Combined rate limit across all configured time windows","schema":{"type":"string"}},"RateLimitRemaining":{"description":"Number of requests remaining in the current limiting window","schema":{"type":"string"}},"RateLimitReset":{"description":"Time in seconds until the rate limit window resets","schema":{"type":"string"}},"XRateLimitLimitSecond":{"description":"Maximum requests allowed per second","schema":{"type":"string"}},"XRateLimitRemainingSecond":{"description":"Requests remaining in the current second","schema":{"type":"string"}},"XRateLimitLimitMinute":{"description":"Maximum requests allowed per minute","schema":{"type":"string"}},"XRateLimitRemainingMinute":{"description":"Requests remaining in the current minute","schema":{"type":"string"}},"PaymentRequired":{"description":"Base64-encoded x402 payment options returned on 402 responses for x402 clients","schema":{"type":"string"}},"WWWAuthenticatePayment":{"description":"MPP payment challenge returned on 402 responses, for example `Payment id=\"...\", realm=\"api.nansen.ai\", method=\"tempo\", intent=\"charge\", request=\"...\"`","schema":{"type":"string"}},"RetryAfter":{"description":"Number of seconds to wait before making a new request","schema":{"type":"string"}}},"responses":{"BadRequestError":{"description":"Bad Request - Invalid request parameters or malformed request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnauthorizedError":{"description":"Authentication error - No API key found in request","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"PaymentRequiredError":{"description":"Payment Required - This endpoint supports pay-per-request via x402 and MPP. x402 responses advertise payment options in `Payment-Required`; MPP responses advertise a fresh `WWW-Authenticate: Payment ...` challenge. Successful MPP responses may include `Payment-Receipt`.","headers":{"Payment-Required":{"$ref":"#/components/headers/PaymentRequired"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticatePayment"}},"content":{"application/json":{"schema":{"type":"object","description":"Problem-details body for x402 or MPP payment challenges."}}}},"ForbiddenError":{"description":"Forbidden - User does not have required subscription tier or has exceeded credit limit","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"NotFoundError":{"description":"Not Found - The requested resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"ValidationError":{"description":"Validation error - Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"}}}}}}}}},"TooManyRequestsError":{"description":"Too Many Requests - Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying"}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"InternalServerError":{"description":"Internal Server Error - An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/api/v1beta1/tgm/historical-token-flow-summary":{"post":{"tags":["Token God Mode"],"summary":"Get historical \"Token God Mode\" (TGM) token flow summary (Beta)","description":"**Beta — subject to breaking changes.**\n\nAggregated token flow intelligence with temporally-correct segment labels.\nSame response shape as `/tgm/flow-intelligence` plus a `token_symbol` column.\n\n**Key differences from `/tgm/flow-intelligence`:**\n- Accepts an explicit `date_range` (no rolling timeframe default)\n- Segment labels (Whale, Public Figure, Top PnL, Smart Trader) are resolved\n  at `date_to` from history tables to avoid forward-looking bias\n- Segment columns are NULL when temporal label coverage does not yet include\n  `date_to` (whale/public_figure/top_pnl/exchange coverage starts 2025-03-11;\n  smart_trader is available from 2020+","operationId":"get_tgm_historical_token_flow_summary_beta_api_v1beta1_tgm_historical_token_flow_summary_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMHistoricalTokenFlowSummaryRequest"}}},"required":true},"responses":{"200":{"description":"Historical TGM token flow summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TGMHistoricalTokenFlowSummaryResponse"}}},"headers":{"X-Nansen-Credits-Used":{"$ref":"#/components/headers/XNansenCreditsUsed"},"X-Nansen-Credits-Remaining":{"$ref":"#/components/headers/XNansenCreditsRemaining"},"Payment-Receipt":{"$ref":"#/components/headers/PaymentReceipt"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RateLimit-Limit-Second":{"$ref":"#/components/headers/XRateLimitLimitSecond"},"X-RateLimit-Remaining-Second":{"$ref":"#/components/headers/XRateLimitRemainingSecond"},"X-RateLimit-Limit-Minute":{"$ref":"#/components/headers/XRateLimitLimitMinute"},"X-RateLimit-Remaining-Minute":{"$ref":"#/components/headers/XRateLimitRemainingMinute"}}},"400":{"description":"Bad Request","$ref":"#/components/responses/BadRequestError"},"401":{"description":"Unauthorized","$ref":"#/components/responses/UnauthorizedError"},"402":{"description":"Payment Required","$ref":"#/components/responses/PaymentRequiredError"},"403":{"description":"Forbidden","$ref":"#/components/responses/ForbiddenError"},"404":{"description":"Not Found","$ref":"#/components/responses/NotFoundError"},"422":{"description":"Unprocessable Content","$ref":"#/components/responses/ValidationError"},"429":{"description":"Too Many Requests","$ref":"#/components/responses/TooManyRequestsError"},"500":{"description":"Internal Server Error","$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nansen.ai/api/backtesting-data/historical-token-flow-summary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
