axionquant-sdk 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- axionquant_sdk-0.1.0/PKG-INFO +330 -0
- axionquant_sdk-0.1.0/README.md +310 -0
- axionquant_sdk-0.1.0/axion/__init__.py +8 -0
- axionquant_sdk-0.1.0/axion/axion.py +612 -0
- axionquant_sdk-0.1.0/axion/models.py +111 -0
- axionquant_sdk-0.1.0/axion/ta.py +230 -0
- axionquant_sdk-0.1.0/axion/utils.py +283 -0
- axionquant_sdk-0.1.0/axion/visualize.py +241 -0
- axionquant_sdk-0.1.0/axionquant_sdk.egg-info/PKG-INFO +330 -0
- axionquant_sdk-0.1.0/axionquant_sdk.egg-info/SOURCES.txt +13 -0
- axionquant_sdk-0.1.0/axionquant_sdk.egg-info/dependency_links.txt +1 -0
- axionquant_sdk-0.1.0/axionquant_sdk.egg-info/requires.txt +11 -0
- axionquant_sdk-0.1.0/axionquant_sdk.egg-info/top_level.txt +1 -0
- axionquant_sdk-0.1.0/pyproject.toml +36 -0
- axionquant_sdk-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: axionquant-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Short description
|
|
5
|
+
Author-email: AxionQuant <admin@axionquant.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/axionquant/python-sdk
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: requests>=2.28.0
|
|
11
|
+
Requires-Dist: pandas>=1.5.0
|
|
12
|
+
Requires-Dist: numpy>=1.21.0
|
|
13
|
+
Requires-Dist: ipython
|
|
14
|
+
Requires-Dist: plotly
|
|
15
|
+
Requires-Dist: tensorflow
|
|
16
|
+
Requires-Dist: scikit-learn
|
|
17
|
+
Requires-Dist: tqdm
|
|
18
|
+
Requires-Dist: parsedatetime
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
|
|
21
|
+
# Axion Python SDK
|
|
22
|
+
|
|
23
|
+
A comprehensive Python client for accessing financial market data, economic indicators, company profiles, and more through the Axion API.
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install axion-sdk
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from axion import Axion
|
|
35
|
+
|
|
36
|
+
# Initialize the client with your API key
|
|
37
|
+
client = Axion(api_key="your_api_key_here")
|
|
38
|
+
|
|
39
|
+
# Get stock prices
|
|
40
|
+
prices = client.get_stock_prices("AAPL", from_date="2024-01-01", to_date="2024-12-31")
|
|
41
|
+
|
|
42
|
+
# Search for economic data
|
|
43
|
+
econ_data = client.search_econ("unemployment rate")
|
|
44
|
+
|
|
45
|
+
# Get company news
|
|
46
|
+
news = client.get_company_news("TSLA")
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Authentication
|
|
50
|
+
|
|
51
|
+
Most endpoints require authentication. Initialize the client with your API key:
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
client = Axion(api_key="your_api_key_here")
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Features
|
|
58
|
+
|
|
59
|
+
### Stocks API
|
|
60
|
+
|
|
61
|
+
Get stock ticker information, prices, and historical data.
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
# Get all stock tickers (filtered by country/exchange)
|
|
65
|
+
tickers = client.get_stock_tickers(country="america")
|
|
66
|
+
|
|
67
|
+
# Get specific ticker information
|
|
68
|
+
ticker_info = client.get_stock_ticker_by_symbol("AAPL")
|
|
69
|
+
|
|
70
|
+
# Get historical prices
|
|
71
|
+
prices = client.get_stock_prices(
|
|
72
|
+
ticker="AAPL",
|
|
73
|
+
from_date="2024-01-01",
|
|
74
|
+
to_date="2024-12-31",
|
|
75
|
+
frame="daily" # Options: daily, weekly, monthly, quarterly, yearly
|
|
76
|
+
)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Company Profiles API
|
|
80
|
+
|
|
81
|
+
Access comprehensive company information and financial statements.
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
# Company overview and business summary
|
|
85
|
+
profile = client.get_company_asset_profile("AAPL")
|
|
86
|
+
|
|
87
|
+
# Financial statements
|
|
88
|
+
income_statement = client.get_company_income_statement("AAPL")
|
|
89
|
+
balance_sheet = client.get_company_balance_sheet("AAPL")
|
|
90
|
+
cashflow = client.get_company_cashflow("AAPL")
|
|
91
|
+
|
|
92
|
+
# Key statistics and ratios
|
|
93
|
+
stats = client.get_company_statistics("AAPL")
|
|
94
|
+
|
|
95
|
+
# Earnings data
|
|
96
|
+
earnings = client.get_company_earnings_history("AAPL")
|
|
97
|
+
earnings_trend = client.get_company_earnings_trend("AAPL")
|
|
98
|
+
|
|
99
|
+
# Ownership information
|
|
100
|
+
insiders = client.get_company_insider_holders("AAPL")
|
|
101
|
+
institutions = client.get_company_institution_ownership("AAPL")
|
|
102
|
+
major_holders = client.get_company_major_holders("AAPL")
|
|
103
|
+
|
|
104
|
+
# Analyst data
|
|
105
|
+
recommendations = client.get_company_recommendation_trend("AAPL")
|
|
106
|
+
|
|
107
|
+
# Other data
|
|
108
|
+
calendar = client.get_company_calendar_events("AAPL")
|
|
109
|
+
traffic = client.get_company_website_traffic("AAPL")
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Cryptocurrency API
|
|
113
|
+
|
|
114
|
+
Access cryptocurrency ticker data and historical prices.
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
# Get all crypto tickers
|
|
118
|
+
crypto_tickers = client.get_crypto_tickers(type="coin")
|
|
119
|
+
|
|
120
|
+
# Get specific crypto information
|
|
121
|
+
btc_info = client.get_crypto_ticker_by_symbol("BTC")
|
|
122
|
+
|
|
123
|
+
# Get crypto prices
|
|
124
|
+
btc_prices = client.get_crypto_prices(
|
|
125
|
+
ticker="BTC",
|
|
126
|
+
from_date="2024-01-01",
|
|
127
|
+
frame="daily"
|
|
128
|
+
)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Forex API
|
|
132
|
+
|
|
133
|
+
Access foreign exchange rates and historical data.
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
# Get forex tickers
|
|
137
|
+
forex_tickers = client.get_forex_tickers()
|
|
138
|
+
|
|
139
|
+
# Get specific forex pair
|
|
140
|
+
pair_info = client.get_forex_ticker_by_symbol("EURUSD")
|
|
141
|
+
|
|
142
|
+
# Get forex prices
|
|
143
|
+
prices = client.get_forex_prices("EURUSD", from_date="2024-01-01")
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Futures API
|
|
147
|
+
|
|
148
|
+
Access futures contract data and prices.
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
# Get futures tickers
|
|
152
|
+
futures = client.get_futures_tickers(exchange="CME")
|
|
153
|
+
|
|
154
|
+
# Get specific futures contract
|
|
155
|
+
contract = client.get_futures_ticker_by_symbol("ES")
|
|
156
|
+
|
|
157
|
+
# Get futures prices
|
|
158
|
+
prices = client.get_futures_prices("ES", from_date="2024-01-01")
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Indices API
|
|
162
|
+
|
|
163
|
+
Access market index data and historical performance.
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
# Get index tickers
|
|
167
|
+
indices = client.get_index_tickers()
|
|
168
|
+
|
|
169
|
+
# Get specific index
|
|
170
|
+
index_info = client.get_index_ticker_by_symbol("SPX")
|
|
171
|
+
|
|
172
|
+
# Get index prices
|
|
173
|
+
prices = client.get_index_prices("SPX", from_date="2024-01-01")
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Economic Data API
|
|
177
|
+
|
|
178
|
+
Search and retrieve economic indicators and calendar events.
|
|
179
|
+
|
|
180
|
+
```python
|
|
181
|
+
# Search for economic series
|
|
182
|
+
results = client.search_econ("GDP")
|
|
183
|
+
|
|
184
|
+
# Get economic dataset
|
|
185
|
+
dataset = client.get_econ_dataset("UNRATE")
|
|
186
|
+
|
|
187
|
+
# Get economic calendar with filters
|
|
188
|
+
calendar = client.get_econ_calendar(
|
|
189
|
+
from_date="2024-01-01",
|
|
190
|
+
to_date="2024-12-31",
|
|
191
|
+
country="US,UK,CA",
|
|
192
|
+
min_importance=3,
|
|
193
|
+
currency="USD",
|
|
194
|
+
category="employment,inflation"
|
|
195
|
+
)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### ETF API
|
|
199
|
+
|
|
200
|
+
Access ETF fund data, holdings, and exposure information.
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
# Get ETF fund details
|
|
204
|
+
fund_data = client.get_etf_fund_data("SPY")
|
|
205
|
+
|
|
206
|
+
# Get ETF holdings
|
|
207
|
+
holdings = client.get_etf_holdings("SPY")
|
|
208
|
+
|
|
209
|
+
# Get exposure data
|
|
210
|
+
exposure = client.get_etf_exposure("SPY")
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### News API
|
|
214
|
+
|
|
215
|
+
Access financial news articles by company, country, or category.
|
|
216
|
+
|
|
217
|
+
```python
|
|
218
|
+
# Get general news
|
|
219
|
+
news = client.get_news()
|
|
220
|
+
|
|
221
|
+
# Get company-specific news
|
|
222
|
+
company_news = client.get_company_news("AAPL")
|
|
223
|
+
|
|
224
|
+
# Get country news
|
|
225
|
+
country_news = client.get_country_news("US")
|
|
226
|
+
|
|
227
|
+
# Get category news
|
|
228
|
+
category_news = client.get_category_news("technology")
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Sentiment API
|
|
232
|
+
|
|
233
|
+
Analyze market sentiment from social media, news, and analyst ratings.
|
|
234
|
+
|
|
235
|
+
```python
|
|
236
|
+
# Get all sentiment data
|
|
237
|
+
all_sentiment = client.get_sentiment_all("AAPL")
|
|
238
|
+
|
|
239
|
+
# Get specific sentiment types
|
|
240
|
+
social = client.get_sentiment_social("AAPL")
|
|
241
|
+
news = client.get_sentiment_news("AAPL")
|
|
242
|
+
analyst = client.get_sentiment_analyst("AAPL")
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### ESG API
|
|
246
|
+
|
|
247
|
+
Access Environmental, Social, and Governance data.
|
|
248
|
+
|
|
249
|
+
```python
|
|
250
|
+
esg_data = client.get_esg_data("AAPL")
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Credit Ratings API
|
|
254
|
+
|
|
255
|
+
Search for credit entities and retrieve credit ratings.
|
|
256
|
+
|
|
257
|
+
```python
|
|
258
|
+
# Search for credit entities
|
|
259
|
+
results = client.search_credit("Apple Inc")
|
|
260
|
+
|
|
261
|
+
# Get credit ratings
|
|
262
|
+
ratings = client.get_credit_ratings("entity_id_here")
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Supply Chain API
|
|
266
|
+
|
|
267
|
+
Analyze company supply chain relationships.
|
|
268
|
+
|
|
269
|
+
```python
|
|
270
|
+
# Get customers
|
|
271
|
+
customers = client.get_supply_chain_customers("AAPL")
|
|
272
|
+
|
|
273
|
+
# Get suppliers
|
|
274
|
+
suppliers = client.get_supply_chain_suppliers("AAPL")
|
|
275
|
+
|
|
276
|
+
# Get peers
|
|
277
|
+
peers = client.get_supply_chain_peers("AAPL")
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Error Handling
|
|
281
|
+
|
|
282
|
+
The SDK provides detailed error messages for various failure scenarios:
|
|
283
|
+
|
|
284
|
+
```python
|
|
285
|
+
try:
|
|
286
|
+
data = client.get_stock_prices("INVALID")
|
|
287
|
+
except Exception as e:
|
|
288
|
+
print(f"Error: {e}")
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
Common errors include:
|
|
292
|
+
- **HTTP Error**: API returned an error status code
|
|
293
|
+
- **Connection Error**: Unable to connect to the API
|
|
294
|
+
- **Timeout Error**: Request took too long to complete
|
|
295
|
+
- **Authentication Error**: Missing or invalid API key
|
|
296
|
+
|
|
297
|
+
## Free Tier Limitations
|
|
298
|
+
|
|
299
|
+
The free tier has some restrictions:
|
|
300
|
+
- Stock API: Limited to 'america' country
|
|
301
|
+
- Rate limits may apply to certain endpoints
|
|
302
|
+
|
|
303
|
+
## Date Formats
|
|
304
|
+
|
|
305
|
+
All date parameters should be in `YYYY-MM-DD` format:
|
|
306
|
+
|
|
307
|
+
```python
|
|
308
|
+
data = client.get_stock_prices("AAPL", from_date="2024-01-01", to_date="2024-12-31")
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## Time Frames
|
|
312
|
+
|
|
313
|
+
Price endpoints support various time frames:
|
|
314
|
+
- `daily` (default)
|
|
315
|
+
- `weekly`
|
|
316
|
+
- `monthly`
|
|
317
|
+
- `quarterly`
|
|
318
|
+
- `yearly`
|
|
319
|
+
|
|
320
|
+
```python
|
|
321
|
+
prices = client.get_stock_prices("AAPL", frame="monthly")
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## Support
|
|
325
|
+
|
|
326
|
+
For API documentation, support, or to obtain an API key, visit the Axion API website.
|
|
327
|
+
|
|
328
|
+
## License
|
|
329
|
+
|
|
330
|
+
See LICENSE file for details.
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# Axion Python SDK
|
|
2
|
+
|
|
3
|
+
A comprehensive Python client for accessing financial market data, economic indicators, company profiles, and more through the Axion API.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install axion-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from axion import Axion
|
|
15
|
+
|
|
16
|
+
# Initialize the client with your API key
|
|
17
|
+
client = Axion(api_key="your_api_key_here")
|
|
18
|
+
|
|
19
|
+
# Get stock prices
|
|
20
|
+
prices = client.get_stock_prices("AAPL", from_date="2024-01-01", to_date="2024-12-31")
|
|
21
|
+
|
|
22
|
+
# Search for economic data
|
|
23
|
+
econ_data = client.search_econ("unemployment rate")
|
|
24
|
+
|
|
25
|
+
# Get company news
|
|
26
|
+
news = client.get_company_news("TSLA")
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Authentication
|
|
30
|
+
|
|
31
|
+
Most endpoints require authentication. Initialize the client with your API key:
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
client = Axion(api_key="your_api_key_here")
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
### Stocks API
|
|
40
|
+
|
|
41
|
+
Get stock ticker information, prices, and historical data.
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
# Get all stock tickers (filtered by country/exchange)
|
|
45
|
+
tickers = client.get_stock_tickers(country="america")
|
|
46
|
+
|
|
47
|
+
# Get specific ticker information
|
|
48
|
+
ticker_info = client.get_stock_ticker_by_symbol("AAPL")
|
|
49
|
+
|
|
50
|
+
# Get historical prices
|
|
51
|
+
prices = client.get_stock_prices(
|
|
52
|
+
ticker="AAPL",
|
|
53
|
+
from_date="2024-01-01",
|
|
54
|
+
to_date="2024-12-31",
|
|
55
|
+
frame="daily" # Options: daily, weekly, monthly, quarterly, yearly
|
|
56
|
+
)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Company Profiles API
|
|
60
|
+
|
|
61
|
+
Access comprehensive company information and financial statements.
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
# Company overview and business summary
|
|
65
|
+
profile = client.get_company_asset_profile("AAPL")
|
|
66
|
+
|
|
67
|
+
# Financial statements
|
|
68
|
+
income_statement = client.get_company_income_statement("AAPL")
|
|
69
|
+
balance_sheet = client.get_company_balance_sheet("AAPL")
|
|
70
|
+
cashflow = client.get_company_cashflow("AAPL")
|
|
71
|
+
|
|
72
|
+
# Key statistics and ratios
|
|
73
|
+
stats = client.get_company_statistics("AAPL")
|
|
74
|
+
|
|
75
|
+
# Earnings data
|
|
76
|
+
earnings = client.get_company_earnings_history("AAPL")
|
|
77
|
+
earnings_trend = client.get_company_earnings_trend("AAPL")
|
|
78
|
+
|
|
79
|
+
# Ownership information
|
|
80
|
+
insiders = client.get_company_insider_holders("AAPL")
|
|
81
|
+
institutions = client.get_company_institution_ownership("AAPL")
|
|
82
|
+
major_holders = client.get_company_major_holders("AAPL")
|
|
83
|
+
|
|
84
|
+
# Analyst data
|
|
85
|
+
recommendations = client.get_company_recommendation_trend("AAPL")
|
|
86
|
+
|
|
87
|
+
# Other data
|
|
88
|
+
calendar = client.get_company_calendar_events("AAPL")
|
|
89
|
+
traffic = client.get_company_website_traffic("AAPL")
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Cryptocurrency API
|
|
93
|
+
|
|
94
|
+
Access cryptocurrency ticker data and historical prices.
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
# Get all crypto tickers
|
|
98
|
+
crypto_tickers = client.get_crypto_tickers(type="coin")
|
|
99
|
+
|
|
100
|
+
# Get specific crypto information
|
|
101
|
+
btc_info = client.get_crypto_ticker_by_symbol("BTC")
|
|
102
|
+
|
|
103
|
+
# Get crypto prices
|
|
104
|
+
btc_prices = client.get_crypto_prices(
|
|
105
|
+
ticker="BTC",
|
|
106
|
+
from_date="2024-01-01",
|
|
107
|
+
frame="daily"
|
|
108
|
+
)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Forex API
|
|
112
|
+
|
|
113
|
+
Access foreign exchange rates and historical data.
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
# Get forex tickers
|
|
117
|
+
forex_tickers = client.get_forex_tickers()
|
|
118
|
+
|
|
119
|
+
# Get specific forex pair
|
|
120
|
+
pair_info = client.get_forex_ticker_by_symbol("EURUSD")
|
|
121
|
+
|
|
122
|
+
# Get forex prices
|
|
123
|
+
prices = client.get_forex_prices("EURUSD", from_date="2024-01-01")
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Futures API
|
|
127
|
+
|
|
128
|
+
Access futures contract data and prices.
|
|
129
|
+
|
|
130
|
+
```python
|
|
131
|
+
# Get futures tickers
|
|
132
|
+
futures = client.get_futures_tickers(exchange="CME")
|
|
133
|
+
|
|
134
|
+
# Get specific futures contract
|
|
135
|
+
contract = client.get_futures_ticker_by_symbol("ES")
|
|
136
|
+
|
|
137
|
+
# Get futures prices
|
|
138
|
+
prices = client.get_futures_prices("ES", from_date="2024-01-01")
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Indices API
|
|
142
|
+
|
|
143
|
+
Access market index data and historical performance.
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
# Get index tickers
|
|
147
|
+
indices = client.get_index_tickers()
|
|
148
|
+
|
|
149
|
+
# Get specific index
|
|
150
|
+
index_info = client.get_index_ticker_by_symbol("SPX")
|
|
151
|
+
|
|
152
|
+
# Get index prices
|
|
153
|
+
prices = client.get_index_prices("SPX", from_date="2024-01-01")
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Economic Data API
|
|
157
|
+
|
|
158
|
+
Search and retrieve economic indicators and calendar events.
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
# Search for economic series
|
|
162
|
+
results = client.search_econ("GDP")
|
|
163
|
+
|
|
164
|
+
# Get economic dataset
|
|
165
|
+
dataset = client.get_econ_dataset("UNRATE")
|
|
166
|
+
|
|
167
|
+
# Get economic calendar with filters
|
|
168
|
+
calendar = client.get_econ_calendar(
|
|
169
|
+
from_date="2024-01-01",
|
|
170
|
+
to_date="2024-12-31",
|
|
171
|
+
country="US,UK,CA",
|
|
172
|
+
min_importance=3,
|
|
173
|
+
currency="USD",
|
|
174
|
+
category="employment,inflation"
|
|
175
|
+
)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### ETF API
|
|
179
|
+
|
|
180
|
+
Access ETF fund data, holdings, and exposure information.
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
# Get ETF fund details
|
|
184
|
+
fund_data = client.get_etf_fund_data("SPY")
|
|
185
|
+
|
|
186
|
+
# Get ETF holdings
|
|
187
|
+
holdings = client.get_etf_holdings("SPY")
|
|
188
|
+
|
|
189
|
+
# Get exposure data
|
|
190
|
+
exposure = client.get_etf_exposure("SPY")
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### News API
|
|
194
|
+
|
|
195
|
+
Access financial news articles by company, country, or category.
|
|
196
|
+
|
|
197
|
+
```python
|
|
198
|
+
# Get general news
|
|
199
|
+
news = client.get_news()
|
|
200
|
+
|
|
201
|
+
# Get company-specific news
|
|
202
|
+
company_news = client.get_company_news("AAPL")
|
|
203
|
+
|
|
204
|
+
# Get country news
|
|
205
|
+
country_news = client.get_country_news("US")
|
|
206
|
+
|
|
207
|
+
# Get category news
|
|
208
|
+
category_news = client.get_category_news("technology")
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Sentiment API
|
|
212
|
+
|
|
213
|
+
Analyze market sentiment from social media, news, and analyst ratings.
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
# Get all sentiment data
|
|
217
|
+
all_sentiment = client.get_sentiment_all("AAPL")
|
|
218
|
+
|
|
219
|
+
# Get specific sentiment types
|
|
220
|
+
social = client.get_sentiment_social("AAPL")
|
|
221
|
+
news = client.get_sentiment_news("AAPL")
|
|
222
|
+
analyst = client.get_sentiment_analyst("AAPL")
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### ESG API
|
|
226
|
+
|
|
227
|
+
Access Environmental, Social, and Governance data.
|
|
228
|
+
|
|
229
|
+
```python
|
|
230
|
+
esg_data = client.get_esg_data("AAPL")
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Credit Ratings API
|
|
234
|
+
|
|
235
|
+
Search for credit entities and retrieve credit ratings.
|
|
236
|
+
|
|
237
|
+
```python
|
|
238
|
+
# Search for credit entities
|
|
239
|
+
results = client.search_credit("Apple Inc")
|
|
240
|
+
|
|
241
|
+
# Get credit ratings
|
|
242
|
+
ratings = client.get_credit_ratings("entity_id_here")
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Supply Chain API
|
|
246
|
+
|
|
247
|
+
Analyze company supply chain relationships.
|
|
248
|
+
|
|
249
|
+
```python
|
|
250
|
+
# Get customers
|
|
251
|
+
customers = client.get_supply_chain_customers("AAPL")
|
|
252
|
+
|
|
253
|
+
# Get suppliers
|
|
254
|
+
suppliers = client.get_supply_chain_suppliers("AAPL")
|
|
255
|
+
|
|
256
|
+
# Get peers
|
|
257
|
+
peers = client.get_supply_chain_peers("AAPL")
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## Error Handling
|
|
261
|
+
|
|
262
|
+
The SDK provides detailed error messages for various failure scenarios:
|
|
263
|
+
|
|
264
|
+
```python
|
|
265
|
+
try:
|
|
266
|
+
data = client.get_stock_prices("INVALID")
|
|
267
|
+
except Exception as e:
|
|
268
|
+
print(f"Error: {e}")
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Common errors include:
|
|
272
|
+
- **HTTP Error**: API returned an error status code
|
|
273
|
+
- **Connection Error**: Unable to connect to the API
|
|
274
|
+
- **Timeout Error**: Request took too long to complete
|
|
275
|
+
- **Authentication Error**: Missing or invalid API key
|
|
276
|
+
|
|
277
|
+
## Free Tier Limitations
|
|
278
|
+
|
|
279
|
+
The free tier has some restrictions:
|
|
280
|
+
- Stock API: Limited to 'america' country
|
|
281
|
+
- Rate limits may apply to certain endpoints
|
|
282
|
+
|
|
283
|
+
## Date Formats
|
|
284
|
+
|
|
285
|
+
All date parameters should be in `YYYY-MM-DD` format:
|
|
286
|
+
|
|
287
|
+
```python
|
|
288
|
+
data = client.get_stock_prices("AAPL", from_date="2024-01-01", to_date="2024-12-31")
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
## Time Frames
|
|
292
|
+
|
|
293
|
+
Price endpoints support various time frames:
|
|
294
|
+
- `daily` (default)
|
|
295
|
+
- `weekly`
|
|
296
|
+
- `monthly`
|
|
297
|
+
- `quarterly`
|
|
298
|
+
- `yearly`
|
|
299
|
+
|
|
300
|
+
```python
|
|
301
|
+
prices = client.get_stock_prices("AAPL", frame="monthly")
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Support
|
|
305
|
+
|
|
306
|
+
For API documentation, support, or to obtain an API key, visit the Axion API website.
|
|
307
|
+
|
|
308
|
+
## License
|
|
309
|
+
|
|
310
|
+
See LICENSE file for details.
|