Code Monkey home page Code Monkey logo

sample-trading-bot's People

Contributors

nkaz001 avatar quantitative-technologies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sample-trading-bot's Issues

IndexError: index 0 is out of bounds for axis 0 with size 0

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!

No module named 'tradingbot'

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'

Traceback (most recent call last):

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

gridbot putting sell order at loss before any buy order.

ex. ETHUSDTPERP

  1. buy order price: 1115, 0.09 eth
  2. buy order price: 1110, 0.09 eth
  3. sell order: 1100, 0.09 eth, current price: 1095 <- sell order at loss because there is no any buy average order executed below 1100 price yet.

also when price near buy or sell order, order get cancelled. is that any settings issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.