solidquant / whack-a-mole Goto Github PK
View Code? Open in Web Editor NEWCEX-DEX arbitrage bot written in pure Python
CEX-DEX arbitrage bot written in pure Python
Hi Solid Quant.
WDYT about growing the project with us? More contributors, more users.
If that's interesting, contact me at Telegram: @MistBrown.
Cheers
I'm trying to run main.py, but it keeps giving me this error
PS C:\Users\bmd\bmd\OneDrive\Documents\GitHub\whackamole> & c:/Users/bmd/OneDrive/Documents/GitHub/whackamole/venv/Scripts/Activate.ps1
(venv) PS C:\Users\bmd\OneDrive\Documents\GitHub\whackamole> & c:/Users/bmd/OneDrive/Documents/GitHub/whackamole/venv/Scripts/python.exe c:/Users/bmd/OneDrive/Documents/GitHub/whackamole/main.py
Process Process-1:
Traceback (most recent call last):
File "C:\Users\bmd\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
File "C:\Users\bmd\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "c:\Usersbmd\OneDrive\Documents\GitHub\whackamole\main.py", line 18, in dex_stream_process
dex = DEX({chain: RPC_ENDPOINTS[chain]},
File "c:\Users\bmd\OneDrive\Documents\GitHub\whackamole\data\dex.py", line 450, in init
self.load()
File "c:\Users\bmd\OneDrive\Documents\GitHub\whackamole\data\dex.py", line 132, in load
self._load_pool_data()
File "c:\Users\bmd\OneDrive\Documents\GitHub\whackamole\data\dex.py", line 210, in _load_pool_data
sqrt_price = storage_data[0]
TypeError: 'NoneType' object is not subscriptable
Not sure what went wrong, please kindly look into it. Thanks
After installing all the packages and ran main.py, I get this error in ubuntu 20.04. But it works well in Windows 10.
I think the problem is that MultiCall has another asyncio creation in the package.
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/dev/arbmon/strategies/dex_arb_base.py", line 57, in dex_stream_process
dex = DEX({chain: RPC_ENDPOINTS[chain]},
File "/home/dev/arbmon/data/dex.py", line 431, in __init__
self.load()
File "/home/dev/arbmon/data/dex.py", line 128, in load
self._load_pool_data()
File "/home/dev/arbmon/data/dex.py", line 166, in _load_pool_data
**multicall()
File "/home/dev/.local/lib/python3.10/site-packages/multicall/multicall.py", line 58, in __call__
response = await_awaitable(self)
File "/home/dev/.local/lib/python3.10/site-packages/multicall/utils.py", line 73, in await_awaitable
return get_event_loop().run_until_complete(awaitable)
File "/usr/lib/python3.10/asyncio/base_events.py", line 625, in run_until_complete
self._check_running()
File "/usr/lib/python3.10/asyncio/base_events.py", line 584, in _check_running
raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
I can find another way to get values concurrently in web3.js.
var contract = new web3.eth.Contract(abi, address);
var batch = new web3.BatchRequest();
batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback));
batch.add(contract.methods.balance(address).call.request({from: '0x0000000000000000000000000000000000000000'}, callback2));
batch.execute();
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.