0

For example XLM = $0.3537 now

Is there any option or API&SDK script for it?

or Do I have get it from other website?

2 Answers 2

1

There is a build in DEX in Stellar and you can query the orderbooks for other assets but I guess you will find APIs by coingecko.com, coinmarketcap.com or others more convenient.

0

USD is external to Stellar, so enquiring Stellar will not work. But from the Stellar network you can get XLM/USDC rate, which you can retrieve / calculate from the order book (assuming USDC == USD)

or using https://ticker.stellar.org/ (https://www.stellar.org/developers-blog/a-new-ticker-for-the-stellar-community?locale=en) I don't know how reliable is the ticker page, I would rather use orderbook.

Or use API for coingecko.com or coinmarketcap.com, as @alpe1 advised.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.