Skip to main content

AppController_getSingleTx

POST 

/v2/build-tx

AppController_getSingleTx

Request

Header Parameters

    API-KEY string

Body

required

    route

    object

    required

    routeIdstringrequired

    Unique id for each route.

    Example: 6a4c26b6-b008-431d-a37c-028e0b30482b
    isOnlySwapRoutebooleanrequired

    Contains only on single swap.

    Example: false
    fromAmountstringrequired

    Sending token amount.

    Example: 100000000000000000000

    chainGasBalances

    object

    required

    minimumGasBalances

    object

    required

    toAmountstringrequired

    Approximate receiving token amount.

    Example: 100000000000000000000
    usedBridgeNamesstring[]required

    Array of bridges used in the route

    Possible values: [hop, hopCctp, anyswap, anyswap-router-v4, anyswap-router-v6, polygon-bridge, arbitrum-bridge, hyphen, across, optimism-bridge, celer, refuel-bridge, stargate, connext, cctp, synapse, base-bridge, zora-bridge, zksync-native, symbiosis, gnosis-native-bridge, mantle-native-bridge, scroll-native-bridge, mode-native-bridge, super-bridge, stargate-v2]

    Example: [anyswap-router-v4]
    totalUserTxnumberrequired

    Total number of transactions for the route.

    Example: 3
    totalGasFeesInUsdnumberrequired

    Combined USD gas fees for all transactions in the route.

    Example: 125.4
    recipientstringrequired

    Address of user receiving the amount.

    Example: 0x3e8cB4bd04d81498aB4b94a392c334F5328b237b
    senderstringrequired

    Address of user making the transactions.

    Example: 0x3e8cB4bd04d81498aB4b94a392c334F5328b237b
    userTxsobject[]required

    Array of user transactions.

    receivedValueInUsdnumber

    Receive Value

    inputValueInUsdnumber
    outputValueInUsdnumber
    serviceTimenumberrequired

    Estimate of total time in seconds, excluding the transaction time.

    Example: 600
    maxServiceTimenumberrequired

    Estimate of max time to exit from the chain in seconds.

    Example: 600

    integratorFee

    object

    required

    feeTakerAddressstring
    amountstring

    asset

    object

    namestring

    Name of token.

    Example: USD Coin
    addressstring

    Address of token.

    Example: 0x2791bca1f2de4661ed88a30c99a7a9449aa84174
    iconstring

    URL for icon of token.

    Example: https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg
    decimalsnumber

    Decimal used for token.

    Example: 6
    symbolstring

    Symbol of token.

    Example: USDC
    chainIdstring

    Chain id of the token

    Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]

    Example: 137
    logoURIstring

    URL for icon of token.

    Example: https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg
    chainAgnosticIdstring

    Unique Id over all chains

    Example: DAI
    t2bReceiverAddressstring
    extraDataobject

    refuel

    object

    required

    fromAmountstringrequired
    toAmountstringrequired

    gasFees

    object

    required

    gasLimitnumberrequired

    Approx Gas Limit of the transaction.

    Example: 250000
    feesInUsdnumberrequired

    USD value of gas fees at current gas price.

    Example: 125.4

    asset

    object

    required

    namestring

    Name of token.

    Example: USD Coin
    addressstringrequired

    Address of token.

    Example: 0x2791bca1f2de4661ed88a30c99a7a9449aa84174
    iconstring

    URL for icon of token.

    Example: https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg
    decimalsnumber

    Decimal used for token.

    Example: 6
    symbolstringrequired

    Symbol of token.

    Example: USDC
    chainIdstringrequired

    Chain id of the token

    Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]

    Example: 137
    logoURIstring

    URL for icon of token.

    Example: https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg
    chainAgnosticIdstring

    Unique Id over all chains

    Example: DAI
    gasAmountstringrequired

    Estimated Amount of gas token will be used

    recipientstringrequired
    serviceTimenumberrequired

    fromAsset

    object

    required

    namestring

    Name of token.

    Example: USD Coin
    addressstringrequired

    Address of token.

    Example: 0x2791bca1f2de4661ed88a30c99a7a9449aa84174
    iconstring

    URL for icon of token.

    Example: https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg
    decimalsnumber

    Decimal used for token.

    Example: 6
    symbolstringrequired

    Symbol of token.

    Example: USDC
    chainIdstringrequired

    Chain id of the token

    Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]

    Example: 137
    logoURIstring

    URL for icon of token.

    Example: https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg
    chainAgnosticIdstring

    Unique Id over all chains

    Example: DAI

    toAsset

    object

    required

    namestring

    Name of token.

    Example: USD Coin
    addressstringrequired

    Address of token.

    Example: 0x2791bca1f2de4661ed88a30c99a7a9449aa84174
    iconstring

    URL for icon of token.

    Example: https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg
    decimalsnumber

    Decimal used for token.

    Example: 6
    symbolstringrequired

    Symbol of token.

    Example: USDC
    chainIdstringrequired

    Chain id of the token

    Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]

    Example: 137
    logoURIstring

    URL for icon of token.

    Example: https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg
    chainAgnosticIdstring

    Unique Id over all chains

    Example: DAI
    fromChainIdnumberrequired
    toChainIdnumberrequired

    destinationCallData

    object

    required

    destinationPayloadstringrequired
    destinationGasLimitstringrequired

    bridgeInsuranceData

    object

    required

    amountstringrequired

    Amount of token to be used in insurance.

Responses

Get the tx details for the route.

Schema

    statusbooleanrequired

    Status of API.

    Example: true

    result

    object

    required

    userTxTypestringrequired

    Type of user transaction.

    Possible values: [approve, fund-movr, claim, dex-swap, sign]

    Example: dex-swap
    txTargetstringrequired

    Address to which transaction has to be sent.

    Example: 0x3e8cB4bd04d81498aB4b94a392c334F5328b237b
    chainIdstringrequired

    Id of chain where transaction has to be sent.

    Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]

    Example: 137
    txDatastringrequired

    Calldata for transaction.

    Example: 0xasjajfbalkfajfalalglaglagbalga
    txTypestringrequired

    Type of transaction.

    Possible values: [eth_sendTransaction, eth_signMessage]

    Example: eth_sendTransaction
    valuestringrequired

    Native token amount to be sent with transaction.

    Example: 10000000000000000
    totalUserTxnumberrequired

    Total number of transactions in Active Route.

    Example: 2

    approvalData

    object

    required

    minimumApprovalAmountstringrequired

    Minimum amount of approval needed.

    Example: 10000000000000000
    approvalTokenAddressstringrequired

    Address of token for which approval is required.

    Example: 0x2791bca1f2de4661ed88a30c99a7a9449aa84174
    allowanceTargetstringrequired

    Contract address that needs approval.

    Example: 0x2791bca1f2de4661ed88a30c99a7a9449aa84174
    ownerstringrequired

    Address of owner.

    Example: 0x3e8cB4bd04d81498aB4b94a392c334F5328b237b