Hinkal WaaS
Swap
Swap tokens from a wallet (EVM, Solana, or Tron)
POST
/waas/wallet/swaphttps://api.hinkal.io/waas/wallet/swap
Executes a public swap from the wallet balance via an aggregator. Set toChainId to bridge
instead; the output lands at the same wallet on the destination chain. Cross-chain routes
touching Solana or Tron, and every Tron swap, settle asynchronously through NEAR Intents
and return a depositAddress.
Request body application/jsonrequired
| Name | Type | Description |
|---|---|---|
organizationIdrequired | string | |
userIdrequired | string | |
fromAddressrequired | string | |
fromTokenrequired | string | Token to sell (symbol or contract address) |
toTokenrequired | string | Token to buy (symbol or contract address) |
amountrequired | string | Amount of fromToken to swap |
chainIdrequired | string | |
toChainId | string | Destination chain id to bridge instead of swapping (optional) |
slippagePercentage | number | Max slippage in percent, 0-10; defaults to 0.7 (optional) |
noncerequired | string |
Responses
200Swap submitted
No body
400Bad request
| Name | Type | Description |
|---|---|---|
statusrequired | string | |
messagerequired | string |
401Invalid or missing X-Stamp
| Name | Type | Description |
|---|---|---|
statusrequired | string | |
messagerequired | string |
500Internal server error
| Name | Type | Description |
|---|---|---|
statusrequired | string | |
messagerequired | string |