Skip to content

Instantly share code, notes, and snippets.

@MtkN1
Created July 13, 2023 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MtkN1/eadd734b9c423342d5f6d9b387b9890f to your computer and use it in GitHub Desktop.
Save MtkN1/eadd734b9c423342d5f6d9b387b9890f to your computer and use it in GitHub Desktop.
Get Oanda OHLC via REST API
import requests
r = requests.get(
"https://widget.oanda.jp/api/ohlc-rate?instrument=USD_JPY",
headers={"x-oanda-widget-api": "ohlc-rate"},
)
ohlc = r.json()
print(ohlc)
@MtkN1
Copy link
Author

MtkN1 commented Jul 13, 2023

Requirements

pip install -U requests

@MtkN1
Copy link
Author

MtkN1 commented Jul 13, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment