Docs
Cerca⌘ K
  • Home
  • Informazioni su The Graph
  • Supported Networks
  • Protocol Contracts
  • Subgraphs
    • Substreams
      • Token API
        • AI Suite
          • Indexing
            • Resources
              Token API > EVM Endpoints

              Swap Events

              GET/swaps/evm

              Provides Uniswap V2 & V3 swap events.

              Query Parameters

              ParameterDescrizioneValue
              network_id
              string

              The Graph Network ID for EVM networks https://thegraph.com/networks

              • Default value: mainnet
              • Accepted values: arbitrum-one, avalanche, base, bsc, mainnet, matic, optimism, unichain
              Required
              mainnet
              pool
              string

              Filter by pool address

                caller
                string

                Filter by address

                  sender
                  string

                  Filter by address

                    recipient
                    string

                    Filter by address

                      protocol
                      string

                      Protocol name

                      • Accepted values: uniswap_v2, uniswap_v3, uniswap_v4
                      startTime
                      integer

                      UNIX timestamp in seconds.

                      • Minimum value: -9007199254740991
                      • Maximum value: 9007199254740991
                      endTime
                      integer

                      UNIX timestamp in seconds.

                      • Default value: 9999999999
                      • Minimum value: -9007199254740991
                      • Maximum value: 9007199254740991
                      orderBy
                      string

                      The field by which to order the results.

                      • Default value: timestamp
                      • Accepted values: timestamp
                      timestamp
                      orderDirection
                      string

                      The order in which to return the results: Ascending (asc) or Descending (desc).

                      • Default value: desc
                      • Accepted values: asc, desc
                      desc
                      transaction_id
                      string

                      Filter by transaction

                        limit
                        integer

                        The maximum number of items returned in a single request.

                        • Default value: 10
                        • Minimum value: 1
                        • Maximum value: 1000
                        page
                        integer

                        The page number of the results to return.

                        • Default value: 1
                        • Minimum value: 1
                        • Maximum value: 767465558638

                        Potential Responses

                        StatusDescrizione
                        200Successful Response
                        400Client side error
                        401Authentication failed
                        403Forbidden
                        404Not found
                        500Server side error
                        ⁠Edit on GitHub⁠

                        Liquidity PoolsNFT Activities
                        Test this endpoint

                        1curl --request GET \2  --url 'https://token-api.thegraph.com/swaps/evm?network_id=mainnet&startTime=0&endTime=9999999999&orderBy=timestamp&orderDirection=desc&limit=10&page=1' \3  --header 'Authorization: Bearer {token}'

                        1{2  "data": [3    {4      "block_num": 22589391,5      "datetime": "2025-05-29 15:47:47",6      "timestamp": 1748533667,7      "transaction_id": "0x1ce019b0ad129b8bd21b6c83b75de5e5fd7cd07f2ee739ca3198adcbeb61f5a9",8      "caller": "0x66a9893cc07d91d95644aedd05d03f95e1dba8af",9      "pool": "0xb98437c7ba28c6590dd4e1cc46aa89eed181f97108e5b6221730d41347bc817f",10      "factory": "0x000000000004444c5dc75cb358380d2e3de08a90",11      "token0": {12        "address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",13        "symbol": "WBTC",14        "decimals": 815      },16      "token1": {17        "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",18        "symbol": "USDC",19        "decimals": 620      },21      "sender": "0x66a9893cc07d91d95644aedd05d03f95e1dba8af",22      "recipient": null,23      "amount0": "-894320",24      "amount1": "957798098",25      "value0": -0.0089432,26      "value1": 957.798098,27      "price0": 107417.48517180652,28      "price1": 0.00000930947134352077,29      "protocol": "uniswap_v4",30      "network_id": "mainnet"31    }32  ]33}
                        The GraphStatusTestnetBrand AssetsForumSecurityPrivacy PolicyTerms of Service