fork download
  1. import base64
  2. import hashlib
  3. import hmac
  4. import json
  5. import random
  6. import yaml
  7.  
  8. payload = {
  9. 'type': 'ask',
  10. 'limit': '0',
  11. 'amount': '0.001',
  12. 'price_type': 'market',
  13. }
  14. j = json.dumps(payload).encode('utf-8')
  15. encoded_body = base64.standard_b64encode(j).decode('utf-8')
  16. rand = random.uniform(0.6, 0.9)
  17. #amount1 = int(rand * 1e8)
  18. #print(rand)
  19. print(amount1)
  20. print(encoded_body)
  21. print('eyJ0eXBlIjogImFzayIsCiJsaW1pdCI6ICIwIiwKImFtb3VudCI6ICIwLjAwMSIsCiJwcmljZV90eXBlIjogIm1hcmtldCJ9')
Runtime error #stdin #stdout #stderr 0.01s 119552KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 6, in <module>
    import yaml
ImportError: No module named yaml