Skip to main content
GET
/
getTransactions
Get Transactions
curl --request GET \
  --url https://api-v2.swaps.xyz/api/getTransactions \
  --header 'x-api-key: <api-key>'
{
  "txs": [
    {
      "status": "success",
      "sender": "0x1234567890123456789012345678901234567890",
      "srcChainId": 1,
      "dstChainId": 42161,
      "srcTxHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
      "dstTxHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
      "bridgeDetails": {
        "isBridge": true,
        "bridgeTime": 420,
        "txPath": [
          {
            "chainId": 1,
            "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
            "timestamp": "1640995200000000000",
            "nextBridge": "layerZero"
          }
        ]
      },
      "txId": "0x49b1d3d38176e45864fd55500c6c1879ab318609e1ed0c8eb9abd818e6c811fd",
      "actionRequest": {
        "actionType": "swap-action",
        "sender": "<string>",
        "srcChainId": 123,
        "srcToken": "<string>",
        "dstChainId": 123,
        "dstToken": "<string>",
        "slippage": 5000,
        "amount": "<string>",
        "swapDirection": "exact-amount-in",
        "recipient": "<string>",
        "to": "<string>",
        "data": "<string>",
        "value": "<string>",
        "erc20Amount": "<string>",
        "erc20Spender": "<string>",
        "bridgeIds": [
          "optimism"
        ],
        "refundTo": "<string>"
      },
      "actionResponse": {
        "tx": {
          "to": "<string>",
          "data": "<string>",
          "value": "<string>",
          "chainId": 123
        },
        "txId": "<string>",
        "vmId": "evm",
        "amountIn": {
          "address": "<string>",
          "decimals": 123,
          "symbol": "<string>",
          "name": "<string>",
          "chainId": 123,
          "isNative": true,
          "amount": "<string>"
        },
        "amountInMax": {
          "address": "<string>",
          "decimals": 123,
          "symbol": "<string>",
          "name": "<string>",
          "chainId": 123,
          "isNative": true,
          "amount": "<string>"
        },
        "amountOut": {
          "address": "<string>",
          "decimals": 123,
          "symbol": "<string>",
          "name": "<string>",
          "chainId": 123,
          "isNative": true,
          "amount": "<string>"
        },
        "amountOutMin": {
          "address": "<string>",
          "decimals": 123,
          "symbol": "<string>",
          "name": "<string>",
          "chainId": 123,
          "isNative": true,
          "amount": "<string>"
        },
        "protocolFee": {
          "address": "<string>",
          "decimals": 123,
          "symbol": "<string>",
          "name": "<string>",
          "chainId": 123,
          "isNative": true,
          "amount": "<string>"
        },
        "applicationFee": {
          "address": "<string>",
          "decimals": 123,
          "symbol": "<string>",
          "name": "<string>",
          "chainId": 123,
          "isNative": true,
          "amount": "<string>"
        },
        "bridgeFee": {
          "address": "<string>",
          "decimals": 123,
          "symbol": "<string>",
          "name": "<string>",
          "chainId": 123,
          "isNative": true,
          "amount": "<string>"
        },
        "bridgeIds": [
          "optimism"
        ],
        "bridgeRoute": [
          {
            "srcChainId": 123,
            "dstChainId": 123,
            "srcBridgeToken": "<string>",
            "dstBridgeToken": "<string>",
            "bridgeId": "optimism"
          }
        ],
        "exchangeRate": 123,
        "estimatedTxTime": 123,
        "estimatedPriceImpact": 123,
        "requiresTokenApproval": true,
        "allRoutes": [
          {
            "tx": {
              "to": "<string>",
              "data": "<string>",
              "value": "<string>",
              "chainId": 123
            },
            "txId": "<string>",
            "vmId": "evm",
            "amountIn": {
              "address": "<string>",
              "decimals": 123,
              "symbol": "<string>",
              "name": "<string>",
              "chainId": 123,
              "isNative": true,
              "amount": "<string>"
            },
            "amountInMax": {
              "address": "<string>",
              "decimals": 123,
              "symbol": "<string>",
              "name": "<string>",
              "chainId": 123,
              "isNative": true,
              "amount": "<string>"
            },
            "amountOut": {
              "address": "<string>",
              "decimals": 123,
              "symbol": "<string>",
              "name": "<string>",
              "chainId": 123,
              "isNative": true,
              "amount": "<string>"
            },
            "amountOutMin": {
              "address": "<string>",
              "decimals": 123,
              "symbol": "<string>",
              "name": "<string>",
              "chainId": 123,
              "isNative": true,
              "amount": "<string>"
            },
            "protocolFee": {
              "address": "<string>",
              "decimals": 123,
              "symbol": "<string>",
              "name": "<string>",
              "chainId": 123,
              "isNative": true,
              "amount": "<string>"
            },
            "applicationFee": {
              "address": "<string>",
              "decimals": 123,
              "symbol": "<string>",
              "name": "<string>",
              "chainId": 123,
              "isNative": true,
              "amount": "<string>"
            },
            "bridgeFee": {
              "address": "<string>",
              "decimals": 123,
              "symbol": "<string>",
              "name": "<string>",
              "chainId": 123,
              "isNative": true,
              "amount": "<string>"
            },
            "bridgeIds": [
              "optimism"
            ],
            "bridgeRoute": [
              {
                "srcChainId": 123,
                "dstChainId": 123,
                "srcBridgeToken": "<string>",
                "dstBridgeToken": "<string>",
                "bridgeId": "optimism"
              }
            ],
            "exchangeRate": 123,
            "estimatedTxTime": 123,
            "estimatedPriceImpact": 123
          }
        ]
      },
      "org": {
        "appId": "app_123",
        "affiliateId": "affiliate_123"
      },
      "usdValue": 100.5,
      "srcTx": {
        "toAddress": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
        "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
        "chainId": 1,
        "value": "1000000000000000000n",
        "timestamp": "1640995200000000000",
        "paymentToken": {
          "name": "Ethereum",
          "symbol": "ETH",
          "decimals": 18,
          "amount": "1000000000000000000n",
          "address": "0x1234567890123456789012345678901234567890"
        }
      },
      "dstTx": {
        "toAddress": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
        "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
        "chainId": 1,
        "value": "1000000000000000000n",
        "timestamp": "1640995200000000000",
        "paymentToken": {
          "name": "Ethereum",
          "symbol": "ETH",
          "decimals": 18,
          "amount": "1000000000000000000n",
          "address": "0x1234567890123456789012345678901234567890"
        }
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 150,
    "totalPages": 6
  }
}

Authorizations

x-api-key
string
header
required

Limited demo key for API Reference: 5c951bc81da566bbd030ba8e20724063.

Query Parameters

appIds
string

Comma-separated list of your app IDs. By default, a request to this endpoint will return transactions across all appIds in your org. Each API key has a unique app ID. Multiple app IDs can exist within a single org ID.

Example:

"0x5344e5a7,0x5314e6a7"

walletAddress
string

Wallet address to filter transactions by user

Example:

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

chainIds
string

Comma-separated list of chain IDs to filter by

Example:

"1,42161,10"

page
integer
default:1

Page number for pagination

Required range: x >= 1
Example:

1

limit
integer
default:25

Number of results per page (max 500)

Required range: 1 <= x <= 500
Example:

25

period
enum<string>
default:allTime

Time period filter

Available options:
day,
week,
month,
allTime
Example:

"week"

startDate
string

Start date filter (Unix timestamp)

Example:

"1640995200"

endDate
string

End date filter (Unix timestamp)

Example:

"1672531200"

Response

200 - application/json

Transaction history response

txs
object[]
pagination
object
I