Skip to content

Execute Basket

This method is used to execute the orders of the instruments present in the basket. All the orders are placed in one go and there is no need to place individual orders

Endpoint: api/v1/orders/kart
Method-Type: POST

Request packet

{
    "basket_id": "9cd5fbc3-333b-4934-8d45-e692349b5ede",
    "client_id":"YG1234",
    "execution_state":false,
    "execution_type":"NML",
    "name":"Y_Basket",
    "square_off": false
}

Parameters

FieldName Datatype Description
basket_id String Represents the unique id of the basket.
execution_type String REGULAR, LIMIT, MARKET
name String Represents the name of the basket.
square_off Boolean TRUE or FALSE

Example

data = pocket.executeBasket({
    "basket_id": "9cd5fbc3-333b-4934-8d45-e692349b5ede",
    "client_id":"YG1234",
    "execution_state":False,
    "execution_type":"NML",
    "name":"Y_Basket",
    "square_off": False
})

Response

{

  "data": {
    "data": {
    "basket_id": "20211017-4",
    "message": "basket Order Placed Successfully"
    }
  },
    "message": "Order place successfully",
    "status": "success"
}
FieldName Description
basket_id Represents the unique id of the basket.
message Response message
status success, error

Error Response

{
    "data":{},
    "error_code":49002,
    "message":"instrument `SBIN-EQ` is disabled for hedging",
    "status":"error"
}