Blue Theme Orange Theme Green Theme Red Theme
 
MindFusion's Components
Home | Forums | Videos | Photos | Downloads | Blogs | E-Books | Interviews | Jobs | Beginners | Training
 | Consulting  
Submit an Article Submit a Blog 
 Login Close
User Id:
Password:
 
Forgot Password
Forgot Username
Why Register
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
 Resources  
Close
 Our Network  
Close
Search :       Advanced Search »
Home » Financial Applications » Using the Prosper API to Automate the Loan Market

Using the Prosper API to Automate the Loan Market

This article describes how to begin building applications specifically geared to the Prosper.com website. Prosper.com is a popular auction-style site that helps fulfill loans to individuals through a bidding process.

Author Rank:
Technologies: .NET 1.0/1.1, Windows Forms,Visual C# .NET
Total downloads : 55
Total page views :  3351
Rating :
 0/5
This article has been rated :  0 times
   Print Read/Post comments Post a comment  Rate  
   Email to a friend  Bookmark  Similar Articles  Author's other articles  
Download Files:
LoanQuery.zip
 
Become a Sponsor



Figure 1 - Sample Loan Query Application Courtesy of Prosper Development

Introduction

In the past, the way to secure a loan was to go to a bank or broker, go through hours of tedious financial discovery and wait a month for approval.   The internet has changed all that.  Sites such as LendingTree and E-Loan make it much easier to obtain a loan.  Not only can you obtain a loan quicker, but these sites force banks to compete for your business (Nothing like putting the power back into the hands of the consumer!).    The founder of E-Loan, Chris Larsen, decided one day (probably after seeing how e-bay works),  that there was another way to provide loans.  Why not let individuals lend or borrow money from other individuals through an auction system.  So what exactly gets auctioned?  Interest rates!  And that is how Prosper was born...

How Does Prosper Work?

Prosper allows a borrower request a certain amount of money that they would like to borrow (up to $25,000).  The borrower places their request on the auction block.  In exchange, the lender gets to know quite a lot of financial detail about the borrower (their credit rating, salary, length of employment, number of delinquencies).  The lender uses this information along with the borrower's requested interest rate to decide whether or not they will lend money to the borrower.  Keep in mind that this auction is completely blind like e-bay.  The lender never knows the identity of the borrower and visa versa.  The credit information is real, though.  Lenders are allowed to ask questions to the borrower, such as,  "Please break down your monthly income and expenses."  Or,  "Please explain the delinquencies."   Once the lender decides to lend money, they can bid as little as $50 on the borrower towards the loan.  A loan is not issued unless the full amount requested by the borrower is funded by the multiple lenders.  (Many requested loans are not fulfilled for this reason.) Once the loan has been completely filled to  the total amount requested by the borrower,  a new lender can still bid on the loan until the time runs out.  The new lender "ups" the bid by bidding a lower interest rate than the previous lenders who have bid on the borrower so far.  Often you'll see a successful loan's interest rate drop as much as 50%!  It seems borrowers flock to prosper to pay off high interest credit cards, higher interest loans, or to borrow money to start a business.

The Risk

The risk is always that the borrower defaults on the loan (stops making monthly payments).  The lower the credit grade, the larger the risk to the lender.  Grades range from AA, A, B, C, D, E, and HR (High Risk).  Higher risk credit grades tend to pay much larger interest rates, but are more likely to default.  AA grade is the safest, and rarely defaults, but doesn't usually command a high rate.  Prosper makes the lender aware of the risks before placing the bid.  They even statistically calculate risk of default and return based on historical site statistics.  Still there is no guarantee, so it's always best to diversify if you are a lender.

Groups

Prosper allows you to form Groups.  As a member of a group,  you have the guidance of the Group Leader to help you obtain the loan.  The Group Leader can endorse you as a good loan prospect, if he or she feels you are low risk.   The group leader can also request proof of salary and let lenders know that you can be trusted.  Figure 1, shows a list of groups just started this April.

Prosper API

Prosper has opened up its API to the developer world which is pretty exciting for financial software engineers.  The API makes it easy to write .NET Applications to automate tasks and metrics produced by the Prosper website.  Prosper provides good documentation on the API so you can get started using it right away.   The API works through a WebService.  The WebService allows you to Login, Logout, and Query or Retrieve certain data.  It does not seem like you can automate bidding yet, but I suspect this will be added in a future release.  In this article we will talk about using the Query web method, since this is what was provided in the sample application.

Objects to Query

Prosper has provided a host of objects that you can query on, each providing multiple properties containing loan data.  Table 1 are a list of objects and some of their properties.

Table 1 - Queryable Prosper Objects

Object Description Useful Properties
Listing Contains information about a borrower listing including credit history information BidCount, CreditGrade, AmountDelinquent, AmountFunded, BorrowerRate
Group A Group in Prosper consisting of borrowers, lenders, and a group leader. Name, ShortDescription,GroupRating
Bid Bid coming from a lender on a loan Amount, ListingKey, MemberKey,Status
LenderLoan the part of the loan owned by a lender BidSource, PrincipalLoaned, PrincipalRepaid, LoanNumber
Loan the loan object created after a borrower has received the fully requested loan amount CreationDate, AmountBorrowed,BorrowerRate,Term
MarketPlace contains useful statistics about Prosper LoanVolumeToDate,MembersToDate
Member information about a particular member GroupKey,Roles,ScreenName

Setting up the API

To use the API, we just need to generate a Web Service object using .NET. 

Here are the steps:

1) Create a new Windows Forms Project or ASP.NET Project

2) Right Click on Solution Explorer and choose Add Web Reference.

3) Fill in the url as shown in figure 2 and press Go. Click Add Reference:

Figure 2 - Adding a Web Reference Object

The reference to the prosper api will appear in your solution as a com.prosper.services as shown in Figure 3.  You are now ready to talk directly to the prosper web site to gather information:

Figure 3 - Web Reference to Prosper Appearing in the Solution Explorer

Using the API in C#

Once you've generated the web service reference, you have all the Prosper objects available to you in the .NET framework.  You can call any of them just like you would any other class.  In this example, we will show you how to query on an object to get a group.  You'll first want to add a using statement, so you don't have to preference namespaces every time you access a prosper object:

Listing 1 - Adding a using clause to your class

namespace ProsperQueryApp
{
 
using com.prosper.services;

  public partial class ProsperQueryApp : Form
  {

You will also want to declare and construct a prosperapi object in order to use it's query method later:

Listing 2 - Constructing a prosper API object

private com.prosper.services.ProsperAPI prosperAPI = new com.prosper.services.ProsperAPI();

You are now free to query on any of the available prosper objects provided. Listing 3 shows a simple query to obtain the group information shown in figure 1:

Listing 3 - Querying on the Group Object using the prosper API

ProsperObjectResult result = null;

result = prosperAPI.Query(null, "Group", "Name,CreationDate,IsExceptingNewMembers,ShortDescription",  "CreationDate > '04/01/08'");

The first parameter in the Query method is an authentication key, which for the initial release can be set to null.  The second parameter specifies the name of the prosper object we are querying on (the Group object).  The third parameter is a list of all the properties separated by comma of the Group object from which we are requesting information.  All properties that we do not specify in the property list will be returned as null.  The last parameter is the conditional expression to filter are query. The query expression is similar to a where clause in a database query.

All of the groups fulfilling the condition creation date > april 1, 2008  will be returned to the prosper result object.  The prosper result object contains a collection of prosper objects that you can loop through to retrieve individual object information.

Listing 4 - Looping through the results of the Prosper Query

ArrayList prosperObjects = new ArrayList();
foreach (ProsperObject prosperObject in prosperResult.ProsperObjects)
 {
     prosperObjects .
Add(prosperObject);
 }

Since we asked for Group objects,  the objects returned are of type Group, so if we need to get a property from the group, we just unbox it:

Listing 5 - unboxing a Prosper Group object

Group myProsperGroup = prosperObjects[0] as Group;

string descriptionOfGroup =  myProsperGroup.ShortDescription;

You can use the ArrayList above to bind to a DataGridView in order to display your query results. Just drop a DataGridView onto your form and add the code in Listing 6 after the query is performed:

Listing 6 - Binding to a DataGridView

dataGridView1.DataSource = prosperObjects;

Conclusion

Now that Prosper has opened up it's API to the public, it should be quick and easy to create some cool applications to analyze and track loan information.  Prosper has a large enough pool of borrowers that you contains some interesting statistics from querying their loan info.  You can also use the prosper API to help you create some cool tools to give you an advantage in the prosper marketplace.  I have created a tool myself in .NET called the Prosper Lender's Companion and use it to track and fine tune the bidding process.  It's easy to get into the development game at Prosper and perhaps if your developed application is good enough, they will market it on their website!  If you are looking to experiment with prosper or borrow money for a .NET project, you can join Prosper and tell them I sent you.  In the meantime, don't be afraid to lend a helping hand to the frontier of auction loan markets using C# and .NET.


Login to add your contents and source code to this article
 [Top] Rate this article
 About the author
 
Mike Gold
Michael Gold is President of Microgold Software Inc., makers of the WithClass UML Tool. His company is a Microsoft VBA Partner and Borland Partner. Mike is a Microsoft MVP and founding member of C# Corner. He has a BSEE and MEng EE from Cornell University and has consulted for Chase Manhattan Bank, JP Morgan, Merrill Lynch, and Charles Schwab. Currently he is a senior developer at Finisar Corp. He has been involved in several .NET book projects, and is currently working on a book for using .NET with embedded systems. He can be reached at mike@c-sharpcorner.com
Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Go.NET
Build custom interactive diagrams, network, workflow editors, flowcharts, or software design tools. Includes many predefined kinds of nodes, links, and basic shapes. Supports layers, scrolling, zooming, selection, drag-and-drop, clipboard, in-place editing, tooltips, grids, printing, overview window, palette. 100% implemented in C# as a managed .NET Control. Document/View/Tool architecture with many properties&events. Optional automatic layout.
Dundas Software
Dundas Chart for .NET is the most advanced .NET charting package available today.  With an extremely complete feature set, elegant architecture and easy implementation, Dundas Chart can quickly add advanced Charting functionality to enhance and transform ASP.NET and Windows Forms applications.  Whether you are implementing charting into internal projects, or building applications for clients, Dundas Chart offers advanced technology and advanced results to get the most out of data.
Clickatell's SMS Gateway
Clickatell's Developer Solutions allow you to SMS enable any website or application via a range of API's. Learn More about our API connections.
Free access to .NET Memory Management video
Everything you need to know about Garbage Collection, Temporary Objects, Fragmentation, Finalization and common causes of memory leaks in .NET. Watch the video here.
Microsoft Visual Studio 2010
Microsoft Visual Studio 2010 offers more to developers than any other Visual Studio release. Work more productively and collaboratively-with greater control over your work at every step. The Beta 2 can give you a head start on achieving efficiency.
 
   Print Read/Post comments Post a comment  Rate  
   Email to a friend  Bookmark  Similar Articles  Author's other articles  
Download Files:
LoanQuery.zip
 
 Post a Feedback, Comment, or Question about this article
Subject:  
Comment:  
Become a Sponsor
 Comments

 Hosted by MaximumASP  |  Found a broken link?  |  Contact Us  |  Terms & conditions  |  Privacy Policy  |  Site Map  |  Suggest an Idea  |  Media Kit
Current Version: 5.2009.6.2
 © 1999 - 2009  Mindcracker LLC. All Rights Reserved