@axionquant/sdk 1.0.4 → 1.1.3

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.
package/dist/index.d.ts CHANGED
@@ -103,25 +103,89 @@ declare class SentimentAPI extends BaseAPI {
103
103
  analyst(ticker: string): Promise<ApiResponse>;
104
104
  }
105
105
  declare class ProfilesAPI extends BaseAPI {
106
- asset(ticker: string): Promise<ApiResponse>;
106
+ profile(ticker: string): Promise<ApiResponse>;
107
107
  recommendation(ticker: string): Promise<ApiResponse>;
108
- cashflow(ticker: string): Promise<ApiResponse>;
109
- indexTrend(ticker: string): Promise<ApiResponse>;
110
108
  statistics(ticker: string): Promise<ApiResponse>;
111
- income(ticker: string): Promise<ApiResponse>;
112
- fund(ticker: string): Promise<ApiResponse>;
113
109
  summary(ticker: string): Promise<ApiResponse>;
114
- insiders(ticker: string): Promise<ApiResponse>;
115
110
  calendar(ticker: string): Promise<ApiResponse>;
116
- balancesheet(ticker: string): Promise<ApiResponse>;
117
- earningsTrend(ticker: string): Promise<ApiResponse>;
118
- institutionOwnership(ticker: string): Promise<ApiResponse>;
119
- ownership(ticker: string): Promise<ApiResponse>;
120
- earnings(ticker: string): Promise<ApiResponse>;
121
111
  info(ticker: string): Promise<ApiResponse>;
112
+ }
113
+ declare class EarningsAPI extends BaseAPI {
114
+ history(ticker: string): Promise<ApiResponse>;
115
+ trend(ticker: string): Promise<ApiResponse>;
116
+ index(ticker: string): Promise<ApiResponse>;
117
+ report(ticker: string, params: {
118
+ year: string;
119
+ quarter: string;
120
+ }): Promise<ApiResponse>;
121
+ }
122
+ declare class FilingsAPI extends BaseAPI {
123
+ filings(ticker: string, params?: {
124
+ limit?: number;
125
+ form?: string;
126
+ }): Promise<ApiResponse>;
127
+ forms(ticker: string, formType: string, params?: {
128
+ year?: string;
129
+ quarter?: string;
130
+ limit?: number;
131
+ }): Promise<ApiResponse>;
132
+ descForms(): Promise<ApiResponse>;
133
+ search(params: {
134
+ year: string;
135
+ quarter: string;
136
+ form?: string;
137
+ ticker?: string;
138
+ }): Promise<ApiResponse>;
139
+ }
140
+ declare class FinancialsAPI extends BaseAPI {
141
+ revenue(ticker: string, params?: {
142
+ periods?: number;
143
+ }): Promise<ApiResponse>;
144
+ netIncome(ticker: string, params?: {
145
+ periods?: number;
146
+ }): Promise<ApiResponse>;
147
+ totalAssets(ticker: string, params?: {
148
+ periods?: number;
149
+ }): Promise<ApiResponse>;
150
+ totalLiabilities(ticker: string, params?: {
151
+ periods?: number;
152
+ }): Promise<ApiResponse>;
153
+ stockholdersEquity(ticker: string, params?: {
154
+ periods?: number;
155
+ }): Promise<ApiResponse>;
156
+ currentAssets(ticker: string, params?: {
157
+ periods?: number;
158
+ }): Promise<ApiResponse>;
159
+ currentLiabilities(ticker: string, params?: {
160
+ periods?: number;
161
+ }): Promise<ApiResponse>;
162
+ operatingCashFlow(ticker: string, params?: {
163
+ periods?: number;
164
+ }): Promise<ApiResponse>;
165
+ capitalExpenditures(ticker: string, params?: {
166
+ periods?: number;
167
+ }): Promise<ApiResponse>;
168
+ freeCashFlow(ticker: string, params?: {
169
+ periods?: number;
170
+ }): Promise<ApiResponse>;
171
+ sharesOutstandingBasic(ticker: string, params?: {
172
+ periods?: number;
173
+ }): Promise<ApiResponse>;
174
+ sharesOutstandingDiluted(ticker: string, params?: {
175
+ periods?: number;
176
+ }): Promise<ApiResponse>;
177
+ metrics(ticker: string): Promise<ApiResponse>;
178
+ snapshot(ticker: string): Promise<ApiResponse>;
179
+ }
180
+ declare class InsidersAPI extends BaseAPI {
181
+ funds(ticker: string): Promise<ApiResponse>;
182
+ individuals(ticker: string): Promise<ApiResponse>;
183
+ institutions(ticker: string): Promise<ApiResponse>;
184
+ ownership(ticker: string): Promise<ApiResponse>;
122
185
  activity(ticker: string): Promise<ApiResponse>;
123
186
  transactions(ticker: string): Promise<ApiResponse>;
124
- financials(ticker: string): Promise<ApiResponse>;
187
+ }
188
+ declare class WebTrafficAPI extends BaseAPI {
125
189
  traffic(ticker: string): Promise<ApiResponse>;
126
190
  }
127
191
  export declare class Axion {
@@ -140,6 +204,11 @@ export declare class Axion {
140
204
  news: NewsAPI;
141
205
  sentiment: SentimentAPI;
142
206
  profiles: ProfilesAPI;
207
+ earnings: EarningsAPI;
208
+ filings: FilingsAPI;
209
+ financials: FinancialsAPI;
210
+ insiders: InsidersAPI;
211
+ webTraffic: WebTrafficAPI;
143
212
  constructor(apiKey?: string);
144
213
  _request(method: string, path: string, params?: Record<string, any>, data?: Record<string, any>, authRequired?: boolean): Promise<ApiResponse>;
145
214
  }
package/dist/index.js CHANGED
@@ -144,65 +144,155 @@ class SentimentAPI extends BaseAPI {
144
144
  }
145
145
  }
146
146
  class ProfilesAPI extends BaseAPI {
147
- asset(ticker) {
148
- return this._request("GET", `profiles/${ticker}/asset`);
147
+ // GET /:ticker - Returns asset profile
148
+ profile(ticker) {
149
+ return this._request("GET", `profiles/${ticker}`);
149
150
  }
151
+ // GET /:ticker/recommendation - Returns recommendation trend
150
152
  recommendation(ticker) {
151
153
  return this._request("GET", `profiles/${ticker}/recommendation`);
152
154
  }
153
- cashflow(ticker) {
154
- return this._request("GET", `profiles/${ticker}/cashflow`);
155
- }
156
- indexTrend(ticker) {
157
- return this._request("GET", `profiles/${ticker}/trend/index`);
158
- }
155
+ // GET /:ticker/statistics - Returns key statistics
159
156
  statistics(ticker) {
160
157
  return this._request("GET", `profiles/${ticker}/statistics`);
161
158
  }
162
- income(ticker) {
163
- return this._request("GET", `profiles/${ticker}/income`);
164
- }
165
- fund(ticker) {
166
- return this._request("GET", `profiles/${ticker}/fund`);
167
- }
159
+ // GET /:ticker/summary - Returns summary detail
168
160
  summary(ticker) {
169
161
  return this._request("GET", `profiles/${ticker}/summary`);
170
162
  }
171
- insiders(ticker) {
172
- return this._request("GET", `profiles/${ticker}/insiders`);
173
- }
163
+ // GET /:ticker/calendar - Returns calendar events (earnings, dividends)
174
164
  calendar(ticker) {
175
165
  return this._request("GET", `profiles/${ticker}/calendar`);
176
166
  }
177
- balancesheet(ticker) {
178
- return this._request("GET", `profiles/${ticker}/balancesheet`);
167
+ // GET /:ticker/info - Returns company info (summary profile)
168
+ info(ticker) {
169
+ return this._request("GET", `profiles/${ticker}/info`);
179
170
  }
180
- earningsTrend(ticker) {
181
- return this._request("GET", `profiles/${ticker}/trend/earnings`);
171
+ }
172
+ class EarningsAPI extends BaseAPI {
173
+ // GET /:ticker/history - Returns earnings history
174
+ history(ticker) {
175
+ return this._request("GET", `earnings/${ticker}/history`);
182
176
  }
183
- institutionOwnership(ticker) {
184
- return this._request("GET", `profiles/${ticker}/institution`);
177
+ // GET /:ticker/trend - Returns earnings trend
178
+ trend(ticker) {
179
+ return this._request("GET", `earnings/${ticker}/trend`);
185
180
  }
186
- ownership(ticker) {
187
- return this._request("GET", `profiles/${ticker}/ownership`);
181
+ // GET /:ticker/index - Returns index trend
182
+ index(ticker) {
183
+ return this._request("GET", `earnings/${ticker}/index`);
188
184
  }
189
- earnings(ticker) {
190
- return this._request("GET", `profiles/${ticker}/earnings`);
185
+ // GET /:ticker/report - Returns earnings report (requires year and quarter query params)
186
+ report(ticker, params) {
187
+ return this._request("GET", `earnings/${ticker}/report`, params);
191
188
  }
192
- info(ticker) {
193
- return this._request("GET", `profiles/${ticker}/info`);
189
+ }
190
+ class FilingsAPI extends BaseAPI {
191
+ // GET /:ticker - Get recent filings for a company
192
+ filings(ticker, params = {}) {
193
+ return this._request("GET", `filings/${ticker}`, params);
194
+ }
195
+ // GET /:ticker/forms/:formType - Get specific form type filings
196
+ forms(ticker, formType, params = {}) {
197
+ return this._request("GET", `filings/${ticker}/forms/${formType}`, params);
198
+ }
199
+ // GET /desc/forms - List available form types and their descriptions
200
+ descForms() {
201
+ return this._request("GET", "filings/desc/forms");
202
+ }
203
+ // GET /search - Search filings by year/quarter
204
+ search(params) {
205
+ return this._request("GET", "filings/search", params);
206
+ }
207
+ }
208
+ class FinancialsAPI extends BaseAPI {
209
+ // GET /:ticker/revenue - Get revenue data
210
+ revenue(ticker, params = {}) {
211
+ return this._request("GET", `financials/${ticker}/revenue`, params);
212
+ }
213
+ // GET /:ticker/netincome - Get net income data
214
+ netIncome(ticker, params = {}) {
215
+ return this._request("GET", `financials/${ticker}/netincome`, params);
216
+ }
217
+ // GET /:ticker/total/assets - Get total assets data
218
+ totalAssets(ticker, params = {}) {
219
+ return this._request("GET", `financials/${ticker}/total/assets`, params);
194
220
  }
221
+ // GET /:ticker/total/liabilities - Get total liabilities data
222
+ totalLiabilities(ticker, params = {}) {
223
+ return this._request("GET", `financials/${ticker}/total/liabilities`, params);
224
+ }
225
+ // GET /:ticker/stockholdersequity - Get stockholders equity data
226
+ stockholdersEquity(ticker, params = {}) {
227
+ return this._request("GET", `financials/${ticker}/stockholdersequity`, params);
228
+ }
229
+ // GET /:ticker/current/assets - Get current assets data
230
+ currentAssets(ticker, params = {}) {
231
+ return this._request("GET", `financials/${ticker}/current/assets`, params);
232
+ }
233
+ // GET /:ticker/current/liabilities - Get current liabilities data
234
+ currentLiabilities(ticker, params = {}) {
235
+ return this._request("GET", `financials/${ticker}/current/liabilities`, params);
236
+ }
237
+ // GET /:ticker/cashflow/operating - Get operating cash flow data
238
+ operatingCashFlow(ticker, params = {}) {
239
+ return this._request("GET", `financials/${ticker}/cashflow/operating`, params);
240
+ }
241
+ // GET /:ticker/capitalexpenditures - Get capital expenditures data
242
+ capitalExpenditures(ticker, params = {}) {
243
+ return this._request("GET", `financials/${ticker}/capitalexpenditures`, params);
244
+ }
245
+ // GET /:ticker/cashflow/free - Get free cash flow data
246
+ freeCashFlow(ticker, params = {}) {
247
+ return this._request("GET", `financials/${ticker}/cashflow/free`, params);
248
+ }
249
+ // GET /:ticker/sharesoutstanding/basic - Get basic shares outstanding data
250
+ sharesOutstandingBasic(ticker, params = {}) {
251
+ return this._request("GET", `financials/${ticker}/sharesoutstanding/basic`, params);
252
+ }
253
+ // GET /:ticker/sharesoutstanding/diluted - Get diluted shares outstanding data
254
+ sharesOutstandingDiluted(ticker, params = {}) {
255
+ return this._request("GET", `financials/${ticker}/sharesoutstanding/diluted`, params);
256
+ }
257
+ // GET /:ticker/metrics - Get calculated financial metrics
258
+ metrics(ticker) {
259
+ return this._request("GET", `financials/${ticker}/metrics`);
260
+ }
261
+ // GET /:ticker/snapshot - Get financial data snapshot
262
+ snapshot(ticker) {
263
+ return this._request("GET", `financials/${ticker}/snapshot`);
264
+ }
265
+ }
266
+ class InsidersAPI extends BaseAPI {
267
+ // GET /:ticker/funds - Get fund ownership data
268
+ funds(ticker) {
269
+ return this._request("GET", `insiders/${ticker}/funds`);
270
+ }
271
+ // GET /:ticker/individuals - Get insider holders (individuals)
272
+ individuals(ticker) {
273
+ return this._request("GET", `insiders/${ticker}/individuals`);
274
+ }
275
+ // GET /:ticker/institutions - Get institutional ownership data
276
+ institutions(ticker) {
277
+ return this._request("GET", `insiders/${ticker}/institutions`);
278
+ }
279
+ // GET /:ticker/ownership - Get major holders breakdown
280
+ ownership(ticker) {
281
+ return this._request("GET", `insiders/${ticker}/ownership`);
282
+ }
283
+ // GET /:ticker/activity - Get net share purchase activity
195
284
  activity(ticker) {
196
- return this._request("GET", `profiles/${ticker}/activity`);
285
+ return this._request("GET", `insiders/${ticker}/activity`);
197
286
  }
287
+ // GET /:ticker/transactions - Get insider transactions
198
288
  transactions(ticker) {
199
- return this._request("GET", `profiles/${ticker}/transactions`);
200
- }
201
- financials(ticker) {
202
- return this._request("GET", `profiles/${ticker}/financials`);
289
+ return this._request("GET", `insiders/${ticker}/transactions`);
203
290
  }
291
+ }
292
+ class WebTrafficAPI extends BaseAPI {
293
+ // GET /:ticker/traffic - Get web traffic data for a company's website
204
294
  traffic(ticker) {
205
- return this._request("GET", `profiles/${ticker}/traffic`);
295
+ return this._request("GET", `webtraffic/${ticker}/traffic`);
206
296
  }
207
297
  }
208
298
  class Axion {
@@ -217,7 +307,6 @@ class Axion {
217
307
  if (apiKey) {
218
308
  this.client.defaults.headers.common["Authorization"] = `Bearer ${this.apiKey}`;
219
309
  }
220
- // Initialize nested API classes
221
310
  this.credit = new CreditAPI(this);
222
311
  this.esg = new ESGAPI(this);
223
312
  this.etfs = new ETFAPI(this);
@@ -231,6 +320,11 @@ class Axion {
231
320
  this.news = new NewsAPI(this);
232
321
  this.sentiment = new SentimentAPI(this);
233
322
  this.profiles = new ProfilesAPI(this);
323
+ this.earnings = new EarningsAPI(this);
324
+ this.filings = new FilingsAPI(this);
325
+ this.financials = new FinancialsAPI(this);
326
+ this.insiders = new InsidersAPI(this);
327
+ this.webTraffic = new WebTrafficAPI(this);
234
328
  }
235
329
  async _request(method, path, params = {}, data = {}, authRequired = true) {
236
330
  const config = {
@@ -248,9 +342,6 @@ class Axion {
248
342
  }
249
343
  try {
250
344
  const response = await this.client.request(config);
251
- // The python version has a normalize function, which seems to coerce strings to numbers/booleans.
252
- // This is generally not needed in JS/TS as JSON parsing handles types correctly.
253
- // If the API returns numbers as strings, a normalization step would be needed here.
254
345
  return response.data;
255
346
  }
256
347
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axionquant/sdk",
3
- "version": "1.0.4",
3
+ "version": "1.1.3",
4
4
  "description": "Axion SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Axion SDK
2
2
 
3
- A TypeScript/JavaScript SDK for the Axion financial data API.
3
+ A TypeScript/JavaScript SDK for the [Axion](https://axionquant.com) financial data API.
4
4
 
5
5
  ## Installation
6
6
 
@@ -10,167 +10,170 @@ npm install @axionquant/sdk
10
10
 
11
11
  ## Quick Start
12
12
 
13
- ```typescript
14
- import { Axion } from '@axionquant/sdk';
13
+ [Get your free API key](https://axionquant.com/dashboard/api-keys)
14
+
15
+ ```js
16
+ const { Axion } = require('@axionquant/sdk');
15
17
 
16
- // Initialize with API key
17
18
  const client = new Axion('your-api-key');
18
19
 
19
- // Get stock price data
20
+ // Get stock tickers
21
+ const tickers = await client.stocks.tickers({ country: 'US', exchange: 'NASDAQ' });
22
+
23
+ // Get historical prices
20
24
  const prices = await client.stocks.prices('AAPL', {
21
25
  from: '2024-01-01',
22
- to: '2024-12-31'
26
+ to: '2024-12-31',
27
+ frame: '1d'
23
28
  });
24
29
  ```
25
30
 
26
31
  ## Authentication
27
32
 
28
- Some endpoints require authentication. Provide your API key when initializing the client:
33
+ Most endpoints require an API key. Pass it when initializing the client:
29
34
 
30
- ```typescript
35
+ ```js
31
36
  const client = new Axion('your-api-key');
32
37
  ```
33
38
 
34
- For endpoints that don't require authentication, you can initialize without an API key:
35
-
36
- ```typescript
37
- const client = new Axion();
38
- ```
39
-
40
39
  ## API Reference
41
40
 
42
- ### Credit
43
-
44
- ```typescript
45
- // Search for credit entities
46
- await client.credit.search('Apple Inc');
41
+ ### Stocks
47
42
 
48
- // Get credit ratings for an entity
49
- await client.credit.ratings('entity-id');
50
- ```
43
+ ```js
44
+ // Get all stock tickers
45
+ await client.stocks.tickers({ country: 'US', exchange: 'NASDAQ' });
51
46
 
52
- ### ESG
47
+ // Get ticker info
48
+ await client.stocks.ticker('AAPL');
53
49
 
54
- ```typescript
55
- // Get ESG data for a stock
56
- await client.esg.data('AAPL');
50
+ // Get historical prices
51
+ await client.stocks.prices('AAPL', { from: '2024-01-01', to: '2024-12-31', frame: '1d' });
57
52
  ```
58
53
 
59
- ### ETFs
60
-
61
- ```typescript
62
- // Get ETF fund data
63
- await client.etfs.fund('SPY');
64
-
65
- // Get ETF holdings
66
- await client.etfs.holdings('SPY');
54
+ ### Crypto
67
55
 
68
- // Get ETF exposure data
69
- await client.etfs.exposure('SPY');
56
+ ```js
57
+ await client.crypto.tickers({ type: 'coin' });
58
+ await client.crypto.ticker('BTC');
59
+ await client.crypto.prices('BTC', { from: '2024-01-01', to: '2024-12-31', frame: '1h' });
70
60
  ```
71
61
 
72
- ### Supply Chain
73
-
74
- ```typescript
75
- // Get company customers
76
- await client.supplyChain.customers('AAPL');
77
-
78
- // Get company peers
79
- await client.supplyChain.peers('AAPL');
62
+ ### Forex
80
63
 
81
- // Get company suppliers
82
- await client.supplyChain.suppliers('AAPL');
64
+ ```js
65
+ await client.forex.tickers({ country: 'US' });
66
+ await client.forex.ticker('EURUSD');
67
+ await client.forex.prices('EURUSD', { from: '2024-01-01', to: '2024-12-31' });
83
68
  ```
84
69
 
85
- ### Stocks
70
+ ### Futures
86
71
 
87
- ```typescript
88
- // Get all stock tickers
89
- await client.stocks.tickers({ country: 'US', exchange: 'NASDAQ' });
72
+ ```js
73
+ await client.futures.tickers({ exchange: 'CME' });
74
+ await client.futures.ticker('ES');
75
+ await client.futures.prices('ES', { from: '2024-01-01', to: '2024-12-31' });
76
+ ```
90
77
 
91
- // Get ticker information
92
- await client.stocks.ticker('AAPL');
78
+ ### Indices
93
79
 
94
- // Get historical prices
95
- await client.stocks.prices('AAPL', {
96
- from: '2024-01-01',
97
- to: '2024-12-31',
98
- frame: '1d' // daily
99
- });
80
+ ```js
81
+ await client.indices.tickers({ exchange: 'NYSE' });
82
+ await client.indices.ticker('SPX');
83
+ await client.indices.prices('SPX', { from: '2024-01-01', to: '2024-12-31' });
100
84
  ```
101
85
 
102
- ### Crypto
86
+ ### Financials
103
87
 
104
- ```typescript
105
- // Get all crypto tickers
106
- await client.crypto.tickers({ type: 'coin' });
88
+ ```js
89
+ await client.financials.revenue('AAPL', { periods: 8 });
90
+ await client.financials.netIncome('AAPL');
91
+ await client.financials.totalAssets('AAPL');
92
+ await client.financials.totalLiabilities('AAPL');
93
+ await client.financials.stockholdersEquity('AAPL');
94
+ await client.financials.currentAssets('AAPL');
95
+ await client.financials.currentLiabilities('AAPL');
96
+ await client.financials.operatingCashFlow('AAPL');
97
+ await client.financials.capitalExpenditures('AAPL');
98
+ await client.financials.freeCashFlow('AAPL');
99
+ await client.financials.sharesOutstandingBasic('AAPL');
100
+ await client.financials.sharesOutstandingDiluted('AAPL');
101
+ await client.financials.metrics('AAPL');
102
+ await client.financials.snapshot('AAPL');
103
+ ```
107
104
 
108
- // Get crypto ticker information
109
- await client.crypto.ticker('BTC');
105
+ ### Earnings
110
106
 
111
- // Get crypto prices
112
- await client.crypto.prices('BTC', {
113
- from: '2024-01-01',
114
- to: '2024-12-31',
115
- frame: '1h'
116
- });
107
+ ```js
108
+ await client.earnings.history('AAPL');
109
+ await client.earnings.trend('AAPL');
110
+ await client.earnings.index('AAPL');
111
+ await client.earnings.report('AAPL', { year: '2024', quarter: 'Q1' });
117
112
  ```
118
113
 
119
- ### Forex
114
+ ### Filings
120
115
 
121
- ```typescript
122
- // Get forex tickers
123
- await client.forex.tickers({ country: 'US' });
116
+ ```js
117
+ // Get recent filings
118
+ await client.filings.filings('AAPL', { limit: 10, form: '10-K' });
124
119
 
125
- // Get forex ticker information
126
- await client.forex.ticker('EURUSD');
120
+ // Get specific form type
121
+ await client.filings.forms('AAPL', '10-K', { year: '2024', quarter: 'Q1' });
127
122
 
128
- // Get forex prices
129
- await client.forex.prices('EURUSD', {
130
- from: '2024-01-01',
131
- to: '2024-12-31'
132
- });
123
+ // List available form types
124
+ await client.filings.descForms();
125
+
126
+ // Search filings by year/quarter
127
+ await client.filings.search({ year: '2024', quarter: 'Q1', form: '10-Q', ticker: 'AAPL' });
133
128
  ```
134
129
 
135
- ### Futures
130
+ ### Insiders
136
131
 
137
- ```typescript
138
- // Get futures tickers
139
- await client.futures.tickers({ exchange: 'CME' });
132
+ ```js
133
+ await client.insiders.funds('AAPL');
134
+ await client.insiders.individuals('AAPL');
135
+ await client.insiders.institutions('AAPL');
136
+ await client.insiders.ownership('AAPL');
137
+ await client.insiders.activity('AAPL');
138
+ await client.insiders.transactions('AAPL');
139
+ ```
140
140
 
141
- // Get futures ticker information
142
- await client.futures.ticker('ES');
141
+ ### Company Profiles
143
142
 
144
- // Get futures prices
145
- await client.futures.prices('ES', {
146
- from: '2024-01-01',
147
- to: '2024-12-31'
148
- });
143
+ ```js
144
+ await client.profiles.profile('AAPL');
145
+ await client.profiles.recommendation('AAPL');
146
+ await client.profiles.statistics('AAPL');
147
+ await client.profiles.summary('AAPL');
148
+ await client.profiles.info('AAPL');
149
+ await client.profiles.calendar('AAPL');
149
150
  ```
150
151
 
151
- ### Indices
152
+ ### Sentiment
152
153
 
153
- ```typescript
154
- // Get index tickers
155
- await client.indices.tickers({ exchange: 'NYSE' });
154
+ ```js
155
+ await client.sentiment.all('AAPL');
156
+ await client.sentiment.social('AAPL');
157
+ await client.sentiment.news('AAPL');
158
+ await client.sentiment.analyst('AAPL');
159
+ ```
156
160
 
157
- // Get index ticker information
158
- await client.indices.ticker('SPX');
161
+ ### News
159
162
 
160
- // Get index prices
161
- await client.indices.prices('SPX', {
162
- from: '2024-01-01',
163
- to: '2024-12-31'
164
- });
163
+ ```js
164
+ await client.news.general();
165
+ await client.news.company('AAPL');
166
+ await client.news.country('US');
167
+ await client.news.category('technology');
165
168
  ```
166
169
 
167
170
  ### Economic Data
168
171
 
169
- ```typescript
170
- // Search for economic datasets
172
+ ```js
173
+ // Search datasets
171
174
  await client.econ.search('unemployment rate');
172
175
 
173
- // Get economic dataset
176
+ // Get a dataset
174
177
  await client.econ.dataset('UNRATE');
175
178
 
176
179
  // Get economic calendar
@@ -184,101 +187,56 @@ await client.econ.calendar({
184
187
  });
185
188
  ```
186
189
 
187
- ### News
188
-
189
- ```typescript
190
- // Get latest general news
191
- await client.news.general();
192
-
193
- // Get company-specific news
194
- await client.news.company('AAPL');
195
-
196
- // Get country news
197
- await client.news.country('US');
190
+ ### Credit
198
191
 
199
- // Get category news
200
- await client.news.category('technology');
192
+ ```js
193
+ await client.credit.search('Apple Inc');
194
+ await client.credit.ratings('entity-id');
201
195
  ```
202
196
 
203
- ### Sentiment
204
-
205
- ```typescript
206
- // Get all sentiment data
207
- await client.sentiment.all('AAPL');
208
-
209
- // Get social media sentiment
210
- await client.sentiment.social('AAPL');
211
-
212
- // Get news sentiment
213
- await client.sentiment.news('AAPL');
197
+ ### ESG
214
198
 
215
- // Get analyst sentiment
216
- await client.sentiment.analyst('AAPL');
199
+ ```js
200
+ await client.esg.data('AAPL');
217
201
  ```
218
202
 
219
- ### Company Profiles
220
-
221
- ```typescript
222
- // Asset profile
223
- await client.profiles.asset('AAPL');
224
-
225
- // Recommendations
226
- await client.profiles.recommendation('AAPL');
227
-
228
- // Financial statements
229
- await client.profiles.cashflow('AAPL');
230
- await client.profiles.income('AAPL');
231
- await client.profiles.balancesheet('AAPL');
232
- await client.profiles.financials('AAPL');
233
-
234
- // Company statistics
235
- await client.profiles.statistics('AAPL');
236
- await client.profiles.summary('AAPL');
237
- await client.profiles.info('AAPL');
203
+ ### ETFs
238
204
 
239
- // Ownership and holders
240
- await client.profiles.fund('AAPL');
241
- await client.profiles.insiders('AAPL');
242
- await client.profiles.institutionOwnership('AAPL');
243
- await client.profiles.ownership('AAPL');
205
+ ```js
206
+ await client.etfs.fund('SPY');
207
+ await client.etfs.holdings('SPY');
208
+ await client.etfs.exposure('SPY');
209
+ ```
244
210
 
245
- // Earnings and trends
246
- await client.profiles.earnings('AAPL');
247
- await client.profiles.earningsTrend('AAPL');
248
- await client.profiles.indexTrend('AAPL');
211
+ ### Supply Chain
249
212
 
250
- // Insider activity
251
- await client.profiles.activity('AAPL');
252
- await client.profiles.transactions('AAPL');
213
+ ```js
214
+ await client.supplyChain.customers('AAPL');
215
+ await client.supplyChain.peers('AAPL');
216
+ await client.supplyChain.suppliers('AAPL');
217
+ ```
253
218
 
254
- // Calendar events
255
- await client.profiles.calendar('AAPL');
219
+ ### Web Traffic
256
220
 
257
- // Web traffic
258
- await client.profiles.traffic('AAPL');
221
+ ```js
222
+ await client.webTraffic.traffic('AAPL');
259
223
  ```
260
224
 
261
225
  ## Error Handling
262
226
 
263
- The SDK throws errors for failed requests. Use try-catch blocks to handle them:
264
-
265
- ```typescript
227
+ ```js
266
228
  try {
267
229
  const data = await client.stocks.prices('AAPL');
268
230
  console.log(data);
269
231
  } catch (error) {
270
- console.error('Error fetching data:', error.message);
232
+ console.error('Error:', error.message);
271
233
  }
272
234
  ```
273
235
 
274
- ## TypeScript Support
236
+ ## Get Started
275
237
 
276
- This SDK is written in TypeScript and includes type definitions. Import types as needed:
277
-
278
- ```typescript
279
- import { Axion, ApiResponse } from '@axionquant/sdk';
280
- ```
238
+ For detailed API documentation, support, or to obtain an API key, visit the [Axion](https://axionquant.com) website.
281
239
 
282
- ## Base URL
240
+ ## License
283
241
 
284
- By default, the SDK connects to `https://api.axionquant.com`. To use a different base URL, modify the `BASE_URL` constant in the source code.
242
+ MIT