
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
A unified TypeScript/Node.js SDK for prediction markets - The ccxt for prediction markets.
npm install pmxtjs
import pmxt from 'pmxtjs';
// Initialize exchanges
const poly = new pmxt.Polymarket();
const kalshi = new pmxt.Kalshi();
// Search for markets
const markets = await poly.fetchMarkets({ query: 'Trump' });
console.log(markets[0].title);
// Get outcome details
const outcome = markets[0].outcomes[0];
console.log(`${outcome.label}: ${(outcome.price * 100).toFixed(1)}%`);
// Fetch historical data (use outcome.outcomeId!)
const candles = await poly.fetchOHLCV(outcome.outcomeId, {
resolution: '1d',
limit: 30
});
// Get current order book
const orderBook = await poly.fetchOrderBook(outcome.outcomeId);
const spread = orderBook.asks[0].price - orderBook.bids[0].price;
console.log(`Spread: ${(spread * 100).toFixed(2)}%`);
fetchMarkets(params?) - Get active markets
// Fetch recent markets
await poly.fetchMarkets({ limit: 20, sort: 'volume' });
// Search by text
await poly.fetchMarkets({ query: 'Fed rates', limit: 10 });
// Fetch by slug/ticker
await poly.fetchMarkets({ slug: 'who-will-trump-nominate-as-fed-chair' });
fetchEvents(params?) - Get events (groups of related markets)
await poly.fetchEvents({ query: 'Fed Chair', limit: 5 });
filterMarkets(markets, query) - Filter markets by keyword
const events = await poly.fetchEvents({ query: 'Fed Chair' });
const warsh = poly.filterMarkets(events[0].markets, 'Kevin Warsh')[0];
fetchOHLCV(outcomeId, params) - Get historical price candlesfetchOrderBook(outcomeId) - Get current bids/asksfetchTrades(outcomeId, params) - Get trade historygetExecutionPrice(orderBook, side, amount) - Calculate volume-weighted average pricegetExecutionPriceDetailed(orderBook, side, amount) - Get detailed execution infoPolymarket:
const poly = new pmxt.Polymarket({
privateKey: process.env.POLYMARKET_PRIVATE_KEY,
proxyAddress: process.env.POLYMARKET_PROXY_ADDRESS, // Optional
// signatureType: 'gnosis-safe' (default)
});
Kalshi:
const kalshi = new pmxt.Kalshi({
apiKey: process.env.KALSHI_API_KEY,
privateKey: process.env.KALSHI_PRIVATE_KEY
});
Limitless:
const limitless = new pmxt.Limitless({
privateKey: process.env.LIMITLESS_PRIVATE_KEY
});
createOrder(params) - Place a new order
// Using outcome shorthand (recommended)
await poly.createOrder({
outcome: market.yes,
side: 'buy',
type: 'limit',
amount: 10,
price: 0.55
});
cancelOrder(orderId) - Cancel an open order
fetchOrder(orderId) - Get order details
fetchOpenOrders(marketId?) - Get all open orders
fetchBalance() - Get account balancefetchPositions() - Get current positionsFor complete API documentation and examples, see:
outcome.outcomeId, not market.marketId for deep-dive methods (fetchOHLCV, fetchOrderBook, fetchTrades)MIT
FAQs
Unified prediction market data API - The ccxt for prediction markets
We found that pmxtjs 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.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.