Chainlink
Realtime
Prices
Decentralized
OnChain
Display real-time prices of stocks, forex, crypto or indices using Chainlink's decentralized on-chain smart-contracts.
PriceLink is installable as a Progressive Web Application (PWA).
To understand how Chainlink oracle works - Just for fun !
Using simple Javascript and web3.js library
Get list of all supported networks
fetch('https://raw.githubusercontent.com/smartcontractkit/documentation/main/src/features/feeds/data/chains.ts')
.then((resp) => resp.text())
.then((text) => text.split('CHAINS: Chain[] =').slice(-2)[0].split('export')[0]) // keep useful data
.then((str) => ('{ data:'+str+'}').replace(/(['"])?([a-z0-9A-Z_]+)(['"])?:/g, '"$2": ').replaceAll('https": ','https:').replace(/\,(?!\s*?[\{\[\"\'\w])/g, ''))
.then(JSON.parse).then(console.log)
Returns an array of pages, each page containing an array of networks