SplitOrder
POST /api/v1/splitorder
Endpoint URL
This API Function Place Split Orders to the Broker
Hosted URL : POST https://imc.layr0.org/api/v1/splitorder
Sample API Request
{
"apikey": "<your_app_apikey>",
"strategy": "Test Strategy",
"exchange": "NSE",
"symbol": "YESBANK",
"action": "SELL",
"quantity": "105",
"splitsize": "20",
"pricetype": "MARKET",
"product": "MIS",
"expected_mode": "analyze",
"expected_balance_type": "sandbox",
"expected_mode_version": 7,
"request_id": "saved-example-001"
}
Sample API Response
{
"results": [
{
"order_num": 1,
"orderid": "24120900343417",
"quantity": 20,
"status": "success"
},
{
"order_num": 2,
"orderid": "24120900343419",
"quantity": 20,
"status": "success"
},
{
"order_num": 3,
"orderid": "24120900343420",
"quantity": 20,
"status": "success"
},
{
"order_num": 4,
"orderid": "24120900343418",
"quantity": 20,
"status": "success"
},
{
"order_num": 5,
"orderid": "24120900343421",
"quantity": 20,
"status": "success"
},
{
"order_num": 6,
"orderid": "24120900343416",
"quantity": 5,
"status": "success"
}
],
"split_size": 20,
"status": "success",
"total_quantity": 105
}
Parameter Description
| Parameters | Description | Mandatory/Optional | Default Value |
|---|---|---|---|
| apikey | App API key | Mandatory | - |
| strategy | Strategy name | Mandatory | - |
| exchange | Exchange code | Mandatory | - |
| symbol | Trading symbol | Mandatory | - |
| action | Action (BUY/SELL) | Mandatory | - |
| product | Product type | Optional | MIS |
| pricetype | Price type | Optional | MARKET |
| quantity | Quantity | Mandatory | - |
| price | Price | Optional | 0 |
| trigger_price | Trigger price | Optional | 0 |
| disclosed_quantity | Disclosed quantity | Optional | 0 |
Required mode metadata
Copy the current mode, balance type and version from Funds or Analyzer; the values above are illustrative. A fresh request ID identifies each ordinary operation.
| Field | Required | Meaning |
|---|---|---|
| expected_mode | Yes | Current live or analyze state |
| expected_balance_type | Yes | Current live or sandbox balance |
| expected_mode_version | Yes | Current API-key mode version |
| request_id | Yes | Caller-generated operation identifier |
Documentation metadata is prohibited in executable requests. See request validation.