We're very happy to announce that Stellar Development Foundation is releasing a new ticker API to provide the freshest data about Markets, Issuers and Assets on the Stellar Network.
SDF already had a long-running ticker, but its refresh rate wasn't fast enough to represent the dynamic and ever-growing network, and the data provided was only a subset of what's currently available through tools like Horizon.
The new ticker provides a backend API with the same functionality as the previous one, plus:
- New data about Markets, such as OHLC (open-high-low-close) values and 7d stats
- Orderbook statistics (number of bids, asks, spread, etc) per Market
- A list of all reasonably active Assets within the network
- A GraphQL interface to query data about specific Asset Pairs (e.g. XLM / EURT GAP5…OS2S) or aggregated ones (e.g. XLM_EUR) within an arbitrary time interval, as well as listing Assets and Issuers. If you're curious, try it out by pasting the following query here (and hit play):
What is a Ticker and why is it important?
According to Investopedia:
A stock ticker is a report of the price for certain securities, updated continuously throughout the trading session by the various stock exchanges. A “tick” is any change in price, whether that movement is up or down. A stock ticker automatically displays these ticks, along with other relevant information, like volume, that investors and traders use to stay informed about current market conditions.
In the context of the Stellar Network, a ticker provides the data associated with different trade Asset pairs (e.g. XLM and USDT), which we call Markets.
A ticker is important to give an accurate overview of the market activity at any given instant. Websites such as CoinMarketCap rely on ticker data to correctly display information about trade pairs.
How do I use the ticker?
As a backend project, the new ticker is UI-agnostic, i.e. it doesn't offer by itself a user-friendly interface for visualizing data–although we have some projects for building UIs for displaying ticker data in our roadmap.
In more technical terms, this is the new ticker's API root: https://ticker.stellar.org.
The new ticker offers two JSON endpoints:
- /assets.json: displays information about all assets available:
- /markets.json: displays 24-hour, 7-day and orderbook information about markets that were active during these periods:
The new ticker also speaks GraphQL:
- /graphql: provides a GraphQL interface for querying data
- /graphiql: provides a GraphiQL UI for exploring the GraphQL interface, so that you can try out queries from your browser
You can find more detailed documentation about the ticker endpoints here.
Can I run / tweak my own Stellar Ticker?
Yes! The ticker is an open-source project hosted on SDFs Go monorepo. It consists of a series of routines that scrape data from Horizon, and that process and store that data in a way that enables easy querying.
The README.md contains Docker quick start instructions for any developer who is interested in running / tweaking their own ticker.
This project is under active development, so please feel free to send feedback, create issues and send Pull Requests directly on the monorepo.
Edit 2019–05–21: Updated links