By using the fetching library, you can take advantage of many benefits such as isLoading, isError, caching, auto refreshing, mutatuion, and conditional fetching. When using ccxt, I wonder if these benefits can be maintained by using it with the fetching library.
const ccxtBitmex = new ccxt['bitmex']({
proxyUrl: PROXY_URL,
apiKey: bitmexApiKey,
secret: bitmexSecret,
})
export const fetchBalance = async () => {
return await ccxtBitmex.fetchBalance()
}
// Where is the opportunity to cut in?
If this is not possible, it would be difficult to find a reason to use the ccxt library in react. Maybe I should just access the exchange api without ccxt?