Hinkal WaaS
Private Swap
Swap tokens privately inside the Hinkal private balance
POST
/waas/private-swaphttps://api.hinkal.io/waas/private-swap
Swaps one token for another inside the private balance with no public trace of the trade.
Set toChainId to a different EVM chain to bridge privately instead; the same token symbol
must exist on both chains. The fee comes out of the swap output.
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 executed (a bridge also returns both legs)
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 |