Skip to main content

Place an order

  -X POST
--header 'Content-Type: application/json'
--header 'Accept: application/json'
--header 'Authorization: Bearer {token here}'
-d '{ \
"account_number": "12345678@vision", \
"symbol": "BAC", \
"quantity": 1, \
"price": 20, \
"time_in_force": "day", \
"order_type": "limit", \
"side": "buy", \
"exchange": "Auto" \
}' 'https://api.lime.co/orders/place'

Request example

{
"account_number": "12345678@vision",
"symbol": "BAC",
"quantity": 1,
"price": 20.0,
"time_in_force": "day",
"order_type": "limit",
"side": "buy",
"exchange": "Auto"
}

Response example

{
"success": true,
"data": "201710041710516537"
}

The order is accepted immediately, the method returns assigned id. The order is still validated with exactly same logic as in Validate an order method and is sent to market on successful validation pass. Otherwise, the order will reject asynchronously and you can query its status by calling the Get order details method.

Request

nametypedescription
account_numberstringRequired. The account number in the format of 123456578@vision
symbolstringRequired. The security symbol, stocks in CQS or CMS convention, options in OCC
quantitynumberRequired. Positive integer, number of shares or contracts
pricenumberRequired. Positive decimal if the order_type is limit
time_in_forcestringOptional, day by default. Specifies how long the order remains in effect. Possible values are day - regular hours, ext - extended hours. More values to come
order_typestringOptional, market by default. Possible values are market, limit. More values to come
sidestringOptional, buy by default. Available values are buy and sell. buy opens long position, sell closes the position. The system will detemine the proper side according to the current position, but you are still required to place two orders to revert the position from long to short and the other way around.
exchangestringOptional, Auto by default. The routing instructions for order execution. The actual values are dynamic and depend on the account settings. Use Get account routes method to get a list of all available routes and their properties

Response

nametypedescription
successbooleanPlace order status: true or false
datastringThe id assigned to the order