forked from pilwon/node-yahoo-finance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfields.js
219 lines (198 loc) · 8.27 KB
/
fields.js
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
module.exports = {
s: 'Symbol',
// Pricing
a: 'Ask',
b: 'Bid',
b2: 'Ask (Realtime)',
b3: 'Bid (Realtime)',
p: 'Previous Close',
o: 'Open',
// Dividends
y: 'Dividend Yield',
d: 'Dividend Per Share',
r1: 'Dividend Pay Date',
q: 'Ex-Dividend Date',
// Date
c1: 'Change',
c: 'Change And Percent Change',
c6: 'Change (Realtime)',
k2: 'Change Percent (Realtime)',
p2: 'Change in Percent',
d1: 'Last Trade Date',
d2: 'Trade Date',
t1: 'Last Trade Time',
// Averages
c8: 'After Hours Change (Realtime)',
c3: 'Commission',
g: 'Day’s Low',
h: 'Day’s High',
k1: 'Last Trade (Realtime) With Time',
l: 'Last Trade (With Time)',
l1: 'Last Trade (Price Only)',
t8: '1 yr Target Price',
m5: 'Change From 200-day Moving Average',
m6: 'Percent Change From 200-day Moving Average',
m7: 'Change From 50-day Moving Average',
m8: 'Percent Change From 50-day Moving Average',
m3: '50-day Moving Average',
m4: '200-day Moving Average',
// Misc
w1: 'Day’s Value Change',
w4: 'Day’s Value Change (Realtime)',
p1: 'Price Paid',
m: 'Day’s Range',
m2: 'Day’s Range (Realtime)',
g1: 'Holdings Gain Percent',
g3: 'Annualized Gain',
g4: 'Holdings Gain',
g5: 'Holdings Gain Percent (Realtime)',
g6: 'Holdings Gain (Realtime)',
// 52 Week Pricing
k: '52-week High',
j: '52-week Low',
j5: 'Change From 52-week Low',
k4: 'Change From 52-week High',
j6: 'Percent Change From 52-week Low',
k5: 'Percebt Change From 52-week High',
w: '52-week Range',
// System Info
i: 'More Info',
j1: 'Market Capitalization',
j3: 'Market Cap (Realtime)',
f6: 'Float Shares',
n: 'Name',
n4: 'Notes',
s1: 'Shares Owned',
x: 'Stock Exchange',
j2: 'Shares Outstanding',
// Volume
v: 'Volume',
a5: 'Ask Size',
b6: 'Bid Size',
k3: 'Last Trade Size',
a2: 'Average Daily Volume',
// Ratio
e: 'Earnings Per Share',
e7: 'EPS Estimate Current Year',
e8: 'EPS Estimate Next Year',
e9: 'EPS Estimate Next Quarter',
b4: 'Book Value',
j4: 'EBITDA',
p5: 'Price per Sales',
p6: 'Price per Book',
r: 'PE Ratio',
r2: 'PE Ratio (Realtime)',
r5: 'PEG Ratio',
r6: 'Price Per EPS Estimate Current Year',
r7: 'Price Per EPS Estimate Next Year',
s7: 'Short Ratio',
// Misc
t7: 'Ticker Trend',
t6: 'Trade Links',
i5: 'Order Book (Realtime)',
l2: 'High Limit',
l3: 'Low Limit',
v1: 'Holdings Value',
v7: 'Holdings Value (Realtime)',
s6: 'Revenue',
e1: 'Error Indication (returned for symbol changed or invalid)',
// Map to v10 API
_map: {
// Pricing
a: 'summaryDetail.ask', // 'Ask'
b: 'summaryDetail.bid', // 'Bid'
b2: 'summaryDetail.ask', // 'Ask (Realtime)'
b3: 'summaryDetail.bid', // 'Bid (Realtime)'
p: 'summaryDetail.previousClose', // 'Previous Close'
o: 'summaryDetail.open', // 'Open'
// Dividends
y: 'summaryDetail.dividendYield', // 'Dividend Yield'
d: null, // 'Dividend Per Share'
r1: null, // 'Dividend Pay Date'
q: 'summaryDetail.exDividendDate', // 'Ex-Dividend Date'
// Date
c1: 'price.regularMarketChange', // 'Change'
c: 'price.regularMarketChange,price.regularMarketChangePercent', // 'Change And Percent Change'
c6: 'price.postMarketChange', // 'Change (Realtime)',
k2: 'price.postMarketChange', // 'Change Percent (Realtime)',
p2: 'price.regularMarketChangePercent', // 'Change in Percent',
d1: null, // 'Last Trade Date'
d2: null, // 'Trade Date'
t1: null, // 'Last Trade Time'
// Averages
c8: null, // 'After Hours Change (Realtime)',
c3: null, // 'Commission',
g: 'summaryDetail.dayLow', // 'Day’s Low',
h: 'summaryDetail.dayHigh', // 'Day’s High',
k1: null, // 'Last Trade (Realtime) With Time',
l: null, // 'Last Trade (With Time)',
l1: null, // 'Last Trade (Price Only)',
t8: null, // '1 yr Target Price',
m5: null, // 'Change From 200-day Moving Average',
m6: null, // 'Percent Change From 200-day Moving Average',
m7: null, // 'Change From 50-day Moving Average',
m8: null, // 'Percent Change From 50-day Moving Average',
m3: 'summaryDetail.fiftyDayAverage', // '50-day Moving Average'
m4: 'summaryDetail.twoHundredDayAverage', // '200-day Moving Average'
// Misc
w1: null, // 'Day’s Value Change',
w4: null, // 'Day’s Value Change (Realtime)',
p1: null, // 'Price Paid',
m: null, // 'Day’s Range',
m2: null, // 'Day’s Range (Realtime)',
g1: null, // 'Holdings Gain Percent',
g3: null, // 'Annualized Gain',
g4: null, // 'Holdings Gain',
g5: null, // 'Holdings Gain Percent (Realtime)',
g6: null, // 'Holdings Gain (Realtime)',
// 52 Week Pricing
k: 'summaryDetail.fiftyTwoWeekHigh', // '52-week High',
j: 'summaryDetail.fiftyTwoWeekLow', // '52-week Low',
j5: null, // 'Change From 52-week Low',
k4: null, // 'Change From 52-week High',
j6: null, // 'Percent Change From 52-week Low',
k5: null, // 'Percebt Change From 52-week High',
w: null, // '52-week Range',
// System Info
i: null, // 'More Info',
j1: null, // 'Market Capitalization',
j3: null, // 'Market Cap (Realtime)',
f6: null, // 'Float Shares',
n: null, // 'Name',
n4: null, // 'Notes',
s1: null, // 'Shares Owned',
x: null, // 'Stock Exchange',
j2: null, // 'Shares Outstanding',
// Volume
v: 'summaryDetail.volume', // 'Volume',
a5: 'summaryDetail.askSize', // 'Ask Size',
b6: 'summaryDetail.bidSize', // 'Bid Size',
k3: null, // 'Last Trade Size',
a2: 'summaryDetail.averageDailyVolume10Day', // 'Average Daily Volume',
// Ratio
e: 'defaultKeyStatistics.forwardEps', // 'Earnings Per Share',
e7: null, // 'EPS Estimate Current Year',
e8: null, // 'EPS Estimate Next Year',
e9: null, // 'EPS Estimate Next Quarter',
b4: 'defaultKeyStatistics.bookValue', // 'Book Value',
j4: 'financialData.ebitda', // 'EBITDA',
p5: null, // 'Price per Sales',
p6: null, // 'Price per Book',
r: 'price.trailingPE', // 'PE Ratio',
r2: 'price.forwardPE', // 'PE Ratio (Realtime)',
r5: 'defaultKeyStatistics.pegRatio', // 'PEG Ratio',
r6: null, // 'Price Per EPS Estimate Current Year',
r7: null, // 'Price Per EPS Estimate Next Year',
s7: 'defaultKeyStatistics.shortRatio', // 'Short Ratio',
// Misc
t7: null, // 'Ticker Trend',
t6: null, // 'Trade Links',
i5: null, // 'Order Book (Realtime)',
l2: null, // 'High Limit',
l3: null, // 'Low Limit',
v1: null, // 'Holdings Value',
v7: null, // 'Holdings Value (Realtime)',
s6: null, // 'Revenue',
e1: null, // 'Error Indication (returned for symbol changed or invalid)'
}
};