Skip to content

amount percent of portfolio #9

Open

Description

@Giannizzero

how can use amount percent instead of a quantity order?

Activity

  1. CryptoGnome commented on Jan 24, 2023

    @CryptoGnome
    Owner

    Paid Bounty
    Starting to do community bounties paid in crypto, to claim you must submit a working pull request with the fix & DM me in our Discord Here

    Bounty Award: $10

  2. subhajitlucky commented on May 12, 2026

    @subhajitlucky

    Submitted a working PR for this bounty: #20

    It adds optional qty_percent support for Binance Futures alerts while keeping existing qty behavior. I also fixed the Binance Futures webhook route/config path that prevented that exchange path from running, added unit coverage, and addressed the automated review comments after opening the PR.

    Verification run locally:

    • python3 -m unittest test_order_sizing -v
    • python3 -m py_compile app.py binanceFutures.py order_sizing.py test_order_sizing.py
    • git diff --check
  3. letronghoangminh commented on May 12, 2026

    @letronghoangminh

    Submitted PR #22 for this bounty: #22

    It adds percent-based order sizing for Binance webhooks while keeping existing fixed qty behavior. The PR supports amount_percent, qty_percent, and portfolio_percent; spot buys/futures use quote balance, and spot sells use base balance.

    Verification:

    • python3 -m unittest discover -s tests -v
    • python3 -m py_compile app.py binance_bot.py binanceFutures.py tests/test_binance_bot.py
    • git diff --check
  4. nozprod commented on May 26, 2026

    @nozprod

    Submitted PR #24 for this bounty: #24

    It adds optional qty_percent support so webhook alerts can size orders from a percentage of available quote-currency balance while preserving existing fixed qty behavior. It also keeps the Binance Futures path reachable by fixing the config-key mismatch and webhook routing indentation.

    Verification:

    • PYTHONPYCACHEPREFIX=/private/tmp/pycache python3 -m py_compile app.py binanceFutures.py
    • git diff --check

    Bounty payout if accepted: ERC20/USDC 0x3a2719e116c9C69a2514F3F7287b4AAAb13B9726.

    Disclosure: this submission was prepared with AI assistance and reviewed before posting.

  5. Hobie1Kenobi commented on May 26, 2026

    @Hobie1Kenobi

    Approach

    I'll implement a percent-of-portfolio order sizing feature that allows users to specify order amounts as a percentage of their total portfolio value instead of fixed quantities.

    Steps:

    1. Research the existing order placement codebase to understand current quantity-based logic
    2. Add a percent field to the order schema/parameters (e.g., amount_percent: 10 = 10% of portfolio)
    3. Implement portfolio valuation (sum of all holdings at current market prices)
    4. Add conversion logic: order_quantity = (percent / 100) * total_portfolio_value / asset_price
    5. Add validation (0 < percent ≤ 100) and error handling for edge cases (insufficient balance, illiquid assets)
    6. Update CLI/API docs and add usage examples

    Deliverables

    • percent order parameter support in order creation
    • Portfolio valuation helper function
    • Unit tests for percent-based ordering (including edge cases)
    • Documentation with examples (e.g., --amount-percent 25)

    ETA

    3–4 days from assignment

    Payout Address

    0x408f39B19266022FeC03076091e59D1f4f163658 (Base)

  6. Hobie1Kenobi commented on May 26, 2026

    @Hobie1Kenobi

    Approach

    I'll implement a percentage-based order sizing feature that allows users to specify order amounts as a percentage of their total portfolio value rather than a fixed quantity.

    Steps:

    1. Research the existing order placement logic to understand how quantities are currently calculated and submitted.
    2. Add a percent option to the order parameters (e.g., amount_type: "percent" | "quantity", amount_percent: 0-100).
    3. Calculate portfolio value at order time: fetch current balances and prices, compute total portfolio value, then derive order quantity as (percent / 100) * portfolio_value / current_price.
    4. Add input validation — ensure percent is between 0–100, portfolio value is non-zero, and resulting quantity meets minimum order thresholds.
    5. Update UI/CLI to expose the percentage input option alongside the existing quantity field.
    6. Add tests covering edge cases: 0%, 100%, insufficient balance, and price fetch failures.

    Deliverables

    • Code changes supporting amount_percent parameter in order creation
    • Input validation and error handling
    • Updated documentation/README with usage examples
    • Unit tests for percentage-based calculation logic

    ETA

    3–4 days from assignment

    Payout Address

    0x408f39B19266022FeC03076091e59D1f4f163658

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions