Clarification: Oracles on Secret Network

I’m trying to find oracles, or an API so that I can access Secret Network prices from a script (python).

So far I’ve found…

Secret Oracles… although the article talks more about generating random numbers than anything else.

Band Protocol on Secret Mainnet…

However I cannot find any mention of these projects on this forum. Not sure if both Secret Oracles and/or Band Protocol has since been abandoned on Secret?

What is there current/live price feed on Secret, or used by Secret defi, such as Shade?

I need to inform myself more about oracles in general… do they include an API accessible from python, or only accessible from a Secret smart contract (requiring gas fees)?

I’ve partly answered my own questions with Band’s own docs… They have a good API/access lib.

However Band’s dataset does not include any of Shade’s assets. I will ask Shade directly re oracle/price feeds (unless Shade want to answer here??)

so you want the SCRT price for a Contract on Secretnetwork?

If so you can use the Band and Ojo oracles to achieve that: https://docs.scrt.network/secret-network-documentation/development/secret-contract-fundamentals/available-native-features-modules/price-oracles

if you want it outside of your contract dApp (so just for analytics etc) you can just use any Exchange API or for example Coingecko: https://www.coingecko.com/api/documentation

if you want assets that are on Shade you should be able to query the pools directly inside your contract for their prices: GitHub - securesecrets/Secret-Network-Hackathon

feel free to dm me on telegram @ Ertemann if you want more help, we have some additional Devs on-call who are always happy to answer questions!

Close… I want to sort out price feeds for importing/using on local PC price charting, poss maintaining my own databases. Some prices are not very available anywhere, like Shade’s assets.

Thanks for that github, I also have Shade’s Discord already.
SCRT price is easy to find anywhere.

Shade uses a combination of Band protocol for the critical prices used in lending, and then coingecko for others that are more so display. You would have to write some services to get data from those places.

Just to add in here - this is an example of a Band Protocol mainet query from CLI:

secretcli q compute query secret1ezamax2vrhjpy92fnujlpwfj2dpredaafss47k ‘{“get_reference_data” : {“base_symbol” : “ETH”, “quote_symbol” : “USDC”}}’ | jq

except for the interesting function names you’ve used, std type of params.

If I look at the std Band Dataset page… There are the usual “mainstream” assets, but zero Shade assets… Or are Shade asset prices calc on the fly as a reference of / based on… other assets?

https://data.bandprotocol.com/

Also it occurs to me… I assume Oracles do not provide historical prices, just current/live prices?
If I wanted to build a complete historical database of most Secret / Shade asset prices, would I be required to basically capture any “live” price & store, thereby accumulate my own history?