Created
August 16, 2017 21:58
-
-
Save tkota0726/20b8e9d5805a311f010f86a1db5a5cc4 to your computer and use it in GitHub Desktop.
bitAPIスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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