Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Additional Note Detail #9

Closed
ericbmerritt opened this issue Jan 20, 2014 · 7 comments
Closed

Additional Note Detail #9

ericbmerritt opened this issue Jan 20, 2014 · 7 comments

Comments

@ericbmerritt
Copy link

I would love to get additional detail about a note so that I could algorithmically decide whether or not to invest. For example, monthly payment, gross income, debt to income ratio, credit history information, etc. Right now there only seems to be information about the note itself.

@sun2gz
Copy link

sun2gz commented Feb 23, 2014

I have the same question.

@jgillick
Copy link
Owner

That may be possible. Right now the module simply returns what LC.com says about the note. I'll need to see how to get more info from the site.

@enpassanty
Copy link

Any updates on this?

This API is wonderful but would be so much better if we could query all (or most ) of the features of the BrowseNotes.csv .

Has anyone had luck using LC web services, reliable screen scraping or another API to get more features?

@gtremper
Copy link

I've been able to get a CSV with all the current loan data by querying this url:

urllib.urlopen("https://resources.lendingclub.com/secure/primaryMarketNotes/browseNotes_1-RETAIL.csv")

I'm not sure how stable this is, its from "Download All" link on LendingClubs browse notes page. Its seems to be updated around ~1min past the hour on loan update hours (6,10,14,18)

@jgillick
Copy link
Owner

Lately I haven't had much time to put towards the program, so I cannot give much of an estimate for when I'll be able to add this feature. However, there's a simple URL endpoint that will return the details for any given note in JSON notation. For example, to get the details for loan note #21380586, goto: https://www.lendingclub.com/browse/loanDetailAj.action?loan_id=21380586 (you must be logged in).

Here's a code snippet that will get all note details for the first note in a search for 'B' grade loans:

import pprint as pp
from lendingclub import LendingClub
from lendingclub.filters import Filter

lc = LendingClub()
lc.authenticate()

filters = Filter()
filters['grades']['B'] = True
results = lc.search(filters)

request = lc.session.get('/browse/loanDetailAj.action', query={'loan_id': results['loans'][0]['loan_id']} )
details = request.json()

pp.pprint(details)

Calling lc.session.get(...) on any LC URL will automatically include your user session in the request. See session.py for more information.

This should, hopefully, work for your use case.

@enpassanty
Copy link

Thanks gtremper and jgillick,

I tried both approached and they work well. I wish I could use the json method alone but it looks like LC provides additional loan features in the csv that they don't make available with the loanDetail query. Anyway, this definitely puts me on the right track.

@jgillick
Copy link
Owner

@enpassanty What info does the csv method provide that is not provided by JSON? Is it also provided in the web interface? If it's provided on the web UI, there's likely a JSON URL for it.

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

No branches or pull requests

5 participants