vanillagreencom/kendex/price-handling
Claude Code and agent skill by vanillagreencom/kendex
- community
Checking that the SKILL.md file is still in the repository.
Load when comparing, rounding, formatting, or parsing prices, or designing price types.
Install
npx vskill@latest install vanillagreencom/kendex/price-handlingSKILL.md
Price Handling Patterns
The price type is f64
IEEE 754 double precision. No fixed-point, no decimal types.
Use i64 fixed-point only for a matching engine (bit-exact required), a regulatory audit trail mandating reproducibility, or a settlement system with legal precision requirements. Hybrid: i64 on the execution hot path, f64 for display and analytics.
Never == on prices
Round only at the boundaries
| Boundary | Rounding | |
|---|---|---|
| Order submission (OrderRequest → broker API) | Round to tick, then validate alignment | |
| Display formatting | Round to the symbol's display_decimals | |
| Market data ingestion (ticks, bars, quotes) | Never. Preserve full feed precision | |
| P&L calculation | Never. Use raw values |
Order submission order: round to tick, validate alignment (on failure return an error, never re-round), then format for the broker API if it takes a string.
Format with the symbol's precision, never hardcoded decimals (EURUSD 5, AAPL 2, BTC 8):
Symbol metadata owns precision
Tick size and display precision belong to the symbol, not to the price value. A Price { value, decimals } struct is the wrong shape.
The symbol table loads at subscription setup (cold path), is keyed by symbol ID, and re-syncs on reconnect or symbol list change.
Price newtype
Optional: wrap f64 in a #[repr(transparent)] newtype with PartialOrd but no `PartialEq`; equality goes through prices_equal. Constructor debug_assert!s is_finite(). Use for order types; skip on the market-data hot path.
Normalize feeds to f64 at ingest
Convert at the entry boundary; downstream code sees plain f64 regardless of feed source.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/price-handling/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vanillagreencom/kendex/price-handling)