Start DCA Swap
start_dca_swapStart a DCA (Dollar Cost Averaging) cross-chain swap that splits into multiple sub-swaps over time. Returns the deposit address. API key is optional.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sourceAsset": "<sourceAsset>",
"destinationAsset": "<destinationAsset>",
"destinationAddress": "<destinationAddress>",
"refundAddress": "<refundAddress>",
"numberOfChunks": "<numberOfChunks>"
},
"name": "start_dca_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | No | Optional partner API key. | |
| sourceAsset | Yes | Source asset identifier (e.g., 'btc.btc', 'eth.eth', 'usdc.eth') | |
| minimumPrice | No | Optional minimum accepted price as a destination-per-source ratio (e.g., for a btc.btc to eth.eth swap, 28.5 means 1 BTC gets at least 28.5 ETH). When omitted, automatically calculated from current pool prices with 2% slippage tolerance. Set to 0 to accept any price. | |
| refundAddress | Yes | Refund address on the source chain, used if minimum price cannot be met | |
| numberOfChunks | Yes | Number of sub-swaps for DCA (Dollar Cost Averaging). Values below 1 are treated as 1. | |
| destinationAsset | Yes | Destination asset identifier (e.g., 'eth.eth', 'btc.btc', 'sol.sol') | |
| destinationAddress | Yes | Destination address on the target chain | |
| chunkIntervalBlocks | No | Optional delay between DCA sub-swaps in state-chain blocks (1 block = 6 seconds). Defaults to 2 blocks (12 seconds) when omitted or negative; 0 with more than one chunk becomes 2. A schedule longer than Chainflip's limit is shortened. | |
| livePriceSlippageTolerancePercent | No | Optional live price protection: how far, in percent (0 to 100, at most 2 decimals, e.g. 0.5), the execution price may fall below Chainflip's oracle price before a sub-swap is retried and the rest refunded. Use a quote's recommendedLivePriceSlippageTolerancePercent. When either asset has no oracle price on Chainflip, live price protection is omitted and the swap proceeds without it. When omitted, Chainflip's default protection for the pair applies. |