There is not a function to reverse a position either via the TWS API or the Web API. However, by requesting position data, and then placing an order, you can mimic this functionality. For relevant documentation links:
TWS API:
Web API:
There is not a function to reverse a position either via the TWS API or the Web API. However, by requesting position data, and then placing an order, you can mimic this functionality. For relevant documentation links:
TWS API:
Web API: