The Alpaca Money & Numeric Precision skill provides language-agnostic guidelines and patterns to eliminate floating-point arithmetic errors in financial applications. It ensures developers avoid silent, costly precision bugs by enforcing string-based number transport, fixed-point decimal parsing, explicit directional rounding (such as truncating outgoing cash amounts), fractional-share handling up to 9 decimal places, and safe database storage schemas with multi-currency tracking.
주요 기능
01Safe database schema recommendations using generous fixed-point precision (e.g., DECIMAL(20, 8))
02Multi-currency support guidelines for FX fees and funding wallet transfers
03Fractional order handling rules preventing inaccurate reconstruction of quantity from notional values
04Pre-flight rounding and truncation rules tailored for cash (2 dp) and fractional shares (9 dp)
05String-to-decimal parsing strategies across Python, TypeScript, Go, and Java to prevent IEEE-754 float drift
06140 GitHub stars
사용 사례
01Implementing deposit allocation and portfolio rebalancing calculations without rounding leakage
02Structuring order submission payloads for fractional trading and notional cash orders
03Designing database tables and data layers for financial ledgers, journals, and transfer tracking