TransWikia.com

Simple API to get current price of coin on stellar expert

Stellar Asked by zchristy on August 21, 2021

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.

One Answer

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

Answered by Francesco on August 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP