¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Fractional shares rounding issue


 

Which instrument are you trading?

I can't tell you how to find the client and server versions with ib_insync, but there is probably a way. During connect(), TWS API client indicate the [min, max] protocol level they understand, and TWS replies with its level. Levels are defined (for example):

  • for Java as MIN_VERSION and MAX_VERSION in JavaClient/com/ib/client/EClient.java
  • for Python as MIN_CLIENT_VERSION and MAX_CLIENT_VERSION in pythonclient/ibapi/server_versions.py

The required minimum client protocol level for fractional size support is 163. So I'm sure, TWS will send rounded sizes to a client (any language) that indicates a MAX_VERSION of less than 163.

The protocol level for the connected TWS is available through the EClient object.

´³¨¹°ù²µ±ð²Ô

Join [email protected] to automatically receive all group messages.