Author Topic: What exactly is API?  (Read 15082 times)

core

  • Hero Member
  • *****
  • Posts: 1790
  • Your loss is my gain
    • View Profile
Re: What exactly is API?
« Reply #15 on: August 20, 2013, 03:35:44 PM »
So, if I understand correctly, when API access is granted to an institution, LC does not furnish the investor with an open-source stand alone program, the user has to write the program him/herself from scratch?

Exactly.  An API is just an interface, in this case one program talking to LC's system.  You have to write that program.  I don't see how LC could provide you with an ready-made app anyway... how would they know exactly what you want it to do?  If they knew what everybody wanted they'd just build it right into the web site.  And probably charge for it.   The whole point of an API is to allow you to do things the way YOU want, things that perhaps nobody has thought of yet.

I'd assume that in order to communicate with the LC computers, you'd have to know the list of commands and expected responses, etc...

That is what an API is.  The list of commands (procedure calls, HTTP requests, etc) and expected responses.

I'd have to think that once (or if) API access is made public, the "open source" community will hammer out an API application that can compete with anything. 

Would such an app level the playing field, so to speak?

Interesting thought, about the open source community being able to "compete with anything".  If I wrote something that could beat the pants off the institutions I do not think I would even consider giving it away for free.  I mean I'm here to make money, not play charity software developer.  I'm guessing many others feel the same way.  On the other hand, there are certainly plenty people who are into that kind of free work for whatever reason, and many of them are no doubt very gifted.  I will have to ponder this.

We could examine history and take a look what's happened with the stock market.  Do we have lots of open-source high frequency trading software out there for the taking?  Just set up your server in NASDAQ's back yard, pay your colocation fees, and you're off and running making lots of money?  I don't know; I haven't looked for such software.  Something tells me you won't find it. :)  Even if you take HFT off the table, I really don't come across any trading software that is open source... at least none that give you any kind of edge.
« Last Edit: August 20, 2013, 03:41:44 PM by core »

AnilG

  • Hero Member
  • *****
  • Posts: 1123
    • View Profile
    • PeerCube
Re: What exactly is API?
« Reply #16 on: August 20, 2013, 04:23:46 PM »
You are able to get version info because version method doesn't require authentication. You will not be able to execute other methods such as getting loan listings unless you authenticate first which requires LC approval.


I didn't do anything for access, didn't talk to LC or anything. All I did was use the WSDL to generate code. Then I wrote 4 lines of code that uses the API to get the version info. It was remarkably easy.

Don't read too much into it yet. I didn't even log in or anything. Perhaps they control access by only allowing certain people to log in via the API. Who knows.

EDIT:
I didn't have to do anything with SOAP. That part is all hidden by the classes I generate from the WSDL. I figured out what objects to create and what methods to call by looking at them and figuring it out. That was the hardest part, actually, but not bad.
---
Anil Gupta
PeerCube Thoughts blog https://www.peercube.com/blog
PeerCube https://www.peercube.com

core

  • Hero Member
  • *****
  • Posts: 1790
  • Your loss is my gain
    • View Profile
Re: What exactly is API?
« Reply #17 on: August 20, 2013, 04:57:07 PM »
You will not be able to execute other methods such as getting loan listings unless you authenticate first which requires LC approval.

Doh.  I guess that answers that.  I was just thinking... since say Rev doesn't need each user to get API approval on their accounts, that means there must be authentication for the API client itself before the user auth.  I don't know where my brain was earlier

GS: This may put a small damper on the open source idea.  Someone would have to get the API credentials and then once it's out there in the public domain it's going to get misused and those creds will be shut down.  Of course the open source code could come without an API key but then each person who wants to work on it or even use it would have to go through all the approval hassle on their own.  What a mess.


berniemadeoff

  • Guest
Re: What exactly is API?
« Reply #18 on: August 20, 2013, 05:11:07 PM »
Ban this too.

You can't, at least not without it turning into a witch hunt.  There is no way to tell whether it's a well-written bot or just a human manually reloading the page every 5 seconds.   This would turn into a Barney Fife at LC asking people how they can be on the web site for 12 hours straight without a lunch break.  How long is reasonable?  Me, I don't take lunches.  Maybe I'm one of those fortunate few who don't need to sleep, too.  Yeah that's the ticket.  Obviously if they went to this approach it would be wise to program in an 8 hour "sleep" interval and bathroom breaks.  I could have my bot take up smoking just for realism.

They could put a captcha on all critical site functions.  This would annoy the users and not really accomplish anything anyway.  It costs me 1/10th of a cent to have a foreigner remotely type a captcha which only takes about 8-15 seconds, and I'd gladly eat that cost.  It's pocket change.

Couldn't you just make people enter an annoying code every time they place a manual order - like they do for pulling up account activity? 

This shouldn't be rocket science, after all it is LC's site and they should have full control over how people use it.  As other people have mentioned, the API allows investors to game the system - so why does LC need the API at all when they should be able to design a better automatic order system that would keep everyone happy and in the game. 

LC has created these issues and now they need to come up with an innovative fix. This is Silicon Valley isn't it?  Give it to Elon Musk - I'm sure he'd come up with a better mousetrap than the mess these guys have created.



Fred

  • Hero Member
  • *****
  • Posts: 1421
    • View Profile
Re: What exactly is API?
« Reply #19 on: August 20, 2013, 05:27:34 PM »
so why does LC need the API at all ...

The same reasons NASDAQ, NYSE, and other exchanges provide API: to create or expedite revenues.

berniemadeoff

  • Guest
Re: What exactly is API?
« Reply #20 on: August 20, 2013, 05:40:38 PM »
so why does LC need the API at all ...

The same reasons NASDAQ, NYSE, and other exchanges provide API: to create or expedite revenues.

Sure, but the equity markets are auction style with real price discovery.  If demand exceeds supply in the equity market, price rises to reach some equilibrium (in theory).  You can trade as fast/often as you want, as long as a counter party is willing to make the transaction with you. 

 I see LC and Prosper as offering private placements where the price is set by the sellers. The institutions can use more compute power, bandwidth and skill to beat retail investors to the trough. 

I get your point Fred, LC is not trying to be fair... they are trying to grow revenues and go public.  I get it.  If they want to screw us and shut us out, they have all the right in the world to do so. Go ahead and bend over.



rawraw

  • Hero Member
  • *****
  • Posts: 2795
    • View Profile
Re: What exactly is API?
« Reply #21 on: August 20, 2013, 05:41:30 PM »
Ban this too.

You can't, at least not without it turning into a witch hunt.  There is no way to tell whether it's a well-written bot or just a human manually reloading the page every 5 seconds.   This would turn into a Barney Fife at LC asking people how they can be on the web site for 12 hours straight without a lunch break.  How long is reasonable?  Me, I don't take lunches.  Maybe I'm one of those fortunate few who don't need to sleep, too.  Yeah that's the ticket.  Obviously if they went to this approach it would be wise to program in an 8 hour "sleep" interval and bathroom breaks.  I could have my bot take up smoking just for realism.

They could put a captcha on all critical site functions.  This would annoy the users and not really accomplish anything anyway.  It costs me 1/10th of a cent to have a foreigner remotely type a captcha which only takes about 8-15 seconds, and I'd gladly eat that cost.  It's pocket change.

Couldn't you just make people enter an annoying code every time they place a manual order - like they do for pulling up account activity? 


See the bolded part for your question.

berniemadeoff

  • Guest
Re: What exactly is API?
« Reply #22 on: August 20, 2013, 05:44:34 PM »
Ban this too.

You can't, at least not without it turning into a witch hunt.  There is no way to tell whether it's a well-written bot or just a human manually reloading the page every 5 seconds.   This would turn into a Barney Fife at LC asking people how they can be on the web site for 12 hours straight without a lunch break.  How long is reasonable?  Me, I don't take lunches.  Maybe I'm one of those fortunate few who don't need to sleep, too.  Yeah that's the ticket.  Obviously if they went to this approach it would be wise to program in an 8 hour "sleep" interval and bathroom breaks.  I could have my bot take up smoking just for realism.

They could put a captcha on all critical site functions.  This would annoy the users and not really accomplish anything anyway.  It costs me 1/10th of a cent to have a foreigner remotely type a captcha which only takes about 8-15 seconds, and I'd gladly eat that cost.  It's pocket change.

Couldn't you just make people enter an annoying code every time they place a manual order - like they do for pulling up account activity? 


See the bolded part for your question.

Make them enter a randomly generated code from a token that can only be activated by fingerprint authentication. 

I'm not a techie, but there has got to be a better way than what we have now, or what we will surely have in the future at the rate the situation is deteriorating.

I think the easy solution is to make the order process not time sensitive.  Collect the orders throughout the day on a fixed inventory of loans.  Allocate oversubscribed  loans to investors using some pro rata formula with the results announced the following day. 

Either do this or LC can lower the rates on the "hot" loans until demand is reduced to meet supply.

Why are we racing to buy loans when the approval process takes like 3 weeks anyways.  This is just stupid, imo.

« Last Edit: August 20, 2013, 05:54:13 PM by berniemadeoff »

core

  • Hero Member
  • *****
  • Posts: 1790
  • Your loss is my gain
    • View Profile
Re: What exactly is API?
« Reply #23 on: August 20, 2013, 05:48:24 PM »
Couldn't you just make people enter an annoying code every time they place a manual order - like they do for pulling up account activity?

That's the "captcha" alternative that I addressed in that same post.  (rawraw got in here ahead of me I see )  It costs $0.001-0.002 per image to have a human in India solve them.  Since a $25 note will cost you at least $0.25 in LC/Folio fees, paying $0.001 to get it is really nothing.   If you had to solve a captcha each time you checked for new loans though, wow that could really add up if you are hitting the site 20 times a second.  That would be pretty annoying for humans so I can't see them doing this unless the situation really got bad.

The one thing a captcha will do, if nothing else, is slow down access to whatever it is guarding; an electronic speed bump if you will.  Then again, it depends on how it is implemented.  95% of the time I can pre-fetch and pre-solve captchas so that it doesn't slow down what I am trying to do, but that's only because the site lets me.

core

  • Hero Member
  • *****
  • Posts: 1790
  • Your loss is my gain
    • View Profile
Re: What exactly is API?
« Reply #24 on: August 20, 2013, 05:55:30 PM »
Make them enter a randomly generated code from a token that can only be activated by fingerprint authentication. 

That's an interesting idea.  One of those electronic tokens and it would generate a pseudorandom number based on time and only does so when your fingerprint is on the thing.  Obviously it's not cost effective but still.  I guess if I was not going to try hacking the device itself, I'd make a dummy thumb somehow, Silly Putty maybe or whaver, simulating a press every second and put up a webcam aimed at the thing with OCR software reading the digits off the device.  It would be a fun project.  But not fun enough that I want them to do such a thing.  ;)

As George W. Bush would say, "Bring 'em on!"

berniemadeoff

  • Guest
Re: What exactly is API?
« Reply #25 on: August 20, 2013, 06:01:35 PM »
Make them enter a randomly generated code from a token that can only be activated by fingerprint authentication. 

That's an interesting idea.  One of those electronic tokens and it would generate a pseudorandom number based on time and only does so when your fingerprint is on the thing.  Obviously it's not cost effective but still.  I guess if I was not going to try hacking the device itself, I'd make a dummy thumb somehow, Silly Putty maybe or whaver, simulating a press every second and put up a webcam aimed at the thing with OCR software reading the digits off the device.  It would be a fun project.  But not fun enough that I want them to do such a thing.  ;)

As George W. Bush would say, "Bring 'em on!"

Make people stand in line at the local DMV to place manual orders.

mo

  • Full Member
  • ***
  • Posts: 158
    • View Profile
Re: What exactly is API?
« Reply #26 on: August 20, 2013, 10:40:44 PM »
Could LC withholding API from smaller investors be an SEC violation

Who knows but I don't think they are.  Like many things in life you won't get it if you don't ask.

storm

  • Full Member
  • ***
  • Posts: 143
    • View Profile
Re: What exactly is API?
« Reply #27 on: August 21, 2013, 12:40:43 AM »
No to CAPTCHA's.  Discount brokerages offer automated tools for investing (stop and limit orders) in the stock market.  I don't think it is unreasonable to expect LC to do the same.  They've got the filtering in place.  Just go ahead and automatically buy the notes for the investor.  Here is some pseudocode that will take slow down the rate of funding loans, and since I'm such a nice guy, I won't even charge for it...

Code: [Select]
if ($ListingExpiresIn >= 13 days && $InvestAmount > 100)
{
      print "We are sorry.  The investment amount limit for loans in funding for less than 24 hours is $100.  Please lower your investment amount or wait 24 hours to invest a higher amount.  As always, thank you for using Lending Club."
}

Now why is it so hard to implement that?
« Last Edit: August 21, 2013, 12:44:22 AM by storm »

core

  • Hero Member
  • *****
  • Posts: 1790
  • Your loss is my gain
    • View Profile
Re: What exactly is API?
« Reply #28 on: August 21, 2013, 01:19:08 AM »
Now why is it so hard to implement that?

Those 4 lines of code take only 30 seconds to write but you're forgetting everything else that goes into it:
  • 1 month of research and planning
  • 16 hours of billable time to an attorney making sure it won't violate any laws
  • 8 hours or secret conversations with industry insiders.  Oops, material non-public disclosure.
  • More hours to the attorney.  See above.
  • 5 hours of heavy drinking at a San Francisco dancing establishment asking fund managers what they think of it
  • 8 hours of meetings, drawing Venn diagrams, ridiculous project documentation
  • 30 seconds to write the code
  • 4 hour party for the programmers who managed to change one thing on the site in the last 2 years
  • 2 days sleeping off said party
  • 5 minutes to revert all changes back to the way they were after everything breaks