Skip to main content

Short description

Project description

Axion Python SDK

A comprehensive Python client for accessing financial market data, economic indicators, company profiles, and more through the Axion API.

Installation

pip install axion-sdk

Quick Start

from axion import Axion

# Initialize the client with your API key
client = Axion(api_key="your_api_key_here")

# Get stock prices
prices = client.get_stock_prices("AAPL", from_date="2024-01-01", to_date="2024-12-31")

# Search for economic data
econ_data = client.search_econ("unemployment rate")

# Get company news
news = client.get_company_news("TSLA")

Authentication

Most endpoints require authentication. Initialize the client with your API key:

client = Axion(api_key="your_api_key_here")

Features

Stocks API

Get stock ticker information, prices, and historical data.

# Get all stock tickers (filtered by country/exchange)
tickers = client.get_stock_tickers(country="america")

# Get specific ticker information
ticker_info = client.get_stock_ticker_by_symbol("AAPL")

# Get historical prices
prices = client.get_stock_prices(
    ticker="AAPL",
    from_date="2024-01-01",
    to_date="2024-12-31",
    frame="daily"  # Options: daily, weekly, monthly, quarterly, yearly
)

Company Profiles API

Access comprehensive company information and financial statements.

# Company overview and business summary
profile = client.get_company_asset_profile("AAPL")

# Financial statements
income_statement = client.get_company_income_statement("AAPL")
balance_sheet = client.get_company_balance_sheet("AAPL")
cashflow = client.get_company_cashflow("AAPL")

# Key statistics and ratios
stats = client.get_company_statistics("AAPL")

# Earnings data
earnings = client.get_company_earnings_history("AAPL")
earnings_trend = client.get_company_earnings_trend("AAPL")

# Ownership information
insiders = client.get_company_insider_holders("AAPL")
institutions = client.get_company_institution_ownership("AAPL")
major_holders = client.get_company_major_holders("AAPL")

# Analyst data
recommendations = client.get_company_recommendation_trend("AAPL")

# Other data
calendar = client.get_company_calendar_events("AAPL")
traffic = client.get_company_website_traffic("AAPL")

Cryptocurrency API

Access cryptocurrency ticker data and historical prices.

# Get all crypto tickers
crypto_tickers = client.get_crypto_tickers(type="coin")

# Get specific crypto information
btc_info = client.get_crypto_ticker_by_symbol("BTC")

# Get crypto prices
btc_prices = client.get_crypto_prices(
    ticker="BTC",
    from_date="2024-01-01",
    frame="daily"
)

Forex API

Access foreign exchange rates and historical data.

# Get forex tickers
forex_tickers = client.get_forex_tickers()

# Get specific forex pair
pair_info = client.get_forex_ticker_by_symbol("EURUSD")

# Get forex prices
prices = client.get_forex_prices("EURUSD", from_date="2024-01-01")

Futures API

Access futures contract data and prices.

# Get futures tickers
futures = client.get_futures_tickers(exchange="CME")

# Get specific futures contract
contract = client.get_futures_ticker_by_symbol("ES")

# Get futures prices
prices = client.get_futures_prices("ES", from_date="2024-01-01")

Indices API

Access market index data and historical performance.

# Get index tickers
indices = client.get_index_tickers()

# Get specific index
index_info = client.get_index_ticker_by_symbol("SPX")

# Get index prices
prices = client.get_index_prices("SPX", from_date="2024-01-01")

Economic Data API

Search and retrieve economic indicators and calendar events.

# Search for economic series
results = client.search_econ("GDP")

# Get economic dataset
dataset = client.get_econ_dataset("UNRATE")

# Get economic calendar with filters
calendar = client.get_econ_calendar(
    from_date="2024-01-01",
    to_date="2024-12-31",
    country="US,UK,CA",
    min_importance=3,
    currency="USD",
    category="employment,inflation"
)

ETF API

Access ETF fund data, holdings, and exposure information.

# Get ETF fund details
fund_data = client.get_etf_fund_data("SPY")

# Get ETF holdings
holdings = client.get_etf_holdings("SPY")

# Get exposure data
exposure = client.get_etf_exposure("SPY")

News API

Access financial news articles by company, country, or category.

# Get general news
news = client.get_news()

# Get company-specific news
company_news = client.get_company_news("AAPL")

# Get country news
country_news = client.get_country_news("US")

# Get category news
category_news = client.get_category_news("technology")

Sentiment API

Analyze market sentiment from social media, news, and analyst ratings.

# Get all sentiment data
all_sentiment = client.get_sentiment_all("AAPL")

# Get specific sentiment types
social = client.get_sentiment_social("AAPL")
news = client.get_sentiment_news("AAPL")
analyst = client.get_sentiment_analyst("AAPL")

ESG API

Access Environmental, Social, and Governance data.

esg_data = client.get_esg_data("AAPL")

Credit Ratings API

Search for credit entities and retrieve credit ratings.

# Search for credit entities
results = client.search_credit("Apple Inc")

# Get credit ratings
ratings = client.get_credit_ratings("entity_id_here")

Supply Chain API

Analyze company supply chain relationships.

# Get customers
customers = client.get_supply_chain_customers("AAPL")

# Get suppliers
suppliers = client.get_supply_chain_suppliers("AAPL")

# Get peers
peers = client.get_supply_chain_peers("AAPL")

Error Handling

The SDK provides detailed error messages for various failure scenarios:

try:
    data = client.get_stock_prices("INVALID")
except Exception as e:
    print(f"Error: {e}")

Common errors include:

  • HTTP Error: API returned an error status code
  • Connection Error: Unable to connect to the API
  • Timeout Error: Request took too long to complete
  • Authentication Error: Missing or invalid API key

Free Tier Limitations

The free tier has some restrictions:

  • Stock API: Limited to 'america' country
  • Rate limits may apply to certain endpoints

Date Formats

All date parameters should be in YYYY-MM-DD format:

data = client.get_stock_prices("AAPL", from_date="2024-01-01", to_date="2024-12-31")

Time Frames

Price endpoints support various time frames:

  • daily (default)
  • weekly
  • monthly
  • quarterly
  • yearly
prices = client.get_stock_prices("AAPL", frame="monthly")

Support

For API documentation, support, or to obtain an API key, visit the Axion API website.

License

See LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axionquant_sdk-0.1.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axionquant_sdk-0.1.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file axionquant_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: axionquant_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for axionquant_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7c93e0cdb783b87a59a0b68d0732b6128ffd2334b6516643aacb34a532214cf7
MD5 a5de3e9db3950506213c052673a112d5
BLAKE2b-256 8031f6f1d6f7aa33423b486b1ba83f499045b9c0146ae520e8081d504b83b091

See more details on using hashes here.

File details

Details for the file axionquant_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: axionquant_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for axionquant_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e62e39b8d7f706e34896ebeba81b110b2eaa04dd0acd6146dadbda748f88ffb
MD5 603a5e353d4d7b4cf447115f7d28cf16
BLAKE2b-256 4790547510dd4b04fc45c72449ee79c1f04ccac2c30a338e7c97e1ecd4a7090d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page