[Add] position price data for BitmexGateway
This commit is contained in:
parent
2916cb4391
commit
d065f6c352
@ -8,7 +8,7 @@ from vnpy.trader.ui import MainWindow, create_qapp
|
|||||||
from vnpy.gateway.bitmex import BitmexGateway
|
from vnpy.gateway.bitmex import BitmexGateway
|
||||||
# from vnpy.gateway.futu import FutuGateway
|
# from vnpy.gateway.futu import FutuGateway
|
||||||
# from vnpy.gateway.ib import IbGateway
|
# from vnpy.gateway.ib import IbGateway
|
||||||
from vnpy.gateway.ctp import CtpGateway
|
# from vnpy.gateway.ctp import CtpGateway
|
||||||
# from vnpy.gateway.ctptest import CtptestGateway
|
# from vnpy.gateway.ctptest import CtptestGateway
|
||||||
# from vnpy.gateway.mini import MiniGateway
|
# from vnpy.gateway.mini import MiniGateway
|
||||||
# from vnpy.gateway.sopt import SoptGateway
|
# from vnpy.gateway.sopt import SoptGateway
|
||||||
@ -18,20 +18,20 @@ from vnpy.gateway.ctp import CtpGateway
|
|||||||
# from vnpy.gateway.oes import OesGateway
|
# from vnpy.gateway.oes import OesGateway
|
||||||
# from vnpy.gateway.okex import OkexGateway
|
# from vnpy.gateway.okex import OkexGateway
|
||||||
# from vnpy.gateway.huobi import HuobiGateway
|
# 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.onetoken import OnetokenGateway
|
||||||
from vnpy.gateway.okexf import OkexfGateway
|
# from vnpy.gateway.okexf import OkexfGateway
|
||||||
from vnpy.gateway.okexs import OkexsGateway
|
# from vnpy.gateway.okexs import OkexsGateway
|
||||||
# from vnpy.gateway.xtp import XtpGateway
|
# from vnpy.gateway.xtp import XtpGateway
|
||||||
# from vnpy.gateway.hbdm import HbdmGateway
|
# from vnpy.gateway.hbdm import HbdmGateway
|
||||||
# from vnpy.gateway.tap import TapGateway
|
# from vnpy.gateway.tap import TapGateway
|
||||||
# from vnpy.gateway.tora import ToraGateway
|
# from vnpy.gateway.tora import ToraGateway
|
||||||
# from vnpy.gateway.alpaca import AlpacaGateway
|
# from vnpy.gateway.alpaca import AlpacaGateway
|
||||||
from vnpy.gateway.da import DaGateway
|
# from vnpy.gateway.da import DaGateway
|
||||||
from vnpy.gateway.coinbase import CoinbaseGateway
|
# from vnpy.gateway.coinbase import CoinbaseGateway
|
||||||
from vnpy.gateway.bitstamp import BitstampGateway
|
# from vnpy.gateway.bitstamp import BitstampGateway
|
||||||
from vnpy.gateway.gateios import GateiosGateway
|
# from vnpy.gateway.gateios import GateiosGateway
|
||||||
from vnpy.gateway.bybit import BybitGateway
|
# from vnpy.gateway.bybit import BybitGateway
|
||||||
|
|
||||||
from vnpy.app.cta_strategy import CtaStrategyApp
|
from vnpy.app.cta_strategy import CtaStrategyApp
|
||||||
# from vnpy.app.csv_loader import CsvLoaderApp
|
# from vnpy.app.csv_loader import CsvLoaderApp
|
||||||
@ -77,9 +77,9 @@ def main():
|
|||||||
# main_engine.add_gateway(OkexsGateway)
|
# main_engine.add_gateway(OkexsGateway)
|
||||||
# main_engine.add_gateway(DaGateway)
|
# main_engine.add_gateway(DaGateway)
|
||||||
# main_engine.add_gateway(CoinbaseGateway)
|
# main_engine.add_gateway(CoinbaseGateway)
|
||||||
main_engine.add_gateway(BitstampGateway)
|
# main_engine.add_gateway(BitstampGateway)
|
||||||
# main_engine.add_gateway(GateiosGateway)
|
# main_engine.add_gateway(GateiosGateway)
|
||||||
main_engine.add_gateway(BybitGateway)
|
# main_engine.add_gateway(BybitGateway)
|
||||||
|
|
||||||
main_engine.add_app(CtaStrategyApp)
|
main_engine.add_app(CtaStrategyApp)
|
||||||
main_engine.add_app(CtaBacktesterApp)
|
main_engine.add_app(CtaBacktesterApp)
|
||||||
|
@ -740,6 +740,7 @@ class BitmexWebsocketApi(WebsocketClient):
|
|||||||
exchange=Exchange.BITMEX,
|
exchange=Exchange.BITMEX,
|
||||||
direction=Direction.NET,
|
direction=Direction.NET,
|
||||||
volume=d.get("currentQty", 0),
|
volume=d.get("currentQty", 0),
|
||||||
|
price=d.get("avgEntryPrice", 0),
|
||||||
gateway_name=self.gateway_name,
|
gateway_name=self.gateway_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user