The default value of DisplaySize must be zero, not MaxInt64, when reading Order data from TWS. Otherwise if you try to send PlaceOrder request with the same fields as the received order, except for the parameter to modify, you'll get Unable to parse data. java.lang.NumberFormatException: For input string: "9223372036854775807" error from TWS. It's because TWS can't parse DisplaySize value that is equal to MaxInt64. Actually, when you call NewOrder method, the default value of DisplaySize is zero, not MaxInt64. Why it should be different, when you read the order from TWS?
The default value of DisplaySize must be zero, not MaxInt64, when reading Order data from TWS. Otherwise if you try to send PlaceOrder request with the same fields as the received order, except for the parameter to modify, you'll get
Unable to parse data. java.lang.NumberFormatException: For input string: "9223372036854775807"
error from TWS. It's because TWS can't parse DisplaySize value that is equal to MaxInt64. Actually, when you call NewOrder method, the default value of DisplaySize is zero, not MaxInt64. Why it should be different, when you read the order from TWS?