/chainflip/broker/channel - Opening a Chainflip deposit channel
To initiate a swap through the CHAINFLIPor CHAINFLIP_STREAMINGproviders, a deposit channel must be opened first.
Method: POST
URL: https://api.swapkit.dev/chainflip/broker/channel
The information needed to open a channel is included inside the meta.chainflipobject of the /quoteresponse, as in the example below. The object needs to be passed to the /chainflip/broker/channelendpoint, which creates a deposit channel.
It contains a deposit address for the chain initiating the swap, where the tokens can be sent to.
"meta": {
...
"chainflip": {
"sellAsset": {
"chain": "Ethereum",
"asset": "ETH"
},
"buyAsset": {
"chain": "Bitcoin",
"asset": "BTC"
},
"destinationAddress": "357a3So9CbsNfBBgFYACGvxxS6tMaDoa1P",
"affiliateFees": [{
"brokerAddress": "cFNwtr2mPhpUEB5AyJq38DqMKMkSdzaL9548hajN2DRTwh7Mq",
"feeBps": 100
}],
"refundParameters": {
"minPrice": "0x2c166186363d48000000000",
"refundAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"retryDuration": 150
}
}
}As an example a channel can be requested as:
The response contains a depositAddresswhich funds can be sent to.
No approval is needed for this address in the case of ERC-20 tokens, and a memo is not needed either.
Here is an example integrating a /quoterequest with opening a channel:
Last updated

