Fee Parameters
Include these parameters in theappFees array when requesting a quote:
percentage = fee / 10,000 (so fee: 50 is 0.5%).
Each fee must be an integer. After 1Click adds its share, the combined total cannot exceed 500 bps (5%). A submitted 480 bps without an API key is rejected (480 + 25 = 505).
Public ANY_INPUT quotes cannot include appFees. Set appFees on the user-facing quotes that pay into your aggregation deposit address.
What happens to the fee you send
API key, no fee of your own: 20 bps to 1Click
OmitappFees, or send only fee: 0. 1Click charges 20 bps. USDC, USDT, and DAI pairs, and same-asset transfers across chains, are 1 bp.
API key with appFees: 50/50 split
Your fee is split 50/50 with 1Click. 1Click’s half has a 20 bps minimum (1 bp for USDC, USDT, and DAI pairs and same-asset multichain routes). You keep your half. If 1Click’s half would be under 20, 1Click still takes 20. That means any fee below 40 is charged as your half plus 20.
For example, "fee": 5 → 3 bps to you (half of 5, rounded up). 1Click’s half would be 3, which is under 20, so 20 is added. The swap is charged 23.
"fee": 21 is the same pattern: 21 is already above 20, but half of 21 is 11, which is still under 20. You get 11, 1Click takes 20, charged 31.
"fee": 40 → 20 bps to you, 20 bps to 1Click. Half meets the minimum, so nothing extra is added.
This split is the default for authenticated partners. Better fee sharing and custom conditions are available: reach out through the Partner Portal.
No API key: your fee plus 25 bps
Without an API key there is no 50/50 split. You keep the fullfee you submit, and 1Click adds 25 bps on top. Omit appFees or send fee: 0, and the swap is still charged 25 bps, all to 1Click.
For example, "fee": 50 → 50 bps to you and 25 bps to 1Click (75 charged). "fee": 5 → 5 to you and 25 to 1Click (30 charged).
How Fees Are Applied
The formulas below use the combined fee in basis points: your share plus 1Click’s share, after any split or automatic add. Fees are calculated differently depending on the swap type:- EXACT_INPUT
- EXACT_OUTPUT
- FLEX_INPUT
For EXACT_INPUT swaps, the fee is deducted from your input amount before the swap:
net_in = amount_in * (1 - p)wherep = fee / 10,000- The quote calculates
amount_outfromnet_in fee_amount = amount_in - net_in(deducted in input token)
- Input:
amount_in = 1,000,000,fee = 100(1%) - Calculation:
net_in = 1,000,000 * (1 - 0.01) = 990,000 - User deposits
1,000,000and quote calculates output from990,000 - Fee:
10,000units (in input token)
Example Quote with Fees
Example Quote with Fees
Fee Aggregation
For high-volume integrations that collect fees in many different tokens, theANY_INPUT swap type aggregates them all into a single destination asset and withdraws automatically.
To compare
ANY_INPUT with the other swap types, see the Swap Types page.How it works
- Deposits in any supported token are sent to one dedicated
depositAddressand accumulate there. - A background job continuously swaps everything to your chosen
destinationAssetand withdraws it torecipientonce the pool reaches $1,000 USD. - The
deadlineis checked only when the quote is created — after that the quote runs indefinitely, so a single quote keeps collecting and withdrawing without being refreshed. - Failed swaps retry every 5 minutes.
Set it up
Every request must include an
Authorization: Bearer YOUR_JWT_TOKEN header to receive the quote and its depositAddress. Get your API key from the Partner Dashboard. Public ANY_INPUT quote requests cannot contain appFees.1
Create an ANY_INPUT quote
Request a quote with
originAsset: "1cs_v1:any" and amount: "0" to get a dedicated depositAddress for fee collection.Example ANY_INPUT request
Example ANY_INPUT request
2
Wire the deposit address into your fees
Use the
depositAddress from the quote response as the appFees.recipient in your user quotes (see Fee Parameters). Collected fees now flow to the aggregation address and convert automatically.Track withdrawals
Use the/v0/any-input/withdrawals endpoint to retrieve withdrawal records for your deposit address.
Request:
depositAddress and sorted by timestamp (newest first). Page through results with these query parameters:
Response: