Komnomnomnom / swigibpy

Third party Interactive Brokers Python API generated from TWS C++ API using SWIG.
http://github.com/Komnomnomnom/swigibpy/
Other
157 stars 35 forks source link

Why I cannot do reqPositions()? #52

Open hasakura511 opened 7 years ago

hasakura511 commented 7 years ago

when i do: tws.reqPositions()

it gives me this error: AttributeError: 'EPosixClientSocket' object has no attribute 'reqPositions'

When i checked the swigibpy.py reqPositions is defined in EClient and EClientSocketBase

def reqPositions(self):
    """reqPositions(EClientSocketBase self)"""
    return _swigibpy.EClientSocketBase_reqPositions(self)

when I do dir(EPosixClientSocket) its not there. Can someone please help me understand why and how to load it?

Thanks.

Out[13]: ['TwsConnectionTime', 'class', 'delattr', 'dict', 'doc', 'format', 'getattribute', 'hash', 'init', 'module', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'swig_destroy', 'weakref', 'calculateImpliedVolatility', 'calculateOptionPrice', 'cancelCalculateImpliedVolatility', 'cancelCalculateOptionPrice', 'cancelFundamentalData', 'cancelHistoricalData', 'cancelMktData', 'cancelMktDepth', 'cancelNewsBulletins', 'cancelOrder', 'cancelRealTimeBars', 'cancelScannerSubscription', 'checkMessages', 'clientId', 'eConnect', 'eDisconnect', 'exerciseOptions', 'fd', 'handleSocketError', 'isConnected', 'isInBufferEmpty', 'isOutBufferEmpty', 'isSocketOK', 'onError', 'onReceive', 'onSend', 'placeOrder', 'replaceFA', 'reqAccountUpdates', 'reqAllOpenOrders', 'reqAutoOpenOrders', 'reqContractDetails', 'reqCurrentTime', 'reqExecutions', 'reqFundamentalData', 'reqGlobalCancel', 'reqHistoricalData', 'reqIds', 'reqManagedAccts', 'reqMarketDataType', 'reqMktData', 'reqMktDepth', 'reqNewsBulletins', 'reqOpenOrders', 'reqRealTimeBars', 'reqScannerParameters', 'reqScannerSubscription', 'requestFA', 'serverVersion', 'setServerLogLevel', 'thisown']

programmingwithalex commented 6 years ago

Did you ever find a solution to this?