Getting this error with stocks sometimes and cryptos consistently. Even though the position info shows qty as available, it is unable to place a sell order to close.
Unable to place take profit order for BCHUSD because {“code”:40010001,“message”:“qty or notional is required”}
{ ‘asset_class’: <AssetClass.CRYPTO: ‘crypto’>,
‘asset_id’: UUID(‘4d752b8a-3245-45ca-a407-336c6baca7e6’),
‘asset_marginable’: False,
‘avg_entry_price’: ‘441.58’,
‘avg_entry_swap_rate’: None,
‘change_today’: ‘0.0045827829782347’,
‘cost_basis’: ‘9.974774’,
‘current_price’: ‘437.32’,
‘exchange’: <AssetExchange.CRYPTO: ‘CRYPTO’>,
‘lastday_price’: ‘435.325’,
‘market_value’: ‘9.878545’,
‘qty’: ‘0.022588826’,
‘qty_available’: ‘0.022588826’,
‘side’: <PositionSide.LONG: ‘long’>,
‘swap_rate’: None,
‘symbol’: ‘BCHUSD’,
‘unrealized_intraday_pl’: ‘-0.096229’,
‘unrealized_intraday_plpc’: ‘-0.0096472361178308’,
‘unrealized_pl’: ‘-0.096229’,
‘unrealized_plpc’: ‘-0.0096472361178308’,
‘usd’: None}