question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

says qty is required when submitting an order with a notional value

See original GitHub issue
order = 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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

2reactions
tifolsoncommented, Jan 5, 2022

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/

2reactions
tifolsoncommented, Nov 13, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found