Skip to content

Conversation

@rapcmia
Copy link
Contributor

@rapcmia rapcmia commented Dec 12, 2025

Before submitting this PR, please make sure:

  • Your code builds clean without any errors or warnings
  • Tests all pass
  • You are using approved title ("feat/", "fix/", "docs/", "refactor/")

A description of the changes proposed in the pull request:

Tests performed by the developer:

Tips for QA testing:

fengtality and others added 30 commits October 28, 2025 19:53
…formula

Fixed maker target price calculation to properly achieve target profitability:
- Changed from multiplication to division formula
- Now maker_price = taker_price / (1 ± target_profitability ± tx_cost_pct)
- This ensures net profitability matches target profitability

Also updated executor orchestrator update interval to 10.0 seconds and improved log messages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated test_control_task_running_order_not_placed to expect the correct
maker target price based on the new division formula instead of multiplication:
- Old: maker_price = taker_price * (1 - target - tx_cost)
- New: maker_price = taker_price / (1 + target + tx_cost)

The test now dynamically calculates the expected price to make the formula clear.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…troller

Modified determine_executor_actions to allocate amounts proportionally:
- Allocates 50% of total_amount_quote to buy side and 50% to sell side
- Each level receives proportional share: (level_amount / total_side_amount) * (side_quote)
- Example: with total_amount_quote=100 and levels 10-20-30 (total=60):
  * First level: (10/60) * 50 = 8.33 quote
  * Second level: (20/60) * 50 = 16.67 quote
  * Third level: (30/60) * 50 = 25 quote

This ensures total capital is properly allocated across all levels while maintaining the relative weighting specified in the configuration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ulation

Added test_control_task_running_order_not_placed_sell_side to cover line 155:
- Tests maker SELL side (taker BUY) price calculation formula
- Verifies: maker_price = taker_price / (1 - target_profitability - tx_cost_pct)
- Improves coverage from 75% to 100% for xemm_executor.py price calculation logic

This test complements the existing test_control_task_running_order_not_placed
which tests the maker BUY side.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated simple_xemm_gateway.py to use profitability-based parameters and logic:

Config changes:
- Renamed maker_exchange -> maker_connector, maker_pair -> maker_trading_pair
- Renamed taker_exchange -> taker_connector, taker_pair -> taker_trading_pair
- Replaced spread_bps with target_profitability (decimal, e.g. 0.01 for 1%)
- Replaced min_spread_bps with min_profitability
- Removed max_order_age parameter
- Added max_profitability parameter

Logic changes:
- Price calculation now uses division formula (matches executor):
  * Buy: maker_price = taker_price / (1 + target_profitability)
  * Sell: maker_price = taker_price / (1 - target_profitability)
- Cancellation logic uses profitability range (min/max) instead of spread and age
- Display methods show profitability % instead of spread BPS

This makes the script consistent with the XEMM executor's parameter naming and calculation methods.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…m_gateway

Updated simple_xemm_gateway.py to use max_order_age instead of max_profitability:

Config changes:
- Removed max_profitability parameter
- Added back max_order_age parameter (120 seconds default)

Logic changes:
- Cancellation now checks: profitability < min OR order age > max_order_age
- Removed max profitability check from cancellation logic
- Now matches simple_xemm.py's time-based cancellation approach

Display changes:
- active_orders_df: Replaced "Max Profit %" column with "Age" column
- Shows order age in HH:MM:SS format

This aligns the script more closely with the original simple_xemm.py while maintaining profitability-based parameters.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated simple_xemm_gateway.py to display actual placed order prices:

Changes:
- Added instance variables: maker_buy_price, maker_sell_price
- Store prices when placing maker orders in _fetch_prices_and_update()
- exchanges_df() now uses stored prices instead of get_price_for_volume()
- Profitability calculations now reflect actual placed orders vs taker prices

Benefits:
- Shows exact profitability of placed orders (not theoretical order book prices)
- More accurate representation of current strategy state
- Eliminates unnecessary order book queries for display

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removed profit calculations from exchanges_df since they're already shown in active_orders_df:

Changes:
- Removed maker_buy_price and maker_sell_price instance variables
- Removed profit calculation logic from exchanges_df()
- Removed "Maker Buy Profit %" and "Maker Sell Profit %" columns
- exchanges_df now shows only: Exchange, Market, Mid Price, Buy Price, Sell Price

Rationale:
- Profitability is already displayed per order in active_orders_df
- Reduces redundancy in status display
- Simplifies the exchanges view to focus on raw price data
- active_orders_df shows actual profitability of placed orders

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…s and logic

Updated simple_xemm.py to use profitability-based parameters and logic:

Config changes:
- Renamed maker_exchange -> maker_connector, maker_pair -> maker_trading_pair
- Renamed taker_exchange -> taker_connector, taker_pair -> taker_trading_pair
- Replaced spread_bps with target_profitability (decimal, e.g. 0.001 for 0.1%)
- Replaced min_spread_bps with min_profitability
- Removed slippage_buffer_spread_bps parameter

Logic changes:
- Price calculation now uses division formula (matches executor):
  * Buy: maker_price = taker_price / (1 + target_profitability)
  * Sell: maker_price = taker_price / (1 - target_profitability)
- Cancellation logic uses profitability range (min) instead of spread
- Removed slippage buffer from place_buy_order and place_sell_order

Display changes:
- exchanges_df: Removed "Buy Spread" and "Sell Spread" columns
- active_orders_df: Replaced "Spread Mid" and "Spread Cancel" with "Current Profit %" and "Min Profit %"

This makes simple_xemm.py fully consistent with simple_xemm_gateway.py's parameter naming and calculation methods.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: claudecodering <claudecoder@outlook.com>
Replace deprecated DataFrame.append() with pd.concat() in the
cross_exchange_market_making strategy status display to fix
deprecation warnings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove Binance US connector and related rate source implementations due to exchange closure.

Changes:
- Remove BinanceUSRateSource from rate oracle
- Remove BinanceUSConfigMap and related configuration
- Remove BinanceUSRateSourceMode from client config
- Delete binance_us_rate_source.py and its test file
- Clean up fee override template for binance_us entries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…d support for Injective offchain vault data source.
cardosofede and others added 27 commits November 20, 2025 12:02
API-keys support to Hyperliquid Spot/Perpetual
The validation was checking int and float types separately, causing
decimal values like 1.2 to be rejected when the current value was
stored as an integer. This combined the numeric type check to accept
both int and float values for any numeric config field.

Fixes hummingbot/gateway#557

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
fix: allow decimal values in gateway config updates
sync / Client development -> staging v2.11
…r_gateway

(feat) modify side to avoid errors
sync / add modify side to avoid errors to staging
@rapcmia rapcmia merged commit 30e284c into master Dec 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants