Code Monkey home page Code Monkey logo

Comments (7)

sun2gz avatar sun2gz commented on June 25, 2024

I have the same question.

from lendingclub.

jgillick avatar jgillick commented on June 25, 2024

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.

from lendingclub.

enpassanty avatar enpassanty commented on June 25, 2024

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?

from lendingclub.

gtremper avatar gtremper commented on June 25, 2024

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)

from lendingclub.

jgillick avatar jgillick commented on June 25, 2024

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.

from lendingclub.

enpassanty avatar enpassanty commented on June 25, 2024

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.

from lendingclub.

jgillick avatar jgillick commented on June 25, 2024

@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.

from lendingclub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.