Hinkal WaaS

Private Swap

Swap tokens privately inside the Hinkal private balance

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

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 executed (a bridge also returns both legs)

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