says qty is required when submitting an order with a notional value
See original GitHub issueorder = api.submit_order(symbol=stock.upper(), notional=5000, side='buy', type='market', time_in_force='day')
File "C:\ProgramData\Anaconda3\lib\site-packages\alpaca_trade_api\rest.py", line 347, in submit_order
resp = self.post('/orders', params)
File "C:\ProgramData\Anaconda3\lib\site-packages\alpaca_trade_api\rest.py", line 179, in post
return self._request('POST', path, data)
File "C:\ProgramData\Anaconda3\lib\site-packages\alpaca_trade_api\rest.py", line 139, in _request
return self._one_request(method, url, opts, retry)
File "C:\ProgramData\Anaconda3\lib\site-packages\alpaca_trade_api\rest.py", line 168, in _one_request
raise APIError(error, http_error)
alpaca_trade_api.rest.APIError: qty is required
says qty is required when submitting an order with a notional value and then when I try to submit an order with both it says I shouldn’t have qty, which is true, but why isn’t notional working by itself?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
Understanding Notional Value and How It Works - Investopedia
Notional value is a term often used to value the underlying asset in a derivatives trade. It can be the total value of...
Read more >Can we submit orders smaller than 1 USD in notional value?
No, to ensure an equitable trading experience for traders across the platform, we enforce a minimum 1 USD notional amount for entry orders....
Read more >APIError(code=-4164): Order's notional must be no smaller ...
The quantity parameter is not calculated in USDT, you need to set quantity of asset you are trading with. For example, let's say...
Read more >Notional Value Average Pricing Workflow - CME Group
average price and providing lot quantities, the group will now keep track of the ... -New Requested Allocation Value = Allocation Quantity ......
Read more >2018-12362 | CFTC
gross notional amount for purposes of the de minimis threshold swaps ... file and will be considered as required under the Administrative
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not from Alpaca, but I was able to resolve this by resetting my paper account. I did this after another user on Alpaca’s Community Forum reset his account and cited this article: https://alpaca.markets/docs/trading-on-alpaca/fractional-trading/
I’m having a similar issue.
When I use notional: alpaca.submit_order(symbol=‘SPY’, notional=600, side=‘buy’, type=‘market’, time_in_force=‘day’) alpaca_trade_api.rest.APIError: qty is required
When I use qty with a fractional amount: alpaca.submit_order(symbol=‘SPY’, qty=1.5, side=‘buy’, type=‘market’, time_in_force=‘day’) alpaca_trade_api.rest.APIError: qty must be integer