Skip to content

Instantly share code, notes, and snippets.

@tkota0726
Created August 16, 2017 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkota0726/20b8e9d5805a311f010f86a1db5a5cc4 to your computer and use it in GitHub Desktop.
Save tkota0726/20b8e9d5805a311f010f86a1db5a5cc4 to your computer and use it in GitHub Desktop.
bitAPIスクリプト
# -*- coding: utf-8 -*-
import pybitflyer
import json
def main():
api = pybitflyer.API(api_key="************",
api_secret="**************")
b = api.board(product_code="BTC_JPY")
t = api.ticker(product_code="BTC_JPY")
print(json_shaping(t))
def json_shaping(j) :
dict = j
format_json = json.dumps(dict, indent=4, separators=(',', ': '))
return format_json
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment