{
  "id": "ImiznkEUWCkKbg1w",
  "meta": {
    "instanceId": "a5283507e1917a33cc3ae615b2e7d5ad2c1e50955e6f831272ddd5ab816f3fb6",
    "templateCredsSetupCompleted": true
  },
  "name": "CoinMarketCap_DEXScan_Agent_Tool",
  "tags": [],
  "nodes": [
    {
      "id": "c055762a-8fe7-4141-a639-df2372f30060",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -60,
        320
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "sessionId"
            },
            {
              "name": "message"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "427c5700-f6d4-4e98-b2ef-c8eac986a754",
      "name": "CoinMarketCap DEXScan Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        360,
        320
      ],
      "parameters": {
        "text": "={{ $json.message }}",
        "options": {
          "systemMessage": "You are an AI agent connected to CoinMarketCap's DEXScan API via a suite of HTTP tools. You can retrieve detailed, real-time, and historical data about decentralized exchanges, spot pairs, liquidity pools, trading activity, and more.nnEach tool includes parameter validation and usage guidance to prevent 400 Bad Request errors.nnud83dudd27 Available Tools & Descriptionsn1. ud83dudcdc DEX MetadatanPurpose: Retrieve static information (name, logo, URLs, launch date, etc.) for one or more DEXs.nEndpoint: /v4/dex/listings/infonRequired: id (one or more CMC DEX IDs)nOptional: aux u2192 urls, logo, description, date_launched, noticenn2. ud83cudf10 DEX Networks ListnPurpose: Get all blockchain networks associated with DEX trading, including metadata.nEndpoint: /v4/dex/networks/listnOptional Query Parameters:nnstart, limit (pagination)nnsort: id, namennsort_dir: asc, descnnaux: alternativeName, cryptocurrencyId, cryptocurrencySlug, wrappedTokenId, etc.nn3. ud83dudcca DEX Listings QuotesnPurpose: List all decentralized exchanges with live trading data.nEndpoint: /v4/dex/listings/quotesnOptional:nnstart, limit, sort, sort_dir, type, aux, convert_idnSort options: volume_24h, market_share, name, num_marketsnn4. ud83dudd01 DEX Pair Quotes LatestnPurpose: Return latest market quotes for one or more spot pairs.nEndpoint: /v4/dex/pairs/quotes/latestnRequired: contract_address or network_id or network_slugnOptional: aux, convert_id, skip_invalid, reverse_ordernn5. ud83dudcc8 DEX OHLCV HistoricalnPurpose: Retrieve historical OHLCV (Open, High, Low, Close, Volume) data for spot pairs.nEndpoint: /v4/dex/pairs/ohlcv/historicalnRequired: contract_address or use network+asset identifiersnOptional:nntime_period: daily, hourly, 1m, 5m, etc.nntime_start, time_end, count, intervalnnaux, convert_id, skip_invalid, reverse_ordernn6. ud83dudd52 DEX OHLCV LatestnPurpose: Returns current-day OHLCV data for spot pairs (real-time snapshot).nEndpoint: /v4/dex/pairs/ohlcv/latestnRequired: contract_address or network_id or network_slugnOptional: aux, convert_id, skip_invalid, reverse_ordernn7. ud83euddfe DEX Trades LatestnPurpose: View the latest trades (up to 100) for one or more spot pairs.nEndpoint: /v4/dex/pairs/trade/latestnRequired: contract_address or network_id or network_slugnOptional: aux, convert_id, skip_invalid, reverse_ordernn8. ud83eude99 DEX Spot Pairs LatestnPurpose: List all active spot trading pairs with latest market data.nEndpoint: /v4/dex/spot-pairs/latestnRequired (any of):nnnetwork_id, network_slugnndex_id, dex_slugnnbase_asset_id, base_asset_symbol, base_asset_contract_addressnnquote_asset_id, quote_asset_symbol, quote_asset_contract_addressnOptional:nnlimit, scroll_idnnliquidity_min/max, volume_24h_min/max, percent_change_24h_min/maxnnsort: name, price, volume_24h, etc.nnsort_dir: asc, descnnaux, convert_id, reverse_ordernnu26a0ufe0f General Rules to Avoid 400 ErrorsnAlways include at least one required identifier per endpoint.nnUse proper casing and valid slugs (e.g., ethereum, polygon).nnAvoid mixing convert and convert_id.nnUse comma-separated values when multiple inputs are allowed.nnOnly use documented values in aux, sort, and interval fields.nnDo not leave required parameters blank or use unsupported types."
        },
        "promptType": "define"
      },
      "typeVersion": 1.8
    },
    {
      "id": "3101c7f4-cf73-4150-8a17-e11366c07c80",
      "name": "DEXScan Agent Brain",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -400,
        620
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "yUizd8t0sD5wMYVG",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a596e26a-61eb-4fe1-8a07-3a93694beca0",
      "name": "DEXScan Agent Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -220,
        620
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "49bb58dc-d68b-4091-86f1-12e1071b1fbc",
      "name": "DEX Metadata",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        -40,
        620
      ],
      "parameters": {
        "url": "https://pro-api.coinmarketcap.com/v4/dex/listings/info",
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "parametersQuery": {
          "values": [
            {
              "name": "id"
            },
            {
              "name": "aux",
              "valueProvider": "modelOptional"
            }
          ]
        },
        "toolDescription": "Returns static metadata for one or more decentralized exchanges, including launch date, description, URLs, and logos.nnHere is a precise and complete **tool description** for the `GET /v4/dex/listings/info` endpoint, formatted for use in your n8n agent system or documentation:nn---nn### ud83eudded **DEX Metadata Tool**nn**Purpose:**  nRetrieve static metadata for one or more decentralized exchanges (DEXs) listed on CoinMarketCap. This includes key profile information such as name, status, description, launch date, logos, official URLs, and important notices.nn**Endpoint:**  n`https://pro-api.coinmarketcap.com/v4/dex/listings/info`nn---nn**Query Parameters:**nn- `id` *(string, required)* u2013 One or more comma-separated CoinMarketCap DEX IDs to fetch metadata for.n- `aux` *(string, optional)* u2013 A comma-separated list of supplemental fields to include in the response.  n  Valid values:n  - `"urls"` u2013 Official website, social media, and documentation linksn  - `"logo"` u2013 Hosted logo (default 64x64, customizable size via URL)n  - `"description"` u2013 Platform descriptionn  - `"date_launched"` u2013 ISO 8601 launch date timestampn  - `"notice"` u2013 Markdown-formatted warning about operational issues or status alertsnn---nn**Returns (200 OK):**nnFor each exchange:n- `id`: Unique CoinMarketCap IDn- `name`: Exchange namen- `slug`: URL-friendly namen- `status`: `"active"` or `"inactive"`n- `description`: (if requested via `aux`)n- `date_launched`: (if requested via `aux`)n- `logo`: (if requested via `aux`)n- `urls`: (if requested via `aux`)n- `notice`: Operational message, if applicablenn---nn**Error Handling:**nn- **400 Bad Request**: Triggered if the `id` is missing or invalid.n- **u26a0ufe0f Large Response Alert:** If multiple IDs return too much metadata and exceed the GPT modelu2019s context window, notify with:  n  > **"u26a0ufe0f The returned metadata exceeds processing limits. Please reduce the number of IDs or narrow the `aux` parameters."**nn",
        "parametersHeaders": {
          "values": [
            {
              "name": "Accept",
              "value": "application/json",
              "valueProvider": "fieldValue"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "OKXROn8aWkgAOvvV",
          "name": "CoinMarketCap Standard"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "f87838f8-0840-4a78-9d4b-96c79a137d48",
      "name": "DEX Networks List",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        140,
        620
      ],
      "parameters": {
        "url": "https://pro-api.coinmarketcap.com/v4/dex/networks/list",
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "parametersQuery": {
          "values": [
            {
              "name": "start",
              "valueProvider": "modelOptional"
            },
            {
              "name": "limit",
              "valueProvider": "modelOptional"
            },
            {
              "name": "sort",
              "valueProvider": "modelOptional"
            },
            {
              "name": "sort_dir",
              "valueProvider": "modelOptional"
            },
            {
              "name": "aux",
              "valueProvider": "modelOptional"
            }
          ]
        },
        "toolDescription": "Returns a list of all decentralized exchange (DEX) blockchain networks along with their CoinMarketCap IDs and associated metadata.nnOptional query parameters (to avoid errors):nnstart (string) u2013 Offset for pagination (1-based index)nnlimit (string) u2013 Number of results to return (e.g. "100")nnsort (string) u2013 Sort field. Valid values: "id", "name"nnsort_dir (string) u2013 Sort order. Valid values: "asc", "desc"nnaux (string) u2013 Comma-separated list of extra fields. Valid values:n"alternativeName", "cryptocurrencyId", "cryptocurrenySlug",n"wrappedTokenId", "wrappedTokenSlug", "tokenExplorerUrl",n"poolExplorerUrl", "transactionHashUrl"nnMake sure input values for sort, sort_dir, and aux are spelled exactly as shown to prevent a 400 error response.",
        "parametersHeaders": {
          "values": [
            {
              "name": "Accept",
              "value": "application/json",
              "valueProvider": "fieldValue"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "OKXROn8aWkgAOvvV",
          "name": "CoinMarketCap Standard"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "3f356c20-4efc-479b-b0fa-ab346c7340d8",
      "name": "DEX Listings Quotes",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        360,
        620
      ],
      "parameters": {
        "url": "https://pro-api.coinmarketcap.com/v4/dex/listings/quotes",
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "parametersQuery": {
          "values": [
            {
              "name": "start",
              "valueProvider": "modelOptional"
            },
            {
              "name": "limit",
              "valueProvider": "modelOptional"
            },
            {
              "name": "sort",
              "valueProvider": "modelOptional"
            },
            {
              "name": "sort_dir",
              "valueProvider": "modelOptional"
            },
            {
              "name": "type",
              "valueProvider": "modelOptional"
            },
            {
              "name": "aux",
              "valueProvider": "modelOptional"
            },
            {
              "name": "convert_id",
              "valueProvider": "modelOptional"
            }
          ]
        },
        "toolDescription": "Returns a paginated list of all decentralized exchanges (DEXs) with their latest market data, including market share, quote volume, trading pairs, and multi-currency conversions.nnud83dudee0ufe0f Acceptable Query Inputs:nstart u2013 Offset pagination start (e.g., "1")nnlimit u2013 Max results to returnnnsort u2013 Valid: "name", "volume_24h", "market_share", "num_markets"nnsort_dir u2013 "asc" or "desc"nntype u2013 "all", "orderbook", "swap", "aggregator"nnaux u2013 Optional extras, e.g., "date_launched"nnconvert_id u2013 Currency IDs to convert quote values (up to 30)",
        "parametersHeaders": {
          "values": [
            {
              "name": "Accept",
              "value": "application/json",
              "valueProvider": "fieldValue"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "OKXROn8aWkgAOvvV",
          "name": "CoinMarketCap Standard"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "3fceb769-621f-4e7f-9351-4052d72b3346",
      "name": "DEX Pair Quotes Latest",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        560,
        620
      ],
      "parameters": {
        "url": "https://pro-api.coinmarketcap.com/v4/dex/pairs/quotes/latest",
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "parametersQuery": {
          "values": [
            {
              "name": "contract_address",
              "valueProvider": "modelOptional"
            },
            {
              "name": "network_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "aux",
              "valueProvider": "modelOptional"
            },
            {
              "name": "convert_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "skip_invalid",
              "valueProvider": "modelOptional"
            },
            {
              "name": "reverse_order",
              "valueProvider": "modelOptional"
            },
            {
              "name": "network_slug",
              "valueProvider": "modelOptional"
            }
          ]
        },
        "toolDescription": "Returns the latest market quote for one or more DEX spot trading pairs, including metrics like:nnLiquiditynn24h buy/sell volumennSecurity scansnnBuy/sell taxnnPercent poolednnPool creation and supply statsnnud83dudee0ufe0f Query Parameters Supported:nncontract_address u2013 (Comma-separated smart contract addresses)nnnetwork_id u2013 CMC network IDsnnnetwork_slug u2013 Slug-formatted network names (e.g., ethereum, polygon)nnaux u2013 Comma-separated fields:npool_created, percent_pooled_base_asset, num_transactions_24h,npool_base_asset, pool_quote_asset, 24h_volume_quote_asset,ntotal_supply_quote_asset, total_supply_base_asset, holders,nbuy_tax, sell_tax, security_scan, 24h_no_of_buys, 24h_no_of_sells,n24h_buy_volume, 24h_sell_volumennconvert_id u2013 Comma-separated CMC currency IDs for conversionnnskip_invalid u2013 Pass "true" to ignore invalid resultsnnreverse_order u2013 Pass "true" to invert base/quote pair display",
        "parametersHeaders": {
          "values": [
            {
              "name": "Accept",
              "value": "application/json",
              "valueProvider": "fieldValue"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "OKXROn8aWkgAOvvV",
          "name": "CoinMarketCap Standard"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "134d7fc5-15cf-4897-92bb-97b18a121e41",
      "name": "DEX OHLCV Historical",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        740,
        620
      ],
      "parameters": {
        "url": "https://pro-api.coinmarketcap.com/v4/dex/pairs/ohlcv/historical",
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "parametersQuery": {
          "values": [
            {
              "name": "contract_address",
              "valueProvider": "modelOptional"
            },
            {
              "name": "network_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "network_slug",
              "valueProvider": "modelOptional"
            },
            {
              "name": "time_period",
              "valueProvider": "modelOptional"
            },
            {
              "name": "time_start",
              "valueProvider": "modelOptional"
            },
            {
              "name": "time_end",
              "valueProvider": "modelOptional"
            },
            {
              "name": "count",
              "valueProvider": "modelOptional"
            },
            {
              "name": "interval",
              "valueProvider": "modelOptional"
            },
            {
              "name": "aux",
              "valueProvider": "modelOptional"
            },
            {
              "name": "convert_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "skip_invalid",
              "valueProvider": "modelOptional"
            },
            {
              "name": "reverse_order",
              "valueProvider": "modelOptional"
            }
          ]
        },
        "toolDescription": "This tool retrieves historical OHLCV (Open, High, Low, Close, Volume) data for DEX spot trading pairs. It includes optional data on security risks, transaction activity, supply, and tax information. Supports flexible time range and sampling intervals for charting or backtesting.nnu2705 Valid Query Parameters:nncontract_address (string) u2013 A single DEX spot pairu2019s smart contract address (required unless using network + asset options).nnnetwork_id (string) u2013 One or more CMC network IDs.nnnetwork_slug (string) u2013 Friendly name slug of the network (e.g., "ethereum").nntime_period (string) u2013 Time unit for OHLCV data.nAllowed: "daily", "hourly", "1m", "5m", "15m", "30m", "4h", "8h", "12h", "weekly", "monthly"n(Default: "daily")nntime_start (string) u2013 ISO or Unix timestamp for start (e.g., "2024-01-01").nntime_end (string) u2013 ISO or Unix timestamp for end (e.g., "2024-03-01"). Optional.nncount (string) u2013 Number of time intervals to return (default is 10, max is 500).nninterval (string) u2013 How frequently to sample the time_period. Same options as time_period.nnaux (string) u2013 Optional comma-separated extra fields to return: pool_created, percent_pooled_base_asset, num_transactions_24h,npool_base_asset, pool_quote_asset, 24h_volume_quote_asset,ntotal_supply_quote_asset, total_supply_base_asset, holders,nbuy_tax, sell_tax, security_scan, 24h_no_of_buys, 24h_no_of_sells,n24h_buy_volume, 24h_sell_volumennconvert_id (string) u2013 Comma-separated CMC currency IDs for market conversion (e.g., "1,2781").nnskip_invalid (string) u2013 Pass "true" to skip failed lookups in bulk queries.nnreverse_order (string) u2013 Pass "true" to reverse base/quote asset display order.",
        "parametersHeaders": {
          "values": [
            {
              "name": "Accept",
              "value": "application/json",
              "valueProvider": "fieldValue"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "OKXROn8aWkgAOvvV",
          "name": "CoinMarketCap Standard"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "bee1d41a-af4c-442d-b0c6-7be0e17c31a5",
      "name": "DEX OHLCV Latest",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        940,
        640
      ],
      "parameters": {
        "url": "https://pro-api.coinmarketcap.com/v4/dex/pairs/ohlcv/latest",
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "parametersQuery": {
          "values": [
            {
              "name": "contract_address",
              "valueProvider": "modelOptional"
            },
            {
              "name": "network_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "network_slug",
              "valueProvider": "modelOptional"
            },
            {
              "name": "aux",
              "valueProvider": "modelOptional"
            },
            {
              "name": "convert_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "skip_invalid",
              "valueProvider": "modelOptional"
            },
            {
              "name": "reverse_order",
              "valueProvider": "modelOptional"
            }
          ]
        },
        "toolDescription": "This tool retrieves the most recent OHLCV (Open, High, Low, Close, Volume) data for one or more spot trading pairs on decentralized exchanges. It reflects market activity during the current UTC day and is continuously updated. Suitable for real-time monitoring of decentralized market performance, this tool supports advanced filtering via network identifiers or contract addresses.nnRequired Input (at least one of the following):ncontract_address (string)nOne or more comma-separated smart contract addresses for the trading pair(s).nnExample: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"nnnetwork_id (string)nOne or more CoinMarketCap internal network IDs.nnExample: "1" (Ethereum)nnnetwork_slug (string)nThe lowercase, hyphenated identifier of a blockchain network.nnExample: "ethereum", "binance-smart-chain"nnud83eudde9 Optional Query Parameters:naux (string)nComma-separated list of additional fields to enrich the returned data:nValid values: pool_created, percent_pooled_base_asset, num_transactions_24h,npool_base_asset, pool_quote_asset, 24h_volume_quote_asset,ntotal_supply_quote_asset, total_supply_base_asset, holders,nbuy_tax, sell_tax, security_scan, 24h_no_of_buys, 24h_no_of_sells,n24h_buy_volume, 24h_sell_volumennExample: "security_scan,holders,pool_created"nnconvert_id (string)nCalculate quote values in one or more fiat/crypto currencies using CoinMarketCap IDs.nnExample: "1" (USD), "2781" (BTC)nnNote: Cannot be used with the convert symbol-based parameter.nnskip_invalid (string)nAccepts "true" or "false" (default).nIf set to "true", skips spot pairs with invalid or missing data instead of returning a 400 error.nnExample: "true"nnreverse_order (string)nAccepts "true" or "false" (default).nFlips the order of the token pair if the token contract uses reverse naming convention.nnExample: "true"nnu26a0ufe0f Tips to Avoid 400 Errors:nEnsure at least one of contract_address, network_id, or network_slug is included.nnUse correct spelling and case for slugs (e.g., "ethereum" not "Ethereum").nnOnly include valid aux values in a comma-separated list.nnDo not use both convert and convert_id at the same time.nnAvoid empty strings for required parameters or unsupported values in optional fields.",
        "parametersHeaders": {
          "values": [
            {
              "name": "Accept",
              "value": "application/json",
              "valueProvider": "fieldValue"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "OKXROn8aWkgAOvvV",
          "name": "CoinMarketCap Standard"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "742a6f07-d85d-4b6c-9ba6-90940e2b365c",
      "name": "DEX Trades Latest",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1140,
        640
      ],
      "parameters": {
        "url": "https://pro-api.coinmarketcap.com/v4/dex/pairs/trade/latest",
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "parametersQuery": {
          "values": [
            {
              "name": "contract_address",
              "valueProvider": "modelOptional"
            },
            {
              "name": "network_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "network_slug",
              "valueProvider": "modelOptional"
            },
            {
              "name": "aux",
              "valueProvider": "modelOptional"
            },
            {
              "name": "convert_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "skip_invalid",
              "valueProvider": "modelOptional"
            },
            {
              "name": "reverse_order",
              "valueProvider": "modelOptional"
            }
          ]
        },
        "toolDescription": "Returns up to the latest 100 trades for one or more DEX spot pairs using CoinMarketCap.nQuery Parameters Accepted:nncontract_address: (Required*) One or more comma-separated contract addresses.nnnetwork_id: CoinMarketCap network ID (alternative to contract_address).nnnetwork_slug: URL-friendly network name (alternative to network_id).nnaux: Optional fields to include: "transaction_hash", "blockchain_explorer_link".nnconvert_id: One or more fiat/crypto IDs to return converted market values.nnskip_invalid: "true" to skip invalid pairs instead of erroring.nnreverse_order: "true" to reverse trading pair (e.g., A/B u2192 B/A).nnUse at least one of contract_address, network_id, or network_slug to avoid a 400 error.",
        "parametersHeaders": {
          "values": [
            {
              "name": "Accept",
              "value": "application/json",
              "valueProvider": "fieldValue"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "OKXROn8aWkgAOvvV",
          "name": "CoinMarketCap Standard"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "3ddf229c-16b2-4610-982e-d5e3c07b0cb0",
      "name": "DEX Spot Pairs Latest",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1340,
        640
      ],
      "parameters": {
        "url": "https://pro-api.coinmarketcap.com/v4/dex/spot-pairs/latest",
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "parametersQuery": {
          "values": [
            {
              "name": "network_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "network_slug",
              "valueProvider": "modelOptional"
            },
            {
              "name": "dex_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "dex_slug",
              "valueProvider": "modelOptional"
            },
            {
              "name": "base_asset_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "base_asset_symbol",
              "valueProvider": "modelOptional"
            },
            {
              "name": "base_asset_contract_address",
              "valueProvider": "modelOptional"
            },
            {
              "name": "base_asset_ucid",
              "valueProvider": "modelOptional"
            },
            {
              "name": "quote_asset_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "quote_asset_symbol",
              "valueProvider": "modelOptional"
            },
            {
              "name": "quote_asset_contract_address",
              "valueProvider": "modelOptional"
            },
            {
              "name": "quote_asset_ucid",
              "valueProvider": "modelOptional"
            },
            {
              "name": "scroll_id",
              "valueProvider": "modelOptional"
            },
            {
              "name": "limit",
              "valueProvider": "modelOptional"
            },
            {
              "name": "liquidity_min",
              "valueProvider": "modelOptional"
            },
            {
              "name": "liquidity_max",
              "valueProvider": "modelOptional"
            },
            {
              "name": "volume_24h_min",
              "valueProvider": "modelOptional"
            },
            {
              "name": "volume_24h_max",
              "valueProvider": "modelOptional"
            },
            {
              "name": "no_of_transactions_24h_min",
              "valueProvider": "modelOptional"
            },
            {
              "name": "no_of_transactions_24h_max",
              "valueProvider": "modelOptional"
            },
            {
              "name": "percent_change_24h_min",
              "valueProvider": "modelOptional"
            },
            {
              "name": "percent_change_24h_max",
              "valueProvider": "modelOptional"
            },
            {
              "name": "sort",
              "valueProvider": "modelOptional"
            },
            {
              "name": "sort_dir",
              "valueProvider": "modelOptional"
            },
            {
              "name": "aux",
              "valueProvider": "modelOptional"
            },
            {
              "name": "reverse_order",
              "valueProvider": "modelOptional"
            },
            {
              "name": "convert_id",
              "valueProvider": "modelOptional"
            }
          ]
        },
        "toolDescription": "This tool calls the /v4/dex/spot-pairs/latest endpoint to retrieve a paginated list of all active decentralized exchange (DEX) spot pairs with the latest market data. This includes price, liquidity, trading volume, and more. You can filter, sort, and enrich the results using query parameters.nnu26a0ufe0f To avoid a 400 Bad Request error, you must include at least one of the following identifiers in your request:nnnetwork_id OR network_slugnndex_id OR dex_slugnnbase_asset_id, base_asset_symbol, or base_asset_contract_addressnnquote_asset_id, quote_asset_symbol, or quote_asset_contract_addressnnu2705 Supported Query ParametersnCore Identifiers (At least one required):nnetwork_id: One or more comma-separated CoinMarketCap network IDs.nnnetwork_slug: One or more comma-separated URL-friendly network slugs.nndex_id: One or more CoinMarketCap DEX exchange IDs.nndex_slug: One or more URL-friendly DEX slugs.nnbase_asset_id, base_asset_symbol, base_asset_contract_address: Identify the base asset of the pair.nnquote_asset_id, quote_asset_symbol, quote_asset_contract_address: Identify the quote asset of the pair.nnbase_asset_ucid / quote_asset_ucid: Optional unique CoinMarketCap identifiers.nnPagination:nscroll_id: For continuous pagination. Use the scroll_id from the previous response to get the next set.nnlimit: Maximum number of results to return.nnFiltering:nliquidity_min, liquidity_max: Minimum/maximum liquidity thresholds.nnvolume_24h_min, volume_24h_max: Minimum/maximum 24h volume thresholds.nnno_of_transactions_24h_min, no_of_transactions_24h_max: Filter by transaction count.nnpercent_change_24h_min, percent_change_24h_max: 24-hour price change filters.nnSorting:nsort: Sort the results by:nnname, date_added, price, volume_24h, percent_change_1h, percent_change_24h, liquidity, fully_diluted_value, no_of_transactions_24hnnsort_dir: Direction of sort (asc or desc, default: desc)nnAdditional Metadata (Optional):nUse the aux parameter to enrich the response with supplemental fields:nnpool_created, percent_pooled_base_asset, num_transactions_24h, pool_base_asset, pool_quote_asset, 24h_volume_quote_asset, total_supply_quote_asset, total_supply_base_asset, holders, buy_tax, sell_tax, security_scan, 24h_no_of_buys, 24h_no_of_sells, 24h_buy_volume, 24h_sell_volumennQuote Conversion:nconvert_id: Convert pricing to specific fiat or crypto by CMC ID (e.g. convert_id=1,2781 for BTC, USD).nnu26a0ufe0f Cannot be used with convert (symbol-based conversion).nnOther Options:nreverse_order: Flip the base/quote asset order if needed.",
        "parametersHeaders": {
          "values": [
            {
              "name": "Accept",
              "value": "application/json",
              "valueProvider": "fieldValue"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "OKXROn8aWkgAOvvV",
          "name": "CoinMarketCap Standard"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "3dab3ebc-14c5-49a8-bb11-aa82564785a5",
      "name": "DEXScan Agent Guide",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1580,
        -760
      ],
      "parameters": {
        "width": 1080,
        "height": 1420,
        "content": "# ud83dudcca CoinMarketCap DEXScan AI Agent Tool (n8n Workflow)nn## ud83eudde0 Multi-Agent System: DEXScan AgentnThis workflow powers **DEX intelligence capabilities** in the CoinMarketCap AI Analyst ecosystem. It enables deep insights into **liquidity**, **volume**, **spot pairs**, and **trading activity** across decentralized exchanges.nn---nn### ud83dudd27 Connected DEX Tools:n1. **DEX Metadata** u2013 `/v4/dex/listings/info`n2. **DEX Networks List** u2013 `/v4/dex/networks/list`n3. **DEX Listings Quotes** u2013 `/v4/dex/listings/quotes`n4. **DEX Pair Quotes Latest** u2013 `/v4/dex/pairs/quotes/latest`n5. **DEX OHLCV Historical** u2013 `/v4/dex/pairs/ohlcv/historical`n6. **DEX OHLCV Latest** u2013 `/v4/dex/pairs/ohlcv/latest`n7. **DEX Trades Latest** u2013 `/v4/dex/pairs/trade/latest`n8. **DEX Spot Pairs Latest** u2013 `/v4/dex/spot-pairs/latest`nn---nn## u2705 Key Capabilities:n- View real-time DEX liquidity and 24h trading volumen- Retrieve metadata (logos, URLs, launch info) for decentralized exchangesn- Track market pair quotes, liquidity, and spot pair datan- Monitor historical OHLCV data for technical analysisn- Identify recent trades and pair-specific activitynn---nn## ud83eudde0 Agent Structuren### **1ufe0fu20e3 DEXScan Brain**n- **Type**: GPT-4o Minin- **Function**: Understands queries, routes tools, summarizes resultsnn### **2ufe0fu20e3 Session Memory**n- Maintains contextual state via memory buffernn### **3ufe0fu20e3 Tool Triggers**n- **HTTP Tools:** Each CMC endpoint is mapped to one of 8 tool nodes with rich parameter controlnn---nn## u26a0ufe0f Notes:n- Use **`contract_address`**, **`network_slug`**, or **`network_id`** in nearly all endpointsn- Avoid using both `convert` and `convert_id` in the same queryn- Be cautious of high-volume requests which may exceed token limits (e.g., when requesting OHLCV for many intervals)nn---nnud83dudcce API responses are designed for fine-tuned filtering. You can retrieve:n- Top trading pairs on Polygonn- Volume-based DEX rankingsn- Historical trade data for a Uniswap pairn- Real-time liquidity on Solana spot pairs"
      },
      "typeVersion": 1
    },
    {
      "id": "af395be6-3683-478e-bffd-087ffa8dc8c9",
      "name": "DEX Usage + Examples",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        -760
      ],
      "parameters": {
        "color": 5,
        "width": 960,
        "height": 1000,
        "content": "## ud83dudccc How to Use the Workflownn### u2705 Step 1: Provide InputsnUse `contract_address`, `network_slug`, `dex_slug`, or `convert_id` as needednn### u2705 Step 2: Trigger From Supervisor AgentnParent agent forwards user message and sessionId to DEXScannn### u2705 Step 3: DEX Data is ReturnednData can be streamed to Telegram, dashboards, or HTTP responsenn---nn## ud83dudd0d Example API Callsnn### 1ufe0fu20e3 Get Top DEXs by 24h Volumen```plaintextnGET /v4/dex/listings/quotes?sort=volume_24h&limit=5n```nn### 2ufe0fu20e3 Query Historical OHLCV for SOL-USDTn```plaintextnGET /v4/dex/pairs/ohlcv/historical?network=solana&pair=SOL-USDT&interval=1dn```nn### 3ufe0fu20e3 Latest Trades on a Uniswap Pairn```plaintextnGET /v4/dex/pairs/trade/latest?contract_address=0x...&network_slug=ethereumn```nn### 4ufe0fu20e3 Spot Pairs on Polygonn```plaintextnGET /v4/dex/spot-pairs/latest?network_slug=polygon&sort=volume_24hn```nn### 5ufe0fu20e3 DEX Metadata for PancakeSwapn```plaintextnGET /v4/dex/listings/info?id=123&aux=logo,description,date_launchedn```"
      },
      "typeVersion": 1
    },
    {
      "id": "0fcffddb-d343-4739-917a-878925673295",
      "name": "DEX Errors + IP Notice",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1220,
        -760
      ],
      "parameters": {
        "color": 3,
        "width": 740,
        "height": 600,
        "content": "## u26a0ufe0f DEXScan Error Codes & Fixesnn| Code | Message |n|------|---------|n| `200` | Success |n| `400` | Bad Request u2013 missing/invalid query |n| `401` | Unauthorized u2013 invalid API key |n| `429` | Rate limit exceeded |n| `500` | Server error |nn### ud83dudd0d Fixes:n- Always use at least 1 required param: `contract_address`, `network_slug`, etc.n- Double-check slugs and convert ID formatsn- Donu2019t mix `convert` and `convert_id`n- Avoid oversized `aux` and `interval` combinationsnn---nn## ud83dude80 Support & Licensingnnud83dudd17 **Don Jayamaha u2013 LinkedIn**  n[http://linkedin.com/in/donjayamahajr](http://linkedin.com/in/donjayamahajr)nnu00a9 2025 Treasurium Capital Limited Company. All rights reserved.nThis AI workflow architecture, including logic, design, and prompt structures, is the intellectual property of Treasurium Capital Limited Company. Unauthorized reproduction, redistribution, or resale is prohibited under U.S. copyright law. Licensed use only."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2507ec1c-d0e3-45ef-aca6-f16c81f9cf17",
  "connections": {
    "DEX Metadata": {
      "ai_tool": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "DEX OHLCV Latest": {
      "ai_tool": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "DEX Networks List": {
      "ai_tool": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "DEX Trades Latest": {
      "ai_tool": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "DEX Listings Quotes": {
      "ai_tool": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "DEXScan Agent Brain": {
      "ai_languageModel": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "DEX OHLCV Historical": {
      "ai_tool": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "DEXScan Agent Memory": {
      "ai_memory": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "DEX Spot Pairs Latest": {
      "ai_tool": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "DEX Pair Quotes Latest": {
      "ai_tool": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "CoinMarketCap DEXScan Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}