{"uid":"cap_ojUGVsk2zYpN_1Qq6eK5_","slug":"nansen-dex-trades-d82c32ba","name":"Nansen TGM DEX Trades","description":"Access individual DEX trading transactions for a specific token. Shows detailed trade-by-trade data including trader labels, amounts, and prices.","url":"https://api.nansen.ai/api/v1/tgm/dex-trades?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","title":"TGMDexTradesRequest","required":["chain","token_address","date"],"properties":{"date":{"type":"object","title":"DateRange","properties":{"to":{"anyOf":[{"type":"string"}],"title":"To","examples":["2025-01-31T23:59:59Z"],"description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"},"from":{"anyOf":[{"type":"string"}],"title":"From","examples":["2025-01-01T00:00:00Z"],"description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"}},"description":"Date range model matching the API schema."},"chain":{"enum":["arbitrum","arc","avalanche","base","bnb","ethereum","hyperevm","hyperliquid","injective","iotaevm","linea","mantle","mantra","monad","near","optimism","plasma","polygon","robinhood","sei","solana","sonic","starknet","sui","ton","tron"],"type":"string","title":"TGMChain","description":"Chains supported in TGM (Token God Mode) endpoints."},"filters":{"anyOf":[{"type":"object","title":"TGMDexTradesFilters","properties":{"action":{"anyOf":[{"enum":["BUY","SELL"],"type":"string","title":"TGMWhoBoughtSoldType","description":"TGM who bought/sold type."}],"examples":["BUY","SELL"],"description":"Action filter (BUY/SELL)"},"token_name":{"anyOf":[{"type":"string"}],"title":"Token Name","examples":["USDC","%Uniswap%"],"description":"Token name filter"},"token_amount":{"anyOf":[{"type":"object","title":"NumericRangeFilter","properties":{"max":{"anyOf":[{"type":"number"}],"title":"Max","examples":[50000,10000000,100],"description":"Maximum value (inclusive)"},"min":{"anyOf":[{"type":"number"}],"title":"Min","examples":[1000,1000000,-50,0],"description":"Minimum value (inclusive)"}},"description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"}],"examples":[{"min":100}],"description":"Token amount range filter"},"token_address":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Token Address","examples":["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],"description":"Token address filter"},"trader_address":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trader Address","examples":["0x28c6c06298d514db089934071355e5743bf21d60"],"description":"Trader address filter"},"block_timestamp":{"anyOf":[{"type":"object","title":"DateRangeFilter","properties":{"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"},{"type":"null"}],"title":"To","examples":["2025-01-31T23:59:59Z"],"description":"End date (inclusive), ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"},"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"},{"type":"null"}],"title":"From","examples":["2025-01-01T00:00:00Z"],"description":"Start date (inclusive), ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"}},"description":"Filter for date ranges with optional from/to bounds. - Date range"}],"examples":[{"to":"2025-01-31T23:59:59Z","from":"2025-01-01T00:00:00Z"}],"description":"Date range filter for trade timestamps"},"transaction_hash":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Transaction Hash","examples":["0x61adb6da30853c5988f0204dd9f6e4abbc878e02c34030a4f707cf4ec3124bcb"],"description":"Transaction hash filter"},"traded_token_name":{"anyOf":[{"type":"string"}],"title":"Traded Token Name","examples":["DAI","%Maker%"],"description":"Traded token name filter"},"estimated_value_usd":{"anyOf":[{"type":"object","title":"NumericRangeFilter","properties":{"max":{"anyOf":[{"type":"number"}],"title":"Max","examples":[50000,10000000,100],"description":"Maximum value (inclusive)"},"min":{"anyOf":[{"type":"number"}],"title":"Min","examples":[1000,1000000,-50,0],"description":"Minimum value (inclusive)"}},"description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"}],"examples":[{"min":1000}],"description":"Estimated value range filter in USD"},"traded_token_amount":{"anyOf":[{"type":"object","title":"NumericRangeFilter","properties":{"max":{"anyOf":[{"type":"number"}],"title":"Max","examples":[50000,10000000,100],"description":"Maximum value (inclusive)"},"min":{"anyOf":[{"type":"number"}],"title":"Min","examples":[1000,1000000,-50,0],"description":"Minimum value (inclusive)"}},"description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"}],"examples":[{"min":100}],"description":"Traded token amount range filter"},"traded_token_address":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Traded Token Address","examples":["0x1234...","%DAI%"],"description":"Traded token address filter"},"trader_address_label":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trader Address Label","examples":["High Gas Consumer"],"description":"Trader name filter"},"estimated_swap_price_usd":{"anyOf":[{"type":"object","title":"NumericRangeFilter","properties":{"max":{"anyOf":[{"type":"number"}],"title":"Max","examples":[50000,10000000,100],"description":"Maximum value (inclusive)"},"min":{"anyOf":[{"type":"number"}],"title":"Min","examples":[1000,1000000,-50,0],"description":"Minimum value (inclusive)"}},"description":"Filter for numeric values (floats) with optional min/max bounds.\nUse for prices, volumes, ratios, and other decimal values. - Values between -10.5 and 100.75"}],"examples":[{"min":0.01}],"description":"Estimated swap price range filter in USD"},"exclude_smart_money_labels":{"anyOf":[{"type":"array","items":{"enum":["30D Smart Trader","90D Smart Trader","180D Smart Trader","Fund","Smart Trader","Public Figure","Exchange","Whale","BananaGun Bot User","Top Maestro Bot User","Top BananaGun Bot User","Maestro Bot User","Early MAGIC Miner","First Mover LP","First Mover Staking","Profitable LP","Smart HL Perps Trader"],"type":"string","title":"LabelType","description":"Filter by entity label type."}}],"title":"Exclude Smart Money Labels","examples":[["Public Figure"],["Exchange"]],"description":"Exclude smart money labels for counterparties"},"include_smart_money_labels":{"anyOf":[{"type":"array","items":{"enum":["30D Smart Trader","90D Smart Trader","180D Smart Trader","Fund","Smart Trader","Public Figure","Exchange","Whale","BananaGun Bot User","Top Maestro Bot User","Top BananaGun Bot User","Maestro Bot User","Early MAGIC Miner","First Mover LP","First Mover Staking","Profitable LP","Smart HL Perps Trader"],"type":"string","title":"LabelType","description":"Filter by entity label type."}}],"title":"Include Smart Money Labels","examples":[["Public Figure"],["Exchange"]],"description":"Include smart money labels for counterparties"}},"description":"Filters for TGM DEX trades endpoint.\n\nThese filters control which DEX trades are included in the analysis.","additionalProperties":false}],"examples":[{"action":"BUY","token_amount":{"min":100},"estimated_value_usd":{"min":1000},"include_smart_money_labels":["Whale","Smart Trader"]}],"description":"Additional filters to apply to the query."},"order_by":{"anyOf":[{"type":"array","items":{"type":"object","title":"TGMDexTradesSortOrder","required":["field","direction"],"properties":{"field":{"enum":["block_timestamp","transaction_hash","trader_address","trader_address_label","token_address","action","token_name","token_amount","traded_token_address","traded_token_name","traded_token_amount","estimated_swap_price_usd","estimated_value_usd"],"type":"string","title":"TGMDexTradesSortField","description":"Enum for sortable fields in TGM DEX trades."},"direction":{"enum":["ASC","DESC"],"type":"string","title":"SortDirection","description":"Enum for sort directions."}}}}],"title":"Order By","description":"Custom sort order to override the endpoint's default ordering.\n\nExamples:\n- [{\"field\": \"block_timestamp\", \"direction\": \"DESC\"}] - Sort by timestamp descending\n- [{\"field\": \"estimated_value_usd\", \"direction\": \"ASC\"}] - Sort by estimated value ascending\n- [{\"field\": \"token_amount\", \"direction\": \"DESC\"}] - Sort by token amount descending"},"pagination":{"type":"object","title":"PaginationRequest","properties":{"page":{"type":"integer","title":"Page","default":1,"minimum":1,"description":"Page number (1-based)"},"per_page":{"type":"integer","title":"Per Page","default":10,"maximum":1000,"minimum":1,"description":"Number of records per page (max 1000)"}},"description":"Pagination parameters for API requests."},"token_address":{"type":"string","title":"Token Address","examples":["2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv"],"description":"Token address"},"only_smart_money":{"type":"boolean","title":"Only Smart Money","default":false,"examples":[false],"description":"Returns only the DEX Trades made by Smart Money wallets"}},"description":"Request model for TGM dex-trades endpoint.\n\nThis endpoint provides all DEX trades for a specific token with optional filtering\nfor smart money wallets only.","additionalProperties":false},"responseSchema":{"type":"object","title":"TGMDexTradesResponse","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"type":"object","title":"TGMDexTrade","required":["block_timestamp","transaction_hash","trader_address","action","token_address","token_name","token_amount","traded_token_address","traded_token_name","traded_token_amount","estimated_swap_price_usd","estimated_value_usd"],"properties":{"action":{"enum":["BUY","SELL"],"type":"string","title":"TGMWhoBoughtSoldType","description":"TGM who bought/sold type."},"token_name":{"type":"string","title":"Token Name","examples":["USDC"],"description":"The name of the token"},"token_amount":{"anyOf":[{"type":"number"}],"title":"Token Amount","examples":[1000],"description":"The amount of the specified token traded"},"token_address":{"type":"string","title":"Token Address","examples":["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],"description":"Address of token"},"trader_address":{"type":"string","title":"Trader Address","examples":["0x28c6c06298d514db089934071355e5743bf21d60"],"description":"Trader's address"},"block_timestamp":{"type":"string","title":"Block Timestamp","examples":["2025-05-01T12:00:00Z"],"description":"Block timestamp of the trade"},"transaction_hash":{"type":"string","title":"Transaction Hash","examples":["0x61adb6da30853c5988f0204dd9f6e4abbc878e02c34030a4f707cf4ec3124bcb"],"description":"Transaction hash"},"traded_token_name":{"type":"string","title":"Traded Token Name","examples":["DAI"],"description":"The name of the token traded for the specified token"},"estimated_value_usd":{"anyOf":[{"type":"number"}],"title":"Estimated Value Usd","examples":[1500.5],"description":"The estimated value of the trade in USD"},"traded_token_amount":{"anyOf":[{"type":"number"}],"title":"Traded Token Amount","examples":[500],"description":"The amount of the token traded for the specified token"},"traded_token_address":{"type":"string","title":"Traded Token Address","examples":["0x6b175474e89094c44da98b954eedeac495271d0f"],"description":"Address of token"},"trader_address_label":{"anyOf":[{"type":"string"}],"title":"Trader Address Label","examples":["High Gas Consumer"],"description":"Name of the trader, based on nansen_label"},"estimated_swap_price_usd":{"anyOf":[{"type":"number"}],"title":"Estimated Swap Price Usd","examples":[1],"description":"Estimated swap price in USD, derived from the counterpart token's USD value. Falls back to the daily median token price if the counterpart price is unavailable."}},"description":"Individual TGM dex trade record.\n\nRepresents a single DEX trade for a specific token."},"title":"Data","description":"List of TGM DEX trade records"},"pagination":{"type":"object","title":"PaginationInfo","properties":{"page":{"type":"integer","title":"Page","default":1,"minimum":1,"description":"Current page number"},"per_page":{"type":"integer","title":"Per Page","default":10,"maximum":1000,"minimum":1,"description":"Number of records per page"},"is_last_page":{"type":"boolean","title":"Is Last Page","default":true,"description":"Whether this is the last page"}},"description":"Pagination information for API responses."}},"description":"Response model for TGM dex-trades endpoint.\n\nContains a list of DEX trade records with pagination and metadata."},"example":null,"exampleRequest":null,"tags":["blockchain","smart-money","wallet","tokens","defi","analytics","profiler","dex","pnl","onchain","prediction-market","data"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pwKwZNL90jEV6rhwHcoWl","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"Nansen","brandSlug":"nansen","brandBaseUrl":"https://nansen.ai","brandDocsUrl":"https://docs.nansen.ai","whatItDoes":"Retrieves individual DEX trade transactions for a specific token on a given chain, including trader addresses, labels, amounts, prices, and trade direction (buy/sell).","exampleAgentPrompt":"Pull all DEX trades for token 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 on Ethereum between January 1, 2025 and January 31, 2025, and show me only BUY transactions worth at least $1,000 USD — I want to see each trader's address, how much they bought, and the transaction hash.","exampleUseCases":[{"title":"Track whale wallet trading patterns","prompt":"Show me all DEX trades made by wallet 0x1234567890123456789012345678901234567890 over the last 30 days across all chains — I want to see what tokens they bought and sold, the exact amounts, prices they paid, and timestamps so I can understand their trading strategy."},{"title":"Identify coordinated token pump activity","prompt":"Pull every DEX trade for token 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599 on Ethereum from the last 48 hours, sorted by timestamp — show me buy transactions over $5,000 USD with trader addresses and amounts so I can spot if the same wallets are moving together."},{"title":"Build audit trail for token migration","prompt":"Get all individual DEX swap transactions for the old token contract 0x1111111111111111111111111111111111111111 on Polygon for the last 90 days — I need trader addresses, exact amounts swapped, prices in USD, and transaction hashes to reconcile user holdings before our migration deadline."}],"resultDescription":"Returns a paginated list of individual DEX trade records, each containing the transaction hash, block timestamp, trader address, buy/sell action, token name and amount, the counter-token name and amount, estimated swap price in USD, estimated total value in USD, and optional trader labels. Pagination metadata is also included.","failureModes":["Missing required fields (chain, token_address, date) returns 400 validation error","Invalid chain enum value returns 400 error","Invalid date format returns 400 error","Token address not found on specified chain returns empty data array","Date range too large may result in truncated or paginated results","Malformed numeric range filter (min > max) returns 400 error","Payment not provided or insufficient returns 402 payment required"],"whenToPreferThis":"Use this endpoint when you need granular, trade-by-trade DEX transaction data for a specific token — including individual trader addresses, exact amounts, and timestamps — rather than aggregated summaries. Prefer this over the 'Who Bought Sold' endpoint when you need transaction-level detail rather than aggregated volume. Ideal for forensic analysis, tracking specific wallets, or building trade history timelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-09T18:43:38.419Z","isFirstParty":false,"canonicalSlug":"nansen-dex-trades-d82c32ba"}