Skip to content

Commit 467ed7a

Browse files
committed
include both _name and _dataname
1 parent bb0e3f8 commit 467ed7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

alpaca_backtrader_api/alpacastore.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ def _t_account(self):
543543

544544
def order_create(self, order, stopside=None, takeside=None, **kwargs):
545545
okwargs = dict()
546-
okwargs['symbol'] = order.data._name
546+
okwargs['symbol'] = order.data._name if order.data._name else order.data._dataname
547547
okwargs['qty'] = abs(int(order.created.size))
548548
okwargs['side'] = 'buy' if order.isbuy() else 'sell'
549549
okwargs['type'] = self._ORDEREXECS[order.exectype]

0 commit comments

Comments
 (0)