whittlem / pycryptobot

Python Crypto Bot (PyCryptoBot)
Apache License 2.0
1.99k stars 744 forks source link

Arguments not being recognised #262

Closed Matthy1981 closed 3 years ago

Matthy1981 commented 3 years ago

Describe the bug Using Windows and powershell, arguments are not being recognised, the bot will only run in demo mode with test funds. - -live 1 using version 2.14.1

To Reproduce Run the bot using any arguments and they will be set to FALSE, see screenshot below

Expected behavior The bot should run in live mode, also arguments such as disablebullonly should be set to FALSE but stay on TRUE

Desktop (please complete the following information): Windows 10

Additional context Ive re-installed all the bots again from fresh and problem still occurs, ive also added arguments into the config file but they still dont work Capture

whittlem commented 3 years ago

I don't use Windows myself so it is difficult to work on this for you. I'm not aware of any other Windows users having problems. Maybe one of the devs using Windows can help you with this.

Can you try pass the arguments as configuration in the config.json as see if it works?

{  
    "coinbasepro" : {
        "api_url" : "https://api.pro.coinbase.com",
        "api_key" : "",
        "api_secret" : "",
        "api_passphrase" : "",
        "config" : {
            "base_currency" : "BTC",
            "quote_currency" : "GBP",
            "live" : 1,
            "autorestart" : 1
        }
    }
}
Matthy1981 commented 3 years ago

Also i forgot to mention, i ran the code for LTC-GBP

git pull; clear; python3 pycryptobot.py --sellatloss 0 --disablebullonly --live 1

but you can see from the screenshot the market is BTC, the config file also says LTC as base currency

im going to try your config file now also

Matthy1981 commented 3 years ago

just tried the argument as a config and they are still not working, it did seem to work fine, but when i restarted and updated the bots a couple of days ago is when the issue started

lesterbx commented 3 years ago

Hi, same problem here running on Ubuntu. After last update is completely ignoring arguments both from command line or from config.json file. Is always running on test mode with BTC-GBP.

lesterbx commented 3 years ago

Okay, is fixed using new config format.

Matthy1981 commented 3 years ago

Can you share the config format please?

gibbstp commented 3 years ago

I run on Win10 but using WSL2. Maybe a work around would be install and use WSL2 until someone can track down the bug? I'm at work and can't until tonight.

lesterbx commented 3 years ago

Can you share the config format please?

Is on the README, this one:

{
    "coinbasepro" : {
        "api_url" : "https://api.pro.coinbase.com",
        "api_key" : "<removed>",
        "api_secret" : "<removed>",
        "api_passphrase" : "<removed>",
        "config" : {
            "base_currency" : "BTC",
            "quote_currency" : "GBP",
            "granularity" : "3600",
            "live" : 0,
            "verbose" : 0
        }
    }
} 
Matthy1981 commented 3 years ago

Mmm That the one same as I have now

Matthy1981 commented 3 years ago

Seemed to have solved the issue now, not sure exactly what the problem was but i re-installed the bot and cloned the directories, then used the new style config file