Routing

Compute Route

This is the first step when bridging tokens between chains. Call this endpoint with your source and destination assets to find the optimal transfer route. The response includes the expected output amount, USD value estimates, and an ordered list of operations.

After receiving a route, pass the full response (including operations) to the Generate Transaction endpoint (POST /v2/fungible/msgs) to get signable transaction messages you can broadcast.

If the route involves an IBC transfer between the Initia L1 chain and an external Cosmos chain, the endpoint also checks that the transfer fits within the current IBC rate-limit capacity. When the requested amount exceeds the remaining send or receive capacity, the request is rejected with a 400 error whose message reports the remaining capacity in human-readable units.

post/v2/fungible/route

Request body

amount_instring required

Amount to send in the smallest denomination (e.g. "1000000" for 1 INIT).

source_asset_chain_idstring required

Source chain ID.

source_asset_denomstring required

Source asset denomination.

dest_asset_chain_idstring required

Destination chain ID.

dest_asset_denomstring required

Destination asset denomination.

allow_unsafeboolean

Allow routes that may have higher risk.

go_fastboolean

Use Go Fast bridging. Automatically determined if not set.

is_op_withdrawboolean

Force an Optimistic withdrawal route.

Response

Successful response

amount_instring

Input amount.

amount_outstring

Expected output amount.

source_asset_chain_idstring

Source chain ID.

source_asset_denomstring

Source asset denom.

dest_asset_chain_idstring

Destination chain ID.

dest_asset_denomstring

Destination asset denom.

operationsobject[]

Ordered list of transfer operations to execute.

required_chain_addressesstring[]

All chain IDs that require an address, in order of usage by operations in the route. Use this to populate the address_list parameter in the Generate Transaction request.

chain_idsstring[]

Ordered list of all chain IDs involved in the route.

does_swapboolean

Whether the route involves a token swap.

estimated_amount_outstring

Estimated output amount before fees and slippage adjustments.

estimated_route_duration_secondsinteger nullable

Estimated time in seconds for the route to complete.

txs_requiredinteger

Number of transactions required to execute the route.

swap_price_impact_percentstring

Estimated price impact percentage for the swap.

usd_amount_instring

USD value of the input amount.

usd_amount_outstring

USD value of the output amount.

extra_warningsstring[] nullable

Additional warning messages for the route, such as withdrawal duration notices.

required_op_hookboolean

Whether an OP hook is required for this route.

Changes

Changed in 3 of the 6 revisions of this API.1012

    • added the non-success response with the status 400

      response-non-success-status-added

    • added the optional property chain_ids to the response with the 200 status

      response-optional-property-added

    • added the optional property does_swap to the response with the 200 status

      response-optional-property-added

    • added the optional property estimated_amount_out to the response with the 200 status

      response-optional-property-added

    • added the optional property estimated_fees to the response with the 200 status

      response-optional-property-added

    • added the optional property estimated_route_duration_seconds to the response with the 200 status

      response-optional-property-added

    • added the optional property extra_warnings to the response with the 200 status

      response-optional-property-added

    • added the optional property swap_price_impact_percent to the response with the 200 status

      response-optional-property-added

    • added the optional property swap_venue to the response with the 200 status

      response-optional-property-added

    • added the optional property swap_venues to the response with the 200 status

      response-optional-property-added

    • added the optional property txs_required to the response with the 200 status

      response-optional-property-added

  • 8f391fd6e76c101See the full diff
    • removed the optional property chain_ids from the response with the 200 status

      response-optional-property-removed

    • removed the optional property does_swap from the response with the 200 status

      response-optional-property-removed

    • removed the optional property estimated_amount_out from the response with the 200 status

      response-optional-property-removed

    • removed the optional property estimated_fees from the response with the 200 status

      response-optional-property-removed

    • removed the optional property estimated_route_duration_seconds from the response with the 200 status

      response-optional-property-removed

    • removed the optional property extra_warnings from the response with the 200 status

      response-optional-property-removed

    • removed the optional property swap_price_impact_percent from the response with the 200 status

      response-optional-property-removed

    • removed the optional property swap_venue from the response with the 200 status

      response-optional-property-removed

    • removed the optional property swap_venues from the response with the 200 status

      response-optional-property-removed

    • removed the optional property txs_required from the response with the 200 status

      response-optional-property-removed

    • removed the non-success response with the status 400

      response-non-success-status-removed