Advertisement
Guest User

Untitled

a guest
Aug 16th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. error: TypeError: coercing to Unicode: need string or buffer, float found
  2.  
  3. supposed to print the price if greater than the price + 0.2
  4.  
  5. public_client = gdax.PublicClient()
  6. x = public_client.get_product_ticker(product_id='ETC-USD')
  7. print x['bid']
  8. time.sleep(20)
  9. y = public_client.get_product_ticker(product_id='ETC-USD')
  10. #if x['bid'] >= y['bid']:
  11. if x['bid'] >= y['bid'] + (0.2):
  12. print x['bid']
  13. else:
  14. print ('x isn't greater than y + 0.2')
  15. print y['bid']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement