Available Data Sources
kScript provides access to 6 different data sources covering price data, derivatives, funding rates, and on-chain metrics.
buy_sell_volumeDataSourceBuy/sell volume from trade data
source("buy_sell_volume", symbol, exchange)funding_rateDataSourceFunding rate aggregation data from derivatives markets
source("funding_rate", symbol, exchange)liquidationsDataSourceLiquidation aggregation data from derivatives markets
source("liquidations", symbol, exchange)ohlcvDataSourceOpen, High, Low, Close, Volume data from trade aggregations
source("ohlcv", symbol, exchange)open_interestDataSourceOpen interest aggregation data from derivatives markets
source("open_interest", symbol, exchange)orderbookDataSourceOrderbook heatmap snapshot aggregation data
source("orderbook", symbol, exchange)Data Source Categories
Data sources are organized into categories based on the type of market information they provide.
Price & Volume
Basic market data including OHLCV and trading volumes
Derivatives
Futures, options, and derivative market data
Lending & Rates
Margin rates, lending rates, and borrowing data
Institutional Data
ETF flows, institutional holdings, and market structure
Common Usage Patterns
Examples of how to use different data sources in your trading strategies.
Basic Price Data
Access OHLCV data for price-based technical analysis.
Funding Rate Analysis
Monitor funding rates across perpetual futures markets.
Liquidation Monitoring
Track liquidation events and volumes for market sentiment.
Best Practices
Choose Appropriate Sources
Select data sources that match your strategy timeframe and requirements.
Cache Data References
Store data source references to avoid repeated source() calls.
Handle Data Availability
Not all data sources are available for every symbol/exchange combination.