Skip to main content

API Structure

The lemon.markets API consists of a variety of different endpoints that together enable you to place orders at the stock market, manage your previous orders and portfolio, and retrieve market data conveniently. Please take a look at the graphic below to understand how our different API services are structured and related with each other.

API Structure

Let us quickly go through the different sections.

Authentication#

Most requests with our API need authentication. This works via the separate request URL:

https://auth.lemon.markets/oauth2/token

Find out more in the authentication chapter.

Paper Trading#

All requests related to paper money trading are executed against the URL:

https://paper-trading.lemon.markets/rest/v1/

State#

The paper money state is a place where unused money is store and can be reached via:

https://paper-trading.lemon.markets/rest/v1/state/

Find out more about the state here.

Spaces#

Spaces are a key concept of lemon.markets. There are 3 GET operations that deal specifically with spaces, with the base URL being:

https://paper-trading.lemon.markets/rest/v1/spaces/

Find out more about the general idea behind spaces here and dive deeper into specific endpoints here.

Orders#

All Order endpoints are always related to one specific space and can be accessed via the base URL:

https://paper-trading.lemon.markets/rest/v1/spaces/{spaced_uuid}/orders/

Find out more about the different order use cases and specific endpoints here.

Portfolio#

Similarly to orders, the portfolio is also always related to one specific space. Its endpoints can be accessed via:

https://paper-trading.lemon.markets/rest/v1/spaces/{space_uuid}/portfolio/

Find out more about the portfolio endpoints here.

Transactions#

Transactions also occur in one specific space. All transactions-related endpoints can be accessed through the base URL:

https://paper-trading.lemon.markets/rest/v1/spaces/{space_uuid}/transactions/

Find out more about the transactions endpoints here.

Market Data#

Trading Venues#

You can get specific information on trading venues through the URL:

https://paper-data.lemon.markets/v1/venues/

For detailed information on trading venues, click here

Instruments#

You can retrieve instruments through the URL:

https://paper-data.lemon.markets/v1/instruments/

For detailed information, click here

Quotes#

To receive data about the quotes of an instrument, use the following URL:

https://paper-data.lemon.markets/v1/quotes/

For detailed information on the quotes endpoint, click here.

OHLC#

Historic Data in the "Open-High-Low-Close" (OHLC) format can be accessed through the base URL:

https://paper-data.lemon.markets/v1/ohlc/{x1}

Find out more information here.

Trades#

Information about trades of specific instruments can be accessed through the request URL:

https://paper-data.lemon.markets/v1/trades/

Find more information here.