-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsector.lisp
29 lines (20 loc) · 1.1 KB
/
sector.lisp
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
(in-package :fmp)
(defun sectors-performance ()
"Provides performance of each sector of the stock market over a specified period of time"
(return-json-v3 "sectors-performance"))
(defun sectors-historical (&key(limit 120))
"Provided historical data on the performance of each sector of the stock market."
(return-json-v3 "historical-sectors-performance" (pairlis '("limit") `(,limit))))
(defun sector-pe-ratio (&key date exchange)
"Price to Earnings (PE) ratio for each sector of the stock market.
Date must be in format YYYY-MM-DD"
(return-json-v4 (concatenate
'string
"sector_price_earning_ratio")
(pairlis '("date" "exchange") `(,date ,exchange))))
(defun market-index ()
"List of all the major stock market indices such as S&P 500, Dow Jones Industrial Average and Nasdaq Composity Index"
(return-json-v3 "quotes/index"))
(defun stock-peers (&key ticker)
"Group of companies that tradde in the same exchange, are in the same sector and have similar market capitalization"
(return-json-v4 "stock_peers" (pairlis '("symbol") `(,ticker))))