2

Is there a simple API to grab coin details, such as current coin price?

I have not found a suitable solution for this as of yet.

1 Answer 1

1

First, you need to decide how to defined the price of a coin, should it be:

  • The price of the most recent trade?
  • The average price of the most recent n trades?
  • A volume-weighted price of the most recent X units traded?
  • The midpoint between the current bid/ask?

You can get the data you need from Horizon:

  • Get the most recent n trades for a coin: example
  • Get the orderbook data for a coin: example

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.