Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. import pybitflyer
  3. import json
  4.  
  5. def main():
  6.  
  7. api = pybitflyer.API(api_key="************",
  8. api_secret="**************")
  9. b = api.board(product_code="BTC_JPY")
  10. t = api.ticker(product_code="BTC_JPY")
  11. print(json_shaping(t))
  12.  
  13. def json_shaping(j) :
  14. dict = j
  15. format_json = json.dumps(dict, indent=4, separators=(',', ': '))
  16. return format_json
  17.  
  18. if __name__ == '__main__':
  19. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement