pocketful logo light
pocketful logo light

Cancel GTT Order

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

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

Path Params

{
    "client_id" : "<client id>",
    "id" : "e06f52ab-6cf4-492d-a014-c6e0e5843a93"
}

Parameters

Field NameData TypeDescription
idStringid of the gtt order that needs to be cancelled.

Example Code

response = pocket.gttCancelRule(
    {
        "id":"e06f52ab-6cf4-492d-a014-c6e0e5843a93"
    })

Response

{
    "status": true,
    "message": "SUCCESS",
    "errorcode": "",
    "data": {
        "id": "e06f52ab-6cf4-492d-a014-c6e0e5843a93"
    }
}
KeyDescription
statusIndicates the status of the operation.
messageDescribes the outcome of the operation.
errorcodeRepresents any error code if applicable.
data.idUnique identifier associated with the data.

Error response

{
    "data": {},
    "error_code": 45000,
    "message": "Error from backend: (500)-event id not found",
    "status": "error"
}