Start an advanced swap.
The same as startSwap, plus a JSON body for parameters that do not fit in a query string, such as a Cross-Chain Messaging payload for the destination chain.
Request
- Base URL: https://chainflip-broker.io
- URL: https://chainflip-broker.io/swap
- Auth: one of:
- API key in query parameter apiKey
- API key in header X-API-Key
Query parameters
Your partner API key. A key is required through this parameter OR the X-API-Key header; when both are present, this query parameter wins, even when it is empty, which fails validation rather than falling back to the header.
The asset to swap from.
The asset to swap to.
The address on the destination chain to swap to.
An optional override to the charged commission bps.
Maximum accepted boost fee in basis points (100th of a percent).
Minimum accepted human readable price.
Address on the source chain to which the refund will be sent, if the minimum price cannot be met.
Number of blocks after which a deposit is refunded if the minimum price cannot be met. One block corresponds to 6 seconds. Max 14400 = 24 hours. Recommended: 150.
Live price protection: how far, in percent (0 to 100, at most 2 decimals), the execution price may fall below Chainflip's oracle price; a swap below it is retried and, after retryDurationInBlocks, refunded. Use the quote's recommendedLivePriceSlippageTolerancePercent when it has one. Rejected with code live_price_protection_unavailable when either asset has no oracle price on Chainflip. When set, a stale oracle price also counts as a violation. Omit it to keep Chainflip's default protection for the pair.
The number of "sub-swaps" to perform for a DCA swap.
The delay between the "sub-swaps" of a DCA swap in number of blocks.
First optional extra affiliate ss58 address to share commission with.
First optional extra affiliate commission in basis points.
Second optional extra affiliate ss58 address to share commission with.
Second optional extra affiliate commission in basis points.
Third optional extra affiliate ss58 address to share commission with.
Third optional extra affiliate commission in basis points.
Fourth optional extra affiliate ss58 address to share commission with.
Fourth optional extra affiliate commission in basis points.
Optional provider to route the swap through. Defaults to chainflip.
Request body
Example request
{
"ccmPayload": {
"gas_budget": "100000",
"message": "0xdeadc0de"
}
}Response
A deposit address for the given swap.
Example response
{
"id": 42,
"address": "0x8127c88e8b5a92917486bc68a4b481befab12534",
"issuedBlock": 1504251,
"network": "Ethereum",
"channelId": 107,
"sourceExpiryBlock": 850819,
"explorerUrl": "https://scan.chainflip.io/channels/1504251-Ethereum-107",
"channelOpeningFeeNative": "0",
"destinationAddress": "bc1qujr7jlxeh4m20lldqh4fcsl63ff2ee6uk60g8r"
}Changes
No recorded changes to this operation across all 1 revision of this API.