@axionquant/sdk
v1.1.3
Published
Axion SDK for Node.js
Maintainers
Readme
Axion SDK
A TypeScript/JavaScript SDK for the Axion financial data API.
Installation
npm install @axionquant/sdkQuick Start
const { Axion } = require('@axionquant/sdk');
const client = new Axion('your-api-key');
// Get stock tickers
const tickers = await client.stocks.tickers({ country: 'US', exchange: 'NASDAQ' });
// Get historical prices
const prices = await client.stocks.prices('AAPL', {
from: '2024-01-01',
to: '2024-12-31',
frame: '1d'
});Authentication
Most endpoints require an API key. Pass it when initializing the client:
const client = new Axion('your-api-key');API Reference
Stocks
// Get all stock tickers
await client.stocks.tickers({ country: 'US', exchange: 'NASDAQ' });
// Get ticker info
await client.stocks.ticker('AAPL');
// Get historical prices
await client.stocks.prices('AAPL', { from: '2024-01-01', to: '2024-12-31', frame: '1d' });Crypto
await client.crypto.tickers({ type: 'coin' });
await client.crypto.ticker('BTC');
await client.crypto.prices('BTC', { from: '2024-01-01', to: '2024-12-31', frame: '1h' });Forex
await client.forex.tickers({ country: 'US' });
await client.forex.ticker('EURUSD');
await client.forex.prices('EURUSD', { from: '2024-01-01', to: '2024-12-31' });Futures
await client.futures.tickers({ exchange: 'CME' });
await client.futures.ticker('ES');
await client.futures.prices('ES', { from: '2024-01-01', to: '2024-12-31' });Indices
await client.indices.tickers({ exchange: 'NYSE' });
await client.indices.ticker('SPX');
await client.indices.prices('SPX', { from: '2024-01-01', to: '2024-12-31' });Financials
await client.financials.revenue('AAPL', { periods: 8 });
await client.financials.netIncome('AAPL');
await client.financials.totalAssets('AAPL');
await client.financials.totalLiabilities('AAPL');
await client.financials.stockholdersEquity('AAPL');
await client.financials.currentAssets('AAPL');
await client.financials.currentLiabilities('AAPL');
await client.financials.operatingCashFlow('AAPL');
await client.financials.capitalExpenditures('AAPL');
await client.financials.freeCashFlow('AAPL');
await client.financials.sharesOutstandingBasic('AAPL');
await client.financials.sharesOutstandingDiluted('AAPL');
await client.financials.metrics('AAPL');
await client.financials.snapshot('AAPL');Earnings
await client.earnings.history('AAPL');
await client.earnings.trend('AAPL');
await client.earnings.index('AAPL');
await client.earnings.report('AAPL', { year: '2024', quarter: 'Q1' });Filings
// Get recent filings
await client.filings.filings('AAPL', { limit: 10, form: '10-K' });
// Get specific form type
await client.filings.forms('AAPL', '10-K', { year: '2024', quarter: 'Q1' });
// List available form types
await client.filings.descForms();
// Search filings by year/quarter
await client.filings.search({ year: '2024', quarter: 'Q1', form: '10-Q', ticker: 'AAPL' });Insiders
await client.insiders.funds('AAPL');
await client.insiders.individuals('AAPL');
await client.insiders.institutions('AAPL');
await client.insiders.ownership('AAPL');
await client.insiders.activity('AAPL');
await client.insiders.transactions('AAPL');Company Profiles
await client.profiles.profile('AAPL');
await client.profiles.recommendation('AAPL');
await client.profiles.statistics('AAPL');
await client.profiles.summary('AAPL');
await client.profiles.info('AAPL');
await client.profiles.calendar('AAPL');Sentiment
await client.sentiment.all('AAPL');
await client.sentiment.social('AAPL');
await client.sentiment.news('AAPL');
await client.sentiment.analyst('AAPL');News
await client.news.general();
await client.news.company('AAPL');
await client.news.country('US');
await client.news.category('technology');Economic Data
// Search datasets
await client.econ.search('unemployment rate');
// Get a dataset
await client.econ.dataset('UNRATE');
// Get economic calendar
await client.econ.calendar({
from: '2024-01-01',
to: '2024-12-31',
country: 'US',
minImportance: 3,
currency: 'USD',
category: 'employment'
});Credit
await client.credit.search('Apple Inc');
await client.credit.ratings('entity-id');ESG
await client.esg.data('AAPL');ETFs
await client.etfs.fund('SPY');
await client.etfs.holdings('SPY');
await client.etfs.exposure('SPY');Supply Chain
await client.supplyChain.customers('AAPL');
await client.supplyChain.peers('AAPL');
await client.supplyChain.suppliers('AAPL');Web Traffic
await client.webTraffic.traffic('AAPL');Error Handling
try {
const data = await client.stocks.prices('AAPL');
console.log(data);
} catch (error) {
console.error('Error:', error.message);
}Get Started
For detailed API documentation, support, or to obtain an API key, visit the Axion website.
License
MIT
