nkaz001 / sample-trading-bot Goto Github PK
View Code? Open in Web Editor NEWBinance Futures Sample Trading Bot
Binance Futures Sample Trading Bot
Hi,
Thanks for this bot. While running this bot in testnet, I get below error message. Could you please help?
INFO:root:WS Connected. Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/root/sample-trading-bot/tradingbot/custom_strategy.py", line 60, in <module> run() File "/root/sample-trading-bot/tradingbot/custom_strategy.py", line 56, in run order_manager.run_loop() File "/root/sample-trading-bot/tradingbot/ordermanager.py", line 155, in run_loop ioloop.run_until_complete(start()) File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/root/sample-trading-bot/tradingbot/ordermanager.py", line 139, in start await self.place_orders() File "/root/sample-trading-bot/tradingbot/custom_strategy.py", line 23, in place_orders mid = (bid['price'][0] + ask['price'][0]) / 2.0 File "/usr/local/lib/python3.10/dist-packages/pandas/core/series.py", line 956, in __getitem__ return self._values[key] IndexError: index 0 is out of bounds for axis 0 with size 0 ERROR:asyncio:Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7efff4c3ee90> ERROR:asyncio:Task was destroyed but it is pending!
I get this error when I want to run python in GitHub code I have installed other plugins
Traceback (most recent call last):
File "/home/orhan/Belgeler/22/custom_strategy.py", line 6, in
from tradingbot.ordermanager import OrderManager
ModuleNotFoundError: No module named 'tradingbot'
Hey, I get this when I try to run it:
Traceback (most recent call last):
File "C:\Users\Nutzer\Desktop\coding\binance\mm\tradingbot\ordermanager.py", line 149, in run_loop
ioloop.add_signal_handler(signal.SIGTERM, signal_handler)
File "C:\Users\Nutzer\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 539, in add_signal_handler
raise NotImplementedError
NotImplementedError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Nutzer\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Nutzer\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Nutzer\Desktop\coding\binance\mm\tradingbot\custom_strategy.py", line 57, in <module>
run()
File "C:\Users\Nutzer\Desktop\coding\binance\mm\tradingbot\custom_strategy.py", line 53, in run
order_manager.run_loop()
File "C:\Users\Nutzer\Desktop\coding\binance\mm\tradingbot\ordermanager.py", line 153, in run_loop
if e.args[0] != 'Event loop stopped before Future completed.':
IndexError: tuple index out of range
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x000001DCEEEE1A00>
do you maybe know why?
Regards
plz help
This fixed by 3f1ab37
ex. ETHUSDTPERP
also when price near buy or sell order, order get cancelled. is that any settings issue?
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.