Skip to main content

AppController_getSingleTxFromQuery

GET 

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

AppController_getSingleTxFromQuery

Request​

Query Parameters

    sender stringrequired

    Address of the sender.

    Example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
    recipient stringrequired

    Address of the recipient.

    Example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
    routePath string

    Path returned in the userTx with type "fund-movr"

    Example: 1-6
    fromChainId stringrequired

    Source ChainId

    Example: 137
    toChainId stringrequired

    Destination ChainId

    Example: 56
    fromTokenAddress stringrequired

    Address of the source token

    Example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
    toTokenAddress stringrequired

    Address of the destination token

    Example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
    fromAmount stringrequired

    Amount as Bignumber for the source token

    Example: 1000000000
    toAmount stringrequired

    Amount as Bignumber for the destination token

    Example: 10000000000
    bridgeInputTokenAddress string

    Token Address that is being sent to the bridge. In case of swap, the token that you swapped into has to be passed here.

    Example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
    bridgeWithGas boolean

    Boolean variable that notifies us if refuel(dropping some native tokens on the destination chain) also has to be included in the transaction.

    Example: false
    swapSlippage string

    Override the default swap slippage sent by the quote in percentage, i.e 1% = 1 or 0.5% = 0.5.

    Example: 1
    bridgeSlippage string

    Override the default bridge slippage sent by the quote in percentage, i.e 1% = 1 or 0.5% = 0.5. NOTE - Slippage is not present for all bridges.

    Example: 1
    destinationPayload string

    Destination Payload

    destinationGasLimit string

    Destination Gas limit

    bridgeInsuranceAmount string

    BridgeInsuranceAmount

    Example: 10000000000
    feePercent string

    Fee Percentage - Percentage of fee to be cut from the input token. Supports only three decimal places and uptp 5 percent.

    feeTakerAddress string

    Fee Taker Address - Address that collects the fee.

Header Parameters

    API-KEY string

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...