Treasury Wallets

Swap tokens via DEX aggregator

Executes a token swap through a DEX aggregator from the user's active wallet on the specified chain. Requires re-authentication via X-Auth-Confirm header (account password). Human users only.

post/v1/treasury/wallets/{chain}/swap

Request

  • Base URL: https://api.1claw.co
  • URL: https://api.1claw.co/v1/treasury/wallets/{chain}/swap
  • Auth: HTTP bearer

Path parameters

chainstring required

Headers

X-Auth-Confirmstring password required

Account password for re-authentication

Request body

sell_tokenstring required

Address of the token to sell (or "native" for ETH)

buy_tokenstring required

Address of the token to buy (or "native" for ETH)

sell_amountstring required

Amount to sell in token's smallest unit

Response

Swap executed

tx_hashstring required
sell_tokenstring required
buy_tokenstring required
sell_amountstring required
buy_amountstring required
chainstring required
statusstring required

Changes

No recorded changes to this operation across all 2 revisions of this API.