Created
September 16, 2016 07:11
-
-
Save anonymous/3bada9cbbd74fc3de01d871a72c600db to your computer and use it in GitHub Desktop.
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
import requests | |
url = 'https://api.zaif.jp/api/1/depth/btc_jpy' | |
bj_board = requests.get(url, timeout=3).json() | |
bj_board_bid_top = bj_board['bids'][0] | |
bj_board_ask_top = bj_board['asks'][0] | |
if bj_board_ask_top[0] < 60000: | |
print 'time to buy!!' | |
elif bj_board_bid_top[0] > 70000: | |
print 'time to sell' | |
else: | |
print 'HODL...' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment