From 69f9a21c3e5ad3ea3cc10a279edfd1f757c23205 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Tue, 17 Sep 2019 23:41:10 +0800 Subject: [PATCH] [Fix] close #2037 --- examples/vn_trader/run.py | 4 ++-- vnpy/gateway/bitfinex/bitfinex_gateway.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/vn_trader/run.py b/examples/vn_trader/run.py index f6f7a376..1c31e879 100644 --- a/examples/vn_trader/run.py +++ b/examples/vn_trader/run.py @@ -18,7 +18,7 @@ from vnpy.gateway.bitmex import BitmexGateway # from vnpy.gateway.oes import OesGateway # from vnpy.gateway.okex import OkexGateway # from vnpy.gateway.huobi import HuobiGateway -# from vnpy.gateway.bitfinex import BitfinexGateway +from vnpy.gateway.bitfinex import BitfinexGateway # from vnpy.gateway.onetoken import OnetokenGateway from vnpy.gateway.okexf import OkexfGateway from vnpy.gateway.okexs import OkexsGateway @@ -63,7 +63,7 @@ def main(): # main_engine.add_gateway(OesGateway) # main_engine.add_gateway(OkexGateway) # main_engine.add_gateway(HuobiGateway) - # main_engine.add_gateway(BitfinexGateway) + main_engine.add_gateway(BitfinexGateway) # main_engine.add_gateway(OnetokenGateway) # main_engine.add_gateway(OkexfGateway) # main_engine.add_gateway(HbdmGateway) diff --git a/vnpy/gateway/bitfinex/bitfinex_gateway.py b/vnpy/gateway/bitfinex/bitfinex_gateway.py index 47d58fdd..ac2d614e 100644 --- a/vnpy/gateway/bitfinex/bitfinex_gateway.py +++ b/vnpy/gateway/bitfinex/bitfinex_gateway.py @@ -558,7 +558,7 @@ class BitfinexWebsocketApi(WebsocketClient): # ASK ask_keys = ask.keys() - askPriceList = sorted(ask_keys, reverse=True) + askPriceList = sorted(ask_keys) tick.ask_price_1 = askPriceList[0] tick.ask_price_2 = askPriceList[1]