C# Prosper API Wrapper - Updated

A couple of semantic changes - mostly now returning a clean Task<List<T>>, instead of making the method async Task<List<T>>.

However, one big change is that I've made GetProsperObjectAsync<T>(string url) public instead of private. This allows you as a consumer to pass custom OData queries and get back the appropriately strongly typed object. This method is actually used for all of the main Get methods in the API Wrapper.

To install the nuget package type:

PM> Install-Package ProsperApiWrapper

Here's an example of how you can use it to get some specific data:

//Get All AA Rated Listings
var AAListings = _api.GetProsperObjectAsync<List<Listing>>("Listings?filter=ProsperRating eq AA").Result;

//Top 10 C Listings*
var CListings = _api.GetProsperObjectAsync<List<Listing>>("Listings?filter=ProsperRating eq C&$top=10").Result;  

*The $top should be rarely used. The data goes against a view and OData/EntityFramework don't know how to order it, so it orders it by EVERY COLUMN ASC - which is a horribly terrible query. You're better off filtering by say date greater than yesterday to get new ones, or date greater than release time - 1 minute. I'd avoid all queries that require an order.

Prosper Objects you can use:

  • Account - Your account information
  • Investment - Everything you've successfully bid on, PendingInvestments = _api.GetProsperObjectAsync<List<Investment>>("Investments?$filter=ListingStatus eq 2")
  • Listing - Active listings
  • Note - All of your notes, past and present

Prosper API Documentation - overview of all of the api capabilities. They are using a limited subset of the ODATA Spec

OData spec documentation

Follow me on twitter, @prescottnasser, I'm there if you have questions or want to chat about online lending

Github Code // Nuget Package