Many thanks for the comprehensive answer
The purpose was to identify different strategies executed by different clients to track individual strategy performance. For some reason (though it theoretically provides them) I can't retrieve the clientIDs through Flex queries that I would otherwise use for this. Hence my question.
toggle quoted message
Show quoted text
------ Original Message ------
Date 28/06/2023 10:09:37
Subject Re: [ibc] IBC 3.17.0
Not really.
?
All IBC does using this feature is what you can do manually by clicking the ¡®Reset API order ID sequence¡¯ button in the API settings dialog. Clicking this results in the NextValidId() callback returning 1 for all clients that don¡¯t currently have any pending orders.
?
You can always set a particular starting point for any given client just by placing an order with that id (as long as it¡¯s higher than any id used before for that client). After you do that, NextValidId() will give you the next number. So the first time you place an order for a particular client, use the order id you want as the starting point for that client, increment the number for each subsequent order, then for each subsequent connection use the NextValidID() as the starting point and increment that.
?
Having said that, I really wouldn¡¯t recommend doing it to make different client ids use different order id ranges. What would be the point? There is no problem with different client ids placing orders with the same order ids: that¡¯s very largely the point of having client ids, they enable you to distinguish between similar things fed to/back from the API for different clients API apps.
?
And having said that, I do actually use this method to start order ids for all clients ids at 0x10000000, so that I can easily distinguish error messages relating to orders from other causes (eg from market data requests). ?Similarly I use separate id ranges for market data requests, contract requests, historical data requests etc.
?
?
Particularly interested in the ability to reset the order ID sequence at start up. Does that imply that IBC could also be used to generate specific order number ranges (or starting points) for individual clients attached to IB Gateway??
------ Original Message ------
I¡¯ve just released version 3.17.0 of IBC, which you can get here:
?
?
?
This release provides the following enhancements:
?
?
- Support for Gateway v10.22 and later. IBKR changed the format of the Gateway login dialog, resulting in earlier IBC versions failing to recognise it and therefore not completing login automatically.
?
- Fixes a problem where IBC no longer worked properly with the FIX/CTCI Gateway. See the notes for the new setting TrustedTwsApiClientIPs ?in config.ini
?
- Enables the master client id to be set automatically at startup. See the notes for the new setting OverrideTwsMasterClientID in config.ini for details.
?
- Enables the order id sequence for API orders to be reset to 1 at startup. See the notes for the new settings ResetOrderIdsAtStart and ConfirmOrderIdReset in config.ini
?
- The default for the SecondFactorAuthenticationExitInterval setting in config.ini has been increased from 40 seconds to 60 seconds. This is because starting with recent versions of TWS/Gateway, sometimes considerably more data is downloaded at startup due to the inclusion of the JxBrowser. This extra data can cause the original timeout to be exceeded.
?
If your IBC installation is working well and you do not need the enhancements listed above, you do not need to upgrade to this version.
?
To upgrade from version 3.16.2 (or a later beta version), download the relevant zip file and extract the IBC.jar and version files, overwriting the current versions. Also update your config.ini file with the new settings mentioned above. These are the only changed files.
?
To upgrade from an earlier version than 3.16.2, the safest way is to first rename your existing IBC folder (eg to IBC.old) and then create a new one. Then download the relevant zip file and extract the files, as for a new installation (as described in the User Guide). Then re-apply any changes you previously made to the following files, On Linux, remember to set execute permission on the scripts.
?
All platforms:
?
config.ini
?
Windows only
?
StartTWS.bat
StartGateway.bat
?
Linux & macOS
?
gatewaystart.sh (or gatewaystartmacos.sh)
twsstart.sh (or twsstartmacos.sh)
?
?
Richard
?