shortcuts

Find optimal route between token and nontokenized position

Changed on
get/api/v1/shortcuts/route/nontokenized

Request

  • Base URL
    https://api.enso.finance
  • URL
    https://api.enso.finance/api/v1/shortcuts/route/nontokenized
  • Auth
    HTTP bearer

Query parameters

chainIdnumber
Example:80094

Chain ID of the network to execute the transaction on

fromAddressstring required

Ethereum address of the wallet to send the transaction from

routingStrategy'router' | 'delegate' | 'delegate-legacy' | 'checkout' nullable

Routing strategy to use

referralCodestring
Example:0123456789ABCDEF

Referral code that will be included in an on-chain event.

destinationChainIdnumber

Chain ID of the network to bridge to and receive nontokenized position

tokenInstring[] required

Ethereum address of the token to swap from. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

[
  "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
]
positionOutstring required

ID of a non-tokenized position

slippagestring
Example:300

Slippage in basis points (1/10000). If specified, minAmountOut should not be specified

ignoreAggregatorsstring[] nullable

A list of swap aggregators to be ignored from consideration

ignoreBridgesstring[] nullable

A list of bridge protocols to be ignored from consideration

ignoreStandardsstring[] nullable

A list of standards to be ignored from consideration

amountInstring[] required

Amount of tokenIn to swap in wei

[
  "1000000000000000000"
]
receiverstring required
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Ethereum address of the receiver of the positionOut

spenderstring
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Ethereum address of the spender of the tokenIn

refundReceiverstring
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Ethereum address of the receiver of any dust tokens that might be produced during the execution of actions

Response

createdAtnumber required

Block number the transaction was created on

gasstring required
amountOutstring

Amount out in the destination protocol precision. Only available for hypercore-spot deposits, where it represents the amount in 8-decimal HyperCore precision.

priceImpactnumber nullable

Price impact in basis points (1/10000) between the initial route value and the positionAmount. For example, 50 = 0.50%. Returns null if price impact calculation is not available.

feeAmountstring[]
ensoFeeAmountstring[]
validUntilnumber

Unix timestamp (seconds) after which this quote expires. Transactions submitted after this time may revert.

Example response

{
  "metadata": {
    "bridgeRefundAssets": [
      {
        "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "recipient": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
        "symbol": "USDC"
      }
    ]
  },
  "route": [
    {
      "via": "cctp-forwarder"
    }
  ]
}

Changes

    • warning

      added the new mayan enum value to the /// response property for the response status

    • info

      added the enum value mayan to the property items/ of the query request parameter ignoreBridges

    • info

      added the enum value akka to the property items/ of the query request parameter ignoreAggregators