Repository navigation
Token God Mode
The TokenGodMode service provides access to the token screener, flow intelligence, and who-bought-sold endpoints.
Access it via client.TokenGodMode.
TokenScreener discovers and screens tokens across multiple blockchains, with rich filtering and sorting capabilities.
Endpoint: POST /api/v1/token-screener
| Constant | Value |
|---|---|
Timeframe5M |
"5m" |
Timeframe10M |
"10m" |
Timeframe1H |
"1h" |
Timeframe6H |
"6h" |
Timeframe24H |
"24h" |
Timeframe7D |
"7d" |
Timeframe30D |
"30d" |
type TokenScreenerRequest struct {
Chains []Chain `json:"chains"`
Timeframe *TokenScreenerTimeframe `json:"timeframe,omitempty"`
Date *DateRange `json:"date,omitempty"`
Pagination *PaginationRequest `json:"pagination,omitempty"`
Filters *TokenScreenerFilters `json:"filters,omitempty"`
OrderBy []SortOrder `json:"order_by,omitempty"`
}Filters (TokenScreenerFilters):
| Field | Type | Description |
|---|---|---|
TokenAddress |
interface{} |
Filter by token address or list of addresses. |
TokenSymbol |
interface{} |
Filter by token symbol or list of symbols. |
OnlySmartMoney |
*bool |
Show only tokens with smart money activity. |
TraderType |
*TraderType |
Filter by trader cohort. |
Sectors |
[]string |
Include only tokens in these sectors. |
ExcludeSectors |
[]string |
Exclude tokens in these sectors. |
TokenAgeDays |
*NumericRangeFilter |
Filter by token age in days. |
MarketCapUSD |
*NumericRangeFilter |
Filter by market cap in USD. |
Liquidity |
*NumericRangeFilter |
Filter by liquidity in USD. |
PriceUSD |
*NumericRangeFilter |
Filter by price in USD. |
PriceChange |
*NumericRangeFilter |
Filter by price change percentage. |
FDV |
*NumericRangeFilter |
Filter by fully diluted valuation. |
NofBuyers |
*IntegerRangeFilter |
Filter by number of buyers. |
NofSellers |
*IntegerRangeFilter |
Filter by number of sellers. |
Volume |
*NumericRangeFilter |
Filter by total volume. |
Netflow |
*NumericRangeFilter |
Filter by net flow. |
IncludeStablecoins |
*bool |
Whether to include stablecoins. |
IncludeSmartMoneyLabels |
[]SmartMoneyLabel |
Include only these smart money cohorts. |
ExcludeSmartMoneyLabels |
[]SmartMoneyLabel |
Exclude these smart money cohorts. |
Sort fields (TokenScreenerSortField):
chain, token_address, token_symbol, market_cap_usd, volume, liquidity, nof_traders, nof_buyers, nof_sellers, nof_buys, nof_sells, price_change, price_usd, netflow, buy_volume, sell_volume, fdv, fdv_mc_ratio, inflow_fdv_ratio, outflow_fdv_ratio, token_age_days
tf := nansen.Timeframe24H
resp, err := client.TokenGodMode.TokenScreener(ctx, &nansen.TokenScreenerRequest{
Chains: []nansen.Chain{nansen.ChainEthereum, nansen.ChainSolana},
Timeframe: &tf,
Pagination: &nansen.PaginationRequest{
Page: nansen.IntPtr(1),
PerPage: nansen.IntPtr(20),
},
Filters: &nansen.TokenScreenerFilters{
MarketCapUSD: &nansen.NumericRangeFilter{
Min: nansen.Float64Ptr(1_000_000),
Max: nansen.Float64Ptr(50_000_000),
},
IncludeStablecoins: nansen.BoolPtr(false),
},
OrderBy: []nansen.SortOrder{
{Field: string(nansen.ScreenerSortVolume), Direction: nansen.SortDesc},
},
})FlowIntelligence returns token flow summaries broken down by holder segments (Whales, Smart Traders, Funds, Public Figures, Fresh Wallets, Exchanges).
Endpoint: POST /api/v1/tgm/flow-intelligence
| Constant | Value |
|---|---|
FlowTimeframe5M |
"5m" |
FlowTimeframe1H |
"1h" |
FlowTimeframe6H |
"6h" |
FlowTimeframe12H |
"12h" |
FlowTimeframe1D |
"1d" |
FlowTimeframe7D |
"7d" |
type TGMFlowIntelligenceRequest struct {
Chain Chain `json:"chain"`
TokenAddress string `json:"token_address"`
Timeframe *TGMFlowIntelligenceTimeframe `json:"timeframe,omitempty"`
Filters *TGMFlowIntelligenceFilters `json:"filters,omitempty"`
}tf := nansen.FlowTimeframe1D
resp, err := client.TokenGodMode.FlowIntelligence(ctx, &nansen.TGMFlowIntelligenceRequest{
Chain: nansen.ChainEthereum,
TokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
Timeframe: &tf,
})WhoBoughtSold returns a list of addresses that bought or sold a specific token within a date range.
Endpoint: POST /api/v1/tgm/who-bought-sold
type TGMWhoBoughtSoldRequest struct {
Chain Chain `json:"chain"`
TokenAddress string `json:"token_address"`
BuyOrSell *BuyOrSell `json:"buy_or_sell,omitempty"`
Date DateRange `json:"date"`
Pagination *PaginationRequest `json:"pagination,omitempty"`
Filters *TGMWhoBoughtSoldFilters `json:"filters,omitempty"`
OrderBy []SortOrder `json:"order_by,omitempty"`
}The BuyOrSell type accepts nansen.Buy ("BUY") or nansen.Sell ("SELL"). Omitting it returns both directions.
Sort fields (TGMWhoBoughtSoldSortField):
bought_volume_usd, sold_volume_usd, token_trade_volume, trade_volume_usd, bought_token_volume, sold_token_volume
buy := nansen.Buy
resp, err := client.TokenGodMode.WhoBoughtSold(ctx, &nansen.TGMWhoBoughtSoldRequest{
Chain: nansen.ChainEthereum,
TokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
BuyOrSell: &buy,
Date: nansen.DateRange{
From: "2023-01-01T00:00:00Z",
To: "2023-01-07T00:00:00Z",
},
Pagination: &nansen.PaginationRequest{
Page: nansen.IntPtr(1),
PerPage: nansen.IntPtr(10),
},
})