Post /v2/fungible/msgs_direct
This supports cross-chain actions among EVM chains, Cosmos chains, and between them. Returns minimal number of messages required to execute a multi-chain swap or transfer. This is a convenience endpoint that combines /route and /msgs into a single call.
curl --request POST \
--url https://api.skip.build/v2/fungible/msgs_direct \
--header 'Content-Type: application/json' \
--data '{
"source_asset_denom": "uusdc",
"source_asset_chain_id": "axelar-dojo-1",
"dest_asset_denom": "uatom",
"dest_asset_chain_id": "cosmoshub-4",
"amount_in": "1500000000",
"chain_ids_to_addresses": {
"axelar-dojo-1": "axelar1x8ad0zyw52mvndh7hlnafrg0gt284ga7u3rez0",
"osmosis-1": "osmo1x8ad0zyw52mvndh7hlnafrg0gt284ga7syxplu",
"cosmoshub-4": "cosmos1x8ad0zyw52mvndh7hlnafrg0gt284ga7cl43fw"
},
"slippage_tolerance_percent": "3",
"allow_multi_tx": true
}'
{
"msgs": [
{
"multi_chain_msg": {
"chain_id": "axelar-dojo-1",
"path": [
"axelar-dojo-1"
],
"msg": "{\"source_port\":\"transfer\",\"source_channel\":\"channel-3\",\"token\":{\"denom\":\"uusdc\",\"amount\":\"1000000\"},\"sender\":\"axelar1x8ad0zyw52mvndh7hlnafrg0gt284ga7u3rez0\",\"receiver\":\"osmo1qpvu80yfd0jnnh3ytn8964382typrqq0ejmqaasa3j233su8apasfqtler\",\"timeout_height\":{},\"timeout_timestamp\":1688663426558649000,\"memo\":\"{\\\"wasm\\\":{\\\"contract\\\":\\\"osmo1qpvu80yfd0jnnh3ytn8964382typrqq0ejmqaasa3j233su8apasfqtler\\\",\\\"msg\\\":{\\\"swap_with_action\\\":{\\\"swap_msg\\\":{\\\"token_out_min_amount\\\":\\\"105963\\\",\\\"path\\\":[{\\\"pool_id\\\":\\\"678\\\",\\\"token_out_denom\\\":\\\"uosmo\\\"},{\\\"pool_id\\\":\\\"1\\\",\\\"token_out_denom\\\":\\\"ibc/27394fb092d2eccd56123c74f36e4c1f926001ceada9ca97ea622b25f41e5eb2\\\"}]},\\\"after_swap_action\\\":{\\\"ibc_transfer\\\":{\\\"receiver\\\":\\\"cosmos1x8ad0zyw52mvndh7hlnafrg0gt284ga7cl43fw\\\",\\\"channel\\\":\\\"channel-0\\\"}},\\\"local_fallback_address\\\":\\\"osmo1x8ad0zyw52mvndh7hlnafrg0gt284ga7syxplu\\\"}}}}\"}",
"msg_type_url": "/ibc.applications.transfer.v1.MsgTransfer"
}
}
],
"route": {
"amount_in": "1000000",
"amount_out": "107033",
"source_asset_denom": "uusdc",
"source_asset_chain_id": "axelar-dojo-1",
"dest_asset_denom": "uatom",
"dest_asset_chain_id": "cosmoshub-4",
"operations": [
{
"transfer": {
"port": "transfer",
"channel": "channel-3",
"from_chain_id": "axelar-dojo-1",
"to_chain_id": "osmosis-1",
"pfm_enabled": false,
"supports_memo": true,
"dest_denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
"bridge_id": "IBC"
}
},
{
"swap": {
"swap_in": {
"swap_venue": {
"name": "osmosis-poolmanager",
"chain_id": "osmosis-1"
},
"swap_operations": [
{
"pool": "678",
"denom_in": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
"denom_out": "uosmo"
},
{
"pool": "1",
"denom_in": "uosmo",
"denom_out": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2"
}
],
"swap_amount_in": "1000000",
"price_impact_percent": "1.05"
},
"estimated_affiliate_fee": "0ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2",
"from_chain_id": "osmosis-1",
"chain_id": "osmosis-1",
"denom_in": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
"denom_out": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2"
}
},
{
"transfer": {
"port": "transfer",
"channel": "channel-0",
"from_chain_id": "osmosis-1",
"to_chain_id": "cosmoshub-4",
"pfm_enabled": true,
"supports_memo": true,
"dest_denom": "uatom",
"bridge_id": "IBC"
}
}
],
"chain_ids": [
"axelar-dojo-1",
"osmosis-1",
"cosmoshub-4"
],
"required_chain_addresses": [
"axelar-dojo-1",
"osmosis-1",
"cosmoshub-4"
],
"does_swap": true,
"estimated_amount_out": "107033",
"swap_venue": {
"name": "osmosis-poolmanager",
"chain_id": "osmosis-1"
},
"txs_required": 1,
"usd_amount_in": "2000.01",
"usd_amount_out": "2005.23",
"swap_price_impact_percent": "1.05",
"estimated_route_duration_seconds": 60
}
}
Body
Denom of the source asset
Chain-id of the source asset
Denom of the destination asset
Chain-id of the destination asset
Amount of source asset to be transferred or swapped. If this is a swap, only one of amount_in and amount_out should be provided.
Amount of destination asset out. If this is a swap, only one of amount_in and amount_out should be provided. If amount_out is provided for a swap, the route will be computed to give exactly amount_out.
Map of chain-ids to receipient and/or sender address for each chain in the path. Since the path is not known to the caller beforehand, the caller should attempt to provide addresses for all chains in the path, and the API will return an error if the path cannot be constructed.
Percent tolerance for slippage on swap, if a swap is performed
Number of seconds for the IBC transfer timeout, defaults to 5 minutes
Map of chain-ids to arrays of affiliates. Since cumulative_affiliate_fee_bps must be provided to retrieve a route, and the swap chain is not known at this time, all chains must have the same cumulative_affiliate_fee_bps otherwise the API will return an error.
Whether to allow route responses requiring multiple transactions
Toggles whether the api should return routes that fail price safety checks.
Array of experimental features to enable
Array of bridges to use
Bridge Type:
IBC
- IBC BridgeAXELAR
- Axelar BridgeCCTP
- CCTP BridgeHYPERLANE
- Hyperlane BridgeOPINIT
- Opinit BridgeGO_FAST
- Go Fast BridgeSTARGATE
- Stargate Bridge
IBC
, AXELAR
, CCTP
, HYPERLANE
, OPINIT
, GO_FAST
, STARGATE
Indicates whether this transfer route should be relayed via Skip's Smart Relay service
Whether to allow swaps in the route
Whether to enable Go Fast routes
Whether to enable gas warnings for intermediate and destination chains
Response
A message that interacts with multiple chains
Chain-id of the chain that the transaction containing the message is intended for
JSON string of the message
TypeUrl of the message
Path of chain-ids that the message is intended to interact with
A transaction on a Cosmos chain
Chain-id of the chain that the transaction is intended for
Path of chain-ids that the message is intended to interact with
The address of the wallet that will sign this transaction
Array of indices of the operations that this transaction executes
Amount of source asset to be transferred or swapped
Amount of destination asset out
Chain-ids of all chains of the transfer or swap, in order of usage by operations in the route
All chain-ids that require an address to be provided for, in order of usage by operations in the route
Chain-id of the destination asset
Denom of the destination asset
Whether this route performs a swap
Amount of destination asset out, if a swap is performed
Array of operations required to perform the transfer or swap
A cross-chain transfer
Chain-id on which the transfer is initiated
Chain-id on which the transfer is received
Channel to use to initiate the transfer
Denom of the destionation asset of the transfer
Whether pfm is enabled on the chain where the transfer is initiated
Port to use to initiate the transfer
Whether the transfer chain supports a memo
Denom of the input asset of the transfer
Denom of the output asset of the transfer
Amount of the fee asset to be paid as the transfer fee if applicable.
Amount of the fee asset to be paid as the transfer fee if applicable, converted to USD value
Asset to be paid as the transfer fee if applicable.
Chain-id of the asset
Coingecko id of the asset
Number of decimals used for amounts of the asset
Denom of the asset
Description of the asset
Indicates whether asset is a CW20 token
Indicates whether asset is an EVM token
Indicates whether asset is an SVM token
URI pointing to an image of the logo of the asset
Name of the asset
Chain-id of the origin of the asset. If this is an ibc denom, this is the chain-id of the asset that the ibc token represents
Denom of the origin of the asset. If this is an ibc denom, this is the original denom that the ibc token represents
Recommended symbol of the asset used to differentiate between bridged assets with the same symbol, e.g. USDC.axl for Axelar USDC and USDC.grv for Gravity USDC
Symbol of the asset, e.g. ATOM for uatom
Address of the contract for the asset, e.g. if it is a CW20 or ERC20 token
The forward slash delimited sequence of ibc ports and channels that can be traversed to unwind an ibc token to its origin asset.
Bridge Type:
IBC
- IBC BridgeAXELAR
- Axelar BridgeCCTP
- CCTP BridgeHYPERLANE
- Hyperlane BridgeOPINIT
- Opinit BridgeGO_FAST
- Go Fast BridgeSTARGATE
- Stargate Bridge
IBC
, AXELAR
, CCTP
, HYPERLANE
, OPINIT
, GO_FAST
, STARGATE
Indicates whether this transfer is relayed via Smart Relay
Index of the tx returned from Msgs that executes this operation
Amount of input asset to this operation
Amount of output asset from this operation
Chain-id of the source asset
Denom of the source asset
Number of transactions required to perform the transfer or swap
Amount of the source denom, converted to USD value
Amount of the destination denom expected to be received, converted to USD value
Price impact of the estimated swap, if present. Measured in percentage e.g. "0.5" is .5%
Indicates if the route is unsafe due to poor execution price or if safety cannot be determined due to lack of pricing information
Recommendation reason:
LOW_INFO_WARNING
- Not enough asset pricing information to determine the price safety of the route.BAD_PRICE_WARNING
- The execution price of the route deviates significantly from the current market price.
LOW_INFO_WARNING
, BAD_PRICE_WARNING
Warning message
Indicates fees incurred in the execution of the transfer
Fee type:
- SMART_RELAY - Fees for Smart relaying services.'
SMART_RELAY
Bridge Type:
IBC
- IBC BridgeAXELAR
- Axelar BridgeCCTP
- CCTP BridgeHYPERLANE
- Hyperlane BridgeOPINIT
- Opinit BridgeGO_FAST
- Go Fast BridgeSTARGATE
- Stargate Bridge
IBC
, AXELAR
, CCTP
, HYPERLANE
, OPINIT
, GO_FAST
, STARGATE
Amount of the fee asset to be paid
The value of the fee in USD
Chain-id of the asset
Coingecko id of the asset
Number of decimals used for amounts of the asset
Denom of the asset
Description of the asset
Indicates whether asset is a CW20 token
Indicates whether asset is an EVM token
Indicates whether asset is an SVM token
URI pointing to an image of the logo of the asset
Name of the asset
Chain-id of the origin of the asset. If this is an ibc denom, this is the chain-id of the asset that the ibc token represents
Denom of the origin of the asset. If this is an ibc denom, this is the original denom that the ibc token represents
Recommended symbol of the asset used to differentiate between bridged assets with the same symbol, e.g. USDC.axl for Axelar USDC and USDC.grv for Gravity USDC
Symbol of the asset, e.g. ATOM for uatom
Address of the contract for the asset, e.g. if it is a CW20 or ERC20 token
The forward slash delimited sequence of ibc ports and channels that can be traversed to unwind an ibc token to its origin asset.
Chain ID of the chain where fees are collected
The index of the transaction in the list of transactions required to execute the transfer where fees are paid
The index of the operation in the returned operations list which incurs the fee
The estimated time in seconds for the route to execute
curl --request POST \
--url https://api.skip.build/v2/fungible/msgs_direct \
--header 'Content-Type: application/json' \
--data '{
"source_asset_denom": "uusdc",
"source_asset_chain_id": "axelar-dojo-1",
"dest_asset_denom": "uatom",
"dest_asset_chain_id": "cosmoshub-4",
"amount_in": "1500000000",
"chain_ids_to_addresses": {
"axelar-dojo-1": "axelar1x8ad0zyw52mvndh7hlnafrg0gt284ga7u3rez0",
"osmosis-1": "osmo1x8ad0zyw52mvndh7hlnafrg0gt284ga7syxplu",
"cosmoshub-4": "cosmos1x8ad0zyw52mvndh7hlnafrg0gt284ga7cl43fw"
},
"slippage_tolerance_percent": "3",
"allow_multi_tx": true
}'
{
"msgs": [
{
"multi_chain_msg": {
"chain_id": "axelar-dojo-1",
"path": [
"axelar-dojo-1"
],
"msg": "{\"source_port\":\"transfer\",\"source_channel\":\"channel-3\",\"token\":{\"denom\":\"uusdc\",\"amount\":\"1000000\"},\"sender\":\"axelar1x8ad0zyw52mvndh7hlnafrg0gt284ga7u3rez0\",\"receiver\":\"osmo1qpvu80yfd0jnnh3ytn8964382typrqq0ejmqaasa3j233su8apasfqtler\",\"timeout_height\":{},\"timeout_timestamp\":1688663426558649000,\"memo\":\"{\\\"wasm\\\":{\\\"contract\\\":\\\"osmo1qpvu80yfd0jnnh3ytn8964382typrqq0ejmqaasa3j233su8apasfqtler\\\",\\\"msg\\\":{\\\"swap_with_action\\\":{\\\"swap_msg\\\":{\\\"token_out_min_amount\\\":\\\"105963\\\",\\\"path\\\":[{\\\"pool_id\\\":\\\"678\\\",\\\"token_out_denom\\\":\\\"uosmo\\\"},{\\\"pool_id\\\":\\\"1\\\",\\\"token_out_denom\\\":\\\"ibc/27394fb092d2eccd56123c74f36e4c1f926001ceada9ca97ea622b25f41e5eb2\\\"}]},\\\"after_swap_action\\\":{\\\"ibc_transfer\\\":{\\\"receiver\\\":\\\"cosmos1x8ad0zyw52mvndh7hlnafrg0gt284ga7cl43fw\\\",\\\"channel\\\":\\\"channel-0\\\"}},\\\"local_fallback_address\\\":\\\"osmo1x8ad0zyw52mvndh7hlnafrg0gt284ga7syxplu\\\"}}}}\"}",
"msg_type_url": "/ibc.applications.transfer.v1.MsgTransfer"
}
}
],
"route": {
"amount_in": "1000000",
"amount_out": "107033",
"source_asset_denom": "uusdc",
"source_asset_chain_id": "axelar-dojo-1",
"dest_asset_denom": "uatom",
"dest_asset_chain_id": "cosmoshub-4",
"operations": [
{
"transfer": {
"port": "transfer",
"channel": "channel-3",
"from_chain_id": "axelar-dojo-1",
"to_chain_id": "osmosis-1",
"pfm_enabled": false,
"supports_memo": true,
"dest_denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
"bridge_id": "IBC"
}
},
{
"swap": {
"swap_in": {
"swap_venue": {
"name": "osmosis-poolmanager",
"chain_id": "osmosis-1"
},
"swap_operations": [
{
"pool": "678",
"denom_in": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
"denom_out": "uosmo"
},
{
"pool": "1",
"denom_in": "uosmo",
"denom_out": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2"
}
],
"swap_amount_in": "1000000",
"price_impact_percent": "1.05"
},
"estimated_affiliate_fee": "0ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2",
"from_chain_id": "osmosis-1",
"chain_id": "osmosis-1",
"denom_in": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
"denom_out": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2"
}
},
{
"transfer": {
"port": "transfer",
"channel": "channel-0",
"from_chain_id": "osmosis-1",
"to_chain_id": "cosmoshub-4",
"pfm_enabled": true,
"supports_memo": true,
"dest_denom": "uatom",
"bridge_id": "IBC"
}
}
],
"chain_ids": [
"axelar-dojo-1",
"osmosis-1",
"cosmoshub-4"
],
"required_chain_addresses": [
"axelar-dojo-1",
"osmosis-1",
"cosmoshub-4"
],
"does_swap": true,
"estimated_amount_out": "107033",
"swap_venue": {
"name": "osmosis-poolmanager",
"chain_id": "osmosis-1"
},
"txs_required": 1,
"usd_amount_in": "2000.01",
"usd_amount_out": "2005.23",
"swap_price_impact_percent": "1.05",
"estimated_route_duration_seconds": 60
}
}