Responses from SDK¶
Response_ListAvailableBrokers
pydantic-model
¶
Bases: _BaseResponse
Response model for listing available brokers
Show JSON schema:
JSON
{
"$defs": {
"Broker": {
"description": "Broker to be used in the execution module",
"enum": [
"aliceblue",
"angel",
"choice",
"dhan",
"fivepaisa",
"fivepaisa-xts",
"fyers",
"mo",
"mstock",
"nuvama",
"sharekhan",
"upstox",
"zerodha"
],
"title": "Broker",
"type": "string"
},
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"ResponseListAvailableBrokers_Type": {
"properties": {
"access_token_login": {
"items": {
"anyOf": [
{
"$ref": "#/$defs/Broker"
},
{
"type": "string"
}
]
},
"title": "Access Token Login",
"type": "array"
},
"oauth_login": {
"items": {
"anyOf": [
{
"$ref": "#/$defs/Broker"
},
{
"type": "string"
}
]
},
"title": "Oauth Login",
"type": "array"
}
},
"required": [
"access_token_login",
"oauth_login"
],
"title": "ResponseListAvailableBrokers_Type",
"type": "object"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"description": "Response model for listing available brokers",
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"$ref": "#/$defs/ResponseListAvailableBrokers_Type"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "Response_ListAvailableBrokers",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[ResponseListAvailableBrokers_Type]
)
Response_ListMappedBrokers
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"Broker": {
"description": "Broker to be used in the execution module",
"enum": [
"aliceblue",
"angel",
"choice",
"dhan",
"fivepaisa",
"fivepaisa-xts",
"fyers",
"mo",
"mstock",
"nuvama",
"sharekhan",
"upstox",
"zerodha"
],
"title": "Broker",
"type": "string"
},
"BrokerAccountValidity": {
"description": "Broker Account Validity to be used in the execution module",
"enum": [
"-2",
"-1",
"0"
],
"title": "BrokerAccountValidity",
"type": "string"
},
"BrokerRole": {
"description": "BrokerRole to be used in the execution module",
"enum": [
"owner",
"reader",
"executor"
],
"title": "BrokerRole",
"type": "string"
},
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"ListBrokersIndividualBrokerData_Type": {
"properties": {
"margin": {
"$ref": "#/$defs/ResponseListBrokersApiIndividualDataMargin"
},
"name": {
"title": "Name",
"type": "string"
},
"role": {
"$ref": "#/$defs/BrokerRole"
},
"valid": {
"title": "Valid",
"type": "boolean"
},
"validity": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"$ref": "#/$defs/BrokerAccountValidity"
}
],
"title": "Validity"
}
},
"required": [
"margin",
"name",
"role",
"valid",
"validity"
],
"title": "ListBrokersIndividualBrokerData_Type",
"type": "object"
},
"ResponseListBrokersApiIndividualDataMargin": {
"properties": {
"dt": {
"title": "Dt",
"type": "string"
},
"NSE-FO": {
"title": "Nse-Fo",
"type": "string"
}
},
"required": [
"dt",
"NSE-FO"
],
"title": "ResponseListBrokersApiIndividualDataMargin",
"type": "object"
},
"ResponseListMappedBrokers_Type": {
"properties": {
"brokers": {
"additionalProperties": {
"additionalProperties": {
"$ref": "#/$defs/ListBrokersIndividualBrokerData_Type"
},
"type": "object"
},
"propertyNames": {
"$ref": "#/$defs/Broker"
},
"title": "Brokers",
"type": "object"
},
"version": {
"title": "Version",
"type": "integer"
},
"next_margin": {
"format": "date-time",
"title": "Next Margin",
"type": "string"
}
},
"required": [
"brokers",
"version",
"next_margin"
],
"title": "ResponseListMappedBrokers_Type",
"type": "object"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"$ref": "#/$defs/ResponseListMappedBrokers_Type"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "Response_ListMappedBrokers",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[ResponseListMappedBrokers_Type]
)
Response_AddBroker
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
}
},
"required": [
"success"
],
"title": "Response_AddBroker",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[str]
)
PayloadDhanBrokerLoginCredentials_Type
¶
PayloadChoiceBrokerLoginCredentials_Type
¶
Response_DeleteBroker
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
}
},
"required": [
"success"
],
"title": "Response_DeleteBroker",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[str]
)
Response_ListOrders
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"Broker": {
"description": "Broker to be used in the execution module",
"enum": [
"aliceblue",
"angel",
"choice",
"dhan",
"fivepaisa",
"fivepaisa-xts",
"fyers",
"mo",
"mstock",
"nuvama",
"sharekhan",
"upstox",
"zerodha"
],
"title": "Broker",
"type": "string"
},
"BrokerClient": {
"properties": {
"broker": {
"$ref": "#/$defs/Broker"
},
"client_id": {
"title": "Client Id",
"type": "string"
}
},
"required": [
"broker",
"client_id"
],
"title": "BrokerClient",
"type": "object"
},
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"OrderBuySell": {
"description": "Order Buy Sell to be used in the execution module",
"enum": [
"b",
"s"
],
"title": "OrderBuySell",
"type": "string"
},
"OrderProductType": {
"description": "Order Product Type to be used in the execution module",
"enum": [
"intraday",
"nrml"
],
"title": "OrderProductType",
"type": "string"
},
"OrderStatus": {
"description": "Order Status to be used in the execution module",
"enum": [
"cancelled",
"completed",
"partial",
"pending",
"failed",
"placed",
"rejected",
"transit"
],
"title": "OrderStatus",
"type": "string"
},
"OrderType": {
"description": "Order Type to be used in the execution module",
"enum": [
"limit",
"market",
"sll",
"slm"
],
"title": "OrderType",
"type": "string"
},
"ResponseOrderListingData_Type": {
"description": "sample\n```\n{\n 'broker_client': 'mstock,MA6232931',\n 'b_orderid': '33422505073382',\n 'e_orderid': 1600000075847609,\n 'userid': 522521,\n 'qty': 75,\n 'qty_filled': 0,\n 'price': 1.2,\n 'stop_price': 0.0\n 'buy_sell': execution_enums.Order,\n 'instrument': 'NIFTY:15-May-25:c:25500',\n 'order_type': execution_enums.OrderType,\n 'product_type': 'nrml',\n 'order_status': 'pending',\n 'q_usec': 1746596369775443,\n 'b_usec_update': 1746596370000000,\n 'o_ctr': 1,\n}",
"properties": {
"broker_client": {
"$ref": "#/$defs/BrokerClient"
},
"b_orderid": {
"title": "B Orderid",
"type": "string"
},
"e_orderid": {
"title": "E Orderid",
"type": "string"
},
"userid": {
"title": "Userid",
"type": "integer"
},
"qty": {
"title": "Qty",
"type": "integer"
},
"qty_filled": {
"title": "Qty Filled",
"type": "integer"
},
"price": {
"title": "Price",
"type": "number"
},
"stop_price": {
"title": "Stop Price",
"type": "number"
},
"buy_sell": {
"$ref": "#/$defs/OrderBuySell"
},
"instrument": {
"title": "Instrument",
"type": "string"
},
"order_type": {
"$ref": "#/$defs/OrderType"
},
"product_type": {
"$ref": "#/$defs/OrderProductType"
},
"order_status": {
"$ref": "#/$defs/OrderStatus"
},
"q_usec": {
"format": "date-time",
"title": "Q Usec",
"type": "string"
},
"b_usec_update": {
"format": "date-time",
"title": "B Usec Update",
"type": "string"
},
"o_ctr": {
"title": "O Ctr",
"type": "integer"
}
},
"required": [
"broker_client",
"b_orderid",
"e_orderid",
"userid",
"qty",
"qty_filled",
"price",
"stop_price",
"buy_sell",
"instrument",
"order_type",
"product_type",
"order_status",
"q_usec",
"b_usec_update",
"o_ctr"
],
"title": "ResponseOrderListingData_Type",
"type": "object"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ResponseOrderListingData_Type"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
}
},
"required": [
"success"
],
"title": "Response_ListOrders",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[list[ResponseOrderListingData_Type]]
)
Response_PlaceOrder
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"Broker": {
"description": "Broker to be used in the execution module",
"enum": [
"aliceblue",
"angel",
"choice",
"dhan",
"fivepaisa",
"fivepaisa-xts",
"fyers",
"mo",
"mstock",
"nuvama",
"sharekhan",
"upstox",
"zerodha"
],
"title": "Broker",
"type": "string"
},
"BrokerClient": {
"properties": {
"broker": {
"$ref": "#/$defs/Broker"
},
"client_id": {
"title": "Client Id",
"type": "string"
}
},
"required": [
"broker",
"client_id"
],
"title": "BrokerClient",
"type": "object"
},
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"OrderBuySell": {
"description": "Order Buy Sell to be used in the execution module",
"enum": [
"b",
"s"
],
"title": "OrderBuySell",
"type": "string"
},
"OrderStatus": {
"description": "Order Status to be used in the execution module",
"enum": [
"cancelled",
"completed",
"partial",
"pending",
"failed",
"placed",
"rejected",
"transit"
],
"title": "OrderStatus",
"type": "string"
},
"ResponsePlaceOrderIndividualLeg_Type": {
"description": "sample\n```\n{\n \"b_orderid\": \"ATQOU00005F5\",\n \"qty\": 75,\n \"buy_sell\": \"b\",\n \"price\": 0.05\n}",
"properties": {
"b_order_id": {
"title": "B Order Id",
"type": "string"
},
"qty": {
"title": "Qty",
"type": "integer"
},
"buy_sell": {
"$ref": "#/$defs/OrderBuySell"
},
"price": {
"title": "Price",
"type": "number"
}
},
"required": [
"qty",
"buy_sell",
"price"
],
"title": "ResponsePlaceOrderIndividualLeg_Type",
"type": "object"
},
"ResponsePlaceOrders_Type": {
"description": "sample\n```\n{\n 'success': bool,\n 'ref_id': 8,\n 'q_usec': 1747905016476938, # micro seconds\n 'orders': {\n BrokerClient_Pydantic: {\n \"placed\": {\n \"NIFTY:26-Jun-25:c:26500\": [\n ResponsePlaceOrderIndividualLeg_Type\n ]\n },\n \"failed\": {\n \"NIFTY:26-Jun-25:c:26500\": [\n {\n \"qty\": 75,\n \"buy_sell\": \"b\",\n \"price\": 0.01\n }\n ]\n }\n }\n }\n}",
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"ref_id": {
"title": "Ref Id",
"type": "integer"
},
"q_usec": {
"format": "date-time",
"title": "Q Usec",
"type": "string"
},
"orders": {
"additionalProperties": {
"additionalProperties": {
"additionalProperties": {
"items": {
"$ref": "#/$defs/ResponsePlaceOrderIndividualLeg_Type"
},
"type": "array"
},
"type": "object"
},
"propertyNames": {
"$ref": "#/$defs/OrderStatus"
},
"type": "object"
},
"propertyNames": {
"$ref": "#/$defs/BrokerClient"
},
"title": "Orders",
"type": "object"
}
},
"required": [
"success",
"ref_id",
"q_usec",
"orders"
],
"title": "ResponsePlaceOrders_Type",
"type": "object"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"$ref": "#/$defs/ResponsePlaceOrders_Type"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "Response_PlaceOrder",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[ResponsePlaceOrders_Type]
)
Response_ModifyOrder
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
}
},
"required": [
"success"
],
"title": "Response_ModifyOrder",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[str]
)
Response_CancelOrders
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"ResponseCancelOrders_Type": {
"description": "sample\n```\n{\n 'success': bool,\n 'ref_id': 8\n}",
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"ref_id": {
"title": "Ref Id",
"type": "integer"
}
},
"required": [
"success",
"ref_id"
],
"title": "ResponseCancelOrders_Type",
"type": "object"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"$ref": "#/$defs/ResponseCancelOrders_Type"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "Response_CancelOrders",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[ResponseCancelOrders_Type]
)
Response_CancelAllOrders
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"ResponseCancelOrders_Type": {
"description": "sample\n```\n{\n 'success': bool,\n 'ref_id': 8\n}",
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"ref_id": {
"title": "Ref Id",
"type": "integer"
}
},
"required": [
"success",
"ref_id"
],
"title": "ResponseCancelOrders_Type",
"type": "object"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"$ref": "#/$defs/ResponseCancelOrders_Type"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "Response_CancelAllOrders",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[ResponseCancelOrders_Type]
)
PayloadGetPositions_Type
¶
Response_GetPositions
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"Broker": {
"description": "Broker to be used in the execution module",
"enum": [
"aliceblue",
"angel",
"choice",
"dhan",
"fivepaisa",
"fivepaisa-xts",
"fyers",
"mo",
"mstock",
"nuvama",
"sharekhan",
"upstox",
"zerodha"
],
"title": "Broker",
"type": "string"
},
"BrokerClient": {
"properties": {
"broker": {
"$ref": "#/$defs/Broker"
},
"client_id": {
"title": "Client Id",
"type": "string"
}
},
"required": [
"broker",
"client_id"
],
"title": "BrokerClient",
"type": "object"
},
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"OrderProductType": {
"description": "Order Product Type to be used in the execution module",
"enum": [
"intraday",
"nrml"
],
"title": "OrderProductType",
"type": "string"
},
"ResponsePositionsAccountwiseListing_Type": {
"description": "sample\n```\n{\n 'instrument': 'NIFTY:15-May-25:c:25200',\n 'product_type': 'nrml',\n 'buy_qty': 75,\n 'buy_t_value': 581.25,\n 'sell_qty': 75,\n 'sell_t_value': 570\n 'p_ctr': 3, # TODO same logic as o_ctr, Check whether position data coming on order updates ws (This will come once order got completed)\n}",
"properties": {
"instrument": {
"title": "Instrument",
"type": "string"
},
"product_type": {
"$ref": "#/$defs/OrderProductType"
},
"buy_qty": {
"title": "Buy Qty",
"type": "integer"
},
"buy_t_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "number"
}
],
"title": "Buy T Value"
},
"sell_qty": {
"title": "Sell Qty",
"type": "integer"
},
"sell_t_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "number"
}
],
"title": "Sell T Value"
},
"p_ctr": {
"title": "P Ctr",
"type": "integer"
}
},
"required": [
"instrument",
"product_type",
"buy_qty",
"buy_t_value",
"sell_qty",
"sell_t_value",
"p_ctr"
],
"title": "ResponsePositionsAccountwiseListing_Type",
"type": "object"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"additionalProperties": {
"items": {
"$ref": "#/$defs/ResponsePositionsAccountwiseListing_Type"
},
"type": "array"
},
"propertyNames": {
"$ref": "#/$defs/BrokerClient"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
}
},
"required": [
"success"
],
"title": "Response_GetPositions",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[dict[BrokerClient, list[ResponsePositionsAccountwiseListing_Type]]]
)
Response_GetPositionsCombined
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"OrderProductType": {
"description": "Order Product Type to be used in the execution module",
"enum": [
"intraday",
"nrml"
],
"title": "OrderProductType",
"type": "string"
},
"ResponsePositionsCombinedListing_Type": {
"description": "sample\n```\n{\n 'instrument': 'NIFTY:15-May-25:c:25200',\n 'product_type': 'nrml',\n 'buy_qty': 75,\n 'buy_t_value': 581.25,\n 'sell_qty': 75,\n 'sell_t_value': 570\n}",
"properties": {
"instrument": {
"title": "Instrument",
"type": "string"
},
"product_type": {
"$ref": "#/$defs/OrderProductType"
},
"buy_qty": {
"title": "Buy Qty",
"type": "integer"
},
"buy_t_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "number"
}
],
"title": "Buy T Value"
},
"sell_qty": {
"title": "Sell Qty",
"type": "integer"
},
"sell_t_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "number"
}
],
"title": "Sell T Value"
}
},
"required": [
"instrument",
"product_type",
"buy_qty",
"buy_t_value",
"sell_qty",
"sell_t_value"
],
"title": "ResponsePositionsCombinedListing_Type",
"type": "object"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ResponsePositionsCombinedListing_Type"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
}
},
"required": [
"success"
],
"title": "Response_GetPositionsCombined",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[list[ResponsePositionsCombinedListing_Type]]
)
Response_GetOrderLogs
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
}
},
"required": [
"success"
],
"title": "Response_GetOrderLogs",
"type": "object"
}
Fields:
Response_GetBrokerWebsocketConnectionStatus
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"ResponseBrokerWsConnStatus_Type": {
"description": "Sample\n```\n{\n \"ts_ping\": dt.datetime,\n \"ts_msg\": dt.datetime,\n \"ts_conn\": dt.datetime,\n}",
"properties": {
"ts_ping": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"title": "Ts Ping"
},
"ts_msg": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"title": "Ts Msg"
},
"ts_conn": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"title": "Ts Conn"
}
},
"required": [
"ts_ping",
"ts_msg",
"ts_conn"
],
"title": "ResponseBrokerWsConnStatus_Type",
"type": "object"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"$ref": "#/$defs/ResponseBrokerWsConnStatus_Type"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "Response_GetBrokerWebsocketConnectionStatus",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[ResponseBrokerWsConnStatus_Type]
)
Response_BrokerWebsocketReConnect
pydantic-model
¶
Bases: _BaseResponse
Show JSON schema:
JSON
{
"$defs": {
"ErrorCodes": {
"enum": [
"QE-1",
"QE-2",
"QE-3",
"QE-API-1",
"QE-API-2",
"QE-API-3",
"QE-EX-1",
"QE-EX-2",
"QE-EX-3",
"QE-EX-4",
"QE-EX-5",
"QE-EX-6",
"QE-EX-7",
"QE-EX-8",
"QE-EX-9",
"QE-EX-10",
"QE-EX-WS-1",
"QE-EX-WS-2",
"QE-SDK-1"
],
"title": "ErrorCodes",
"type": "string"
},
"Response_Error": {
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/ErrorCodes"
},
{
"type": "null"
}
],
"default": null
},
"msg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Msg"
}
},
"title": "Response_Error",
"type": "object"
}
},
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/Response_Error"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Body"
}
},
"required": [
"success"
],
"title": "Response_BrokerWebsocketReConnect",
"type": "object"
}
Fields:
-
success
(bool
) -
error
(Optional[Response_Error]
) -
body
(Optional[str]
)