Closed jackbader closed 4 years ago
Same issue still present. I've tried a bunch of symbols and get same "Not Found". Do you have any that actually return Bar data?
curl -H "APCA-API-KEY-ID: $APCA-API-KEY-ID" -H "APCA-API-SECRET-KEY: $APCA-API-SECRET-KEY" "https://paper-api.alpaca.markets/v1/bars/1D?symbols=AAPL&limit=100"
Not Found%
@phiat It actually does seem to be working...
Most people tell me cors errors are usually just happening because there is something wrong with the request formatting. And in this case it's true.
I was able to run the same request in Postman and it returned the results just fine.
Ah yes. Thanks @jackbader for the sanity check. I had the wrong subdomain (https://**paper-api**.alpaca.markets vs https://**data**.alpaca.markets) as well as erroneous env vars! :100:
curl -H "APCA-API-KEY-ID: $APCA_API_KEY" -H "APCA-API-SECRET-KEY: $APCA_API_SECRET" "https://data.alpaca.markets/v1/bars/1D?symbols=AAPL
{"AAPL":[{"t":1571112000,"o":236.39,"h":237.65,"l":234.88,"c":235.32,"v":3
7286507} ...
works. I think this issue can be closed.
EDIT: If your issue is with CORS, then maybe keep open if not addressed. Sorry should've read a bit more.
FYI, CORS for data.alpaca.markets are addressed.
I'm trying to hit the /v1/bars endpoint and all I'm getting is 404's, accompanied by a cors error (the cors error is most likely a result of the endpoint not being found. Other endpoints work fine.
Im using
const accountResponse = await fetch( "https://data.alpaca.markets/v1/bars/day?symbols=AAPL&limit=1&start=2019-02-01&end=2019-02-10", { method: "GET", // or 'PUT' headers: { "APCA-API-KEY-ID": process.env.REACT_APP_ALPACA_KEY_ID, "APCA-API-SECRET-KEY": process.env.REACT_APP_ALPACA_SECRET_KEY } } );
Thanks guys!