Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
User
User info for Prosper data
User | |
|
Account
A data structure for holding account information for Prosper
Account | |
|
emptyAccount :: Account Source
An empty account. All values are zero.
Listing
Data related to the listing's offer and contract terms
Offer | |
|
Data related to the credibility of the listing
Credit | |
|
The Category
of a loan is the type of loan.
This is basically copied verbatim from the Prosper API.
Note
data NoteStatus Source
data NoteDefaultReason Source
Note | |
|
Invest
data InvestStatus Source
Status of an invest request
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
NoError | |
InternalError | |
InvestedAmountLessThanRequested | |
ListingNotAvailable | |
ListingNotFound | |
InsufficientFunds | |
ListingClosedBeforeBidPlaced | |
ServerBusy | |
SuitabilityRequirementsNotMet | |
InvestedAmountLessThanMinimumRequired | |
OtherError | Not in the prosper docs, this is a catch all |
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
Show InvestResponse | |
Generic InvestResponse | |
FromJSON InvestResponse | Parser for invest request response on api/Invest |
Serialize InvestResponse | |
type Rep InvestResponse |