Fixed rate sets the rate but doesn’t cover the provider’s fees. To deliver a fixed-rate output without provider fees, also turn on swap fee sponsorship, and set
fixedRate and feeSponsorship together on each quote.- Turnkey has enabled fixed rate for your parent organization. Early access is invite-only: reach out to your Turnkey contact with your parent organization ID.
- Only the parent organization can turn it on and change the spend limit. Sub-organizations use their parent’s settings.
Set the spend limit
From the parent organization, submitACTIVITY_TYPE_UPSERT_SWAP_FIXED_RATE_LIMIT_CONFIG with enabled: true. Like swap fee sponsorship, fixed rate has an organization-wide limit and a sub-organization limit over a rolling time window, set separately from the swap fee sponsorship limits.
Turning fixed rate on or off needs root quorum approval. Changing the limits while it’s on follows your policies.
Request a fixed-rate quote
SubmitACTIVITY_TYPE_CREATE_SWAP_QUOTE_V3 with fixedRate: true, and usually feeSponsorship: true. Both tokens must be stablecoins supported for fixed rate. Same-chain and cross-chain routes both work. Everything else is the same as a regular quote.
With the Go SDK, use Client.CreateSwapQuoteV3. The TypeScript SDK’s createSwapQuote sends V2; until it adds V3, submit the activity with client.request, as in Enable Swaps.
A fixed-rate quote comes back with fixedRate: true and estimatedFixedRateAdjustmentUsd, the estimated USD cost of the fixed rate. Positive is billed to you; negative is an earning credited against your transaction management charges. It is informational; the final amount is settled after the swap completes.
Execute the quote
Execute the quote withACTIVITY_TYPE_EXECUTE_SWAP_V3 as for any quote. The quote binds the fixed rate, so nothing else changes.
Check usage
get_swap_sponsorship_usage returns the fixed-rate spend limit under fixedRate. Fixed-rate usageUsd nets earnings against costs within the window and never goes below zero, so earnings restore capacity up to the limit. Pending swaps are not reserved, so what is left does not account for swaps still in progress.
Errors
A quote that requests a fixed rate fails, rather than falling back to the market rate, when:
A quote is also rejected when the spend limit is turned off, or when the swap’s estimated cost would exceed what is left in the window.
Next steps
- Swap Fee Sponsorship: pay the provider’s fees on behalf of your users.
- Execute a swap: the signing activity that runs the swap end-to-end.
- Track swap status: same-chain vs. cross-chain polling.