###前提・実現したいこと
python3.6でシステムを作っています。
zaifという仮想通貨取引所で、定期的に日本円の残高が有った場合に買い注文をできるようにするため、while文を用いたプログラムを書いているのですがうまく行きません。
###発生している問題・エラーメッセージ
C:\Users\hatanaka\AppData\Local\Programs\Python\Python36-32\python.exe C:/zaif/main.py File "C:/zaif/main.py", line 15 last_price = int(zaif_public.last_price('btc_jpy')["last_price"]) ^ IndentationError: expected an indented block Process finished with exit code 1
###該当のソースコード
# -*- coding: utf-8 -*- from time import sleep from zaifapi import ZaifTradeApi # Zaifの取引のためのクラス from zaifapi import ZaifPublicApi # Zaifが公開している認証情報が要らないAPIを実行するクラス from pprint import pprint # 表示用(jsonをきれいに表示してくれる) if __name__ == '__main__': key = 'himitsu ' secret = 'himitsu' zaif_public = ZaifPublicApi() zaif_private = ZaifTradeApi(key, secret) # 情報取得 num = 0 while num < 2: last_price = int(zaif_public.last_price('btc_jpy')["last_price"]) last_pricepuls = last_price + 1000 trade_info = zaif_private.get_info2() funds_jpy = trade_info["funds"]["jpy"] print('last_price: ' + str(last_price)) print('funds_jpy: ' + str(funds_jpy)) amountbtc = round(float(funds_jpy) / last_price, 4) - 0.0001 if funds_jpy > 100: pprint(zaif_private.trade(currency_pair='btc_jpy', action='bid', amount=amountbtc, price=last_price, limit=last_pricepuls) ) sleep(5) else: sleep(5)
###試したこと
https://qiita.com/speedkingg/items/7f122e1fd90558c531f4#_reference-0bb3193d4b94894ec497
を参考に試行錯誤しています。
###補足情報(言語/FW/ツール等のバージョンなど)
OSはwindows10,PyCharmを使って作っています。

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/11/07 23:46