Skip to main content

AppController_getSingleTx

POST 

https://api.socket.tech/v2/build-tx

AppController_getSingleTx

Request​

Header Parameters

    API-KEY string

Body

required

    route

    object

    required

    routeId stringrequired

    Unique id for each route.

    isOnlySwapRoute booleanrequired

    Contains only on single swap.

    fromAmount stringrequired

    Sending token amount.

    chainGasBalances

    object

    required

    minimumGasBalances

    object

    required

    toAmount stringrequired

    Approximate receiving token amount.

    usedBridgeNames string[]required

    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]

    Array of bridges used in the route

    totalUserTx numberrequired

    Total number of transactions for the route.

    totalGasFeesInUsd numberrequired

    Combined USD gas fees for all transactions in the route.

    recipient stringrequired

    Address of user receiving the amount.

    sender stringrequired

    Address of user making the transactions.

    userTxs object[]required

    Array of user transactions.

    receivedValueInUsd number

    Receive Value

    inputValueInUsd number
    outputValueInUsd number
    serviceTime numberrequired

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

    maxServiceTime numberrequired

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

    integratorFee

    object

    required

    feeTakerAddress string
    amount string

    asset

    object

    name string

    Name of token.

    address string

    Address of token.

    icon string

    URL for icon of token.

    decimals number

    Decimal used for token.

    symbol string

    Symbol of token.

    chainId string

    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]

    Chain id of the token

    logoURI string

    URL for icon of token.

    chainAgnosticId string

    Unique Id over all chains

    t2bReceiverAddress string
    extraData object

    refuel

    object

    required

    fromAmount stringrequired
    toAmount stringrequired

    gasFees

    object

    required

    gasLimit numberrequired

    Approx Gas Limit of the transaction.

    feesInUsd numberrequired

    USD value of gas fees at current gas price.

    asset

    object

    required

    name string

    Name of token.

    address stringrequired

    Address of token.

    icon string

    URL for icon of token.

    decimals number

    Decimal used for token.

    symbol stringrequired

    Symbol of token.

    chainId stringrequired

    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]

    Chain id of the token

    logoURI string

    URL for icon of token.

    chainAgnosticId string

    Unique Id over all chains

    gasAmount stringrequired

    Estimated Amount of gas token will be used

    recipient stringrequired
    serviceTime numberrequired

    fromAsset

    object

    required

    name string

    Name of token.

    address stringrequired

    Address of token.

    icon string

    URL for icon of token.

    decimals number

    Decimal used for token.

    symbol stringrequired

    Symbol of token.

    chainId stringrequired

    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]

    Chain id of the token

    logoURI string

    URL for icon of token.

    chainAgnosticId string

    Unique Id over all chains

    toAsset

    object

    required

    name string

    Name of token.

    address stringrequired

    Address of token.

    icon string

    URL for icon of token.

    decimals number

    Decimal used for token.

    symbol stringrequired

    Symbol of token.

    chainId stringrequired

    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]

    Chain id of the token

    logoURI string

    URL for icon of token.

    chainAgnosticId string

    Unique Id over all chains

    fromChainId numberrequired
    toChainId numberrequired

    destinationCallData

    object

    required

    destinationPayload stringrequired
    destinationGasLimit stringrequired

    bridgeInsuranceData

    object

    required

    amount stringrequired

    Amount of token to be used in insurance.

Responses​

Get the tx details for the route.

Schema

    status booleanrequired

    Status of API.

    result

    object

    required

    userTxType stringrequired

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

    Type of user transaction.

    txTarget stringrequired

    Address to which transaction has to be sent.

    chainId stringrequired

    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]

    Id of chain where transaction has to be sent.

    txData stringrequired

    Calldata for transaction.

    txType stringrequired

    Possible values: [eth_sendTransaction, eth_signMessage]

    Type of transaction.

    value stringrequired

    Native token amount to be sent with transaction.

    totalUserTx numberrequired

    Total number of transactions in Active Route.

    approvalData

    object

    required

    minimumApprovalAmount stringrequired

    Minimum amount of approval needed.

    approvalTokenAddress stringrequired

    Address of token for which approval is required.

    allowanceTarget stringrequired

    Contract address that needs approval.

    owner stringrequired

    Address of owner.

Loading...