Aggregate fees from any token into desired asset
1Click Swap — ANY_INPUT
Purpose: Aggregate fees from any supported token into one destinationAsset, then auto-withdraw once the pool hits $1,000 USD.
Wire-up (fees flow)
Create the ANY_INPUT quote → grab
depositAddress.Put that address into
appFeesfor user quotes.System auto-swaps incoming tokens to
destinationAssetand withdraws at ≥$1,000 USD.
How it works
Use
originAsset: "1cs:any"withamount: "0".Take the
depositAddressfrom the quote response and put it intoappFeesin user quotes (that’s where fees should land).Quote deadline is checked only at creation; after that the quote is valid indefinitely.
A background job continuously polls, swaps all deposits to
destinationAsset, and withdraws when the $1k threshold is reached.No refunds. If a swap attempt fails, it retries every 5 minutes (no funds returned). However it’s still suggested to add the address you control to
refundTo
Auth: You must call the Quote API with Authorization: Bearer <JWT> to receive the quote (and depositAddress).
Tip: quoteWaitingTimeMs ≈ 5000–10000 (3–4s often OK).
Create ANY_INPUT quote (example request)
ANY_INPUT Withdrawals
Endpoint
GET /any-input/withdrawals
Description
Use this endpoint to retrieve withdrawal records. Withdrawals are identified and filtered by the depositAddress parameter.
Each response contains up to 50 records, ordered by timestamp by default.
Features
Filtering: Records are retrieved by
depositAddress.Pagination: Supports pagination through standard query parameters.
Sorting: Results are sorted by
timestamp(descending by default).Limit: Maximum of 50 records per request.
ANY_INPUT Withdrawals response
Last updated