| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Prosper
Description
These are bindings to the Prosper marketplace API. The documentation for the API can be seen at https://api.prosper.com/.
- invest :: User -> Money -> Listing -> IO InvestResponse
- account :: User -> IO Account
- allListings :: User -> IO (Vector Listing)
- notes :: User -> IO (Vector Note)
- listingFromNote :: User -> Note -> IO (Maybe Listing)
- data AccountException = AccountException ByteString
- data User = User {
- username :: !ByteString
- password :: !ByteString
- data Account = Account {}
- emptyAccount :: Account
- data Listing = Listing {}
- data Offer = Offer {
- requestAmount :: !Money
- rate :: !Double
- termInMonths :: !Int
- yield :: !Double
- effectiveYield :: !Double
- apr :: !Double
- data Credit = Credit {
- fico :: !Int
- bankcardUtilization :: !Double
- isHomeowner :: !Bool
- debtToIncome :: !Double
- monthsEmployed :: !(Maybe Int)
- currentDelinquencies :: !(Maybe Int)
- amountDelinquent :: !(Maybe Money)
- openCreditLines :: !(Maybe Int)
- totOpenRevolvingAccts :: !(Maybe Int)
- revolvingBalance :: !(Maybe Money)
- revolvingAvailableCredit :: !(Maybe Int)
- incomeRange :: !(Maybe (Money, Money))
- statedMonthlyIncome :: !(Maybe Money)
- currentCreditLines :: !(Maybe Int)
- nowDelinquentDerog :: !(Maybe Int)
- wasDelinquentDerog :: !(Maybe Int)
- data Rating
- data Category
- data Status
- data NoteStatus
- data NoteDefaultReason
- data Note = Note {
- loanNoteId :: Text
- listingNumber :: Int
- amountParticipation :: Money
- totalAmountBorrowed :: Money
- borrowerRate :: Double
- noteRating :: Rating
- term :: Int
- ageInMonths :: Int
- daysPastDue :: Int
- principalBalance :: Money
- principalRepaid :: Money
- interestPaid :: Money
- serviceFees :: Money
- prosperFees :: Money
- lateFees :: Money
- noteStatus :: NoteStatus
- noteDefaultReason :: Maybe NoteDefaultReason
- isSold :: Bool
- data InvestStatus
- = Success
- | Failed
- | Error
- | PartialSuccess
- data InvestMessage
- data InvestResponse = InvestResponse {}
- type Money = Double
Commands
allListings :: User -> IO (Vector Listing) Source
Send a request to the Listings end-point at Prosper
data AccountException Source
Used as a hack around the 500 Critical Exception error
Constructors
| AccountException ByteString |
User
User info for Prosper data
Constructors
| User | |
Fields
| |
Account
A data structure for holding account information for Prosper
Constructors
| Account | |
Fields
| |
emptyAccount :: Account Source
An empty account. All values are zero.
Listing
Constructors
| Listing | |
Data related to the listing's offer and contract terms
Constructors
| Offer | |
Fields
| |
Data related to the credibility of the listing
Constructors
| Credit | |
Fields
| |
The Category of a loan is the type of loan.
This is basically copied verbatim from the Prosper API.
Constructors
| Active | |
| Withdrawn | |
| Expired | |
| ListingCompleted | |
| ListingCancelled | |
| Pending |
Note
data NoteStatus Source
Constructors
| OriginationDelayed | |
| Current | |
| ChargeOff | |
| Defaulted | |
| NoteCompleted | |
| FinalPaymentInProgress | |
| NoteCancelled |
Instances
data NoteDefaultReason Source
Constructors
| Delinquency | |
| Bankruptcy | |
| Deceased | |
| Repurchased | |
| PaidInFull | |
| SettledInFull |
Constructors
| Note | |
Fields
| |
Invest
data InvestStatus Source
Status of an invest request
Constructors
| Success | |
| Failed | |
| Error | |
| PartialSuccess |
Instances
| Eq InvestStatus | |
| Read InvestStatus | |
| Show InvestStatus | |
| Generic InvestStatus | |
| FromJSON InvestStatus | Status of Invest request response JSON parser |
| Serialize InvestStatus | |
| type Rep InvestStatus |
data InvestMessage Source
Message associated with an error
Constructors
| NoError | |
| InternalError | |
| InvestedAmountLessThanRequested | |
| ListingNotAvailable | |
| ListingNotFound | |
| InsufficientFunds | |
| ListingClosedBeforeBidPlaced | |
| ServerBusy | |
| SuitabilityRequirementsNotMet | |
| InvestedAmountLessThanMinimumRequired | |
| OtherError | Not in the prosper docs, this is a catch all |
Instances
| Eq InvestMessage | |
| Read InvestMessage | |
| Show InvestMessage | |
| Generic InvestMessage | |
| FromJSON InvestMessage | Parser for message in an error |
| Serialize InvestMessage | |
| type Rep InvestMessage |
data InvestResponse Source
JSON response to an invest request
Constructors
| InvestResponse | |
Fields | |
Instances
| Show InvestResponse | |
| Generic InvestResponse | |
| FromJSON InvestResponse | Parser for invest request response on api/Invest |
| Serialize InvestResponse | |
| type Rep InvestResponse |