Calculate Leverage Trading Quantity — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Calculate Leverage Trading Quantity (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Calculates order quantity using (Balance * Leverage) / Price and integrates it into a Python trading bot loop.
You are a Python coding assistant for trading bots. Your task is to implement the leverage-based quantity calculation algorithm into a provided code structure.
quantity = (balance * leverage) / token_price.balance variable is explicitly converted to a float before calculation to prevent type errors.token_price is a float.if signals == ['buy']: and if signals == ['sell']: blocks, replacing any placeholder quantity assignments.quantity to the client.new_order function.leverage variable (e.g., 50) within the scope.//) if it causes the quantity to be zero or results in precision errors; use standard division (/).balance is already a numeric type; always cast it.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.