Author Topic: Invalid API Response  (Read 3898 times)

piranha971

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Re: Invalid API Response
« Reply #15 on: April 13, 2016, 12:11:12 AM »
Hi guys.  I am having the same Invalid API Response error since I set up PLS 3 days ago.  This is a typical message:

016-04-12 18:00:19.6369 PST   PLS Service Finished
2016-04-12 18:00:19.6361 PST   No notes match filter criteria
2016-04-12 18:00:19.2428 PST   List detected - Note count of most recent list: 51
2016-04-12 18:00:07.8363 PST   List detection (13 of 300) - Invalid API response
2016-04-12 18:00:04.3385 PST   List detection (12 of 300) - Invalid API response
2016-04-12 18:00:01.2255 PST   List detection (11 of 300)
2016-04-12 17:59:58.1048 PST   List detection (10 of 300)
2016-04-12 17:59:55.1426 PST   List detection (9 of 300)
2016-04-12 17:59:51.5947 PST   List detection (8 of 300)
2016-04-12 17:59:49.1966 PST   List detection (7 of 300)
2016-04-12 17:59:47.3502 PST   PLS Service Finished
2016-04-12 17:59:47.3490 PST   No notes match filter criteria
2016-04-12 17:59:46.8000 PST   Note count of most recent list: 149
2016-04-12 17:59:42.1314 PST   Downloading notes from most recent listing period
2016-04-12 17:59:39.7933 PST   List detection (6 of 300)
2016-04-12 17:59:39.5875 PST   Initial cash available: $xxx
2016-04-12 17:59:38.5373 PST   Starting PLS
2016-04-12 17:59:38.5358 PST   -----------------------------------------------------------------------------------------------------
2016-04-12 17:59:34.0884 PST   List detection (5 of 300)
2016-04-12 17:59:30.9147 PST   List detection (4 of 300)
2016-04-12 17:59:28.2984 PST   List detection (3 of 300)
2016-04-12 17:59:25.1198 PST   List detection (2 of 300)
2016-04-12 17:59:20.0219 PST   List detection (1 of 300)
2016-04-12 17:59:13.6166 PST   Initial note count of most recent loan list: 149
2016-04-12 17:59:11.2233 PST   Starting loan list detection
2016-04-12 17:59:11.1892 PST   Initial cash available: $xxx
2016-04-12 17:59:10.1487 PST   Starting PLS

No loans matching criteria is not possible, because at the same time, I manually bought several notes off the Lending Club site that do match the criteria.
When I run it manually tonight, I get the following message:

2016-04-12 21:00:26.2919 PST   PLS Service Finished
2016-04-12 21:00:26.2907 PST   No notes match filter criteria
2016-04-12 21:00:25.2752 PST   Note count of most recent list: 3
2016-04-12 21:00:23.3693 PST   Downloading notes from most recent listing period
2016-04-12 21:00:23.0968 PST   Initial cash available: $xxx
2016-04-12 21:00:22.1164 PST   Starting PLS

It has never been able to buy any notes, while I am able to do it directly off the site at the same time.
Thanks for your help.
« Last Edit: April 13, 2016, 12:14:08 AM by piranha971 »

RaymondG

  • Full Member
  • ***
  • Posts: 247
    • View Profile
    • Email
Re: Invalid API Response
« Reply #16 on: April 13, 2016, 11:26:59 PM »
It has never been able to buy any notes, while I am able to do it directly off the site at the same time.
Thanks for your help.
I would run the process step by step with the downloaded loan list to make sure the logic/filters of the process is good, especially the loan you were able to purchased on LC web site.

prasanta

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Invalid API Response
« Reply #17 on: June 11, 2016, 11:05:07 PM »
I am having a similar problem since I upgraded to Ubuntu 16.04. Today I reinstalled my Ubuntu, installed the new Virtualbox and PLS 7 but no change. I am not able to see the list. There is network activity, when I try to run manually, I get this and the log stops there. Any idea what is this and why I am not able to see the list at all?

Date   Status
   
2016-06-11 20:03:43.9479 PST   List detection (300 of 300) - Invalid API response
2016-06-11 20:03:42.9317 PST   List detection (299 of 300) - Invalid API response

kiltym

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Invalid API Response
« Reply #18 on: June 12, 2016, 09:26:41 AM »
I have not seen a valid drop in 3-4 days.  Including this morning's 6am.

I just tried a manual run again, and get the Invalid API response messages.

Also, when I click on the Browse Notes button, the window never appears, also implying there is is API issue that is happening.

If I can provide any log information to help, let me know.

sociallender

  • Sr. Member
  • ****
  • Posts: 273
    • View Profile
    • Email
Re: Invalid API Response
« Reply #19 on: June 13, 2016, 12:07:12 AM »
Sorry for the delay in responding, I have been traveling this past week.  I am just now taking a look and looks like I am having the same problem.  I noticed that other folks on LA forums are saying that there hasn't been any new notes listed recently?.?.  This would cause the issue of PLS reaching the 300 attempts and not detecting new notes list because it has a minimum new note count of 15 threshold (hard coded) which indicates that new notes are listed.  In other words, PLS will continually poll LC until it finds a note count of 15+ new notes (from current note count) which indicates that the new batch is available.  The reason this is in place is that LC continually adds/removes notes and PLS needs a way to know when new notes have been added (can't rely on timing and there is no field via their API that indicates when new notes have been added).  Therefore, an increase of 15 or more notes indicates new list and PLS will start.  Since no notes or a few have been added, new loan list never gets detected. 

As for the API invalid response, PLS does 3 verifications on the payload of the API response:

* Length of JSON string must be greater than 0 (loan data must be present)
* JSON string must contain a valid field.  PLS looks for "pubRec" in header (arbitrarily chosen) to make sure that it contains information relating to loan data (full verification of all fields would take too long)
* Conversion from JSON to table records must complete successfully

In the past, I have seen payload be empty/missing.  Likely that these errors were due to some technical issue on LC side since no code has changed on PLS.  I don't see the invalid API error in most recent run of PLS but rather the issue of no note list detection.

I am also curious as to why other 3rd party software sites have not reported this API issue (on forum).  Anyone reading this use a 3rd party site and seen this behavior?  Do they log/post the API responses to their users or hide technical issues?  I would assume they are experiencing the same problem as we all connect via the same API.

I will keep an eye on this issue tomorrow and post any new findings. 

SL


kiltym

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Invalid API Response
« Reply #20 on: June 13, 2016, 02:03:32 PM »
Just a quick update.  Last runs have all processed correctly.

As in, it ran 300 times and stopped since no new loans were available.

I am no longer getting the invalid API response during the drop runs, or via the Browse Loans, so obviously something on LC side that has been remedied.

Now back to the issue of why no new loans in 5 days.....

sociallender

  • Sr. Member
  • ****
  • Posts: 273
    • View Profile
    • Email
Re: Invalid API Response
« Reply #21 on: June 13, 2016, 04:21:20 PM »
Thanks, I am seeing the same results on my end. 

Now that I am thinking about what is happening, it is likely that LC is sending no data in its API results when no new loans are listed.  This results in an invalid API but I should probably label it differently.  When coding it, I did not anticipate no data meaning no new loans...  However, there are many times where the API payload is empty but there are new loans (I believe it happens when old loans are flushed out of API and new have not been listed).  I will probably put an "empty payload" or something on the status versus API error...

Yes, what is the deal with no new loans?  I am getting cash drag now and not good....

SL


Fred93

  • Hero Member
  • *****
  • Posts: 1822
    • View Profile
Re: Invalid API Response
« Reply #22 on: June 13, 2016, 04:38:16 PM »
Yes, what is the deal with no new loans?  I am getting cash drag now and not good....

There were new loans yesterday afternoon and today.  For example...
06/13/16 10:00:00.8  LC  Batch size: $163,075f   $729,775w

sociallender

  • Sr. Member
  • ****
  • Posts: 273
    • View Profile
    • Email
Re: Invalid API Response
« Reply #23 on: June 13, 2016, 05:17:58 PM »
Hmmm... Do you know how many notes were listed with each batch on fractional?  I am not logging that with PLS at the moment.  Were there more than 15 new notes per list?  Looks like ~165K could be less than that number given max amount of 35K per note.  PLS needs 15 notes per list for list detection at the moment.  I don't have the time right now to troubleshoot with code unfortunately.

Fred93

  • Hero Member
  • *****
  • Posts: 1822
    • View Profile
Re: Invalid API Response
« Reply #24 on: June 13, 2016, 05:27:09 PM »
Hmmm... Do you know how many notes were listed with each batch on fractional?  I am not logging that with PLS at the moment.  Were there more than 15 new notes per list?  Looks like ~165K could be less than that number given max amount of 35K per note.  PLS needs 15 notes per list for list detection at the moment.  I don't have the time right now to troubleshoot with code unfortunately.

Unfortunately, I don't log the # of loans in each category, just the $.  It was very likely under 15 loans.  Historical average loan price is something like $17k.  This really exposes a flaw in the API design.  There's no good algorithm for knowing when exactly the loans are posted when there are so few of them.

jheizer

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
    • LC Tools
Re: Invalid API Response
« Reply #25 on: June 13, 2016, 05:30:54 PM »
Quick skimming my logs the most I saw over the last few days was 13.
Replacement to P2P Quant's Percentile Tool http://lc.geekminute.com

compuatt

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Invalid API Response
« Reply #26 on: July 21, 2016, 10:55:53 AM »
So here we go again. Same problem for several days.  Anyone have thoughts?

kiltym

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Invalid API Response
« Reply #27 on: July 23, 2016, 10:34:27 AM »
Just adding I am seeing the same issue for several days.

PLS is able to get balance from account, but unable to download and loan information.

"Invalid API response from start note count. Attempting connection again..."

sociallender

  • Sr. Member
  • ****
  • Posts: 273
    • View Profile
    • Email
Re: Invalid API Response
« Reply #28 on: July 28, 2016, 03:10:14 PM »
Ugghhhh.. I am not sure what is going with LC APIs at the moment.  Usually they fix their issues within a day or so but this has been going on for some time now.  I will be able to dig deeper hopefully tonight (I have not had any free time to investigate).