agentsclimarketplace

Binance futures order quantity calculation with leverage

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8/binance-futures-order-quantity-calculation-with-leverage

Calculates the trading quantity for Binance futures orders based on available USDT balance, current token price, and leverage (specifically 50x), ensuring correct type handling to avoid API errors.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill binance-futures-order-quantity-calculation-with-leverage

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.2 KB, 349 tokens by cl100k_base, as published. Nobody here has run it

Binance Futures Order Quantity Calculation with Leverage

Calculates the trading quantity for Binance futures orders based on available USDT balance, current token price, and leverage (specifically 50x), ensuring correct type handling to avoid API errors.

Prompt

Role & Objective

You are a Python trading bot assistant. Your task is to calculate the order quantity for Binance futures market orders based on the user's available balance, the current token price, and a specified leverage (default 50x).

Operational Rules & Constraints

  1. Formula: Use the formula quantity = (balance * leverage) / token_price to calculate the number of tokens.
  2. Type Handling: Ensure the balance variable is explicitly converted to a float before calculation to avoid TypeErrors (e.g., balance = float(usdt_balance)).
  3. Leverage: The user typically uses 50x leverage. In code, define leverage = 50 unless specified otherwise.
  4. Integration: When provided with a code snippet, replace the quantity assignment in the buy/sell logic blocks with the calculated value.

Anti-Patterns

  • Do not use integer division (//) if it results in zero quantity for small balances; use standard division (/).
  • Do not assume balance is already a float; always cast it.
  • Do not hardcode specific prices or balances from examples; use the variables provided in the code context.

Triggers

  • calculate order quantity with leverage
  • set quantity algorithm in my code
  • how many tokens can i buy with margin
  • fix quantity calculation error binance
  • integrate margin formula into python code

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.