alpacahq / alpacahq/Alpaca-API

access key verification failed : access key not found (Code = 40110000)

オープン
#186 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
173
フォーク
17
PR マージ指標
30日以内にマージされた PR はありません

説明

I am having an issue where the API keeps telling me `"alpaca_trade_api.rest.APIError: access key verification failed : access key not found (Code = 40110000)"` when I have copied and pasted the keys EXACTLY as they are the code below has my API credentials witch will be changed before actual deployment is implemented

I expected it to just print the `api.get_bar` like I asked it to but instead this is the error

```py
from alpaca_trade_api.rest import REST
import alpaca_trade_api as tradeapi

APCA_API_KEY_ID = "31ac120c4fca2b18a40c43c7704be759"
APCA_API_SECRET_KEY = "d47b3c1f50d46491544e10d20721b2869a3ffe71"
APCA_API_BASE_URL = "https://api.alpaca.markets"

api = REST(APCA_API_KEY_ID, APCA_API_SECRET_KEY, APCA_API_BASE_URL)
"""Client ID
31ac120c4fca2b18a40c43c7704be759

Secert Key
d47b3c1f50d46491544e10d20721b2869a3ffe71

export APCA_API_KEY_ID=31ac120c4fca2b18a40c43c7704be759
export APCA_API_SECRET_KEY=d47b3c1f50d46491544e10d20721b2869a3ffe71
export APCA_API_BASE_URL=https://api.alpaca.markets
APCA_API_DATA_URL=https://data.alpaca.markets"""

api._key_id = APCA_API_KEY_ID
api._secret_key = APCA_API_SECRET_KEY
api._base_url = APCA_API_BASE_URL

api = tradeapi.REST(APCA_API_KEY_ID, APCA_API_SECRET_KEY, APCA_API_BASE_URL)
account = api.get_account()
account.status

api.get_bars("AAPL", TimeFrame.Hour, "2021-02-08", "2021-02-08", limit=10, adjustment='raw').df
```

**Desktop (please complete the following information):**
- OS: macOS Big Sur Version 11.4 (20F71)
- Browser: Safari Version 14.1.1 (16611.2.7.1.4)

Ive also tried `https://paper-api.alpaca.markets` for my base URL and still have issues

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。