1414
1515 # start arbitrage detection
1616 print ("Scanning..." )
17- exchange_name = "binance" # allow pickable exchange_id from https://github.com/ccxt/ccxt/wiki/manual#exchanges
17+ exchange_name = "binanceus" # allow pickable exchange_id from https://github.com/ccxt/ccxt/wiki/manual#exchanges
1818
1919 best_opportunities , best_profit = asyncio .run (detector .run_detection (exchange_name ))
2020
@@ -40,16 +40,19 @@ def get_order_side(opportunity: detector.ShortTicker):
4040 # Format the output as below (real live example):
4141 # -------------------------------------------
4242 # New 2.33873% binanceus opportunity:
43- # 1. buy DOGE to BTC at 552486.18785
44- # 2. sell DOGE to USDT at 0.12232
45- # 3. buy ETH to USDT at 0.00038
46- # 4. buy ADA to ETH at 7570.02271
47- # 5. sell ADA to USDC at 0.35000
48- # 6. buy SOL to USDC at 0.00662
49- # 7. sell SOL to BTC at 0.00226
43+ # 1. buy DOGE with BTC at 552486.18785
44+ # 2. sell DOGE for USDT at 0.12232
45+ # 3. buy ETH with USDT at 0.00038
46+ # 4. buy ADA with ETH at 7570.02271
47+ # 5. sell ADA for USDC at 0.35000
48+ # 6. buy SOL with USDC at 0.00662
49+ # 7. sell SOL for BTC at 0.00226
5050 # -------------------------------------------
5151 order_side = get_order_side (opportunity )
52- print (f"{ i + 1 } . { order_side } { base_currency } to { quote_currency } at { opportunity .last_price :.5f} " )
52+ print (
53+ f"{ i + 1 } . { order_side } { base_currency } "
54+ f"{ 'with' if order_side == 'buy' else 'for' } "
55+ f"{ quote_currency } at { opportunity .last_price :.5f} " )
5356 print ("-------------------------------------------" )
5457 else :
5558 print ("No opportunity detected" )
0 commit comments