curl --request POST \
--url https://router-api.initia.xyz/v2/fungible/msgs \
--header 'Content-Type: application/json' \
--data '
{
"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...",
"address_list": [
"init1abc...",
"0xdef..."
],
"operations": [],
"slippage_tolerance_percent": "1"
}
'import requests
url = "https://router-api.initia.xyz/v2/fungible/msgs"
payload = {
"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...",
"address_list": ["init1abc...", "0xdef..."],
"operations": [],
"slippage_tolerance_percent": "1"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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...',
address_list: ['init1abc...', '0xdef...'],
operations: [],
slippage_tolerance_percent: '1'
})
};
fetch('https://router-api.initia.xyz/v2/fungible/msgs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://router-api.initia.xyz/v2/fungible/msgs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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...',
'address_list' => [
'init1abc...',
'0xdef...'
],
'operations' => [
],
'slippage_tolerance_percent' => '1'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://router-api.initia.xyz/v2/fungible/msgs"
payload := strings.NewReader("{\n \"amount_in\": \"1000000\",\n \"amount_out\": \"999000\",\n \"source_asset_chain_id\": \"interwoven-1\",\n \"source_asset_denom\": \"uinit\",\n \"dest_asset_chain_id\": \"8453\",\n \"dest_asset_denom\": \"0x...\",\n \"address_list\": [\n \"init1abc...\",\n \"0xdef...\"\n ],\n \"operations\": [],\n \"slippage_tolerance_percent\": \"1\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://router-api.initia.xyz/v2/fungible/msgs")
.header("Content-Type", "application/json")
.body("{\n \"amount_in\": \"1000000\",\n \"amount_out\": \"999000\",\n \"source_asset_chain_id\": \"interwoven-1\",\n \"source_asset_denom\": \"uinit\",\n \"dest_asset_chain_id\": \"8453\",\n \"dest_asset_denom\": \"0x...\",\n \"address_list\": [\n \"init1abc...\",\n \"0xdef...\"\n ],\n \"operations\": [],\n \"slippage_tolerance_percent\": \"1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://router-api.initia.xyz/v2/fungible/msgs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_in\": \"1000000\",\n \"amount_out\": \"999000\",\n \"source_asset_chain_id\": \"interwoven-1\",\n \"source_asset_denom\": \"uinit\",\n \"dest_asset_chain_id\": \"8453\",\n \"dest_asset_denom\": \"0x...\",\n \"address_list\": [\n \"init1abc...\",\n \"0xdef...\"\n ],\n \"operations\": [],\n \"slippage_tolerance_percent\": \"1\"\n}"
response = http.request(request)
puts response.read_body{
"txs": [
{
"cosmos_tx": {
"chain_id": "interwoven-1",
"msgs": [],
"signer_address": "init1abc..."
}
}
]
}Generate Transaction
This is the second step when bridging tokens. After computing a route with Compute Route (POST /v2/fungible/route), pass the route details and your addresses to this endpoint. It returns signable transaction messages that you can broadcast to the source chain.
The typical flow is: Compute Route → Generate Transaction → sign and broadcast → Track Transaction.
curl --request POST \
--url https://router-api.initia.xyz/v2/fungible/msgs \
--header 'Content-Type: application/json' \
--data '
{
"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...",
"address_list": [
"init1abc...",
"0xdef..."
],
"operations": [],
"slippage_tolerance_percent": "1"
}
'import requests
url = "https://router-api.initia.xyz/v2/fungible/msgs"
payload = {
"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...",
"address_list": ["init1abc...", "0xdef..."],
"operations": [],
"slippage_tolerance_percent": "1"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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...',
address_list: ['init1abc...', '0xdef...'],
operations: [],
slippage_tolerance_percent: '1'
})
};
fetch('https://router-api.initia.xyz/v2/fungible/msgs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://router-api.initia.xyz/v2/fungible/msgs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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...',
'address_list' => [
'init1abc...',
'0xdef...'
],
'operations' => [
],
'slippage_tolerance_percent' => '1'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://router-api.initia.xyz/v2/fungible/msgs"
payload := strings.NewReader("{\n \"amount_in\": \"1000000\",\n \"amount_out\": \"999000\",\n \"source_asset_chain_id\": \"interwoven-1\",\n \"source_asset_denom\": \"uinit\",\n \"dest_asset_chain_id\": \"8453\",\n \"dest_asset_denom\": \"0x...\",\n \"address_list\": [\n \"init1abc...\",\n \"0xdef...\"\n ],\n \"operations\": [],\n \"slippage_tolerance_percent\": \"1\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://router-api.initia.xyz/v2/fungible/msgs")
.header("Content-Type", "application/json")
.body("{\n \"amount_in\": \"1000000\",\n \"amount_out\": \"999000\",\n \"source_asset_chain_id\": \"interwoven-1\",\n \"source_asset_denom\": \"uinit\",\n \"dest_asset_chain_id\": \"8453\",\n \"dest_asset_denom\": \"0x...\",\n \"address_list\": [\n \"init1abc...\",\n \"0xdef...\"\n ],\n \"operations\": [],\n \"slippage_tolerance_percent\": \"1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://router-api.initia.xyz/v2/fungible/msgs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_in\": \"1000000\",\n \"amount_out\": \"999000\",\n \"source_asset_chain_id\": \"interwoven-1\",\n \"source_asset_denom\": \"uinit\",\n \"dest_asset_chain_id\": \"8453\",\n \"dest_asset_denom\": \"0x...\",\n \"address_list\": [\n \"init1abc...\",\n \"0xdef...\"\n ],\n \"operations\": [],\n \"slippage_tolerance_percent\": \"1\"\n}"
response = http.request(request)
puts response.read_body{
"txs": [
{
"cosmos_tx": {
"chain_id": "interwoven-1",
"msgs": [],
"signer_address": "init1abc..."
}
}
]
}Body
Input amount in smallest denomination.
Expected output amount from the route response.
Source chain ID.
Source asset denomination.
Destination chain ID.
Destination asset denomination.
Array of recipient and/or sender address for each chain in the path, corresponding to the required_chain_addresses array returned from a route request.
2Route operations from the /v2/fungible/route response.
Slippage tolerance as a percentage (e.g. "1" for 1%).
Signed OP hook data, required when the route has required_op_hook true.
Show child attributes
Show child attributes
Response
Successful response
Array of transaction objects. Each can be a cosmos_tx, evm_tx, or svm_tx.
Show child attributes
Show child attributes
Was this page helpful?