Open james1627 opened 2 years ago
`
def set_symbol(self, symbol: str):
"""Sets the orders instrument.
Can be viewed at obj.instrument
"""
if len(symbol) > 15:
try:
# Extract the symbol
underlying = option_symbol(symbol)
# Extract strike price
strike = option_strike(symbol)
# Extract expiration date
exp_date = option_maturity(symbol)
# Extract
callput = option_callput(symbol)
# Wrap it up and spank it on the bottom!
self.instrument = Option(
direction=callput,
underlying=underlying,
exp_date=exp_date,
strike=strike,
)
except:
raise
else:
self.instrument = Stock(symbol=symbol)`
found it just a missing else. should be a simple push for you guys
It does however look like the PosEfct="O" is missing, might just need to update convert_buysell
The fixml changed for options orders and I have been getting the error:
ally.exception.ExecutionException: This symbol is not valid for this request
when submitting with py ally the fixml should be:instead of the given:
according to the link: [https://www.ally.com/api/invest/documentation/trading/]