pocketful logo light
pocketful logo light

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":"<client id>",
    "execution_state":false,
    "execution_type":"NML",
    "name":"Y_Basket",
    "square_off": false
}

Parameters

FieldNameDatatypeDescription
basket_idStringRepresents the unique id of the basket.
execution_typeStringREGULARLIMIT
nameStringRepresents the name of the basket.
square_offBooleanTRUE or FALSE

Example

data = pocket.executeBasket({
    "basket_id": "9cd5fbc3-333b-4934-8d45-e692349b5ede",
    "client_id":"<client id>",
    "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"
}
FieldNameDescription
basket_idRepresents the unique id of the basket.
messageResponse message
statussuccesserror

Error Response

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