Docs
Search⌘ K
  • Home
  • About The Graph
  • Supported Networks
  • Protocol Contracts
  • Subgraphs
    • Substreams
      • Token API
        • Hypergraph
          • AI Suite
            • Indexing
              • Graph Horizon
                • Resources
                  Token API > EVM DEX Endpoints

                  Swap Events

                  GET/v1/evm/swaps

                  Returns DEX swap transactions from Uniswap protocols with token amounts and prices.

                  Query Parameters

                  ParameterDescriptionValue
                  network
                  string

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

                  • Accepted values: arbitrum-one, avalanche, base, bsc, mainnet, optimism, polygon, unichain
                  Required
                  mainnet
                  transaction_id
                  string

                  Filter by transaction hash
                  Single value or array of values* (separate multiple values with ,)
                  *Plan restricted.

                  • Accepted pattern: ^(0[xX])?[0-9a-fA-F]{64}$
                  • Format: evm-tx-hash
                  factory
                  string

                  Filter by factory address
                  Single value or array of values* (separate multiple values with ,)
                  *Plan restricted.

                  • Accepted pattern: ^(0[xX])?[0-9a-fA-F]{40}$
                  • Format: evm-address
                  pool
                  string

                  Filter by pool address
                  Single value or array of values* (separate multiple values with ,)
                  *Plan restricted.

                    caller
                    string

                    Filter by address
                    Single value or array of values* (separate multiple values with ,)
                    *Plan restricted.

                    • Accepted pattern: ^(0[xX])?[0-9a-fA-F]{40}$
                    • Format: evm-address
                    transaction_from
                    string

                    Filter by address
                    Single value or array of values* (separate multiple values with ,)
                    *Plan restricted.

                    • Accepted pattern: ^(0[xX])?[0-9a-fA-F]{40}$
                    • Format: evm-address
                    user
                    string

                    Filter by address
                    Single value or array of values* (separate multiple values with ,)
                    *Plan restricted.

                    • Accepted pattern: ^(0[xX])?[0-9a-fA-F]{40}$
                    • Format: evm-address
                    sender
                    string

                    Filter by address
                    Single value or array of values* (separate multiple values with ,)
                    *Plan restricted.

                    • Accepted pattern: ^(0[xX])?[0-9a-fA-F]{40}$
                    • Format: evm-address
                    recipient
                    string

                    Filter by address
                    Single value or array of values* (separate multiple values with ,)
                    *Plan restricted.

                    • Accepted pattern: ^(0[xX])?[0-9a-fA-F]{40}$
                    • Format: evm-address
                    input_contract
                    string

                    Filter by contract address
                    Single value or array of values* (separate multiple values with ,)
                    *Plan restricted.

                    • Accepted pattern: ^(0[xX])?[0-9a-fA-F]{40}$
                    • Format: evm-address
                    output_contract
                    string

                    Filter by contract address
                    Single value or array of values* (separate multiple values with ,)
                    *Plan restricted.

                    • Accepted pattern: ^(0[xX])?[0-9a-fA-F]{40}$
                    • Format: evm-address
                    protocol
                    string

                    Protocol name

                    • Accepted values: uniswap_v1, uniswap_v2, uniswap_v3, uniswap_v4, curvefi, balancer, bancor, cow, aerodrome, dodo, woofi, traderjoe, kyber_elastic
                    uniswap_v3
                    start_time
                    string

                    UNIX timestamp in seconds or date string (e.g. "2025-01-01T00:00:00Z", "2025-01-01", ...).

                      end_time
                      string

                      UNIX timestamp in seconds or date string (e.g. "2025-01-01T00:00:00Z", "2025-01-01", ...).

                        start_block
                        integer

                        Filter by block number

                        • Minimum value: 0
                        • Maximum value: 9007199254740991
                        end_block
                        integer

                        Filter by block number

                        • Minimum value: 0
                        • Maximum value: 9007199254740991
                        limit
                        integer

                        Number of items* returned in a single request.
                        *Plan restricted.

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

                        Page number to fetch.
                        Empty data array signifies end of results.

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

                        Potential Responses

                        StatusDescription
                        200

                        Successful Response

                        400

                        Client side error

                        401

                        Authentication failed

                        403

                        Forbidden

                        404

                        Not found

                        500

                        Server side error

                        ⁠Edit on GitHub⁠

                        Pool OHLCV DataNFT Collection
                        Test this endpoint

                        1curl --request GET \2  --url 'https://token-api.thegraph.com/v1/evm/swaps?network=mainnet&transaction_id=0xf6374799c227c9db38ff5ac1d5bebe8b607a1de1238cd861ebd1053ec07305ca&factory=0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f&pool=0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640&caller=0x7a250d5630b4cf539739df2c5dacb4c659f2488d&transaction_from=0x7a250d5630b4cf539739df2c5dacb4c659f2488d&user=0x7a250d5630b4cf539739df2c5dacb4c659f2488d&sender=0x7a250d5630b4cf539739df2c5dacb4c659f2488d&recipient=0x7a250d5630b4cf539739df2c5dacb4c659f2488d&input_contract=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&output_contract=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&protocol=uniswap_v3&limit=10&page=1' \3  --header 'Authorization: Bearer {token}'

                        1{2  "data": [3    {4      "block_num": 23590326,5      "datetime": "2025-10-16 12:48:47",6      "timestamp": 1760618927,7      "transaction_id": "0xf6374799c227c9db38ff5ac1d5bebe8b607a1de1238cd861ebd1053ec07305ca",8      "transaction_index": 143,9      "transaction_from": "0xa69babef1ca67a37ffaf7a485dfff3382056e78c",10      "call_index": null,11      "log_ordinal": 42,12      "log_block_index": 0,13      "log_index": 42,14      "log_topic0": "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",15      "factory": "0x1f98431c8ad98523631ae4a59f267346ea31f984",16      "pool": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",17      "input_token": {18        "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",19        "symbol": "USDC",20        "decimals": 621      },22      "output_token": {23        "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",24        "symbol": "WETH",25        "decimals": 1826      },27      "caller": "0xa69babef1ca67a37ffaf7a485dfff3382056e78c",28      "user": "0xa69babef1ca67a37ffaf7a485dfff3382056e78c",29      "sender": "0xa69babef1ca67a37ffaf7a485dfff3382056e78c",30      "recipient": "0xa69babef1ca67a37ffaf7a485dfff3382056e78c",31      "input_amount": "40735537734",32      "input_value": 40735.537734,33      "output_amount": "10042247631260591234",34      "output_value": 10.042247631260592,35      "price": 246517483.4798306,36      "price_inv": 4.0565074163667475e-9,37      "protocol": "uniswap_v3",38      "summary": "Swap 40.74 thousand USDC for 10.042247631260592 WETH on Uniswap V3",39      "network": "mainnet"40    }41  ]42}
                        The GraphStatusTestnetBrand AssetsForumSecurityPrivacy PolicyTerms of Service