Web API Reference
Complete API documentation for integrating with EDISON's web interface. All endpoints are available through the BotWebAPI class.
getMarketData()
Get current market data including price, indicators, and trend analysis.
const data = api.getMarketData();Returns:
getCandles(timeframe, limit)
Get candlestick data for charting. Data is updated in real-time as new candles form.
const candles = await api.getCandles('5m', 100);Parameters:
Returns: Candle[]
getPositionHistory(limit)
Get closed positions/trades from the trading journal. Shows entry/exit prices, P&L, and timestamps.
const positions = await api.getPositionHistory(50);Parameters:
Returns: Position[]
getOrderBook(symbol)
Get current orderbook snapshot with bid/ask levels and cumulative volumes.
const book = await api.getOrderBook('BTCUSDT');Parameters:
Returns:
getWalls(symbol)
Get detected whale walls (large orders) on the orderbook. Identifies significant buy/sell pressure.
const walls = await api.getWalls('BTCUSDT');Parameters:
Returns:
getFundingRate(symbol)
Get current funding rate and next funding time. Critical for predicting price movements on futures.
const funding = await api.getFundingRate('BTCUSDT');Returns:
getVolumeProfile(symbol, levels)
Get volume profile showing price distribution of trading volume. Identifies support/resistance and liquidity zones.
const profile = await api.getVolumeProfile('BTCUSDT', 20);Parameters:
Returns:
Complete Usage Example
import { BotWebAPI } from './api/bot-web-api';import { BotServices } from './services/bot-services';// Initialize with bot servicesconst services = new BotServices(...);const api = new BotWebAPI(services);// Get market dataconst data = api.getMarketData();console.log(`Trend: ${data.trend}, Price: $${data.currentPrice}`);// Get candles and analyzeconst candles = await api.getCandles('5m', 50);const chart = candles.map(c => ({ time: c.timestamp, price: c.close }));// Check wall activityconst walls = await api.getWalls('BTCUSDT');if (walls.walls.length > 0) { console.log('Whale walls detected:', walls.walls);}📌 Important Notes
- ✓ All async methods return data from cached providers (non-blocking)
- ✓ Market data is updated in real-time as new candles form
- ✓ Position history includes both open and closed trades from the journal
- ✓ Orderbook data represents the current snapshot at call time
- ✓ Wall strength is calculated based on order size relative to average volume
- ✓ Volume profile aggregates data from recent candles (PRIMARY timeframe, ~100 candles)
- ✓ All timestamps are Unix milliseconds