Pyoanda
Oanda’s API python wrapper. Robust and Fast API wrapper for your Forex bot Python library that wraps Oanda API. Built on top of requests, it’s easy to use and makes sense.
Install / Use
/learn @toloco/PyoandaREADME
PYOANDA
Oanda’s API python wrapper. Robust and Fast API wrapper for your Forex bot Python library that wraps Oanda API. Built on top of requests, it’s easy to use and makes sense.
Pyoanda is released under the MIT license. The source code is on GitHub and issues are also tracked on GitHub. Works well with python 2.7, 3, 3.1, 3.2, 3.3, 3.4 and pypy.
Install
Pypi
pip install pyoanda
Manual
git clone git@github.com:toloco/pyoanda.git
cd pyoanda
python setup.py install
Run the tests
python setup.py test
Code example
from pyoanda import Client, PRACTICE
client = Client(
environment=PRACTICE,
account_id="Your Oanda account ID",
access_token="Your Oanda access token"
)
client.get_instrument_history(
instrument="EUR_GBP",
candle_format="midpoint",
granularity="S30"
)
Note that if you are indenting to use the sandbox environment, you should first use the API to create an account then use the account_id to run the example above.
from pyoanda import Client, SANDBOX
client = Client(environment=SANDBOX)
# Create an account
user = client.create_account()
# Retrieve the username and accountId values for future use
print "username: %s\naccount_id: %d" % (user['username'], user['accountId'])
Examples
Check out the examples gallery (Working progress)
Please feel free to send or post new examples! everybody will love to see them.
See Pypi project page.
See Docs project page.
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
