I tried to look up some common trading pairs in the Ethereum DeFi ecosystem, such as USDC/WETH
but did not successfully get any rates back:
Errors:
Asset: Asset { symbol: "USDC", class: Cryptocurrency }, Error: Failed to retrieve rate from Coinbase: IC0503: Error from Canister uf6dk-hyaaa-aaaaq-qaaaq-cai: Canister called `ic0.trap` with message: Failed to deserialize JSON: error: invalid type: map, expected a sequence at line 1 column 0 response: {"message":"Coinbase Pro API is deprecated."}.
Asset: Asset { symbol: "USDC", class: Cryptocurrency }, Error: Failed to retrieve rate from GateIo: Connecting to api.gateio.ws failed: Request failed direct connect client error (Connect) and connect through socks client error (Connect)
Asset: Asset { symbol: "USDC", class: Cryptocurrency }, Error: Failed to retrieve rate from Poloniex: IC0503: Error from Canister uf6dk-hyaaa-aaaaq-qaaaq-cai: Canister called `ic0.trap` with message: Failed to deserialize JSON: error: invalid type: map, expected a sequence at line 1 column 0 response: { "code" : 24101, "message" : "Invalid symbol!" }.
[KuCoin] Failed to deserialize JSON: error: missing field `data` at line 1 column 51 response: {"msg":"Unsupported trading pair.","code":"400100"}
… and some more.
Maybe the XRC canister should not be used for these kinds of pairs?
I guess WETH
is not a super common token to use on centralised exchanges. It is the #14 of all tokens though, according to Coingecko. So, it seems reasonable the XRC canister should support it?