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]