Skip to main content

QuoteController_getQuote

GET 

https://api.socket.tech/v2/quote

QuoteController_getQuote

Request​

Query Parameters

    fromChainId stringrequired

    Chain id of source chain.

    Example: 137
    fromTokenAddress stringrequired

    Token address on source chain.

    Example: 0x2791bca1f2de4661ed88a30c99a7a9449aa84174
    toChainId stringrequired

    Chain id of destination chain.

    Example: 56
    toTokenAddress stringrequired

    Token address on destination chain.

    Example: 0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3
    fromAmount stringrequired

    Amount of sending tokens.

    Example: 100000000
    userAddress stringrequired

    Address of user. This will be used to check approvals.

    Example: 0x3e8cB4bd04d81498aB4b94a392c334F5328b237b
    recipient string

    Address of recipient. This will be used to check approvals.

    Example: 0x3e8cB4bd04d81498aB4b94a392c334F5328b237b
    uniqueRoutesPerBridge booleanrequired

    Flag to return only best route per bridge using the sort criteria

    Example: true
    disableSwapping boolean

    Flag to specify if routes that have dex swap should be ignored.

    includeDexes string[]

    Possible values: [oneinch, zerox, rainbow]

    Specify Dexes that should be included in routes.

    excludeDexes string[]

    Possible values: [oneinch, zerox, rainbow]

    Specify Dexes that should be excluded in routes. This option will be ignored if includeDexes is specified.

    includeBridges string[]

    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]

    Specify Bridges that should be included in routes.

    excludeBridges string[]

    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]

    Specify Bridges that should be excluded in routes. This option will be ignored if includeBridges is specified.

    sort stringrequired

    Possible values: [output, gas, time]

    Param to sort routes based on.

    maxUserTxs string

    Maximum number of transactions. This option will be ignored if singleTxOnly is marked as true.

    singleTxOnly boolean

    Only get quotes with one user transaction to bridge.

    isContractCall boolean

    Only get quotes with that are compatible with contracts

    bridgeWithGas boolean

    include gas transfer with bridging tx

    bridgeWithInsurance boolean

    include insurance with bridging tx

    defaultBridgeSlippage string

    default bridge slippage for the route in percent between 0 and 100. Default Slippage assumed if not passed. NOTE - Slippage is not present for all bridges.

    defaultSwapSlippage string

    default swap slippage for the route in percent between 0 and 100. Default Slippage assumed if not passed.

    destinationPayload string

    destination payload for contract call

    destinationGasLimit string

    destination gas limit for contract call

    feePercent string

    feePercentage to be cut, this is only available on SocketGateway Contracts.

    feeTakerAddress string

    feeTakerAddress is the address where the fee is sent, this is only available on Socket Gateway Contracts.

Header Parameters

    API-KEY string

Responses​

Returns all the possible routes for bridging tokens from one chain to another. One of the routes can be selected and passed in to start the route.

Schema

    success booleanrequired

    Status of API.

    result

    object

    required

    routes

    object[]

  • Array [

  • 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
  • ]

  • fromChainId number

    fromAsset

    object

    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

    toChainId number

    toAsset

    object

    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

    refuel

    object

    nullable

    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

    Gas token details.

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