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

Limits to returnLoanOrders #3

Open
tteresi7 opened this issue Sep 26, 2017 · 2 comments
Open

Limits to returnLoanOrders #3

tteresi7 opened this issue Sep 26, 2017 · 2 comments

Comments

@tteresi7
Copy link

returnLoanOrders does not return the whole order book. The order book is actually quite large to what is returned. There is a '?limit' variable that can be encoded with a number of entries.

@dzarezenko
Copy link
Owner

Hi,

according to the official API docs

returnLoanOrders

Returns the list of loan offers and demands for a given currency, specified by the "currency" GET parameter.

Call: https://poloniex.com/public?command=returnLoanOrders&currency=BTC

So, looks like this call doesn't support limit variable.

If you have more information about this - let's discuss.

@tteresi7
Copy link
Author

tteresi7 commented Oct 25, 2017

Sure,

It's not listed on their API page currently. When I was trying to retrieve loans when the orderbook had more than 1000 I found it quite odd that I was only receiving 1000 and thus made this post. I found that inserting the following code (quick fix) into the poloniex-api init.py

if cmdType == 'Public': # encode url payload['url'] = 'https://poloniex.com/public?' + _urlencode(args) if args['command'] == 'returnLoanOrders': payload['url'] = payload['url'] + '&limit=99999'

This then rectified the problem and I was able to see the full list of loans that were available at the time.

Obviously, a quick and dirty fix, but I thought I would mention that this issue does arise in this case.

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