Broker API HubMenu

Alpaca status code

Alpaca status code: HTTP 401 (market data)

The error, as text you can copy

HTTP 401 (market data)
Kind
Status code
API
Alpaca

What does HTTP 401 (market data) mean on the Alpaca API?

The Market Data API's shared reply where the authentication headers are missing or invalid.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Independent and unofficialdocs.alpaca.marketschecked

How do I fix HTTP 401 (market data)?

Send APCA-API-KEY-ID and APCA-API-SECRET-KEY, read from your own environment, on the data host as on the trading host. Paper and live keys are different keys.