geek-at / phptrader

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

Undefined index btc when running watchdog #7

Closed haikalfouzi closed 7 years ago

haikalfouzi commented 7 years ago

I got this error of undefined index when running simulation of watchdog function

------                                                                                                                  
[i] Currently watching 1 transactions                                                                                   
[i] Buy price: 79.37 USD                                                                                                
[i] Sell price: 77.67 USD                                                                                               
[i] Spot price: 78.6 USD                                                                                                
[i] Difference buy/sell: 1.7 USD                                                                                        

PHP Notice:  Undefined index: btc in /home/pi/Development/phptrader/trader.php on line 435                              
 [#1] Watching BUY order for    160 USD. Will buy when ETH price reaches 78.                                            
------  
geek-at commented 7 years ago

It's just a notice since I didn't initialize the variables. No biggy ;D