Skip to main content
GET
/
getStatus
Get Status
curl --request GET \
  --url https://api-v2.swaps.xyz/api/getStatus \
  --header 'x-api-key: <api-key>'
{
  "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"
    }
  }
}

Authorizations

x-api-key
string
header
required

Limited demo key for API Reference: 5c951bc81da566bbd030ba8e20724063.

Query Parameters

txHash
string

Transaction hash to query (required if txId not provided)

Example:

"0xd56968cf4fede6a0773f3e6dfad7d1088aacd3994bada55d44faee9596dadff2"

txId
string

Transaction ID to query (required if txHash not provided)

Example:

"0x49b1d3d38176e45864fd55500c6c1879ab318609e1ed0c8eb9abd818e6c811fd"

chainId
integer

Source chain ID for the transaction (optional but recommended)

Example:

1

Response

200 - application/json

Transaction status response

status
enum<string>

Status of the transaction

Available options:
success,
pending,
requires refund,
refunded,
failed
Example:

"success"

sender
string

Sender wallet address

Example:

"0x1234567890123456789012345678901234567890"

srcChainId
integer

Source chain ID

Example:

1

dstChainId
integer

Destination chain ID

Example:

42161

srcTxHash
string

Source transaction hash

Example:

"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"

dstTxHash
string

Destination transaction hash

Example:

"0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"

bridgeDetails
object
txId
string

Unique transaction identifier

Example:

"0x49b1d3d38176e45864fd55500c6c1879ab318609e1ed0c8eb9abd818e6c811fd"

actionRequest
object

Original action request parameters

actionResponse
object

Original action response data

org
object
usdValue
number | null

USD value of the transaction

Example:

100.5

srcTx
object
dstTx
object
I