
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
⚠️ Breaking Changes (2025-10-25):
ticker.history()renamed toticker.bars()andticker.quote()removed. See CHANGELOG.md
A Node.js library that provides programmatic access to TickerBot's trading and market data APIs. This library mirrors the same API available in the TickerBot web platform for server-side applications.
npm install tickerterm
This library requires authentication via the TickerTerm CLI. You must install and authenticate with the CLI before using this library.
# Installation via npm (when published)
npm install -g tickerterm-cli
# Or install locally in your project
git clone <tickerterm-cli-repo>
cd cli && npm install && npm link
# Login with email/password (production)
tickerterm login --email
# Login with Google OAuth (production)
tickerterm login --google
# For TickerTerm employees (staging)
tickerterm login --email --staging
tickerterm login --google --staging
tickerterm whoami
import { tt, portfolio, ticker, utils, TA } from 'tickerterm';
async function example() {
try {
// Get portfolio balances
const balances = portfolio.balances();
console.log('Portfolio equity:', balances.equity);
// Get ticker price
const price = await ticker.price('AAPL');
console.log('AAPL price:', price);
// Place an order
await portfolio.order('AAPL', 'buy', 'market', { qty: 10 });
// Log something to TickerBot
await tt.log('Order placed successfully');
} catch (error) {
if (error.message.includes('Authentication required')) {
console.error('Please run "tickerterm login" first');
} else {
console.error('Error:', error.message);
}
}
}
example();
import { tt } from 'tickerterm';
// Logging and notifications
await tt.log(message);
await tt.send_email(to, subject, body);
await tt.create_toast(message, color?);
// State management
await tt.set_state(name, value);
const value = await tt.get_state(name);
await tt.delete_state(name);
// Watchlists
await tt.set_watchlist(name, tickers);
const tickers = await tt.get_watchlist(name);
await tt.delete_watchlist(name);
// AI queries
const result = await tt.ai(returnType, prompt, data?, model?);
import { portfolio } from 'tickerterm';
// Portfolio data
const balances = portfolio.balances();
const positions = await portfolio.get_positions();
const position = await portfolio.get_position('AAPL');
// Orders and trades
await portfolio.order('AAPL', 'buy', 'market', { qty: 10 });
await portfolio.close_position('AAPL');
await portfolio.cancel_all_orders();
// Account history
const orders = await portfolio.get_orders();
const transactions = await portfolio.get_transactions();
import { ticker } from 'tickerterm';
// Market data
const snapshot = await ticker.get('AAPL');
const price = await ticker.price('AAPL');
const bars = await ticker.bars('AAPL', '1d', { start: new Date('2024-01-01') });
// Fundamentals
const financials = await ticker.financials('AAPL');
const dividends = await ticker.dividends('AAPL');
// Chart annotations
await ticker.create_trendline('AAPL', 'support', {
price0: 150, price1: 160,
date0: '2024-01-01', date1: '2024-01-10'
});
import { utils } from 'tickerterm';
// Market timing
const isOpen = utils.is_market_open();
const minutesUntilClose = utils.get_minutes_until_close();
const lastMarketDay = utils.get_last_market_day();
import { TA } from 'tickerterm';
// Moving averages
const sma = TA.SMA.calculate({ values: prices, period: 20 });
const ema = TA.EMA.calculate({ values: prices, period: 20 });
// Oscillators
const rsi = TA.RSI.calculate({ values: prices, period: 14 });
const macd = TA.MACD.calculate({
values: prices,
fastPeriod: 12,
slowPeriod: 26,
signalPeriod: 9
});
// Volume indicators
const obv = TA.OBV.calculate({ close: prices, volume: volumes });
All functions will throw errors if:
try {
const price = await ticker.price('AAPL');
} catch (error) {
if (error.message.includes('Authentication required')) {
console.error('Please run "tickerterm login" first');
} else if (error.message.includes('token has expired')) {
console.error('Please run "tickerterm login" to re-authenticate');
} else {
console.error('API error:', error.message);
}
}
🚧 This library is currently in development
All functions are implemented as boilerplate and will throw "Not yet implemented" errors. The authentication system is fully functional and will ensure you're properly logged in via the CLI.
The library automatically uses the same environment you authenticated with via the CLI.
MIT
FAQs
Node.js library for TickerBot trading and market data
We found that tickerterm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.