Validate 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": 21.0, \
"time_in_force": "day", \
"order_type": "limit", \
"side": "buy", \
"exchange": "auto", \
"client_order_id": "01HWYX297HG2J9V607VSY4GQ3S" \
}' 'https://api.lime.co/orders/validate'
Request example
{
"account_number": "12345678@vision",
"symbol": "BAC",
"quantity": 1,
"price": 21.0,
"time_in_force": "day",
"order_type": "limit",
"side": "buy",
"exchange": "auto",
"client_order_id": "01HWYX297HG2J9V607VSY4GQ3S"
}
Response example
{
"is_valid": false,
"validation_message": "You cannot sell more shares than your effective long position (effective long position = long position less open sell orders) using one order ticket. Please check your pending order(s) for potential outstanding duplicate order(s). Industry regulations require that two order tickets be submitted: one to sell your effective long position and one to sell your desired short position."
}
The method verifies an order and responds with the validation message if the order can not be placed at the moment. The order is not sent to market.
Request
The method uses the same request parameters as Place an order method.
Response
The method returns the following json structure:
name | type | description |
---|---|---|
is_valid | boolean | Order validation status: true or false |
validation_message | string | Optional reject reason |