Skip to main content
POST
/
v2
/
fungible
/
route
Compute Route
curl --request POST \
  --url https://router-api.initia.xyz/v2/fungible/route \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount_in": "1000000",
  "source_asset_chain_id": "interwoven-1",
  "source_asset_denom": "uinit",
  "dest_asset_chain_id": "8453",
  "dest_asset_denom": "0x...",
  "allow_unsafe": true
}
'
{
  "amount_in": "1000000",
  "amount_out": "999000",
  "source_asset_chain_id": "interwoven-1",
  "source_asset_denom": "uinit",
  "dest_asset_chain_id": "8453",
  "dest_asset_denom": "0x...",
  "operations": [],
  "required_chain_addresses": [
    "interwoven-1",
    "8453"
  ],
  "usd_amount_in": "1.50",
  "usd_amount_out": "1.49",
  "warning": null,
  "required_op_hook": false
}

Body

application/json
amount_in
string
required

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

source_asset_chain_id
string
required

Source chain ID.

source_asset_denom
string
required

Source asset denomination.

dest_asset_chain_id
string
required

Destination chain ID.

dest_asset_denom
string
required

Destination asset denomination.

allow_unsafe
boolean
default:true

Allow routes that may have higher risk.

go_fast
boolean

Use Go Fast bridging. Automatically determined if not set.

is_op_withdraw
boolean

Force an Optimistic withdrawal route.

Response

200 - application/json

Successful response

amount_in
string

Input amount.

amount_out
string

Expected output amount.

source_asset_chain_id
string

Source chain ID.

source_asset_denom
string

Source asset denom.

dest_asset_chain_id
string

Destination chain ID.

dest_asset_denom
string

Destination asset denom.

operations
object[]

Ordered list of transfer operations to execute.

required_chain_addresses
string[]

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.

usd_amount_in
string

USD value of the input amount.

usd_amount_out
string

USD value of the output amount.

warning
object

Price impact warning (present when impact exceeds 5%).

required_op_hook
boolean

Whether an OP hook is required for this route.