Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/core-connectors #380

Merged
merged 92 commits into from
Jan 29, 2025
Merged

test/core-connectors #380

merged 92 commits into from
Jan 29, 2025

Conversation

fengtality
Copy link
Contributor

No description provided.

src/wallet/wallet.routes.ts Fixed Show fixed Hide fixed
fengtality and others added 4 commits January 4, 2025 06:46
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@rapcmia
Copy link
Contributor

rapcmia commented Jan 10, 2025

Followed the steps for setting up gateway including copying the .env-example

  • After successfully importing files using ./gateway-setup then yarn start gateway, im getting the error below:
    image

Steps to reproduce:

Copy link

Gateway Core

@fengtality
Copy link
Contributor Author

@rapcmia I remove the Larp code since it was mainly for reference, so you don't need the .env file anymore. You should be able to install using the traditional Gateway process now.

@fengtality fengtality marked this pull request as ready for review January 26, 2025 00:06
@fengtality
Copy link
Contributor Author

@rapcmia @nikspz This Gateway branch is ready for final review for v2.3.

@fengtality
Copy link
Contributor Author

No more changes in this branch.

I'm making changes slated for v2.4 in another branch https://github.com/hummingbot/gateway/tree/core-2.4

@nikspz
Copy link
Contributor

nikspz commented Jan 27, 2025

gw a72ea11 + Client

Steps:

  1. create amm_arb using jupiter and binance paper
  2. start the startegy
  3. review after 2-3 minutes (2 buy-sells)

Actual:
6 orders filled on jupiter solana side (only one recorded by bot)

a72ea11 logs etc.zip
logs_jup1.log

2025-01-27 14:28:01,895 - 276305 - hummingbot.client.hummingbot_application - INFO - start command initiated.
2025-01-27 14:28:02,068 - 276305 - hummingbot.core.network_iterator - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2025-01-27 14:28:02,377 - 276305 - GatewaySolanaAMM - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2025-01-27 14:28:03,515 - 276305 - hummingbot.connector.exchange.binance.binance_api_order_book_data_source.BinanceAPIOrderBookDataSource - INFO - Subscribed to public order book and trade channels...
2025-01-27 14:28:03,611 - 276305 - hummingbot.core.data_type.order_book_tracker - INFO - Initialized order book for JUP-USDT. 1/1 completed.
2025-01-27 14:28:05,004 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Markets are ready. Trading started.
2025-01-27 14:28:05,029 - 276305 - hummingbot.core.rate_oracle.rate_oracle - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2025-01-27 14:28:05,530 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Can't arbitrage, binance_PaperTrade JUP balance (0) is below required order amount (10.0000000).
2025-01-27 14:28:06,006 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - No arbitrage opportunity.
buy at jupiter_solana_mainnet-beta, sell at binance_PaperTrade: -0.15%
sell at jupiter_solana_mainnet-beta, buy at binance_PaperTrade: -0.10%
2025-01-27 14:28:07,004 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Found arbitrage opportunity!: First Side - Connector: jupiter_solana_mainnet-beta  Side: sell  Quote Price: 1.0540305  Order Price: 1.044155277000000  Amount: 10.000000  Extra Fees: [TokenAmount(token='SOL', amount=Decimal('0.000039058800000000006'))]
Second Side - Connector: binance_PaperTrade  Side: buy  Quote Price: 1.0531  Order Price: 1.0531000000  Amount: 10.0000000  Extra Fees: []
2025-01-27 14:28:07,004 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Placing SELL order for 10.000000 JUP at jupiter_solana_mainnet-beta at 1.044155277000000 price [clock=2025-01-27 14:28:07+00:00]
2025-01-27 14:28:22,516 - 276305 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT SELL order sell-JUP-USDC_-1737988087005419 for 10.000000 JUP-USDC at 1.044155277000000.
2025-01-27 14:28:22,533 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988102.0, "type": "OrderType.LIMIT", "trading_pair": "JUP-USDC", "amount": "10.000000", "price": "1.044155277000000", "order_id": "sell-JUP-USDC_-1737988087005419", "creation_timestamp": 1737988087.0, "exchange_order_id": "5AcY2LDjNspuatabjR5ZZLCi5PZR3YQcycb5M68r7dnjSJHK9XFnWmpBSVFoGLz1dksnREbVD2Dggq7Hi9CNDC9U", "leverage": 1, "position": "NIL", "event_name": "SellOrderCreatedEvent", "event_source": "jupiter_solana_mainnet-beta"}
2025-01-27 14:28:22,536 - 276305 - GatewaySolanaAMM - INFO - Polling for order status updates of 1 orders. Transaction hashes: ['5AcY2LDjNspuatabjR5ZZLCi5PZR3YQcycb5M68r7dnjSJHK9XFnWmpBSVFoGLz1dksnREbVD2Dggq7Hi9CNDC9U']
2025-01-27 14:28:24,056 - 276305 - hummingbot.connector.client_order_tracker - INFO - The SELL order sell-JUP-USDC_-1737988087005419 amounting to 10.000000/10.000000 JUP has been filled at 1.044155277000000 USDC.
2025-01-27 14:28:24,119 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988104.0, "order_id": "sell-JUP-USDC_-1737988087005419", "trading_pair": "JUP-USDC", "trade_type": "TradeType.SELL", "order_type": "OrderType.LIMIT", "price": "1.044155277000000", "amount": "10.000000", "trade_fee": {"percent": "0", "percent_token": null, "flat_fees": [{"token": "SOL", "amount": "0.000073116999999999998075157769950038755268906243145465850830078125"}]}, "exchange_trade_id": "5AcY2LDjNspuatabjR5ZZLCi5PZR3YQcycb5M68r7dnjSJHK9XFnWmpBSVFoGLz1dksnREbVD2Dggq7Hi9CNDC9U", "exchange_order_id": "5AcY2LDjNspuatabjR5ZZLCi5PZR3YQcycb5M68r7dnjSJHK9XFnWmpBSVFoGLz1dksnREbVD2Dggq7Hi9CNDC9U", "leverage": 1, "position": "NIL", "event_name": "OrderFilledEvent", "event_source": "jupiter_solana_mainnet-beta"}
2025-01-27 14:28:24,121 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Sell order completed on jupiter_solana_mainnet-beta: sell-JUP-USDC_-1737988087005419. txHash: 5AcY2LDjNspuatabjR5ZZLCi5PZR3YQcycb5M68r7dnjSJHK9XFnWmpBSVFoGLz1dksnREbVD2Dggq7Hi9CNDC9U [clock=2025-01-27 14:28:24+00:00]
2025-01-27 14:28:24,136 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988104.0, "order_id": "sell-JUP-USDC_-1737988087005419", "base_asset": "JUP", "quote_asset": "USDC", "base_asset_amount": "10.000000", "quote_asset_amount": "10.441552770000000000000", "order_type": "OrderType.LIMIT", "exchange_order_id": "5AcY2LDjNspuatabjR5ZZLCi5PZR3YQcycb5M68r7dnjSJHK9XFnWmpBSVFoGLz1dksnREbVD2Dggq7Hi9CNDC9U", "event_name": "SellOrderCompletedEvent", "event_source": "jupiter_solana_mainnet-beta"}
2025-01-27 14:28:24,137 - 276305 - hummingbot.connector.client_order_tracker - INFO - SELL order sell-JUP-USDC_-1737988087005419 completely filled.
2025-01-27 14:28:24,138 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Placing BUY order for 10.0000000 JUP at binance_PaperTrade at 1.0531000000 price [clock=2025-01-27 14:28:24+00:00]
2025-01-27 14:28:24,453 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988104.0, "type": "OrderType.LIMIT", "trading_pair": "JUP-USDT", "amount": "10.0000000", "price": "1.0531000000", "order_id": "buy://JUP-USDT/c45a5950b5996912267ce2d3c5", "creation_timestamp": 1737988104.0, "exchange_order_id": null, "leverage": 1, "position": "NIL", "event_name": "BuyOrderCreatedEvent", "event_source": "None_PaperTrade"}
2025-01-27 14:28:24,455 - 276305 - hummingbot.core.network_iterator - WARNING - Account balance does not have asset JUP.
2025-01-27 14:28:24,475 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988104.0, "order_id": "buy://JUP-USDT/c45a5950b5996912267ce2d3c5", "trading_pair": "JUP-USDT", "trade_type": "TradeType.BUY", "order_type": "OrderType.LIMIT", "price": "1.0531000000", "amount": "10.0000000", "trade_fee": {"percent": "0.001", "percent_token": null, "flat_fees": []}, "exchange_trade_id": "1737988104455630", "exchange_order_id": "", "leverage": 1, "position": "NIL", "event_name": "OrderFilledEvent", "event_source": "None_PaperTrade"}
2025-01-27 14:28:24,475 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Buy order completed on binance: buy://JUP-USDT/c45a5950b5996912267ce2d3c5. [clock=2025-01-27 14:28:24+00:00]
2025-01-27 14:28:24,488 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988104.0, "order_id": "buy://JUP-USDT/c45a5950b5996912267ce2d3c5", "base_asset": "JUP", "quote_asset": "USDT", "base_asset_amount": "9.9900000000", "quote_asset_amount": "10.53100000000000000", "order_type": "OrderType.LIMIT", "exchange_order_id": null, "event_name": "BuyOrderCompletedEvent", "event_source": "None_PaperTrade"}
2025-01-27 14:28:26,011 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Found arbitrage opportunity!: First Side - Connector: jupiter_solana_mainnet-beta  Side: sell  Quote Price: 1.0529085  Order Price: 1.042433271000000  Amount: 10.000000  Extra Fees: [TokenAmount(token='SOL', amount=Decimal('0.000039058800000000006'))]
Second Side - Connector: binance_PaperTrade  Side: buy  Quote Price: 1.0518  Order Price: 1.0518000000  Amount: 10.0000000  Extra Fees: []
2025-01-27 14:28:26,011 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Placing SELL order for 10.000000 JUP at jupiter_solana_mainnet-beta at 1.042433271000000 price [clock=2025-01-27 14:28:26+00:00]
2025-01-27 14:28:26,012 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Placing BUY order for 10.0000000 JUP at binance_PaperTrade at 1.0518000000 price [clock=2025-01-27 14:28:26+00:00]
2025-01-27 14:28:26,208 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988106.0, "type": "OrderType.LIMIT", "trading_pair": "JUP-USDT", "amount": "10.0000000", "price": "1.0518000000", "order_id": "buy://JUP-USDT/fe44956e433fc2b50b6922263b", "creation_timestamp": 1737988106.0, "exchange_order_id": null, "leverage": 1, "position": "NIL", "event_name": "BuyOrderCreatedEvent", "event_source": "None_PaperTrade"}
2025-01-27 14:28:27,036 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988107.0, "order_id": "buy://JUP-USDT/fe44956e433fc2b50b6922263b", "trading_pair": "JUP-USDT", "trade_type": "TradeType.BUY", "order_type": "OrderType.LIMIT", "price": "1.0518000000", "amount": "10.0000000", "trade_fee": {"percent": "0.001", "percent_token": null, "flat_fees": []}, "exchange_trade_id": "1737988107002712", "exchange_order_id": "", "leverage": 1, "position": "NIL", "event_name": "OrderFilledEvent", "event_source": "None_PaperTrade"}
2025-01-27 14:28:27,037 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Buy order completed on binance: buy://JUP-USDT/fe44956e433fc2b50b6922263b. [clock=2025-01-27 14:28:26+00:00]
2025-01-27 14:28:27,064 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988107.0, "order_id": "buy://JUP-USDT/fe44956e433fc2b50b6922263b", "base_asset": "JUP", "quote_asset": "USDT", "base_asset_amount": "9.9900000000", "quote_asset_amount": "10.51800000000000000", "order_type": "OrderType.LIMIT", "exchange_order_id": null, "event_name": "BuyOrderCompletedEvent", "event_source": "None_PaperTrade"}
2025-01-27 14:28:27,683 - 276305 - GatewaySolanaAMM - ERROR - Error submitting SELL swap order to jupiter on mainnet-beta for 10.000000 JUP-USDC 1.042433271000000.
Traceback (most recent call last):
  File "/home/hbot02/nikita/clientgw7367/hummingbot/connector/gateway/amm/gateway_amm_base.py", line 384, in _create_order
    order_result: Dict[str, Any] = await self._get_gateway_instance().amm_trade(
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 512, in amm_trade
    return await self.api_request("post", f"{connector}/trade", request_payload)
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 234, in api_request
    raise e
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 222, in api_request
    raise ValueError(f"Error on {method.upper()} {url} Error: {parsed_response}")
ValueError: Error on POST https://localhost:15888/jupiter/trade Error: {'message': 'Transaction simulation failed: \nError: {"InstructionError":[2,{"Custom":6001}]}\nProgram Logs: Program ComputeBudget111111111111111111111111111111 invoke [1]\nProgram ComputeBudget111111111111111111111111111111 success\nProgram ComputeBudget111111111111111111111111111111 invoke [1]\nProgram ComputeBudget111111111111111111111111111111 success\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 invoke [1]\nProgram log: Instruction: SharedAccountsRoute\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]\nProgram log: Instruction: Transfer\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4644 of 192043 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo invoke [2]\nProgram log: Instruction: Swap\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]\nProgram log: Instruction: TransferChecked\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 6147 of 141485 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]\nProgram log: Instruction: TransferChecked\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 6238 of 131905 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo invoke [3]\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo consumed 2134 of 122236 compute units\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo consumed 63645 of 182213 compute units\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo success\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 invoke [2]\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 consumed 182 of 116836 compute units\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo invoke [2]\nProgram log: Instruction: Swap\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]\nProgram log: Instruction: TransferChecked\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 6238 of 71113 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]\nProgram log: Instruction: TransferChecked\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 6200 of 61442 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo invoke [3]\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo consumed 2134 of 51811 compute units\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo consumed 63366 of 111475 compute units\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo success\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 invoke [2]\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 consumed 182 of 46377 compute units\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 success\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 consumed 151479 of 196048 compute units\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 failed: custom program error: 0x1771', 'httpErrorCode': 503, 'errorCode': 1024, 'stack': 'Error: Transaction simulation failed: \nError: {"InstructionError":[2,{"Custom":6001}]}\nProgram Logs: Program ComputeBudget111111111111111111111111111111 invoke [1]\nProgram ComputeBudget111111111111111111111111111111 success\nProgram ComputeBudget111111111111111111111111111111 invoke [1]\nProgram ComputeBudget111111111111111111111111111111 success\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 invoke [1]\nProgram log: Instruction: SharedAccountsRoute\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]\nProgram log: Instruction: Transfer\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4644 of 192043 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo invoke [2]\nProgram log: Instruction: Swap\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]\nProgram log: Instruction: TransferChecked\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 6147 of 141485 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]\nProgram log: Instruction: TransferChecked\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 6238 of 131905 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo invoke [3]\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo consumed 2134 of 122236 compute units\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo consumed 63645 of 182213 compute units\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo success\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 invoke [2]\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 consumed 182 of 116836 compute units\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo invoke [2]\nProgram log: Instruction: Swap\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]\nProgram log: Instruction: TransferChecked\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 6238 of 71113 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]\nProgram log: Instruction: TransferChecked\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 6200 of 61442 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo invoke [3]\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo consumed 2134 of 51811 compute units\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo success\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo consumed 63366 of 111475 compute units\nProgram LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo success\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 invoke [2]\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 consumed 182 of 46377 compute units\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 success\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 consumed 151479 of 196048 compute units\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 failed: custom program error: 0x1771\n    at Jupiter.simulateTransaction (/home/hbot02/nikita/gwcore/dist/src/connectors/jupiter/jupiter.js:134:19)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Jupiter.executeSwap (/home/hbot02/nikita/gwcore/dist/src/connectors/jupiter/jupiter.js:144:13)\n    at async trade (/home/hbot02/nikita/gwcore/dist/src/connectors/jupiter/jupiter.controllers.js:125:78)\n    at async Object.<anonymous> (/home/hbot02/nikita/gwcore/dist/src/connectors/jupiter/jupiter.routes.js:37:16)'}
2025-01-27 14:28:27,691 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988107.0, "order_id": "sell-JUP-USDC_-1737988106011974", "order_type": "OrderType.LIMIT", "event_name": "MarketOrderFailureEvent", "event_source": "jupiter_solana_mainnet-beta"}
2025-01-27 14:28:27,692 - 276305 - hummingbot.connector.client_order_tracker - INFO - Order sell-JUP-USDC_-1737988106011974 has failed. Order Update: OrderUpdate(trading_pair='JUP-USDC', update_timestamp=1737988107.0, new_state=<OrderState.FAILED: 6>, client_order_id='sell-JUP-USDC_-1737988106011974', exchange_order_id=None, misc_updates=None)
2025-01-27 14:28:28,007 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Found arbitrage opportunity!: First Side - Connector: jupiter_solana_mainnet-beta  Side: sell  Quote Price: 1.0529085  Order Price: 1.042433271000000  Amount: 10.000000  Extra Fees: [TokenAmount(token='SOL', amount=Decimal('0.000039058800000000006'))]
Second Side - Connector: binance_PaperTrade  Side: buy  Quote Price: 1.0518  Order Price: 1.0518000000  Amount: 10.0000000  Extra Fees: []
2025-01-27 14:28:28,008 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Placing SELL order for 10.000000 JUP at jupiter_solana_mainnet-beta at 1.042433271000000 price [clock=2025-01-27 14:28:28+00:00]
2025-01-27 14:28:28,008 - 276305 - hummingbot.strategy.amm_arb.amm_arb - ERROR - Order sell-JUP-USDC_-1737988108008409 seems to have failed in this arbitrage opportunity. Dropping Arbitrage Proposal.  [clock=2025-01-27 14:28:28+00:00]
2025-01-27 14:28:57,265 - 276305 - GatewaySolanaAMM - ERROR - 
Traceback (most recent call last):
  File "/home/hbot02/nikita/clientgw7367/hummingbot/connector/gateway/gateway_in_flight_order.py", line 102, in get_exchange_order_id
    await self.exchange_order_id_update_event.wait()
  File "/home/hbot02/miniconda3/envs/hummingbot/lib/python3.10/asyncio/locks.py", line 214, in wait
    await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/hbot02/nikita/clientgw7367/hummingbot/connector/gateway/amm/gateway_solana_amm.py", line 48, in _status_polling_loop
    await safe_gather(
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/utils/async_utils.py", line 22, in safe_gather
    return await asyncio.gather(*args, **kwargs)
  File "/home/hbot02/nikita/clientgw7367/hummingbot/connector/gateway/amm/gateway_solana_amm.py", line 116, in update_order_status
    tx_hash_list: List[str] = await safe_gather(
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/utils/async_utils.py", line 22, in safe_gather
    return await asyncio.gather(*args, **kwargs)
  File "/home/hbot02/nikita/clientgw7367/hummingbot/connector/gateway/gateway_in_flight_order.py", line 101, in get_exchange_order_id
    async with timeout(GET_GATEWAY_EX_ORDER_ID_TIMEOUT):
  File "/home/hbot02/miniconda3/envs/hummingbot/lib/python3.10/site-packages/async_timeout/__init__.py", line 179, in __aexit__
    self._do_exit(exc_type)
  File "/home/hbot02/miniconda3/envs/hummingbot/lib/python3.10/site-packages/async_timeout/__init__.py", line 265, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError
2025-01-27 14:29:07,115 - 276305 - GatewaySolanaAMM - ERROR - Error submitting SELL swap order to jupiter on mainnet-beta for 10.000000 JUP-USDC 1.042433271000000.
Traceback (most recent call last):
  File "/home/hbot02/nikita/clientgw7367/hummingbot/connector/gateway/amm/gateway_amm_base.py", line 384, in _create_order
    order_result: Dict[str, Any] = await self._get_gateway_instance().amm_trade(
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 512, in amm_trade
    return await self.api_request("post", f"{connector}/trade", request_payload)
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 234, in api_request
    raise e
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 222, in api_request
    raise ValueError(f"Error on {method.upper()} {url} Error: {parsed_response}")
ValueError: Error on POST https://localhost:15888/jupiter/trade Error: {'message': 'Transaction simulation failed: \nError: {"InstructionError":[2,{"Custom":1}]}\nProgram Logs: Program ComputeBudget111111111111111111111111111111 invoke [1]\nProgram ComputeBudget111111111111111111111111111111 success\nProgram ComputeBudget111111111111111111111111111111 invoke [1]\nProgram ComputeBudget111111111111111111111111111111 success\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 invoke [1]\nProgram log: Instruction: SharedAccountsRoute\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]\nProgram log: Instruction: Transfer\nProgram log: Error: insufficient funds\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4299 of 1395288 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: custom program error: 0x1\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 consumed 8711 of 1399700 compute units\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 failed: custom program error: 0x1', 'httpErrorCode': 503, 'errorCode': 1024, 'stack': 'Error: Transaction simulation failed: \nError: {"InstructionError":[2,{"Custom":1}]}\nProgram Logs: Program ComputeBudget111111111111111111111111111111 invoke [1]\nProgram ComputeBudget111111111111111111111111111111 success\nProgram ComputeBudget111111111111111111111111111111 invoke [1]\nProgram ComputeBudget111111111111111111111111111111 success\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 invoke [1]\nProgram log: Instruction: SharedAccountsRoute\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]\nProgram log: Instruction: Transfer\nProgram log: Error: insufficient funds\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4299 of 1395288 compute units\nProgram TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: custom program error: 0x1\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 consumed 8711 of 1399700 compute units\nProgram JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 failed: custom program error: 0x1\n    at Jupiter.simulateTransaction (/home/hbot02/nikita/gwcore/dist/src/connectors/jupiter/jupiter.js:134:19)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Jupiter.executeSwap (/home/hbot02/nikita/gwcore/dist/src/connectors/jupiter/jupiter.js:144:13)\n    at async trade (/home/hbot02/nikita/gwcore/dist/src/connectors/jupiter/jupiter.controllers.js:125:78)\n    at async Object.<anonymous> (/home/hbot02/nikita/gwcore/dist/src/connectors/jupiter/jupiter.routes.js:37:16)'}
2025-01-27 14:29:07,123 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1737988147.0, "order_id": "sell-JUP-USDC_-1737988108008409", "order_type": "OrderType.LIMIT", "event_name": "MarketOrderFailureEvent", "event_source": "jupiter_solana_mainnet-beta"}
2025-01-27 14:29:07,123 - 276305 - hummingbot.connector.client_order_tracker - INFO - Order sell-JUP-USDC_-1737988108008409 has failed. Order Update: OrderUpdate(trading_pair='JUP-USDC', update_timestamp=1737988147.0, new_state=<OrderState.FAILED: 6>, client_order_id='sell-JUP-USDC_-1737988108008409', exchange_order_id=None, misc_updates=None)
2025-01-27 14:29:08,927 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - No arbitrage opportunity.
buy at jupiter_solana_mainnet-beta, sell at binance_PaperTrade: -0.19%
sell at jupiter_solana_mainnet-beta, buy at binance_PaperTrade: -0.12%
2025-01-27 14:29:12,007 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Found arbitrage opportunity!: First Side - Connector: jupiter_solana_mainnet-beta  Side: buy  Quote Price: 1.0509027  Order Price: 1.062030655000000  Amount: 10.000000  Extra Fees: [TokenAmount(token='SOL', amount=Decimal('0.000039058800000000006'))]
Second Side - Connector: binance_PaperTrade  Side: sell  Quote Price: 1.052  Order Price: 1.0520000000  Amount: 10.0000000  Extra Fees: []
2025-01-27 14:29:12,008 - 276305 - hummingbot.strategy.amm_arb.amm_arb - INFO - Placing BUY order for 10.000000 JUP at jupiter_solana_mainnet-beta at 1.062030655000000 price [clock=2025-01-27 14:29:12+00:00]
2025-01-27 14:29:12,009 - 276305 - hummingbot.strategy.amm_arb.amm_arb - ERROR - Order buy-JUP-USDC_-1737988152008677 seems to have failed in this arbitrage opportunity. Dropping Arbitrage Proposal.  [clock=2025-01-27 14:29:12+00:00]
2025-01-27 14:29:28,016 - 276305 - GatewaySolanaAMM - ERROR - 
Traceback (most recent call last):
  File "/home/hbot02/nikita/clientgw7367/hummingbot/connector/gateway/gateway_in_flight_order.py", line 102, in get_exchange_order_id
    await self.exchange_order_id_update_event.wait()
  File "/home/hbot02/miniconda3/envs/hummingbot/lib/python3.10/asyncio/locks.py", line 214, in wait
    await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/hbot02/nikita/clientgw7367/hummingbot/connector/gateway/amm/gateway_solana_amm.py", line 48, in _status_polling_loop
    await safe_gather(
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/utils/async_utils.py", line 22, in safe_gather
    return await asyncio.gather(*args, **kwargs)
  File "/home/hbot02/nikita/clientgw7367/hummingbot/connector/gateway/amm/gateway_solana_amm.py", line 116, in update_order_status
    tx_hash_list: List[str] = await safe_gather(
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/utils/async_utils.py", line 22, in safe_gather
    return await asyncio.gather(*args, **kwargs)
  File "/home/hbot02/nikita/clientgw7367/hummingbot/connector/gateway/gateway_in_flight_order.py", line 101, in get_exchange_order_id
    async with timeout(GET_GATEWAY_EX_ORDER_ID_TIMEOUT):
  File "/home/hbot02/miniconda3/envs/hummingbot/lib/python3.10/site-packages/async_timeout/__init__.py", line 179, in __aexit__
    self._do_exit(exc_type)
  File "/home/hbot02/miniconda3/envs/hummingbot/lib/python3.10/site-packages/async_timeout/__init__.py", line 265, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError
2025-01-27 14:29:29,669 - 276305 - hummingbot.client.hummingbot_application - INFO - stop command initiated.
2025-01-27 14:29:46,390 - 276305 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT BUY order buy-JUP-USDC_-1737988152008677 for 10.000000 JUP-USDC at 1.062030655000000.
2025-01-27 14:29:46,391 - 276305 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": NaN, "type": "OrderType.LIMIT", "trading_pair": "JUP-USDC", "amount": "10.000000", "price": "1.062030655000000", "order_id": "buy-JUP-USDC_-1737988152008677", "creation_timestamp": 1737988152.0, "exchange_order_id": "3XhRjEVgSbG8D3BCxXaJgv6EJihQAAFqecDc3gPna7LxkiNP6NSVahxcbLmsWkjDYzzi6V21CEDJxF3s6zqAzgdq", "leverage": 1, "position": "NIL", "event_name": "BuyOrderCreatedEvent", "event_source": "jupiter_solana_mainnet-beta"}

image

6 orders filled on jupiter solana side (only one recorded by bot)

image

@nikspz
Copy link
Contributor

nikspz commented Jan 27, 2025

gw a72ea11 + Client
The issue with Celo:

Steps to reproduce:

  1. gateway connect uniswap eth celo
  2. add pkey (tried different wallets nodeURLs)

Actual:
ERROR - Unhandled error in background task: Error on POST https://localhost:15888/ethereum/balances Error: {'message': 'Token not supported: ', 'httpErrorCode': 500, 'errorCode':

2025-01-27 14:02:59,048 - 276305 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: Error on POST https://localhost:15888/ethereum/balances Error: {'message': 'Token not supported: ', 'httpErrorCode': 500, 'errorCode': 1006, 'stack': 'Error: Token not supported: \n    at EVMController.balances (/home/hbot02/nikita/gwcore/dist/src/chains/ethereum/evm.controllers.js:235:19)\n    at async Object.<anonymous> (/home/hbot02/nikita/gwcore/dist/src/chains/ethereum/ethereum.routes.js:43:16)'}
Traceback (most recent call last):
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/hbot02/nikita/clientgw7367/hummingbot/client/command/gateway_command.py", line 373, in _gateway_connect
    balances: Dict[str, Any] = await self._get_gateway_instance().get_balances(
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 305, in get_balances
    return await self.api_request(
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 234, in api_request
    raise e
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 222, in api_request
    raise ValueError(f"Error on {method.upper()} {url} Error: {parsed_response}")
ValueError: Error on POST https://localhost:15888/ethereum/balances Error: {'message': 'Token not supported: ', 'httpErrorCode': 500, 'errorCode': 1006, 'stack': 'Error: Token not supported: \n    at EVMController.balances (/home/hbot02/nikita/gwcore/dist/src/chains/ethereum/evm.controllers.js:235:19)\n    at async Object.<anonymous> (/home/hbot02/nikita/gwcore/dist/src/chains/ethereum/ethereum.routes.js:43:16)'}

image

@fengtality
Copy link
Contributor Author

gw a72ea11 + Client The issue with Celo:

Steps to reproduce:

  1. gateway connect uniswap eth celo
  2. add pkey (tried different wallets nodeURLs)

Actual: ERROR - Unhandled error in background task: Error on POST https://localhost:15888/ethereum/balances Error: {'message': 'Token not supported: ', 'httpErrorCode': 500, 'errorCode':

2025-01-27 14:02:59,048 - 276305 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: Error on POST https://localhost:15888/ethereum/balances Error: {'message': 'Token not supported: ', 'httpErrorCode': 500, 'errorCode': 1006, 'stack': 'Error: Token not supported: \n    at EVMController.balances (/home/hbot02/nikita/gwcore/dist/src/chains/ethereum/evm.controllers.js:235:19)\n    at async Object.<anonymous> (/home/hbot02/nikita/gwcore/dist/src/chains/ethereum/ethereum.routes.js:43:16)'}
Traceback (most recent call last):
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/hbot02/nikita/clientgw7367/hummingbot/client/command/gateway_command.py", line 373, in _gateway_connect
    balances: Dict[str, Any] = await self._get_gateway_instance().get_balances(
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 305, in get_balances
    return await self.api_request(
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 234, in api_request
    raise e
  File "/home/hbot02/nikita/clientgw7367/hummingbot/core/gateway/gateway_http_client.py", line 222, in api_request
    raise ValueError(f"Error on {method.upper()} {url} Error: {parsed_response}")
ValueError: Error on POST https://localhost:15888/ethereum/balances Error: {'message': 'Token not supported: ', 'httpErrorCode': 500, 'errorCode': 1006, 'stack': 'Error: Token not supported: \n    at EVMController.balances (/home/hbot02/nikita/gwcore/dist/src/chains/ethereum/evm.controllers.js:235:19)\n    at async Object.<anonymous> (/home/hbot02/nikita/gwcore/dist/src/chains/ethereum/ethereum.routes.js:43:16)'}

image

this issue and the ones that @rapcmia reported should be fixed after you pull the latest commits in the client PR: hummingbot/hummingbot#7367

@rapcmia
Copy link
Contributor

rapcmia commented Jan 28, 2025

this issue and the ones that @rapcmia reported should be fixed after you pull the latest commits in the client PR: hummingbot/hummingbot#7367

Hi @fengtality

Will finalize tests on meteora and approve later today if all ok, thank you 🙇🏼

@rapcmia
Copy link
Contributor

rapcmia commented Jan 28, 2025

PR updated: Review uniswap_ethereum_avalanche and meteora endpoints

Review uniswap_ethereum_avalanche / okx arbitrage

  • Setup simple arbitrage_controller
  • Run tests and review trades
    • Review executor table ✅
      • closeType.COMPLETED(4) matched trade data between OKX and Avalanch txhash
      • Fees recorded successfully

Run API test for Meteora connector using fastify

  • gateway commit a72ea1192e3b27646806dacb386a84fb78b03e80
  • Set devHTTPS to false ok
  • GET Requests:
    • GET active bin: ✅ Success
    • GET quote swap: ✅ Success
    • GET LB pair and positioned-owned ❌
      • Getting Failed to fetch LB pairs (status error 503 - service unavailable)
      • Meteora API code: 410 (RPC call or parameters disabled)
      • Occurred when setting limit values default 100 and 10 for LB pairs
        POST Requests:
    • POST execute-swap: ✅ Success
      • Observed error 429 (rate limit) during the process. Completed after retrying at a 4s timeframe.
    • POST open position: ✅
      • Successfully posted position from the selected pool address.
      • Error observed when user set min and max that exceeds bin value of 69.
      • positionAddress created and used on other endpoints
    • POST add-liquidity, close-position, collect-fees: ❌
      • Error: Status 503 (service unavailable)
        • Meteora API code: 410 (RPC call or parameters disabled)

We are able to opened a position on the sample pool MEME/USDC and use its pooladdress to open position successfully. However getting status code 503 (service unavailable) on some endpoints which can be found on the gateway log file below

logs_gateway_app.2025-01-28.log

Copy link
Contributor

@rapcmia rapcmia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Setup this gateway PR with hummingbot PR test / gateway-core-connectors hummingbot#7367
  • Fresh installation on source build on every new commit
  • Found issues and compare to development: Not compatible
  • Issues reported on initial tests has been addressed by developer
  • Run tests on arbitrage_controller config on following connectors:
  • jupiter_solana_mainnet-beta
  • uniswap_ethereum_avalanche
  • uniswap_ethereum_polygon
  • Run API tests
    • Watch Mike's demo of gateway for meteora
    • Run tests on postman and fastify
    • Compare endpoint and controller test results ok
    • Run tests on Meteora endpoints (Most worked, others return status code 503)
  • Tests done:
  • Most tests are done with quicknode for SOLANA and infura for ethereum
  • Setup CEX/DEX and DEX/CEX on controller-config
  • Review arbitrage event:
    • Trade data on gateway, executor table and hummingbot matched
    • Behavior when suddenly insufficient balance
    • Review txhash generated
    • Observe behavior on different node providers
  • Run postman tests on jupiter and uniswap connectors (arbitrum, avalanche and polygon)
  • Run fastify for meteora endpoints
    • Fetch prices and active trading bins
    • Swapped and open position ok
    • Reported found issues on other requests (ongoing)

Copy link
Contributor

@nikspz nikspz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Cloned [a72ea11](a72ea11) + Client [13fc657](hummingbot/hummingbot@13fc657)
  • connected jupiter, uniswap arbitrum, avalanche, bsc, celo, polygon
  • checked balance successfully
  • created/started amm_arb successfully on uniswap
  • arbitrage controller script on jupiter / binance: ok

@fengtality fengtality merged commit 3732b57 into development Jan 29, 2025
5 checks passed
@fengtality fengtality deleted the core branch January 29, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Development 2.3.0
Development

Successfully merging this pull request may close these issues.

3 participants