Comments (2)
To get the amount of SOL managed, there is https://solana.lido.fi/api/stats, but this is an internal endpoint that is intended for the staking widget only, we don’t make any stability guarantees about the response and we might rate-limit or block it if we see it being abused. To get the amount of stSOL in existence, you can use https://solana.lido.fi/api/stsol?q=totalcoins. This endpoint is stable. Note that the exchange rate is not the current ratio of stSOL supply / SOL managed, it is fixed per epoch, see also https://docs.solana.lido.fi/internals/exchange-rate.
Of course, using that data is at your own risk. You shouldn’t trust data returned by some random endpoint from some random server, it might lie to you. The best way to get the stSOL price is to run your own Solana RPC node (or commission one from somebody you trust), read the Solido instance account, and extract the exchange rate from there. (The true exchange rate used by the program is stored on-chain in the instance.)
We are working on a Typescript library that facilitates this, you can find the code for that here, but it’s a work in progress: https://github.com/ChorusOne/solido/tree/main/js. If you want to do it manually, there are some snippets here: https://docs.solana.lido.fi/development/frontend-integration.
from solido.
Thank you very much for your very detailed answer, appreciate a lot.
Have a good day.
from solido.
Related Issues (20)
- Add a service that can return historical APY HOT 1
- Backfilling historical stSOL price information HOT 3
- Limit queries to select `epoch + offset`
- Test deploying Anker program with a pre-existing mint
- [APY daemon] Make /metrics internal
- Add Expires header to APY responses HOT 1
- Add fuzzer for APY daemon HOT 1
- Cannot install Solido JS SDK by npm HOT 2
- Can not confirm tx when i use a keypair instance which import by secret key.
- Arbitrage our own `try_sell_anker_rewards` call HOT 5
- Cli: solido deposit doesn't work HOT 1
- wrong minimum_balance in get_reserve_available_balance() HOT 2
- Can't build hello world example using solido repo as external repo HOT 2
- `process_withdraw` duplicates `check_mint` check. HOT 1
- Update Solana to a more recent version
- Updating the Anker deployment
- cargo build fail HOT 1
- Why are the structs different in the rust program vs js package? HOT 4
- Deactivating stake is not exposed properly in Prometheus metrics HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solido.