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:   | 804.eth 2.500 Ξ | remoraid.eth 0.299 Ξ | remoraid.eth 0.299 Ξ | ALL

Buy notes on the secondary market with API

Started by Peter, December 28, 2017, 11:00:00 PM

Previous topic - Next topic

hdsouza

Hi
If I try to buy a NOTE from the SECONDARY market using the PHP script below, I get "Internal Server Error 1510609349610".

I know that My ID and API Key are correct, because I can use them and successfully get the balance and  Notes I currently own, using the same script.
For example here is a note I was trying to buy: https://www.lendingclub.com/foliofn/browseNotesLoanPerf.action?showfoliofn=true&loan_id=80600463&order_id=117950693&note_id=130430010" class="bbc_link" target="_blank">https://www.lendingclub.com/foliofn/browseNotesLoanPerf.action?showfoliofn=true&loan_id=80600463&order_id=117950693&note_id=130430010

Any ideas. Please help
Thanks

Code: [Select]

TravelingPennies


Fred93

Any time you get a "server error", I would ask LC.  That means something went wrong inside their server, likely something unusual you did that was not checked at the right spot to give you a decent error message.

AnilG

Have you been able to successfully make simple Folio API buy call first? The best practice for using API calls is to first make the simplest API call, capture the received errors and responses and then incorporate rest of the logic. Have you captured the complete response received from your curl API buy call? Have you inserted debugging statements to see where your program craps out?

Rob L

You might try to talk to the API using the program SoapUI first. It's an excellent tool.
An open source free download is at: https://www.soapui.org/" class="bbc_link" target="_blank">https://www.soapui.org/

Here's an example of a Folio API sell in C using libcurl. If I remember (its been a while), the transfer and accept encoding setopts are very important. Probably why I commented those lines. I doubt its changed but this code hasn't been run in over a year. No guarantees, use this code at your own risk.

Code: [Select]

TravelingPennies

Thanks Anil, Fred.
I am able to get the OWNED NOTES and BALANCE with the script, so i believe the api call is correct
Only wen I execute the BUY part of the script, it gives the "Internal Server Error"
What would the syntax be for a "simple Folio API buy call"? Do you have any examples I can use.
I tried going over the LC docs too.
Unfortunately the script was written by someone else and is not longer available, so I am trying to get it to work.

Thanks
Hil

apc3161

You can try emailing LC directly, they've been pretty supportive in my experience.

TravelingPennies

After lots of back and forth with LC support they are now telling me that there is a different Key to buy Notes off the secondary market (other than the Api). They mention that, its the reason why my script (above) is not working. I do not find any key other than my API.
Is that true or are they just yanking my chain?


TravelingPennies

I thought so too. But here is the email I received from support
Quote


TravelingPennies

Thanks Fred for the details.

I modified the script with the authorization header and key and I still get the "Internal server error". 
I have debugged the code further and I see the error appears on line $server_output .

Code: [Select]


TravelingPennies

Thanks Fred. That did it!!!!
I finally got a "SUCCESS_PENDING_SETTLEMENT"

TravelingPennies

Now you get to learn the joys of "PENDING SETTLEMENT", and how many don't make it thru this step.

NEW LOANS:   | 804.eth 2.500 Ξ | remoraid.eth 0.299 Ξ | remoraid.eth 0.299 Ξ | ALL