v1

latestOpenAPI 3.1.02026-07-2496304466.3 KB
Batch Orders

Create Batch Order

post/accounts/{account_id}/batch_orders

Path parameters

account_idstring required

An account identifier.

Headers

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

Request body

OR

Example request

{
  "side": "buy",
  "instrument": "IE00B441G979",
  "amount": "50.00",
  "currency": "EUR",
  "fee": "0.50"
}

Response

Successful Response

idstring required

The unique identifier for this batch order.

created_atstring date-time required

The timestamp of the batch order. It represents the point in time at which the batch order was created.

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>
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 amount and fee listed here. The only currently available currency is "EUR".

status'accepted' | 'canceled' | 'canceling' | 'confirmed' | 'created' | 'executed' | 'rejected' required

A category representing the state of an order:

<ul> <li><code>accepted</code> <li><code>canceled</code> <li><code>canceling</code> <li><code>confirmed</code> <li><code>created</code> <li><code>executed</code> <li><code>rejected</code> </ul>

Example response

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