pocketful logo light
pocketful logo light

Fetch Basket

This method used to fetch details of the basket order like basketId, basket type, name, login Id etc. It displays total number of baskets created along with the added instrument details.

Endpoint: api/v1/basket/{client_id}
Method-Type: GET

Query Params

{
    "login_id" : "client_id" 
}

Example

response = pocket.fetchBasket()        # No params needs to be passed.

Response

{
        "data": [
            {
                "basketId": "723905f6-b0f6-4bf9-a4f7-b0f119d9e24f",
                "basketType": "NORMAL",
                "isExecuted": false,
                "loginId": "<client id>",
                "name": "pockbask",
                "orderType": "LIMIT",
                "orders": [
                    {
                        "orderId": "5829e63e-f83d-423f-9327-37f6c5a0c6b5",
                        "orderInfo": {
                            "triggerPrice": 0,
                            "underlyingToken": "13342",
                            "series": "EQ",
                            "userOrderId": 28483,
                            "exchange": "NSE",
                            "squareOff": false,
                            "mode": "NEW",
                            "remainingQuantity": 0,
                            "averageTradePrice": 0,
                            "tradePrice": 0,
                            "orderTag": "",
                            "orderStatusInfo": "",
                            "orderSide": "BUY",
                            "squareOffValue": 0,
                            "contractDescription": {},
                            "segment": "",
                            "clientId": "<client id>",
                            "tradingSymbol": "VAKRANGEE-EQ",
                            "rejectionCode": 0,
                            "lotSize": 0,
                            "quantity": 1,
                            "lastActivityReference": 0,
                            "nnfId": 0,
                            "proCli": "CLIENT",
                            "price": 10,
                            "orderType": "LIMIT",
                            "validity": "DAY",
                            "targetPriceType": "absolute",
                            "instrumentToken": 13342,
                            "slTriggerPrice": 0,
                            "isTrailing": false,
                            "slOrderQuantity": 0,
                            "orderEntryTime": 0,
                            "exchangeTime": 0,
                            "legOrderIndicator": null,
                            "trailingStopLoss": 0,
                            "loginId": null,
                            "omsOrderId": "",
                            "marketProtectionPercentage": 0,
                            "executionType": "REGULAR",
                            "disclosedQuantity": 0,
                            "rejectionReason": "",
                            "stopLossValue": 0,
                            "device": null,
                            "product": "CNC",
                            "slOrderPrice": 0,
                            "filledQuantity": 0,
                            "exchangeOrderId": "",
                            "deposit": 0,
                            "averagePrice": 0,
                            "spreadToken": null,
                            "orderStatus": null
                        }
                    }
                ],
                "productType": "ALL",
                "sipEligible": true,
                "sipEnabled": false
            }]
    }
Field NameDescription
basketIdUnique identifier for the basket.
basketTypeType of basket (e.g., NORMAL).
isExecutedIndicates if the basket has been executed.
loginIdIdentifier for the user’s login.
nameName of the basket.
orderTypeType of orders in the basket (e.g.,LIMIT).
ordersArray containing details of individual orders within the basket.
productTypeType of product associated with the basket (e.g., ALL).
sipEligibleIndicates if the basket is eligible for Systematic Investment Plan.
sipEnabledIndicates if the basket’s SIP is enabled.
orderIdUnique identifier for the order.
triggerPriceTrigger price for the order.
underlyingTokenToken for the underlying security.
seriesSeries for the order.
userOrderIdUser-specific identifier for the order.
exchangeExchange where the order is placed.
squareOffIndicates if square-off is enabled.
modeMode of the order.
remainingQuantityRemaining quantity for the order.
averageTradePriceAverage trade price of the order.
tradePricePrice at which the trade occurred.
orderTagTag associated with the order.
orderStatusInfoAdditional information about the order status.
orderSideSide of the order.
squareOffValueValue for square-off.
contractDescriptionDescription of the contract.
segmentSegment of the market.
clientIdIdentifier for the client.
tradingSymbolSymbol for the traded security.
rejectionCodeCode for rejection reason.
lotSizeSize of the trading lot.
quantityQuantity of shares in the order.
lastActivityReferenceReference to the last activity related to the order.
nnfIdNNF ID for the order.
proCliType of client (e.g., CLIENT).
pricePrice specified for the order.
orderTypeType of order (e.g., LIMIT).
validityValidity of the order.
targetPriceTypeType of target price (e.g., absolute).
instrumentTokenToken for the instrument.
slTriggerPriceTrigger price for stop-loss order.
isTrailingIndicates if trailing stop-loss is enabled.
slOrderQuantityQuantity for stop-loss order.
orderEntryTimeTime at which the order was entered.
exchangeTimeTime at which the order was executed by the exchange.
legOrderIndicatorIndicator for identifying leg of the order.
trailingStopLossValue for trailing stop-loss.
omsOrderIdOrder ID assigned by the order management system.
marketProtectionPercentageLimit on price deviation for order placement.
executionTypeType of execution (e.g., REGULAR).
disclosedQuantityQuantity disclosed in the order.
rejectionReasonReason for rejection.
stopLossValueValue for stop-loss.
deviceDevice used for placing the order.
productProduct type (e.g., CNC).
slOrderPricePrice for stop-loss order.
filledQuantityQuantity filled for the order.
exchangeOrderIdOrder ID assigned by the exchange.
depositDeposit amount for the order.
averagePriceAverage price of the order.

Error Response

 {
    "data": {},
    "error_code": 48001,
    "message": "`order_info` Hedge basket feature enabled only for NIFTY 50 & NIFTY BANK as underlying",
    "status": "error"
 }