Portfolio Analytics
StockAPIS gives you real-time marks, P&L, and exposure across crypto and equity holdings from a single normalized feed spanning 80+ exchanges, brokers, and market-data providers.
Stop reconciling positions across a dozen venues by hand. Pull live prices, OHLCV history, and order-book depth through one API and compute portfolio value the instant the market moves.
The Portfolio Analytics Challenge
Tracking a multi-asset portfolio means following hundreds of instruments across exchanges, brokers, and data vendors — each with its own symbology, latency, and quirks.
Fragmented Pricing
- Logging into multiple exchange and broker dashboards to read marks
- Copying last-trade prices into spreadsheets per position
- Hours spent rebuilding portfolio value each day
- High risk of stale quotes and manual entry errors
Stale Marks
- Waiting on end-of-day files instead of streaming prices
- Outdated NAV affecting allocation and risk decisions
- Missing intraday moves on volatile crypto pairs
- Difficulty justifying valuations to LPs or risk committees
Fragmented Market Intelligence
- No unified view of P&L across crypto and equities
- Cannot easily compare venues or spot the best execution price
- Limited visibility into news and sentiment moving each holding
- Hard to forecast exposure when data lives in silos
Inefficient Operations
- Cannot mark all positions to market simultaneously
- Manual monitoring of order-book depth before sizing trades
- Time-consuming reporting for investors and auditors
- Difficulty scaling coverage as the book grows
Limited Cross-Venue Visibility
- No systematic way to track the same asset across Binance, Coinbase, and NYSE-listed proxies
- Missing arbitrage and rebalancing signals across markets
- Cannot benchmark portfolio returns against indices
- Incomplete data on liquidity and on-chain flows
The StockAPIS Solution
StockAPIS provides a unified analytics layer with automated, normalized data collection from 80+ crypto exchanges, stock exchanges, brokers, and financial-data APIs worldwide.
Key Capabilities
- Real-Time Marks: Streaming last-trade and mid prices for every position
- P&L Tracking: Unrealized and realized P&L computed from a single feed
- Multi-Asset Analytics: One dashboard for crypto, equities, and ETFs
- Exposure Breakdown: Net and gross exposure by asset, sector, and venue
- Liquidity Checks: Order-book depth and spreads before you rebalance
- Benchmarking: Compare returns against indices and on-chain metrics
- Investor Reporting: Generate position and NAV reports in minutes
Data Coverage
Access prices, OHLCV, order books, news, and sentiment from sources including:
- Crypto Exchanges: Binance, Coinbase, Kraken, Bybit, OKX
- Stock Exchanges & Brokers: NYSE, CME Group, Interactive Brokers, Robinhood
- Data APIs: Polygon, Alpha Vantage, Finnhub, Twelve Data, Yahoo Finance
- News & Signals: Bloomberg, Reuters, CNBC, StockTwits, Reddit
- 80+ total sources with consistent, normalized symbology — see all platforms
How It Works
Mark Positions to Market
Pull live prices across every holding in one pass:
from stockapis import StockAPIS
api = StockAPIS(api_key='your_api_key')
# Define portfolio positions (symbol, venue, quantity)
positions = [
('BTC-USD', 'binance', 1.5),
('ETH-USD', 'coinbase', 12.0),
('AAPL', 'nyse', 200),
]
# Mark each position to market
for symbol, venue, qty in positions:
quote = api.platforms.get_quote(venue, symbol)
market_value = quote.last * qty
print(f"\n{symbol} @ {venue}")
print(f" Last: ${quote.last:,.2f}")
print(f" Market Value: ${market_value:,.2f}")Compute P&L
Track unrealized P&L against your cost basis:
# Position with cost basis
symbol, venue, qty, cost_basis = 'BTC-USD', 'binance', 1.5, 58000.00
quote = api.platforms.get_quote(venue, symbol)
market_value = quote.last * qty
cost = cost_basis * qty
pnl = market_value - cost
pnl_pct = (pnl / cost) * 100
print(f"Cost Basis: ${cost:,.2f}")
print(f"Market Value: ${market_value:,.2f}")
print(f"Unrealized P&L: ${pnl:,.2f} ({pnl_pct:.1f}%)")Check Liquidity Before Rebalancing
Read order-book depth so you size trades against real liquidity:
# Pull top-of-book depth for an asset
book = api.platforms.get_order_book('binance', 'BTC-USD', depth=20)
best_bid = book.bids[0].price
best_ask = book.asks[0].price
spread = best_ask - best_bid
bid_liquidity = sum(level.size for level in book.bids)
print(f"\nBTC-USD Order Book")
print(f" Best Bid / Ask: ${best_bid:,.2f} / ${best_ask:,.2f}")
print(f" Spread: ${spread:,.2f}")
print(f" Bid Depth (20 levels): {bid_liquidity:,.4f} BTC")Track Exposure and Trends
Pull OHLCV history to monitor exposure drift across markets:
# Get daily OHLCV for portfolio assets
assets = [('BTC-USD', 'binance'), ('ETH-USD', 'coinbase'), ('AAPL', 'nyse')]
for symbol, venue in assets:
candles = api.platforms.get_ohlcv(venue, symbol, interval='1d', limit=30)
first_close = candles[0].close
last_close = candles[-1].close
change_pct = ((last_close - first_close) / first_close) * 100
print(f"\n{symbol} @ {venue} (30d)")
print(f" Close: ${last_close:,.2f}")
print(f" 30d Change: {change_pct:.1f}%")Surface News and Sentiment
Catch the headlines and social signals moving each holding:
# Pull recent news and sentiment for portfolio symbols
for symbol in ['BTC-USD', 'AAPL']:
news = api.platforms.get_news(symbol, limit=5)
print(f"\n{symbol} — latest headlines")
for item in news:
print(f" [{item.sentiment}] {item.source}: {item.headline}")Quick Start
from stockapis import StockAPIS
api = StockAPIS(api_key='your_api_key')
# Mark a single position
quote = api.platforms.get_quote('binance', 'BTC-USD')
print(f"Symbol: BTC-USD")
print(f"Last Price: ${quote.last:,.2f}")
print(f"24h Change: {quote.change_pct:.1f}%")For detailed code examples and advanced usage, see our API getting started guide, explore the crypto exchange and financial data API integrations, or contact us about pricing.