v1

latestOpenAPI 3.1.02026-07-2496304466.3 KB
Orders

Create Order

post/accounts/{account_id}/orders

Path parameters

account_idstring required

An account identifier.

Headers

LMG-Data-Privacy-Access-Principalstring required
LMG-Data-Privacy-Access-Justificationstring required
Idempotency-Keystring

An optional idempotency key to safely retry requests without creating duplicate resources. Pass a unique string (UUID recommended, max 100 characters). Keys expire after 24 hours. For full details see the Idempotency guide.

Request body

side'buy' | 'sell' required

A category to represent the side of a customer's order:

<ul> <li><code>buy</code>: Buy shares of an instrument and pay with cash. <li><code>sell</code>: Sell shares of an instrument and receive cash. </ul>
type'batch' | 'market' required

A category describing an order type:

<ul> <li><code>batch</code>: A batch order. Batch orders are collected for all customers and executed on the market as one composite order. <li><code>market</code>: A market order. Market orders are executed immediately at the current market price. </ul>
instrumentstring required

An ISIN (International Securities Identification Number) according to ISO 6166. This value uniquely identifies the instrument to be bought/sold.

amountstring

The amount of cash to invest with this order.

quantitystring

Specify the quantity of shares for the instrument to be sold.

currencystring required

An ISO 4217 three-letter currency code. Its value represents the currency for the fee, fees.base_amount and amount listed here. The only currently available currency is "EUR".

securities_accountstring

A securities account identifier. Use this property to specify the securities account for order execution and settlement. If the customer has only one securities account, this property is optional. If the customer has more than one securities account, this property is required.

Example request

{
  "currency": "EUR"
}

Response

Successful Response

idstring required

The unique identifier for this order.

side'buy' | 'sell' required

A category to represent the side of a customer's order:

<ul> <li><code>buy</code>: Buy shares of an instrument and pay with cash. <li><code>sell</code>: Sell shares of an instrument and receive cash. </ul>
type'batch' | 'market' required

A category describing an order type:

<ul> <li><code>batch</code>: A batch order. Batch orders are collected for all customers and executed on the market as one composite order. <li><code>market</code>: A market order. Market orders are executed immediately at the current market price. </ul>
workflowstring

A reference to the workflow that created this order. If the order has not been created using a workflow, the property will not be set.

instrumentstring required

An ISIN (International Securities Identification Number) according to ISO 6166. This value uniquely identifies the instrument to be bought/sold.

amountstring number

The amount of cash for a buy order, null for a sell order. NOTE: We may evolve the API to allow quantity-based buy orders and amount-based sell orders. We do not recommend to rely on the current behavior.

quantitystring number

The quantity of shares for a sell order, null for a buy order. NOTE: We may evolve the API to allow quantity-based buy orders and amount-based sell orders. We do not recommend to rely on the current behavior.

feestring number required

The fee that will be charged by lemon.markets on your behalf.

currencystring required

An ISO 4217 three-letter currency code. Its value represents the currency for the fee, fees.base_amount and amount listed here. The only currently available currency is "EUR".

securities_accountstring

A securities account identifier. This property indicates the securities account used for order execution and settlement.

Example response

{
  "currency": "EUR",
  "history": [
    {
      "timestamp": "2023-06-23T07:29:55.465000+00:00",
      "reason": "insufficient_buying_power"
    }
  ]
}