Skip to content

Feature: Multi-Exchange Arbitrage Detection #10

@pomadev

Description

@pomadev

Description

Implement price comparison across supported exchanges to ensure users get the best possible price for their DCA purchases. The bot would automatically route orders to the exchange offering the best price.

Implementation Details

  • Fetch prices from all configured exchanges simultaneously
  • Compare prices including fees
  • Route orders to the most favorable exchange
  • Track arbitrage opportunities and savings

Key Features

  1. Price Comparison

    • Real-time price fetching from multiple exchanges
    • Include trading fees in comparison
    • Consider withdrawal fees if rebalancing between exchanges
  2. Smart Order Routing

    • Automatically select best exchange for each purchase
    • Support for split orders across exchanges
    • Fallback logic if preferred exchange fails
  3. Arbitrage Analytics

    • Track price differences over time
    • Calculate total savings from smart routing
    • Identify patterns in exchange price differences

Acceptance Criteria

  • Prices are fetched from all configured exchanges
  • Fee calculations are accurate for each exchange
  • Best price selection logic is correct
  • Orders are successfully routed to chosen exchange
  • Savings are tracked and reported
  • Performance impact is minimal (parallel API calls)
  • Handles exchange API failures gracefully
  • LINE notifications show which exchange was used and why

Configuration Example

arbitrage:
  enabled: true
  exchanges:
    - name: bitbank
      priority: 1
      enabled: true
    - name: bitflyer
      priority: 2
      enabled: true
  min_price_difference: 0.1  # percentage
  include_fees: true
  split_orders: false  # future feature

Technical Considerations

  • Implement parallel API calls for performance
  • Cache exchange fees to reduce API calls
  • Handle different price formats and decimal precisions
  • Consider API rate limits for each exchange
  • Implement circuit breaker pattern for failing exchanges

Priority: Medium
Estimated Effort: Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions