forked from s0h3ck/finnhub-api-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.py
More file actions
103 lines (69 loc) · 2.81 KB
/
examples.py
File metadata and controls
103 lines (69 loc) · 2.81 KB
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
from finnhub import client as Finnhub
client = Finnhub.Client(api_key="********************")
# Get real-time update on the number of COVID-19 (Coronavirus) cases in the US
client.covid()
# Get general information of a company
client.company_profile(symbol="NFLX")
# Get latest company's CEO compensation
client.ceo_compensation(symbol="NFLX")
# Get latest analyst recommendation trends
client.recommendation(symbol="NFLX")
# Get latest price target consensus
client.price_target(symbol="NFLX")
# Get latest stock upgrade and downgrade
client.upgrade_downgrade(symbol="NFLX")
# Get company option chain
client.option_chain(symbol="NFLX")
# Get company peers
client.peers(symbol="NFLX")
# Get company quarterly earnings
client.earnings(symbol="NFLX")
# List supported stock exchanges
client.exchange()
# List supported stocks
client.stock_symbol(exchange="US")
# Get quote data
client.quote(symbol="NFLX")
# Get candlestick data for stocks
client.stock_candle(symbol="NFLX", resolution="D", count=200)
client.stock_candle(symbol="NFLX", resolution="D", **{'from':'1575968404', 'to': '1575968424'})
# [PREMIUM] Get tick data
# client.stock_tick(symbol="NFLX", resolution="D", **{'from':'1575968404', 'to': '1575968424'})
# List supported forex exchanges
client.forex_exchange()
# List supported forex symbols
client.forex_symbol(exchange="oanda")
# Get candlestick data for forex symbols
client.forex_candle(symbol="OANDA:EUR_USD", resolution="D", count=200)
# List supported crypto symbols by exchange
client.crypto_symbol(exchange="binance")
# Get candlestick data for crypto symbols
client.crypto_candle(symbol="BINANCE:BTCUSDT", resolution="D", count=200)
# Get pattern recognition on a symbol (support double top/bottom, triple top/bottom, head and shoulders, triangle, wedge, channel, flag, and candlestick patterns)
client.scan_pattern(symbol="NFLX", resolution="D")
# Get support and resistance levels for a symbol
client.scan_support_resistance(symbol="NFLX", resolution="D")
# Get aggregate signal of multiple technical indicators
client.scan_technical_indicator(symbol="NFLX", resolution="D")
# Get latest market news
client.news(category="general")
# List latest company news by symbol
client.company_news(symbol="NFLX")
# Get company's news sentiment and statistics
client.news_sentiment(symbol="NFLX")
# List countries where merger and acquisitions take place
client.merger_country()
# List latest merger and acquisitions deal by country.
client.merger(country="United States")
# List codes of supported economic data
client.economic_code()
# Get economic data
client.economic(code="MA-USA-G")
# Get recent and coming economic releases
client.calendar_economic()
# Get recent and coming earnings release
client.calendar_earnings()
# Get recent and coming IPO
client.calendar_ipo()
# Get recent and coming ICO
client.calendar_ico()