1

We issued a token on Stellar using stellar API. We need to show the price of our token on our website. How we can do that? Is this available using Stellar API?

1

Get the orderbook for the pair you want to know the price like XLM/YOURTOKEN then get the first ask and bid from the list of results, from there you can calculate the average or use the lowest asking price.

XLM/TOK

https://horizon.stellar.org/order_book?buying_asset_type=credit_alphanum4&buying_asset_code=TOK&buying_asset_issuer=GA23456&selling_asset_type=native

  • take this as an example how can i calculate? horizon.stellar.org/… – Ys3 Feb 25 '18 at 21:03
  • results.asks[0].price should give you the latest price – Kuyawa Feb 26 '18 at 1:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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