Home

Welcome to lemon.markets

It’s time for a trading infrastructure that gives you the power to build anything.
Enriched with market data from the stock market. Shipped with all-batteries-included order execution.
All in one API.
Flawless Trading Experience Icon

Flawless Trading Experience

Build your own trading strategy or application with the lemon.markets API

Get Started
Extensive Market Data Icon

Extensive Market Data

Retrieve historical market data and integrate it into your trading product.

Get Started

Explore using lemon.markets

SDK Icon

SDKs ↗

Contribute to lemon.markets with your own Software Development Kit

Dashboard Icon

Postman Collection ↗

Conveniently explore the lemon.markets API endpoint without writing code

Code Icon

API Reference ↗

Check out our Open API Specification to start building

Buy a Stock Icon

Buy a stock ↗

Find out how to place an order with the lemon.markets API

Live Streaming Icon

Live Streaming for Market Data ↗

Retrieve live prices conveniently through lemon.markets

Access historical data Icon

Access historical data ↗

Conveniently retrieve historic OHLC data, quotes and Prices

Quickstart

Wanna get started quickly and place your first Paper Money order within minutes? Then this page is for you. Below, we give you a quick overview of the steps you need to take to make your first request with the lemon.markets API. If you are interested in diving deeper: click the links in the respective sections. The process in our Quickstart Tutorial looks like this:


Show more ↘
GET/instruments
1import requests
2import json
3
4market_data_key = 'YOUR-MARKET-DATA-KEY'
5request = requests.get("https://data.lemon.markets/v1/instruments",
6          headers={"Authorization": f"Bearer {market_data_key}"})
7print(request.json())

Authentication

To use the lemon.markets API, you need to authenticate your requests with an API Key. To get an API Key, sign up on our Dashboard, verify your account and log in afterwards. We automatically provide you with a default API key, which is valid for one year. However, you also have the option to create additional API Keys with a custom expiration date in the Dashboard.


Show more ↘

Error Handling

This page is concerned with providing you with specific information on error handling. The error message will return a JSON response that contains a specific error code and error message. Find out more details on specific error codes for the Trading and Market Data API on the error codes page.


Show more ↘
Error Code
Description
unauthorized
API Key is not provided in HTTP header, cannot be decoded by backend or API Key does not exist
token_invalid
Provided API Key is revoked or user is deleted/suspended
[xxx]_not_found
The required entity xxx does not exist
internal_error
Error is thrown when something is wrong on our end.

Rate Limiting

The lemon.markets API implements rate limiting to make sure we can provide a great experience to each and every user. Find out more details about the rate limit: Its benefits for you, how it affects you and finally, how to use our API in a way that provides both you and everyone else with a great experience.


Show more ↘
HTTP Header
Description
RateLimit-Limit
Number of permitted API requests per time interval (currently: per minute).
RateLimit-Remaining
Number of permitted API requests left in this time interval.
RateLimit-Reset
Number of seconds until the current time interval ends.
Retry-After
Number of seconds until a successful response will be sent.
NOTE: Will only be returned when the HTTP status code was 429.

Trading API

In the Trading API, we provide different endpoints that allow you to build your own trading product. Find more information on the specific endpoints below.

Account

In your account, all important information about yourself are stored. Based on your account, you can, among others, deposit money to (new) spaces, withdraw money to your reference account or access all your tax-related information. Find more specific information below.


Show more ↘

Orders

Easily manage your Orders with the /orders endpoints. You can create and activate new orders, retrieve your previous orders or cancel existing orders. Find more information on all existing /orders endpoints below.


Show more ↘

Positions

After you placed a few orders, you might be interested in seeing how your Positions look like. Using the /positions endpoint, you can get in-depth information on all your positions. In general, a position is the result of an executed order. Find more information on the /positions endpoints below.


Show more ↘

Market Data

A key feature of lemon.markets is the possibility to access market data conveniently via our Market Data API. Find more information on the Market Data API endpoints below.


Instruments & Trading Venues

The Market Data API allows you to identify tradable instruments and get information on trading venues connected to the lemon.markets API. Find more information below.


Show more ↘

Historical Market Data

Using our Market Data API, you conveniently retrieve Quotes, Open-High-Low-Close (OHLC) data (M1/H1/D1) as well as Prices and Trades for a specific instrument. Find more information below


Show more ↘

Live Streaming

A key feature of lemon.markets is the possibility to access live market data conveniently via our Live Streaming API. Find more information on the Live Streaming API elements below.


Connection Setup

Using the SDK from our partner Ably, you can set up a live stream of messages from our Live Straming API.


Show more ↘
Endpoint

Live Market Data

You can use lemon.markets to stream live market data. Find more information below.


Show more ↘

Resources

We provide different resources that help you to easily get started with lemon.markets. Find more information below.


Open API Specification

If you prefer to work with OpenAPI/Swagger, we prepared Swagger files for both the Trading and the Market Data API.


Show more ↘

Changelog

Always keep up to date with our latest changes to our API, Dashboard or Mobile App. See the Changelog below.


Show more ↘

lemon.markets Resources

lemon.markets is a user-centric product that only makes sense if it is built from developers for developers. Therefore, we will always strive to provide tools and possibilites that make the experience for you (our users) even better. Below, you can find different resources that will (hopefully) improve your lemon.markets experience.


Show more ↘

Community SDKs

We believe that a great SDK should not neccesarily come from us, the company that is building the project, but instead that community members know better what functionality makes their development process more convenient and effective. Find a list of community SDKs below.


Show more ↘

Need help?

Let us solve your problems together