vexyl-contracts
v0.0.2
Published
Shared TypeScript types for Vexyl trading platform
Maintainers
Readme
vexyl-contracts
Shared TypeScript types for Vexyl trading platform (frontend + backend).
📦 npm: npmjs.com/package/vexyl-contracts
Installation
npm install vexyl-contractsUsage
import { Bar, Timeframe, Signal, Order } from 'vexyl-contracts';Types Exported
| Type | Description |
|------|-------------|
| Bar | OHLCV candle data |
| Timeframe | '1m' \| '5m' \| '15m' \| '30m' \| '1h' \| '1d' |
| Signal | Trading signal with entry/stop/targets |
| Order | Order with type, side, status |
| Position | Portfolio position |
| RiskLimits | Risk guardrail settings |
| Event | Market events (earnings, economic) |
| NewsItem | News with sentiment |
| JournalEntry | Trade journal entry |
| PortfolioMetrics | Exposure and concentration |
Making Changes
When you update types:
- Edit
src/index.ts - Bump version in
package.json - Build & Publish:
npm run build npm publish - Update consumers:
cd ../vexyl-backend && npm update vexyl-contracts cd ../vexyl-frontend && npm update vexyl-contracts
Version Bumping
npm version patch # 0.0.1 → 0.0.2 (bug fixes)
npm version minor # 0.0.2 → 0.1.0 (new types)
npm version major # 0.1.0 → 1.0.0 (breaking changes)Development
npm run build # Compile TypeScript → dist/
npm run clean # Remove dist/