geek-at / phptrader

A simple php powered Bitcoin and Ethereum trading bot
143 stars 41 forks source link

Undefined index in ptrader.php #12

Closed lbzt closed 7 years ago

lbzt commented 7 years ago

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

geek-at commented 7 years ago

this is normal for the first run. It's because the script has not yet created the storage data (json file)

lbzt commented 7 years ago

Thanks but i am running the bot since Yesterday, i set chmod 777 to whole directory what am i doing wrong? Thanks prof. ;-)!!!!

Il 01 lug 2017 6:35 PM, "Christian Haschek" notifications@github.com ha scritto:

this is normal for the first run. It's because the script has not yet created the storage data (json file)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chrisiaut/phptrader/issues/12#issuecomment-312441991, or mute the thread https://github.com/notifications/unsubscribe-auth/AccBST94sV7Ui7eh_WnXrrBo4aA4AGWEks5sJnVmgaJpZM4OLWbN .

geek-at commented 7 years ago

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? ;)

lbzt commented 7 years ago

Fronte the directory.

Il 01 lug 2017 6:56 PM, "Christian Haschek" notifications@github.com ha scritto:

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? ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chrisiaut/phptrader/issues/12#issuecomment-312443215, or mute the thread https://github.com/notifications/unsubscribe-auth/AccBSePwMcwoU_SweIWVgQZ0A5DNcVP9ks5sJnpJgaJpZM4OLWbN .

lbzt commented 7 years ago

Sorry, from the directory. No, i am not One of You student (i Just Red your biography and i have Belen very imptessed) but i would Be gladiatore to learn from a kind likes You!

Il 01 lug 2017 6:57 PM, "luca labozzetta" magictouch74@gmail.com ha scritto:

Fronte the directory.

Il 01 lug 2017 6:56 PM, "Christian Haschek" notifications@github.com ha scritto:

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? ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chrisiaut/phptrader/issues/12#issuecomment-312443215, or mute the thread https://github.com/notifications/unsubscribe-auth/AccBSePwMcwoU_SweIWVgQZ0A5DNcVP9ks5sJnpJgaJpZM4OLWbN .

lbzt commented 7 years ago

Sorry ( italian t9)!!!!

Il 01 lug 2017 7:00 PM, "luca labozzetta" magictouch74@gmail.com ha scritto:

Sorry, from the directory. No, i am not One of You student (i Just Red your biography and i have Belen very imptessed) but i would Be gladiatore to learn from a kind likes You!

Il 01 lug 2017 6:57 PM, "luca labozzetta" magictouch74@gmail.com ha scritto:

Fronte the directory.

Il 01 lug 2017 6:56 PM, "Christian Haschek" notifications@github.com ha scritto:

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? ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chrisiaut/phptrader/issues/12#issuecomment-312443215, or mute the thread https://github.com/notifications/unsubscribe-auth/AccBSePwMcwoU_SweIWVgQZ0A5DNcVP9ks5sJnpJgaJpZM4OLWbN .

duramato commented 7 years ago

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