diff --git a/LICENSE b/LICENSE index ed35fe5..9dba397 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ -MIT License +The MIT License (MIT) -Copyright (c) 2021 vn.py +Copyright (c) 2015-present, Xiaoyou Chen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 5dae7c0..a06cc8c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

- + @@ -13,13 +13,11 @@ ## 说明 -基于Bitfinex交易所的API开发,支持账户下的数字货币交易。 - -请在Bitfinex网站完成账户的相应设置后再使用。 +基于Bitfinex交易所的API开发。 ## 安装 -安装需要基于2.2.0版本以上的[VN Studio](https://www.vnpy.com)。 +安装需要基于2.6.0版本以上的[VN Studio](https://www.vnpy.com)。 直接使用pip命令: diff --git a/setup.cfg b/setup.cfg index da63602..20a95dd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,11 @@ [metadata] name = vnpy_bitfinex -version = 2021.8.24 +version = 2021.9.17 url = https://www.vnpy.com license = MIT author = Xiaoyou Chen author_email = xiaoyou.chen@mail.vnpy.com -description = BITFINEX gateway for vn.py quant trading framework. +description = Bitfinex gateway for vn.py quant trading framework. long_description = file: README.md long_description_content_type = text/markdown keywords = diff --git a/vnpy_bitfinex/__init__.py b/vnpy_bitfinex/__init__.py index 4f5d797..ac8d890 100644 --- a/vnpy_bitfinex/__init__.py +++ b/vnpy_bitfinex/__init__.py @@ -1 +1,31 @@ +# The MIT License (MIT) +# +# Copyright (c) 2015-present, Xiaoyou Chen +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +import importlib_metadata + from .bitfinex_gateway import BitfinexGateway + + +try: + __version__ = importlib_metadata.version("vnpy_bitfinex") +except importlib_metadata.PackageNotFoundError: + __version__ = "dev" diff --git a/vnpy_bitfinex/bitfinex_gateway.py b/vnpy_bitfinex/bitfinex_gateway.py index 99fe0dd..b0eb5a6 100644 --- a/vnpy_bitfinex/bitfinex_gateway.py +++ b/vnpy_bitfinex/bitfinex_gateway.py @@ -34,6 +34,7 @@ HistoryRequest ) + # UTC时区 UTC_TZ = pytz.utc @@ -624,14 +625,14 @@ def on_trade_update(self, data: dict) -> None: info: dict = data[2] if name == "ws": - for l in info: - self.on_wallet(l) + for buf in info: + self.on_wallet(buf) self.gateway.write_log("账户资金获取成功") elif name == "wu": self.on_wallet(info) elif name == "os": - for l in info: - self.on_order(l) + for buf in info: + self.on_order(buf) self.gateway.write_log("活动委托获取成功") elif name in ["on", "ou", "oc"]: self.on_order(info)