Undefined index in ptrader.php
lbzt opened this issue · comments
the bot does not work propely i get the messages below:
PHP Warning: file_get_contents(): Filename cannot be empty in /home/pi/phptrader/trader.php on line 631
PHP Notice: Undefined index: btc in /home/pi/phptrader/trader.php on line 501
PHP Notice: Undefined index: buyprice in /home/pi/phptrader/trader.php on line 503
this is normal for the first run. It's because the script has not yet created the storage data (json file)
are you running the script from within the phptrader directory or did you just use "php /full/path/to/script.php"?
Are you one of my students? ;)
I'm also experiencing this @chrisiaut no matter which command i run,
php ~/phptrader/trader.php check
[i] Will use 'ETH Wallet' as crypto wallet :)
[i] Will use 'EUR Wallet' as currency wallet :)
[i] Will use EUR Wallet for payments
[i] Buy price: 170.33 EUR
[i] Sell price: 166.94 EUR
[i] Spot price: 168.63 EUR
[i] Difference buy/sell: 3.39 EUR
[i] Currently watching 1 transactions
[i] Buy price: 170.33 EUR
[i] Sell price: 166.94 EUR
[i] Spot price: 168.63 EUR
[i] Difference buy/sell: 3.39 EUR
PHP Notice: Undefined index: btc in /root/phptrader/trader.php on line 506
PHP Notice: Undefined index: buyprice in /root/phptrader/trader.php on line 508
[#1] Watching SELL order for 5 EUR. Will sell when ETH price reaches 168 ETH.
php ~/phptrader/trader.php sell 5 168
[i] Will use 'ETH Wallet' as crypto wallet :)
[i] Will use 'EUR Wallet' as currency wallet :)
[i] Will use EUR Wallet for payments
[i] Buy price: 170.33 EUR
[i] Sell price: 166.94 EUR
[i] Spot price: 168.64 EUR
[i] Difference buy/sell: 3.39 EUR
[i] Adding SELL order for 5 EUR in ETH when price is >= 168 EUR
PHP Warning: file_get_contents(): Filename cannot be empty in /root/phptrader/trader.php on line 636