pocketful logo light
pocketful logo light

Fetch GTT Order

This API is used to fetch the details of the existing gtt orders. This method fetch details like action type, exchange, instrument token, expiry time etc.

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

Query Params

{
    "client_id" : "client_id"
}

Example Code

response = pocket.gttFetchRule() #No Parameters needs to be passed.

Response

{
    action_type: "single_order"
    client_id: "DEMO1"
    created_at: "2021-10-17 18:14:01"
    expiry_time: "2022-10-17"
    id: "673a20c8-80d5-4a0c-8a34-23f20fe79661"
    login_id: "DEMO1"
    order : {
        disclosed_qty: 0
        exchange: "NSE"
        execution_type: ""
        mode: "NEW"
        order_side: "BUY"
        order_type: "LIMIT"
        price: 3611.5
        pro_cli: "CLIENT"
        prod_type: "CNC"
        quantity: 1
        segment: "Capital"
        sl_order_price: 0
        sl_order_quantity: 0
        sl_trigger_price: 0
        square_off_price: 0
        token: 11536
        trading_symbol: "TCS-EQ"
        trailing_stop_loss: 0
        trigger_price: 3611.45
        validity: ""
        vendor_code: "00"
        reject_code: 0
        reject_reason: ""
        status: "Active"
        type: "GTTStock"
        updated_at: "2021-10-17 18:18:12"
        message: ""
        status: "success"
    }

}
KeyDescription
action_typeType of action (e.g., single order)
client_idIdentifier for the client
created_atDate and time when the order was created
expiry_timeExpiry date for the order
idUnique identifier for the order
login_idLogin identifier for the client
disclosed_qtyQuantity disclosed in the order
exchangeExchange where the order is placed
execution_typeType of execution
modeMode of the order (e.g., NEW)
order_sideSide of the order (e.g., BUY)
order_typeType of order (e.g., LIMIT)
pricePrice specified for the order
pro_cliType of client (e.g., CLIENT)
prod_typeProduct type (e.g., CNC)
quantityQuantity of shares in the order
segmentSegment of the market (e.g., Capital)
sl_order_pricePrice for stop-loss order
sl_order_quantityQuantity for stop-loss order
sl_trigger_priceTrigger price for stop-loss order
square_off_pricePrice for square-off
tokenToken associated with the order
trading_symbolSymbol for the traded security
trailing_stop_lossValue for trailing stop-loss
trigger_priceTrigger price for the order
validityValidity of the order
vendor_codeCode for the vendor
reject_codeCode for rejection reason
reject_reasonReason for rejection
statusStatus of the order (e.g., Active)
typeType of order (e.g., GTTStock)
updated_atDate and time when the order was last updated
messageMessage associated with the order

Error Response

{
    "data": {},
    "error_code": 45000,
    "message": "Error from backend: (500)-no gtt data found",
    "status": "error"
}