Clicky

  • Welcome to P2P Lending / NFT Lending Forum.
 

ETH.LOAN

News:

This was the original Lend Academy peer-to-peer lending forum, since forensically restored by deBanked and now reintroduced to eth.loan.

To restore access to your user account, email [email protected]. We apologize for errors you may experience during the recovery.

Main Menu
NEW LOANS:   | machamp.eth 1.750 Ξ | machamp.eth 1.750 Ξ | marshtomp.eth 0.200 Ξ | ALL

Assign a note to a portfolio via API

Started by Peter, October 22, 2018, 11:00:00 PM

Previous topic - Next topic

hdsouza

Hi,

I need to be able to programmatically assign a note to a portfolio.
I have looked through the API resource  (https://www.lendingclub.com/developers" class="bbc_link" target="_blank">https://www.lendingclub.com/developers) and do not see a way  to assign/move notes.

Any ideas?
Thanks
Hil

panther02912

You can assign notes to a portfolio ID when posting an order.  For example:

[{'loanId': 606, 'portfolioId': '124', 'requestedAmount': 25.0}, {'loanId': 607, 'portfolioId': '124', 'requestedAmount': 25.0}]

I don't see a way to programmatically move held notes to another portfolio either.  Have you asked LC support if they have an undocumented API feature since portfolio reassignment is possible with their web site?

TravelingPennies

Thanks Panther. I will ask support and update accordingly

Fred93

The web site doesn't use the same API.  I have never heard of any way to set portfolio via the API.

You can use the undocumented interface used by the web site, but it requires you to do a "login" as the user does on the web site, and exchange cookies to validate that you're the fellow who logged in, and to handle the login getting timed out, and so forth.  I used to do all this nonsense when the API was less capable and there were things I needed to do that the API did not provide.  Was a PITA because they would make tiny changes to the web site that would break my code fairly regularly, and LC discouraged it ... but didn't force me to stop, because I think they understood that the API was lacking important features.  I no longer use any of the undocumented web stuff, because I no longer need to.

TravelingPennies

Thanks Fred.
I just heard back from Support
----------------------------------------------
Unfortunately, we do not currently have an option to move Notes into portfolios via the API. I am sure that you saw the pages regarding creating a portfolio via our documentation pages however, we do not have the option to move the Notes.

I will make sure to bring up your feedback regarding this feature to my leadership team.
----------------------------------------------

There is another way:
 https://github.com/jgillick/LendingClub/blob/master/lendingclub/__init__.py" class="bbc_link" target="_blank">https://github.com/jgillick/LendingClub/blob/master/lendingclub/__init__.py although it does need python.  Look for assign_to_portfolio

From the history it looks like we may have problems installing it on a windows platform too.

TravelingPennies

I managed to get the python script to work.
If anyone is interested here is the code.
I have tested it and it works on windows 10, command line.

The script works in Python version 2.7 which is slated to have an End Of Life date as 2020.
So if anyone is interested in carrying out the upgrade to version 3 would be nice.

Code: [Select]

NEW LOANS:   | machamp.eth 1.750 Ξ | machamp.eth 1.750 Ξ | marshtomp.eth 0.200 Ξ | ALL