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": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"amountInMax": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"amountOut": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"amountOutMin": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"protocolFee": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"applicationFee": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"exchangeRate": 123,
"estimatedTxTime": 123,
"estimatedPriceImpact": 123,
"requiresTokenApproval": 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>",
"usdAmount": 123
},
"amountInMax": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"amountOut": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"amountOutMin": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"protocolFee": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"applicationFee": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"exchangeRate": 123,
"estimatedTxTime": 123,
"estimatedPriceImpact": 123,
"bridgeFee": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<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>",
"usdAmount": 123
},
"bridgeIds": [
"optimism"
],
"bridgeRoute": [
{
"srcChainId": 123,
"dstChainId": 123,
"srcBridgeToken": "<string>",
"dstBridgeToken": "<string>",
"bridgeId": "optimism"
}
]
},
"org": {
"appId": "app_123",
"affiliateId": "affiliate_123"
},
"usdValue": 100.5,
"srcTx": {
"toAddress": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"chainId": 1,
"value": "1000000000000000000",
"timestamp": "1640995200000000000",
"paymentToken": {
"name": "Ethereum",
"symbol": "ETH",
"decimals": 18,
"amount": "1000000000000000000",
"address": "0x1234567890123456789012345678901234567890"
}
},
"dstTx": {
"toAddress": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"chainId": 1,
"value": "1000000000000000000",
"timestamp": "1640995200000000000",
"paymentToken": {
"name": "Ethereum",
"symbol": "ETH",
"decimals": 18,
"amount": "1000000000000000000",
"address": "0x1234567890123456789012345678901234567890"
}
}
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 150,
"totalPages": 6
}
}Retrieve paginated transaction history with optional filtering
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": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"amountInMax": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"amountOut": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"amountOutMin": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"protocolFee": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"applicationFee": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"exchangeRate": 123,
"estimatedTxTime": 123,
"estimatedPriceImpact": 123,
"requiresTokenApproval": 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>",
"usdAmount": 123
},
"amountInMax": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"amountOut": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"amountOutMin": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"protocolFee": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"applicationFee": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<string>",
"usdAmount": 123
},
"exchangeRate": 123,
"estimatedTxTime": 123,
"estimatedPriceImpact": 123,
"bridgeFee": {
"chainId": 123,
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"isNative": true,
"amount": "<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>",
"usdAmount": 123
},
"bridgeIds": [
"optimism"
],
"bridgeRoute": [
{
"srcChainId": 123,
"dstChainId": 123,
"srcBridgeToken": "<string>",
"dstBridgeToken": "<string>",
"bridgeId": "optimism"
}
]
},
"org": {
"appId": "app_123",
"affiliateId": "affiliate_123"
},
"usdValue": 100.5,
"srcTx": {
"toAddress": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"chainId": 1,
"value": "1000000000000000000",
"timestamp": "1640995200000000000",
"paymentToken": {
"name": "Ethereum",
"symbol": "ETH",
"decimals": 18,
"amount": "1000000000000000000",
"address": "0x1234567890123456789012345678901234567890"
}
},
"dstTx": {
"toAddress": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"chainId": 1,
"value": "1000000000000000000",
"timestamp": "1640995200000000000",
"paymentToken": {
"name": "Ethereum",
"symbol": "ETH",
"decimals": 18,
"amount": "1000000000000000000",
"address": "0x1234567890123456789012345678901234567890"
}
}
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 150,
"totalPages": 6
}
}Limited demo key for API Reference: 5c951bc81da566bbd030ba8e20724063.
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.
"0x5344e5a7,0x5314e6a7"
Wallet address to filter transactions by user
"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Comma-separated list of chain IDs to filter by
"1,42161,10"
Page number for pagination
x >= 11
Number of results per page (max 500)
1 <= x <= 50025
Time period filter
day, week, month, allTime "week"
Start date filter (Unix timestamp)
"1640995200"
End date filter (Unix timestamp)
"1672531200"
Transaction history response
Show child attributes
Status of the transaction
success, pending, requires refund, refunded, failed "success"
Sender wallet address
"0x1234567890123456789012345678901234567890"
Source chain ID
1
Destination chain ID
42161
Source transaction hash
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
Destination transaction hash
"0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
Show child attributes
Whether this transaction involves bridging
true
Bridge time in seconds (null if not a bridge)
420
Transaction path through different chains
Show child attributes
Chain ID for this step
1
Transaction hash for this step
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
Timestamp as bigint string
"1640995200000000000"
Bridge type for the next hop
"layerZero"
Unique transaction identifier
"0x49b1d3d38176e45864fd55500c6c1879ab318609e1ed0c8eb9abd818e6c811fd"
Original action request parameters
Show child attributes
Type of action to perform
swap-action, evm-calldata-tx The address of the sender/user
Source chain ID
Source token address
Destination chain ID
Destination token address
Slippage tolerance in bps
0 <= x <= 10000The exact in or exact out amount of the swap
Swap direction for the action
exact-amount-in, exact-amount-out Address to receive the swapped tokens
The EVM address of the target contract (20 bytes hex)
Calldata for the transaction
Value to send with transaction
The amount of Erc20 being transferred
The Erc20 spender requiring approval for the transaction call
Specific bridge protocols to use
Bridge protocol identifier.
optimism, arbitrum, oft, yield-oft, hyperlane, ghost, mayan, across, relay, alt-vm-1, alt-vm-2 Alternate address to receive refunds
Original action response data
Show child attributes
Transaction data for execution
Show child attributes
Transaction ID
Virtual machine identifier.
evm, solana, alt-vm, hypercore Expected amount to input (exclusive of slippage - recommended value to display in frontend)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Maximum amount to input (inclusive of slippage)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Expected amount delivered to users (exclusive of slippage - recommended value to display in frontend)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Minimum amount delivered to users (inclusive of slippage)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Swaps.xyz fee
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Application fee (your fee!)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Exchange rate for the swap.
Estimated transaction time in seconds.
Estimated price impact percentage.
Flag indicating whether the transaction object requires a source token approval check.
All available routes for the action.
Show child attributes
Transaction data for execution
Show child attributes
EVM address (20 bytes hex)
Hex string with 0x prefix
Value in wei as string
Chain ID. Find in the list of supported networks
Transaction ID
Virtual machine identifier.
evm, solana, alt-vm, hypercore Expected amount to input (exclusive of slippage - recommended value to display in frontend)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Maximum amount to input (inclusive of slippage)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Expected amount delivered to users (exclusive of slippage - recommended value to display in frontend)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Minimum amount delivered to users (inclusive of slippage)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Swaps.xyz fee
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Application fee (your fee!)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Exchange rate for the swap.
Estimated transaction time in seconds.
Estimated price impact percentage.
Bridge fee (from aggregated providers)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Bridge IDs used in the route.
Bridge protocol identifier.
optimism, arbitrum, oft, yield-oft, hyperlane, ghost, mayan, across, relay, alt-vm-1, alt-vm-2 Bridge route information (src chain + token, dst chain + token, BridgeId)
Show child attributes
Chain ID. Find in the list of supported networks
Chain ID. Find in the list of supported networks
EVM address (20 bytes hex)
EVM address (20 bytes hex)
Bridge protocol identifier.
optimism, arbitrum, oft, yield-oft, hyperlane, ghost, mayan, across, relay, alt-vm-1, alt-vm-2 Bridge fee (from aggregated providers)
Show child attributes
Chain ID for the token
Token address
Token name
Token symbol
Token decimals
Boolean flag for whether token is the chain's gas token.
USD value of the payment amount
Bridge IDs used in the route.
Bridge protocol identifier.
optimism, arbitrum, oft, yield-oft, hyperlane, ghost, mayan, across, relay, alt-vm-1, alt-vm-2 Bridge route information (src chain + token, dst chain + token, BridgeId)
Show child attributes
Chain ID. Find in the list of supported networks
Chain ID. Find in the list of supported networks
EVM address (20 bytes hex)
EVM address (20 bytes hex)
Bridge protocol identifier.
optimism, arbitrum, oft, yield-oft, hyperlane, ghost, mayan, across, relay, alt-vm-1, alt-vm-2 USD value of the transaction
100.5
Show child attributes
Recipient address
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
Transaction hash
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
Chain ID
1
Transaction value as bigint string
"1000000000000000000"
Timestamp as bigint string
"1640995200000000000"
Show child attributes
Token name
"Ethereum"
Token symbol
"ETH"
Token decimals
18
Token amount as bigint string
"1000000000000000000"
Token contract address
"0x1234567890123456789012345678901234567890"
Show child attributes
Recipient address
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
Transaction hash
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
Chain ID
1
Transaction value as bigint string
"1000000000000000000"
Timestamp as bigint string
"1640995200000000000"
Show child attributes
Token name
"Ethereum"
Token symbol
"ETH"
Token decimals
18
Token amount as bigint string
"1000000000000000000"
Token contract address
"0x1234567890123456789012345678901234567890"