Crypto trading bot: engine, brokers, backtester, dashboard, deploy
CI/CD / backend (push) Successful in 5m18s
CI/CD / frontend (push) Successful in 5m2s
CI/CD / build (push) Successful in 34s
CI/CD / cleanup (push) Successful in 6s
CI/CD / deploy (push) Successful in 22s

FastAPI backend with a single-strategy async engine, paper and Binance
brokers, pure-python indicators, a backtester that shares the engine's
portfolio math, and a Vue dashboard with a live WebSocket feed. Adds the
Gitea Actions CI/CD workflow that deploys to Traefik via docker_default.
This commit is contained in:
matitos committed 2026-09-18 17:02:33 +00:00
1 parent 98028248c2
commit 9c3bee87ac
73 files changed
+9759 -1

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
import { describe, expect, it } from 'vitest'
import { fmtMoney, fmtPrice, pnlClass, signed } from './format'
describe('format helpers', () => {
it('formats money with two decimals', () => {
expect(fmtMoney(10000)).toBe('10,000.00')
})
it('handles null', () => {
expect(fmtMoney(null)).toBe('—')
expect(fmtPrice(undefined)).toBe('—')
})
it('formats small prices with six decimals', () => {
expect(fmtPrice(0.5)).toBe('0.500000')
})
it('signs positive values', () => {
expect(signed(12.346)).toBe('+12.35')
expect(signed(-3)).toBe('-3.00')
})
it('classifies pnl colour', () => {
expect(pnlClass(5)).toBe('text-emerald-400')
expect(pnlClass(-5)).toBe('text-rose-400')
expect(pnlClass(0)).toBe('text-slate-300')
})
})