Is it a bug In alpaca?

The documentation clearly states: notional: dollar amount to trade. Cannot work with qty . Can only work for market order types and day for time in force.

However, this json recieves: 422 Unprocessable Entity: [{“code”:40010001,“message”:“qty is required”}]
Please notice the type and time in force:
{
“symbol”: “AAPL”,
“notional”: 350,
“side”:“buy”,
“type”:“market”,
“time_in_force”:“day”
}

getting the same issue.

I want to buy using notional $

is it only available in real trading accounts?

@rajpeter2020 Notional orders work identically in both paper accounts and live trading. What code are you using and what error are you getting? The following works

curl --location ‘https://paper-api.alpaca.markets/v2/orders
–header ‘Apca-Api-Key-Id: xxxxx’
–header ‘Apca-Api-Secret-Key: xxxxx’
–header ‘Content-Type: application/json’
–data '{
“side”: “buy”,
“type”: “market”,
“time_in_force”: “day”,
“symbol”: “AAPL”,
“notional”: “350”
}

Seems so

$ curl --location 'https://paper-api.alpaca.markets/v2/orders' \
  --header 'Apca-Api-Key-Id: xxxx' \
  --header 'Apca-Api-Secret-Key: xxxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "side": "buy",
    "type": "market",
    "time_in_force": "day",
    "symbol": "AAPL",
    "qty": "350"
  }'
{"code":40010001,"message":"qty is required"}

It even happens in the dashboard.

works on my live account doesn’t work in my paper account.

@sixcorners First off, thank you for being a long time Alpaca user. How do I know? The issue stems from the fact that you have an account created before 2021. Many of the features such as notional orders were not available then. These “legacy” accounts, which internally are referred to as PAPERV2 accounts, do not support or more problematically, get confused with some of the new features. In this case these legacy accounts always expect a quantity. That is why you are getting the error qty is required.

The fix unfortunately is to create a new paper account. That will be a new PAPERV3 account and should resolve all your issues.

Apologies for the confusion.

1 Like

Sweet. I have a vintage paper account.
Thanks for the info and fix!