Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the instrument pair format from 'aaabbb' to 'aaa_bbb' #61

Open
zhuyuecai opened this issue Nov 19, 2017 · 0 comments
Open

change the instrument pair format from 'aaabbb' to 'aaa_bbb' #61

zhuyuecai opened this issue Nov 19, 2017 · 0 comments

Comments

@zhuyuecai
Copy link

the format of pair string is too hard coded. Thus the whole package can only deal with pure currency pairs. But for some new supported product, it doesn't work at all, ex:AU200_AUD, wheat_usd, etc. The format should be changed such that instead of
instrument = "%s_%s" % (event.instrument[:3], event.instrument[3:])
we can simply input the pair string. and we just need pair.split('_') to get the list of the two instrument.

moreover, why not use some oanda api wrapper to do the execution instead of writing our own?
There are well developed python wrappers for v1 and v20 account, we just need to do an conditional import

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant