You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that I can get a list of all the possible tokens to trade by calling the rest api, but I am wanting to get the token list by making calls with web3.
I was hoping for a "get_tokens" function on KyberNetworkProxy, but I'm not seeing one. Am I missing it, or do I need to make several web3 calls? I am wanting to give my program the KyberNetworkProxy address and it should connect to web3 and make some calls and then print out all the supported tokens. It looks like this will be a multi-step process.
Please join our telegram dev channel at https://t.me/KyberDeveloper
For questions on the api.
As for the contract, no get tokens function, it can be collected by reading events
The method presented above is valid.
I would add a last step.
KyberNetworkProxy.getExpectedRate(eth, token, qty)
and
KyberNetworkProxy.getExpectedRate(token, eth, qty)
to make sure the token is actually active.
Not sure what do u mean by official reserves, but to avoid getting responses with permission less reserves.
set the flag:
PERM_HINT_GET_RATE in call to get expected rate.
this way you are sure only got rate from permission-ed liquidity resources.
I see that I can get a list of all the possible tokens to trade by calling the rest api, but I am wanting to get the token list by making calls with web3.
I was hoping for a "get_tokens" function on KyberNetworkProxy, but I'm not seeing one. Am I missing it, or do I need to make several web3 calls? I am wanting to give my program the KyberNetworkProxy address and it should connect to web3 and make some calls and then print out all the supported tokens. It looks like this will be a multi-step process.
KyberNetwork = KyberNetworkProxy.kyberNetworkContract()
reserves = KyberNetwork.get_reserves()
crc = reserve.conversionRatesContract()
and thencrc.getListedTokens()
I'd also like to optionally be able to limit the call to official reserves just like the rest API can, but I'm not seeing how to do that.
The text was updated successfully, but these errors were encountered: