Market Data / Overview and API Structure

Overview and API Structure

We are in open beta

Everything related to lemon.markets is still very much work in progress. Please bear with us that some things are still a bit buggy or functionality is missing. We are really grateful if you share your feedback on Slack as this helps make lemon.markets a product we all want to use. Thank you :)

A key feature of lemon.markets is the possibility to access historical as well as real-time market data conveniently via our Market Data API. This chapter is concerned with giving you an overview of all aspects regarding market data.

The Market Data API can be reached via the URL:

https://data.lemon.markets/v1/

In general, the structure of the Market Data API is designed like this:




Market Data API Structure


Use our Postman Collection to conveniently try out all endpoints in the Market Data API

Run in Postman

On average, we allow 100 requests per minute, with an allowed burst to 300 requests per minute. After that, we make a hard cut. Please note that we have separate Rate Limits for the Trading and the Market Data API, meaning that one rate limit does not influence the other.

Pagination in the market data API works with the two parameters limit and page.

With limit, you define the number of results you want to display per page. With page you can go to a specific results page. So imagine you would have 80 results in total, and would define a limit of 10 and that you want to see page 2. This would return you the results 11-20.

For historical market data, you additonally have the possibility to define a time range, using the query parameters from and to. If the API returns more results than the limit, results are displayed using pagination.

Refer to the Market Data Section for specific information.

If you use our Market Data API, you will relatively quickly make use of the possibility to define a specific date or a specific time range, e.g. to get the OHLC data for your favourite stock from the last week of August. You can do so by specifying the from and to query parameters in the Quotes, OHLC, and Trades endpoint (see a more detailed description below at the respective endpoint section).

In general, you have two options to do so.

  • By specifying an ISO Date
  • By specifying an epoch timestamp

Please note that you need to specify the timestamp in milliseconds for both the epoch and the ISO version. Let's look at an example for both options.

If you prefer to use the ISO date format, you would specifiy your query parameter through:

from=2021-01-01T00:01:00.000

If you wanted to define the epoch timestamp for January 1st 2021, 12:01 am, you would do that through:

from=1609455601000

You can easily specify the numbers format you want the API to return.

For that, use the Query Parameter decimals and set true if you want the API to return everything in decimals or false if you want it to return Integers. See an example below.

https://data.lemon.markets/v1/ohlc/h1/?isin=US88160R1014&&decimals=true/