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

Trade count > 50 #17

Open
jorfermo opened this issue Jul 8, 2015 · 1 comment
Open

Trade count > 50 #17

jorfermo opened this issue Jul 8, 2015 · 1 comment

Comments

@jorfermo
Copy link

jorfermo commented Jul 8, 2015

As oanda says in the api documentation:

Trades can be paginated with the count and maxId parameters. At most, a maximum of 50 trades can be returned in one query. If more trades exist than specified by the given or default count, a url with maxId set to the next unreturned trade will be returned within the Link header.

Currently it's not possible to get more than 50 trades since you cannot access to the Link Header returned.

@eadains
Copy link

eadains commented Jul 13, 2015

Just through some quick searching, Requests provides an easy way to do this:
http://docs.python-requests.org/en/latest/user/advanced/#link-headers

Should be fairly easy to modify the get_trades() function to return the maxId, and perhaps accept it as a parameter. I may do it myself eventually.

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

2 participants