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>",
        "appFees": [
          {
            "bps": 123,
            "receiverAddress": "<string>"
          }
        ]
      },
      "actionResponse": {
        "tx": {
          "to": "<string>",
          "data": "<string>",
          "value": "<string>",
          "chainId": 123
        },
        "txId": "<string>",
        "vmId": "evm",
        "amountIn": {
          "chainId": 123,
          "address": "<string>",
          "name": "<string>",
          "symbol": "<string>",
          "decimals": 123,
          "isNative": true,
          "amount": "<string>",
          "logo": "<string>",
          "swapsXyzCode": "<string>",
          "usdAmount": 123
        },
        "amountInMax": {
          "chainId": 123,
          "address": "<string>",
          "name": "<string>",
          "symbol": "<string>",
          "decimals": 123,
          "isNative": true,
          "amount": "<string>",
          "logo": "<string>",
          "swapsXyzCode": "<string>",
          "usdAmount": 123
        },
        "amountOut": {
          "chainId": 123,
          "address": "<string>",
          "name": "<string>",
          "symbol": "<string>",
          "decimals": 123,
          "isNative": true,
          "amount": "<string>",
          "logo": "<string>",
          "swapsXyzCode": "<string>",
          "usdAmount": 123
        },
        "amountOutMin": {
          "chainId": 123,
          "address": "<string>",
          "name": "<string>",
          "symbol": "<string>",
          "decimals": 123,
          "isNative": true,
          "amount": "<string>",
          "logo": "<string>",
          "swapsXyzCode": "<string>",
          "usdAmount": 123
        },
        "protocolFee": {
          "chainId": 123,
          "address": "<string>",
          "name": "<string>",
          "symbol": "<string>",
          "decimals": 123,
          "isNative": true,
          "amount": "<string>",
          "logo": "<string>",
          "swapsXyzCode": "<string>",
          "usdAmount": 123
        },
        "applicationFee": {
          "chainId": 123,
          "address": "<string>",
          "name": "<string>",
          "symbol": "<string>",
          "decimals": 123,
          "isNative": true,
          "amount": "<string>",
          "logo": "<string>",
          "swapsXyzCode": "<string>",
          "usdAmount": 123
        },
        "exchangeRate": 123,
        "estimatedTxTime": 123,
        "estimatedPriceImpact": 123,
        "requiresTokenApproval": true,
        "requiresRegisterTransaction": true,
        "allRoutes": [
          {
            "tx": {
              "to": "<string>",
              "data": "<string>",
              "value": "<string>",
              "chainId": 123
            },
            "txId": "<string>",
            "vmId": "evm",
            "amountIn": {
              "chainId": 123,
              "address": "<string>",
              "name": "<string>",
              "symbol": "<string>",
              "decimals": 123,
              "isNative": true,
              "amount": "<string>",
              "logo": "<string>",
              "swapsXyzCode": "<string>",
              "usdAmount": 123
            },
            "amountInMax": {
              "chainId": 123,
              "address": "<string>",
              "name": "<string>",
              "symbol": "<string>",
              "decimals": 123,
              "isNative": true,
              "amount": "<string>",
              "logo": "<string>",
              "swapsXyzCode": "<string>",
              "usdAmount": 123
            },
            "amountOut": {
              "chainId": 123,
              "address": "<string>",
              "name": "<string>",
              "symbol": "<string>",
              "decimals": 123,
              "isNative": true,
              "amount": "<string>",
              "logo": "<string>",
              "swapsXyzCode": "<string>",
              "usdAmount": 123
            },
            "amountOutMin": {
              "chainId": 123,
              "address": "<string>",
              "name": "<string>",
              "symbol": "<string>",
              "decimals": 123,
              "isNative": true,
              "amount": "<string>",
              "logo": "<string>",
              "swapsXyzCode": "<string>",
              "usdAmount": 123
            },
            "protocolFee": {
              "chainId": 123,
              "address": "<string>",
              "name": "<string>",
              "symbol": "<string>",
              "decimals": 123,
              "isNative": true,
              "amount": "<string>",
              "logo": "<string>",
              "swapsXyzCode": "<string>",
              "usdAmount": 123
            },
            "applicationFee": {
              "chainId": 123,
              "address": "<string>",
              "name": "<string>",
              "symbol": "<string>",
              "decimals": 123,
              "isNative": true,
              "amount": "<string>",
              "logo": "<string>",
              "swapsXyzCode": "<string>",
              "usdAmount": 123
            },
            "exchangeRate": 123,
            "estimatedTxTime": 123,
            "estimatedPriceImpact": 123,
            "requiresRegisterTransaction": true,
            "bridgeFee": {
              "chainId": 123,
              "address": "<string>",
              "name": "<string>",
              "symbol": "<string>",
              "decimals": 123,
              "isNative": true,
              "amount": "<string>",
              "logo": "<string>",
              "swapsXyzCode": "<string>",
              "usdAmount": 123
            },
            "bridgeIds": [
              "optimism"
            ],
            "bridgeRoute": [
              {
                "srcChainId": 123,
                "dstChainId": 123,
                "srcBridgeToken": "<string>",
                "dstBridgeToken": "<string>",
                "bridgeId": "optimism"
              }
            ]
          }
        ],
        "bridgeFee": {
          "chainId": 123,
          "address": "<string>",
          "name": "<string>",
          "symbol": "<string>",
          "decimals": 123,
          "isNative": true,
          "amount": "<string>",
          "logo": "<string>",
          "swapsXyzCode": "<string>",
          "usdAmount": 123
        },
        "bridgeIds": [
          "optimism"
        ],
        "bridgeRoute": [
          {
            "srcChainId": 123,
            "dstChainId": 123,
            "srcBridgeToken": "<string>",
            "dstBridgeToken": "<string>",
            "bridgeId": "optimism"
          }
        ]
      },
      "workflow": {
        "name": "polymarket",
        "operation": "placeOrder",
        "status": "success",
        "timestamp": 1763996274,
        "data": {
          "userId": "0x0797bfec6d2d4f733d461bbee8125805e9e9c892",
          "orderRequest": {
            "side": "BUY",
            "tokenID": "110902308091723190012269532299497167125504426554890434343419495764557291673806",
            "orderType": "FOK",
            "feeRateBps": 0,
            "slippage": 100,
            "tickSize": "0.01",
            "negRisk": true,
            "amount": 5,
            "price": 0.021,
            "size": 5
          },
          "orderResponse": {
            "id": "0xbd2f3c625c1f6f918a74e8645c3afee9e8f2c5adf91f178efa5e1b65f74fb489",
            "status": "MATCHED",
            "owner": "258f7485-b93f-52e5-2327-a53c49a299c1",
            "maker_address": "0xBEDcAD563ddf52391573a016Bc5EC7A334Eec756",
            "market": "0xb050c89e1e5738c79e117d28da1f057ac2f193511aab87a01b517b466c7265dc",
            "asset_id": "110902308091723190012269532299497167125504426554890434343419495764557291673806",
            "side": "BUY",
            "original_size": "5",
            "size_matched": "0",
            "price": "0.02",
            "outcome": "No",
            "expiration": "1763996360",
            "order_type": "GTD",
            "associate_trades": [
              "<string>"
            ],
            "created_at": 1763996291
          },
          "relayTx": {
            "txHash": "<string>",
            "status": "<string>"
          }
        }
      },
      "org": {
        "appId": "0xb38801d6",
        "affiliateId": "0x00000000",
        "appName": "Box Examples / Scenarios"
      },
      "usdValue": 100.5,
      "srcTx": {
        "toAddress": "0x38630c8ec92494cf96ded12060d8136b75e7a8b5",
        "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
        "chainId": 1,
        "value": "0n",
        "timestamp": 1765593607,
        "paymentToken": {
          "name": "Ethereum",
          "symbol": "ETH",
          "decimals": 18,
          "amount": "1000000000000000000",
          "address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
          "chainId": 137,
          "isNative": false,
          "usdAmount": 4.00687776
        },
        "revertReason": "<string>"
      },
      "dstTx": {
        "toAddress": "0x38630c8ec92494cf96ded12060d8136b75e7a8b5",
        "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
        "chainId": 1,
        "value": "0n",
        "timestamp": 1765593607,
        "paymentToken": {
          "name": "Ethereum",
          "symbol": "ETH",
          "decimals": 18,
          "amount": "1000000000000000000",
          "address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
          "chainId": 137,
          "isNative": false,
          "usdAmount": 4.00687776
        },
        "revertReason": "<string>"
      }
    }
  ],
  "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