Fetch Swap
Overview
fetchSwap
API is used to retrieve information about a specific swap. It allows client to specify the swap identifier to fetch the specific swap quotation with information such as the source cryptocurrency, source cryptocurrency amount, destination cryptocurrency, fiat amount and fees.
Params
The FetchSwapParams
used to initialized and perform fetchSwap
API.
- swap id: the existing swap identifier used to retrieve the specific swap quotation
Result
Code
iOS
let params = FetchSwapParams.make(swapId: ...)
swapService
.fetchSwap(with: params)
.asPublisher()
.sink { result in
// ...
}
Android
val params = FetchSwapParams(
swapId = "..."
)
conio.swapService
.fetchSwap(params)
.asFlow()
.collect {
// ...
}