-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathorderConfig.R
62 lines (54 loc) · 1.51 KB
/
orderConfig.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Load required libraries
# library(shiny)
# library(shinyBS)
# Load user configuration
load('config/user.rda')
# Initialize list
lc=list()
# Maximum times to check for new notes per list (roughly once a second)
lc$maxNoteCount = 300
# Number of new notes required for list detection
lc$numNotesThresh = 15
# LC API Version
lc$apiVersion = "v1"
# API URL
lc$urlLoanList = paste("https://api.lendingclub.com/api/investor/",
lc$apiVersion,
"/loans/listing",
sep='')
# API URLs
lc$urlLoanList = paste("https://api.lendingclub.com/api/investor/",
lc$apiVersion,
"/loans/listing",
sep='')
lc$urlLoanListAll = paste("https://api.lendingclub.com/api/investor/",
lc$apiVersion,
"/loans/listing?showAll=true",
sep='')
lc$urlNotesOwned = paste("https://api.lendingclub.com/api/investor/",
lc$apiVersion,
"/accounts/",
user$accNum,
"/notes",
sep='')
lc$urlCash = paste("https://api.lendingclub.com/api/investor/",
lc$apiVersion,
"/accounts/",
user$accNum,
"/availablecash",
sep='')
lc$urlOrders = paste("https://api.lendingclub.com/api/investor/",
lc$apiVersion,
"/accounts/",
user$accNum,
"/orders",
sep='')
# Curl options
options(RCurlOptions = list(verbose = FALSE,
followlocation = TRUE,
autoreferer = TRUE,
ssl.verifypeer = FALSE,
httpheader = c("Authorization" = user$token,
"Accept" = "application/json",
'Content-Type' = "application/json"),
useragent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36"))