Hinkal WaaS

Swap

Swap tokens from a wallet (EVM, Solana, or Tron)

POST/waas/wallet/swap
https://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

NameTypeDescription
organizationIdrequiredstring
userIdrequiredstring
fromAddressrequiredstring
fromTokenrequiredstringToken to sell (symbol or contract address)
toTokenrequiredstringToken to buy (symbol or contract address)
amountrequiredstringAmount of fromToken to swap
chainIdrequiredstring
toChainIdstringDestination chain id to bridge instead of swapping (optional)
slippagePercentagenumberMax slippage in percent, 0-10; defaults to 0.7 (optional)
noncerequiredstring

Responses

200Swap submitted

No body

400Bad request
NameTypeDescription
statusrequiredstring
One of: "error"
messagerequiredstring
401Invalid or missing X-Stamp
NameTypeDescription
statusrequiredstring
One of: "error"
messagerequiredstring
500Internal server error
NameTypeDescription
statusrequiredstring
One of: "error"
messagerequiredstring