python 初心者です。
このURLの約定履歴の中の一番新しい"size"を取り出したいのですがうまくいきません。
なんとか自力で約定履歴を取得するコードは書くことができました。
よろしくお願いいたします.
python
1import requests 2response = requests.get("https://api.bitflyer.jp/v1/getexecutions") 3data = response.json() 4print( data["id"]["size"][1])
エラー内容
python
1Traceback (most recent call last): 2 File "test02.py", line 4, in <module> 3 print( data["id"]["size"][1]) 4TypeError: list indices must be integers or slices, not str