Docs
搜索⌘ K
  • 主页
  • 关于 The Graph
  • 支持的网络
  • 协议合约
  • 子图
    • 子流
      • 代币 API
        • Hypergraph
          • AI Suite
            • 索引
              • Graph Horizon
                • 资源
                  代币 API > SVM DEX Endpoints

                  Swap Events

                  GET/v1/svm/swaps

                  Returns AMM swap events from Solana DEXs with input/output tokens and amounts.

                  查询参数

                  参数描述值
                  network
                  string

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

                  • 可选值: solana
                  必填
                  solana
                  signature
                  string

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

                    amm
                    string

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

                      amm_pool
                      string

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

                        user
                        string

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

                          input_mint
                          string

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

                            output_mint
                            string

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

                              program_id

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

                                start_time
                                string

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

                                • 默认值: 2020-01-01
                                end_time
                                string

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

                                • 默认值: 2050-01-01
                                start_block
                                integer

                                Filter by block number

                                • 最小值: 0
                                • 最大值: 9007199254740991
                                end_block
                                integer

                                Filter by block number

                                • 默认值: 9999999999
                                • 最小值: 0
                                • 最大值: 9007199254740991
                                limit
                                integer

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

                                • 默认值: 10
                                • 最小值: 1
                                • 最大值: 1000
                                page
                                integer

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

                                • 默认值: 1
                                • 最小值: 1
                                • 最大值: 767465558638

                                可能的反应

                                状态描述
                                200

                                Successful Response

                                400

                                Client side error

                                401

                                Authentication failed

                                403

                                Forbidden

                                404

                                Not found

                                500

                                Server side error

                                ⁠在GitHub上编辑⁠

                                Pool OHLCV DataToken Transfers
                                测试此终点

                                1curl --request GET \2  --url 'https://token-api.thegraph.com/v1/svm/swaps?network=solana&signature=5pdoVcSiSBr3LMAijdRYKrL5RoLFjLgHxHbZ34dUBVubnsQt3q1v48LuPazebsSiBVuSbSTyJdzf3G9jqqn8o6jA&amm=675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8&user=5MGfsuYNRhbuN6x1M6WaR3721dSDGtXpcsHxNsgkjsXC&input_mint=HmrzeZapM1EygFc4tBJUXwWTzv5Ahy8axLSAadBx51sw&output_mint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&program_id=JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4&start_time=2020-01-01&end_time=2050-01-01&start_block=0&end_block=9999999999&limit=10&page=1' \3  --header 'Authorization: Bearer {token}'

                                1{2  "data": [3    {4      "block_num": 373763118,5      "datetime": "2025-10-16 14:03:09",6      "timestamp": 1760623389,7      "signature": "5pdoVcSiSBr3LMAijdRYKrL5RoLFjLgHxHbZ34dUBVubnsQt3q1v48LuPazebsSiBVuSbSTyJdzf3G9jqqn8o6jA",8      "transaction_index": 8,9      "instruction_index": 1,10      "program_id": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",11      "program_name": "Jupiter Aggregator v6",12      "amm": "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8",13      "amm_pool": "",14      "user": "5MGfsuYNRhbuN6x1M6WaR3721dSDGtXpcsHxNsgkjsXC",15      "input_mint": "HmrzeZapM1EygFc4tBJUXwWTzv5Ahy8axLSAadBx51sw",16      "input_amount": 49572355581648,17      "output_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",18      "output_amount": 936671,19      "network": "solana"20    }21  ]22}
                                The GraphStatusTestnetBrand AssetsForum安全Privacy PolicyTerms of Service