Installation¶
Basic Installation¶
From Source¶
Optional Dependencies¶
FinanceLib has optional dependency groups for different features:
Environment Variables¶
Set up API keys for full functionality:
# NewsAPI (required for news features)
export NEWS_API_APIKEY="your-api-key"
# Binance (required for crypto trading bot)
export BINANCE_API_KEY="your-key"
export BINANCE_API_SECRET="your-secret"
# Twitter/X (optional, for sentiment analysis)
export TWITTER_API_KEY="your-key"
export TWITTER_API_SECRET="your-secret"
export TWITTER_ACCESS_TOKEN="your-token"
export TWITTER_ACCESS_TOKEN_SECRET="your-token-secret"
Tip
Create a .env file in your project root and FinanceLib will load it automatically via python-dotenv.