v1

latestSwagger 2.02026-07-17172519.5 KB
Bonds Module

Swap two tokens

Perform a swap between two tokens using a swapper bond

post/bonds/swap

Request body

from_amountstring
from_tokenstring
to_tokenstring

Example request

{
  "base_req": {
    "from": "cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc",
    "memo": "Sent via Cosmos Voyager 🚀",
    "chain_id": "Cosmos-Hub",
    "account_number": "0",
    "sequence": "1",
    "gas": "200000",
    "gas_adjustment": "1.2",
    "fees": [
      {
        "denom": "stake"
      }
    ]
  },
  "from_token": "res1",
  "to_token": "res2"
}

Response

Default response