Closed Petersoj closed 4 years ago
I've had this same issue and I brought it up to directly to Alpaca's team. Should be a fix soon hopefully. For now, I just use "PUT Update Watchlist" with a list of the current positions in the watchlist + new positions that I am trying to add. Not ideal, but a temporary solution while we wait for the fix. Hope this helps.
It looks like you're sending a json formatted body but the content type is set to text/plain
- can you try again with the application/json
content type?
Still no dice:
POST https://paper-api.alpaca.markets/v2/watchlists/<my watchlist uuid that is not the primary watchlist>
APCA-API-KEY-ID: <MY KEY ID>
APCA-API-SECRET-KEY: <MY SECRET>
Accept: */*
Content-Type: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-us
{"symbols":["MSFT"]}
HTTP/1.1 422 Unprocessable Entity
Server: nginx/1.13.0
Date: Thu, 05 Dec 2019 17:09:34 GMT
Content-Type: application/json; charset=UTF-8
Connection: keep-alive
Vary: Origin
Content-Length: 47
{
"code": 40010001,
"message": "asset not found: "
}
The POST endpoint is actually supposed to give a symbol
but not symbols
. The documentation has been addressed.
It looks like this is also the case for "POST create a Watchlist".
The following request:
Returns the following response: