Cyfrin / chainlink_feeds

This gets the data from the Chainlink Price feeds in an easy way. Can use either an RPC_URL or the Chainlink Subgraph.
https://docs.chain.link/docs/using-chainlink-reference-contracts
MIT License
13 stars 6 forks source link

Using the RPC_URL can not work #3

Open mattory029 opened 3 years ago

mattory029 commented 3 years ago

1、 from chainlink_feeds.chainlink_feeds import ChainlinkFeeds cf = ChainlinkFeeds(rpc_url = "https://www.infura.com/asdfasdfasdfas") print(cf.get_latest_round_data(network='KOVAN', pair='ETH_USD')) This error occurred after running: KeyError: 'kovan'

2、NO assetPair:"USDT_ETH" ,
That's all: [{'assetPair': 'BTC/ETH', 'id': '0x0133aa47b6197d0ba090bf2cd96626eb71ffd13c'}, {'assetPair': 'DAI/ETH', 'id': '0x037e8f2125bf532f3e228991e051c8a7253b642c'}, {'assetPair': 'LEND/ETH', 'id': '0x0a2539a614e28dddd02ebf396d2611b4f7d552fc'}, {'assetPair': 'LRC/ETH', 'id': '0x174b0b72ca036b0b64f190ed83630751195d3362'}, {'assetPair': 'FTM/ETH', 'id': '0x3aafb0e5b57bb19d02fcb6656059b34d8e79471f'}, {'assetPair': 'YFI/ETH', 'id': '0x4a03707a1bfefc2836a69b1a6a6bd752270041a9'}, {'assetPair': 'SNX/ETH', 'id': '0x93d7bbf4cf42bda5bb86eadfad09271040cc10e8'}, {'assetPair': 'BAT/ETH', 'id': '0x9b4e2579895efa2b4765063310dc4109a7641129'}, {'assetPair': 'ZRX/ETH', 'id': '0xa0f9d94f060836756ffc84db4c78d097ca8c23e8'}, {'assetPair': 'BZRX/ETH', 'id': '0xb58b218365cd12ad765ba8a9f88e881d2b2a01c2'}, {'assetPair': 'REP/ETH', 'id': '0xb8b513d9cf440c1b6f5c7142120d611c94fc220c'}, {'assetPair': 'MANA/ETH', 'id': '0xc89c4ed8f52bb17314022f6c0dcb26210c905c97'}, {'assetPair': 'KNC/ETH', 'id': '0xd0e785973390ff8e77a83961efdb4f271e6b8152'}, {'assetPair': 'WOM/ETH', 'id': '0xd8f46c7e5f9a0dcfac79a79763634fce9302985f'}, {'assetPair': 'MKR/ETH', 'id': '0xda3d675d50ff6c555973c4f0424964e1f6a4e7d3'}, {'assetPair': 'USDC/ETH', 'id': '0xde54467873c3bcaa76421061036053e371721708'}, {'assetPair': 'LINK/ETH', 'id': '0xecfa53a8bda4f0c4dd39c55cc8def3757acfdd07'}, {'assetPair': 'ETH/USD', 'id': '0xf79d6afbb6da890132f9d7c355e3015f15f3406f'}]

PatrickAlphaC commented 3 years ago

Ah looks like we didn't include the config. I'll have to fix in the next release. Thank. you.

For the moment, you can just type the exact address with address=0xq245q345qwerq

mattory029 commented 3 years ago

ok