Created
June 10, 2020 02:01
-
-
Save buddies2705/f8f845c60533290dbca6b51bc45917e8 to your computer and use it in GitHub Desktop.
Python script for bitFlyer Ticker
This file contains hidden or 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
import requests | |
import json | |
API_ENDPOINT = 'https://api.bitflyer.com' | |
def convetStrToJson(str): | |
return json.loads(str) | |
def getTicker(): | |
url = API_ENDPOINT | |
path = '/v1/ticker' | |
query = {'product_code': 'BTC_EUR'} | |
response = requests.get(url + path, params=query) | |
response = convetStrToJson(response.text) | |
print(response) | |
return response | |
getTicker() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment