latestOpenAPI 3.0.02026-08-2232150173.9 KB

b70d36b7002b

shortcuts

Find optimal route between token and nontokenized position

get/api/v1/shortcuts/route/nontokenized

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

feestring[]

Fee in basis points per amountIn. Use 1-100. All-zero fees are ignored. Collection is on the source chain unless a cross-chain route sets destinationFeeReceiver.

[
  "100"
]
feeReceiverstring
Example:0x220866B1A2219f40e72f5c628B65D54268cA3A9D

The Ethereum address that receives the source-chain fee and remains the fallback when destination collection does not apply. Required if fee is provided.

destinationFeeReceiverstring
Example:0x220866B1A2219f40e72f5c628B65D54268cA3A9D

Optional destination-chain fee receiver. For a cross-chain route with destination execution, the requested fee is collected atomically from the delivered bridge asset on the destination chain. Otherwise feeReceiver remains the source-chain receiver.

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"
    }
  ]
}