techbureau / zaifapi Goto Github PK
View Code? Open in Web Editor NEWThis project forked from e-tsubo/zaifapi
zaifのAPIを簡単にコール出来るようにしました。
License: MIT License
This project forked from e-tsubo/zaifapi
zaifのAPIを簡単にコール出来るようにしました。
License: MIT License
gcpのubuntuインスタンス上で実行していたのですが最初は動いていたのですが、以下のようなエラーをはくようになってしまいました。
治そうかと思ったんですが、ちょっと良くわからなかったです。
Traceback (most recent call last): File "./history.py", line 17, in <module> print(json.dumps(zaif.trade_history())) File "/home/bols/.local/lib/python2.7/site-packages/zaifapi/impl.py", line 235, in trade_history return self._execute_api(inspect.currentframe().f_code.co_name, schema_keys, kwargs) File "/home/bols/.local/lib/python2.7/site-packages/zaifapi/impl.py", line 213, in _execute_api header = self.get_header(params) File "/home/bols/.local/lib/python2.7/site-packages/zaifapi/impl.py", line 271, in get_header signature = hmac.new(bytearray(self._secret.encode('utf-8')), digestmod=hashlib.sha512) AttributeError: 'NoneType' object has no attribute 'encode'
ちなみに手元のubuntu ノートPCでは動いています。
件名のまま。
from zaifapi import ZaifPublicApi
pub_api = ZaifPublicApi()
trades = pub_api.trades('btc_jpy')
trades = pub_api.trades('btc_jpy')
Traceback (most recent call last):
…
File "/anaconda/lib/python3.6/site-packages/zaifapi/exchange_api/public.py", line 20, in _execute_api
raise ZaifApiError('return status code is {}'.format(response.status_code))
zaifapi.api_error.ZaifApiError: return status code is 404
path_url='/api/1/trades/btc_jpy/trades/btc_jpy'
連続で叩いた際のrequest URLが間違っているようです。
こんにちは、
あなたのAPIはマーケットオーダーをサポートしていますか? 以下の書類は、市場指図ではなく、指値注文のみを記載しています。
http://techbureau-api-document.readthedocs.io/ja/latest/trade/2_individual/7_trade.html
どうか教えてください。 ありがとうございました。
zaifapiをインポートすると以下のようなバグがでます。
pip install zaifapiでインストールしました。
>>> from zaifapi import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/username/anaconda2/envs/xgboost/lib/python2.7/site-packages/zaifapi/__init__.py", line 1, in <module>
from .exchange_api import *
File "/home/username/anaconda2/envs/xgboost/lib/python2.7/site-packages/zaifapi/exchange_api/__init__.py", line 5
class ZaifExchangeApi(ZaifApi, metaclass=ABCMeta):
^
SyntaxError: invalid syntax
理由は不明ですが、もし何か解決策がありましたら教えて頂けると助かります。
ずっと非公式となってますが、公式ライブラリとしてメンテナンスされないのでしょうか。
それとも https://github.com/techbureau はテックビューロ社と無関係なのでしょうか。
先物公開 API に複数のパラメータを渡した場合にエラーになることがあります。
パラメータがパスに挿入される順番が不定になってしまうようです。
https://api.zaif.jp/fapi/1/last_price/1/btc_jpy
https://api.zaif.jp/fapi/1/last_price/btc_jpy/1
後者に当たった場合502が返ってきます。
from zaifapi import ZaifFuturesPublicApi
futures_api = ZaifFuturesPublicApi()
futures_api.last_price(group_id=1, currency_pair='btc_jpy')
Traceback (most recent call last):
...
File ".../lib/python3.5/site-packages/zaifapi/exchange_api/public.py", line 81, in last_price
currency_pair=currency_pair)
File ".../lib/python3.5/site-packages/zaifapi/exchange_api/public.py", line 21, in _execute_api
raise ZaifApiError('return status code is {}'.format(response.status_code))
zaifapi.api_error.ZaifApiError: return status code is 502
currently stop
parameter is not defined in Cerberus schema
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.