Getting error while fetching order history

Hi, I am trying to fetch data using this url = “https://api.upstox.com/v2/order/history”.
Parameter order_id and tag is not mandatory.still is getting msg in POSTMAN
{
“status”: “error”,
“errors”: [
{
“errorCode”: “UDAPI100059”,
“message”: “At least one of ‘order_id’ or ‘tag’ is required to fetch order details.”,
“propertyPath”: null,
“invalidValue”: null,
“error_code”: “UDAPI100059”,
“property_path”: null,
“invalid_value”: null
}
]
}. and i dont have any data. i am just trying to fetch order history and history candle data too using python script.

Hi @Nithya_Om
You are correct that order_id and tag are specified as optional parameters.

However, as stated in our documentation, Order history can be retrieved by utilizing either the order_id or a tag. Therefore, at least one of these parameters must be included in the URL to enable order retrieval.

For more details, please refer to: Get Order History.

If you require all orders without any filtering, please use the Get Order Book API.

Thank you!

This url not for history.https://api.upstox.com/v2/order/retrieve-all.anyways order_id I will get. i dont understand ‘tag’.can we hardcode it?

correction - order_id I will not get it