multiple order while placing bracket order

I’m using Fyers API v3 to automate equity trades and recently observed that when I place a bracket order (e.g., for the buy side), it gets split into multiple smaller orders. Although the main buy leg has a single order ID, the stop-loss and target legs are assigned separate order IDs. Fyers charges brokerage based on each unique order ID, which leads to higher costs.

Additionally, I need to modify the stop-loss and target orders dynamically at runtime. How can I retrieve their respective order IDs for this purpose? Also, why do these legs have different order IDs when they were all part of a single bracket order?

Lastly, if I place three separate orders—one for entry (buy) and two for exit (stop-loss and target)—would this approach behave any differently in terms of order IDs and brokerage charges?

1
4 replies