The Bridge connects with Broker API for functionality such as order placement, order management and trade management. In such cases some of the Bridge features may not function, or malfunction, based on the Broker API. Also you can see API errors under the Error tab for easy management and resolution. For full details, refer to App Logs and API Logs.
Refer below list of communication between Bridge and API:
1. Login & Authentication
Firstly when you Login to API, it creates a “session” with your Broker. After login, all request made to broker API- such as order placement, net positions etc. are made using “session token”. Bridge does not process/read your login credentials . Usually, the Broker API invokes account login form in browser.
Issue 1: If the login fails for any reason, after that you will see error in message window of APIBridge.
Solution: In this case click on the error for API specific solution.
After login, the API allows to communicate during a “session”. This session automatically expires at the end of trading day. This effectively means you need to login every day to “start session”.
Issue 2 : The session may also expire if you login to API from another device. In this case, you will see error message “Invalid Session” or “Invalid Token”.
Solution : To resolve this, go to APIBridge folder, then Data folder and delete Cache.alg file. Then try fresh login to API.
2. Order Placement
Order Placement is the most critical part. Every broker has their own specific limits w.r.t. order placement such as: margin limit, price band limit, trading symbol limit, time limits etc. Also the API may give error if we place order with wrong parameters. You can see rejection reason under OrderHistory and the error in in Message window. Although you are also advised to cross-check errors with your Broker provided terminal on web or mobile.
Rate Limits
All Broker APIs have limits on the number of requests you can send per minute. Although this can be anything from 10 request per minute to 500 request per minute. The rate limits are also subject to change based on load on broker’s server. We recommend you to not send too many requests to API for order placement, modification or cancellation.
To find the exact rate limit, you need to check your Broker’s API Documentation.
3. Get Order Status
NetPositions (and Signal Rules) depend on the Order Status received from API.
Issue : If there is no information whether the order was completed or not, the NetPosition cannot be updated. MaxOpenPos feature will also not work. In such case to report this error, you can check the Error tab for technical details to report to your broker.
Solution : Firstly click on Sync Net Position button. It syncs all net positions with your broker, irrespective whether the positions were created through APIBridge or not.
4. Order Cancellation
Order Cancellation requests to API are used for automatically cancelling orders based on Signal Rules.
Issue: Signal Rules will not work if proper status is not returned by API. To report this error, you can check the Error tab for technical details to report to your broker.
Solution: Cancel orders manually using the web portal provided by your broker.
5. Get Unrealized MTM
MaxProfit and MaxLoss based on Symbol Settings work based on the Unrealized MTM received from the broker API. Urealized MTM is refreshed at time intervals of 0.5 second to 3 second depending on the rate limits of API.
If Unrealized MTM is not received from API, MaxProfit or MaxLoss may not work correctly. To resolve this error, you can check the Error tab for technical details to report to your broker.
5. Get Net Positions
Sometimes traders may like to exit trades manually. In this case, Sync Net Positions button is used to update actual net positions in APIBridge. This button requires API to get net positions.
I think you should also start adding date if release , I am not sure when you release this new version but I started getting issues from yesterday , it always gives error as Strike price is invalid error 30004 ,I am not even using any option trading . All I work is in FUT IND & STK still I get this error . Also let me know if you have any portal / Jira or other platform to log defects if we encounter any .
Finally please work on making it bit more easy interns of documentation and installation .
HI i had placed Longentry /shortentry and Stoploss using ExpertAdviser -chart trade , what happened it targeted longentery then hit SL . but its start to executed Sl more then 25 times . timeframe 1M under Niftyfuture and Bankniftyfutures..
how to stop multiple time executed