Code Monkey home page Code Monkey logo

Comments (25)

JPStrydom avatar JPStrydom commented on September 26, 2024

Any chance your new API key doesn't have the correct permissions?

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

read info, trade limit and trade market enabled,new api and secret just created

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

was a typo error on the api key, and now seems to be running but showing other errors

TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
2018/04/30 10:36:13 AM - ERROR: Failed to fetch Bittrex market summary for the BTC-USDT market.
2018/04/30 10:36:13 AM - ERROR: unsupported operand type(s) for *: 'NoneType' and 'float'
Type error occurred. Waiting 10 seconds and then retrying.

what should be expected as an correct output ? the lines bellow keeps repeating on my powershell terminal

�[0m
�[1m�[30mSee the latest log file for more information.
�[0m
�[1m�[33mResuming tracking on all 192 markets.�[0m
�[1m�[31m
Failed to fetch Bittrex market summary for the BTC-USDT market.�[0m
�[1m�[30mSee the latest log file for more information.
�[0m
�[1m�[31m
Type error occurred. Waiting 10 seconds and then retrying.�[0m
�[1m�[30mSee the latest log file for more information.
�[0m
�[1m�[33mResuming tracking on all 192 markets.�[0m
�[1m�[31m
Failed to fetch Bittrex market summary for the BTC-USDT market.�[0m
�[1m�[30mSee the latest log file for more information.
�[0m
�[1m�[31m
Type error occurred. Waiting 10 seconds and then retrying.�[0m
�[1m�[30mSee the latest log file for more information.
�[0m
�[1m�[33mResuming tracking on all 192 markets.�[0m

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

this is the log i got last

2018/04/30 10:36:13 AM - ERROR: Failed to fetch Bittrex market summary for the BTC-USDT market.
2018/04/30 10:36:13 AM - ERROR: unsupported operand type(s) for *: 'NoneType' and 'float'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 48, in analyse_pauses
current_balance = self.Messenger.send_balance_slack(self.get_non_zero_balances(),
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 412, in get_non_zero_balances
return py_.map_(non_zero_balances, lambda balance: self.create_balance_object(balance))
File "C:\Users\Leonardo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydash\collections.py", line 538, in map_
return list(itermap(collection, iteratee))
File "C:\Users\Leonardo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydash\collections.py", line 1102, in itermap
for result in iteriteratee(collection, iteratee):
File "C:\Users\Leonardo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydash\helpers.py", line 80, in iteriteratee
yield (callit(cbk, item, key, obj, argcount=argcount),
File "C:\Users\Leonardo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydash\helpers.py", line 37, in callit
return iteratee(*args[:argstop])
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 412, in
return py_.map_(non_zero_balances, lambda balance: self.create_balance_object(balance))
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 430, in create_balance_object
{"BtcValue": round(btc_price * balance_item["Balance"], 8), "IsTracked": is_tracked}
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'

from crypto-trading-bot.

JPStrydom avatar JPStrydom commented on September 26, 2024

In your app-data.json file, does your pause time have have the following structure?

{
    "coinPairs": [],
    "pausedTrackedCoinPairs": [],
    "pauseTime": {
        "buy": "null or a number",
        "sell": "null or a number",
        "balance": "null or a number"
    },
    "previousBalance": "null or a number"
}

i.e. Do you have the "balance" key in your "pauseTime", and do you have "previousBalance" as null or as a number?

from crypto-trading-bot.

JPStrydom avatar JPStrydom commented on September 26, 2024

I just pushed an update that should hopefully fix your issue. Please check it out and lemme know if its :)

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

nope... my app-data.json has the same structure, but numbers, the previous balance is null... downloaded the new and no changes... remains the same error

2018/04/30 03:02:09 PM - ERROR: Failed to fetch Bittrex market summary for the BTC-USDT market.
2018/04/30 03:02:09 PM - ERROR: unsupported operand type(s) for *: 'NoneType' and 'float'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 48, in analyse_pauses
current_balance = self.Messenger.send_balance_slack(self.get_non_zero_balances(),
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 412, in get_non_zero_balances
return py_.map_(non_zero_balances, lambda balance: self.create_balance_object(balance))
File "C:\Users\Leonardo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydash\collections.py", line 538, in map_
return list(itermap(collection, iteratee))
File "C:\Users\Leonardo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydash\collections.py", line 1102, in itermap
for result in iteriteratee(collection, iteratee):
File "C:\Users\Leonardo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydash\helpers.py", line 80, in iteriteratee
yield (callit(cbk, item, key, obj, argcount=argcount),
File "C:\Users\Leonardo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydash\helpers.py", line 37, in callit
return iteratee(*args[:argstop])
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 412, in
return py_.map_(non_zero_balances, lambda balance: self.create_balance_object(balance))
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 430, in create_balance_object
{"BtcValue": round(btc_price * balance_item["Balance"], 8), "IsTracked": is_tracked}
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

what is expected to see when works ? it needs to let it running,i know but i wanna know how it behave

thanks for the fast repply, i am looking for a nice trading bot

from crypto-trading-bot.

JPStrydom avatar JPStrydom commented on September 26, 2024

So this functionality is purely to send balance summary slack messages. If you're not using the slack integration, or just want to leave out the balance notifications, I'd suggest just deleting "balance" object from "pauseParameters" inside your settings file. So it'll look like this ->

{
    "sound": false,
    "tradeParameters": {...},
    "pauseParameters": {
        "buy": {...},
        "sell": {...}
    }
}

The issue here is that Bittrex is failing to fetch the market price (which it sometimes does). It shouldn't crash the program (if it's crashing, please let me know), and it shouldn't cause any issues - but I'm looking into a fix now 👍

from crypto-trading-bot.

JPStrydom avatar JPStrydom commented on September 26, 2024

Just pushed the fix. Please let me know if it works.

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

now just dont run... it gives this message on command line:

PS C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src> python app.py
Please completed the settings.json file in your database directory

i am using your given example of settings.json

from crypto-trading-bot.

JPStrydom avatar JPStrydom commented on September 26, 2024

Please have a look at the README and make sure your settings file is correct. The bot needs those configurations to operate correctly.

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

i have looked, have edited app.py, got it running, but without some parameters, but deleted and downloaded again,created new APIs and settings file like readme... but the error seems the same:

2018/05/01 08:46:22 AM - ERROR: Failed to fetch Bittrex market summary for the BTC-USDT market.
2018/05/01 08:46:22 AM - ERROR: unsupported operand type(s) for *: 'NoneType' and 'float'
Traceback (most recent call last):
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 429, in create_balance_object
btc_value = round(btc_price * balance_item["Balance"], 8)
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
2018/05/01 08:46:22 AM - ERROR: unsupported operand type(s) for +=: 'float' and 'str'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 49, in analyse_pauses
self.Database.get_previous_total_balance())
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\messenger.py", line 232, in send_balance_slack
total_balance += balance["BtcValue"]
TypeError: unsupported operand type(s) for +=: 'float' and 'str'
2018/05/01 08:46:34 AM - ERROR: Failed to fetch Bittrex market summary for the BTC-USDT market.
2018/05/01 08:46:34 AM - ERROR: unsupported operand type(s) for *: 'NoneType' and 'float'
Traceback (most recent call last):
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 429, in create_balance_object
btc_value = round(btc_price * balance_item["Balance"], 8)
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
2018/05/01 08:46:34 AM - ERROR: unsupported operand type(s) for +=: 'float' and 'str'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 49, in analyse_pauses
self.Database.get_previous_total_balance())
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\messenger.py", line 232, in send_balance_slack
total_balance += balance["BtcValue"]
TypeError: unsupported operand type(s) for +=: 'float' and 'str'

i am using windows 10 but all pyhton scripts mostly works fine to me

thanks for the response, and lets get it running !!

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

i am giving it up bro...now it replaces the content of json files with default values...

from crypto-trading-bot.

JPStrydom avatar JPStrydom commented on September 26, 2024

If it's overwriting the JSON file, it means it failed to read it and there's most likely an issue in your files formatting.

As for your initial error, it's still a Bittrex issue, but I believe I know how to work around it.

from crypto-trading-bot.

JPStrydom avatar JPStrydom commented on September 26, 2024

I just pushed a fix that should hopefully fix your crashing issue.

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

just find out, that when i put gmail credentials it causes the code to overwrite the entire json file, so i just put the API keys and got it running... but another error, check the log:

2018/05/01 05:08:51 PM - ERROR: 'buy'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 40, in analyse_pauses
if self.Database.check_resume(self.pause_params["buy"]["pauseTime"], "buy"):
KeyError: 'buy'
2018/05/01 05:09:47 PM - ERROR: 'buy'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 40, in analyse_pauses
if self.Database.check_resume(self.pause_params["buy"]["pauseTime"], "buy"):
KeyError: 'buy'
2018/05/01 05:11:47 PM - ERROR: 'buy'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 40, in analyse_pauses
if self.Database.check_resume(self.pause_params["buy"]["pauseTime"], "buy"):
KeyError: 'buy'

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

the BTC-USDT error seems to been fixed !!!

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

if its not trouble for you, lets keep it going till it runs properly ?

from crypto-trading-bot.

JPStrydom avatar JPStrydom commented on September 26, 2024

I'd suggest deleting your app-data.json file. And if your settings.json or secrets.json gets overwritten, it means there's an error on the file's formatting (i.e. you've entered invalid JSON).

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

deleting app-data.json just gets the bot to make another one, i am getting this error, i changed 3 times API keys on bittrex, but i dont think it is the bug...

2018/05/04 01:44:35 PM - ERROR: 'buy'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 40, in analyse_pauses
if self.Database.check_resume(self.pause_params["buy"]["pauseTime"], "buy"):
KeyError: 'buy'
2018/05/04 01:44:51 PM - ERROR: 'buy'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 40, in analyse_pauses
if self.Database.check_resume(self.pause_params["buy"]["pauseTime"], "buy"):
KeyError: 'buy'
2018/05/04 01:45:46 PM - ERROR: 'buy'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 40, in analyse_pauses
if self.Database.check_resume(self.pause_params["buy"]["pauseTime"], "buy"):
KeyError: 'buy'

from crypto-trading-bot.

JPStrydom avatar JPStrydom commented on September 26, 2024

Mhhh are you sure all your JSON files are in the correct format and contain all the required key-value pairs?

from crypto-trading-bot.

TradeCrafter avatar TradeCrafter commented on September 26, 2024

from crypto-trading-bot.

romali avatar romali commented on September 26, 2024

I have the same issue under linux, following are in the log:

2018/06/14 03:20:49 PM - ERROR: Failed to fetch Bittrex market summary for the BTC-USDT market.
2018/06/14 03:20:49 PM - ERROR: unsupported operand type(s) for *: 'NoneType' and 'float'
Traceback (most recent call last):
  File "/home/xxxxxx/python/trade/Crypto-Trading-Bot/src/trader.py", line 429, in create_balance_object
    btc_value = round(btc_price * balance_item["Balance"], 8)
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'

from crypto-trading-bot.

JPStrydom avatar JPStrydom commented on September 26, 2024

Are you sure you're using the latest version of the repo?

from crypto-trading-bot.

Related Issues (20)

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.