Skip to content

Commit 98fb6c5

Browse files
committed
remove depth quote subscribe param exchange_quote
1 parent 80c19a0 commit 98fb6c5

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

tigeropen/common/consts/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,6 @@ class BarPeriod(Enum):
105105
SIX_HOURS = '6hour' # 6小时
106106

107107

108-
@unique
109-
class ExchangeQuote(Enum):
110-
ARCA = 'ARCA'
111-
TOTAL_VIEW = 'TOTAL_VIEW'
112-
113-
114108
class OrderStatus(Enum):
115109
PENDING_NEW = 'PendingNew'
116110
NEW = 'Initial' # 订单初始状态

tigeropen/examples/push_client_demo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"""
77
import time
88
# from tigeropen.common.consts import QuoteKeyType
9-
from tigeropen.common.consts import ExchangeQuote
109
from tigeropen.push.push_client import PushClient
1110
from tigeropen.examples.client_config import get_client_config
1211

@@ -173,7 +172,7 @@ def unsubscribe_callback(destination, content):
173172
# push_client.subscribe_quote(['MSFT', 'AMD'], quote_key_type=QuoteKeyType.TRADE)
174173

175174
# 订阅深度行情
176-
push_client.subscribe_depth_quote(['AMD', 'BABA'], exchange_quote=ExchangeQuote.TOTAL_VIEW)
175+
push_client.subscribe_depth_quote(['AMD', 'BABA'])
177176

178177
# 订阅资产变动
179178
push_client.subscribe_asset()

tigeropen/push/push_client.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from tigeropen.common.util.order_utils import get_order_status
2020
from tigeropen.common.consts.push_types import RequestType, ResponseType
2121
from tigeropen.common.consts.quote_keys import QuoteChangeKey, QuoteKeyType
22-
from tigeropen.common.consts import OrderStatus, ExchangeQuote
22+
from tigeropen.common.consts import OrderStatus
2323

2424
HOUR_TRADING_QUOTE_KEYS_MAPPINGS = {'hourTradingLatestPrice': 'latest_price', 'hourTradingPreClose': 'pre_close',
2525
'hourTradingLatestTime': 'latest_time', 'hourTradingVolume': 'volume',
@@ -315,16 +315,13 @@ def subscribe_quote(self, symbols, quote_key_type=QuoteKeyType.TRADE, focus_keys
315315
return self._handle_quote_subscribe(destination=QUOTE, subscription='Quote', symbols=symbols,
316316
extra_headers=extra_headers)
317317

318-
def subscribe_depth_quote(self, symbols, exchange_quote=ExchangeQuote.TOTAL_VIEW):
318+
def subscribe_depth_quote(self, symbols):
319319
"""
320320
订阅深度行情
321321
:param symbols: symbol列表
322-
:param exchange_quote: tigeropen.common.consts.ExchangeQuote 交易所行情枚举类型
323322
:return:
324323
"""
325-
extra_headers = {'exchange': exchange_quote.value}
326-
return self._handle_quote_subscribe(destination=QUOTE_DEPTH, subscription='AskBid', symbols=symbols,
327-
extra_headers=extra_headers)
324+
return self._handle_quote_subscribe(destination=QUOTE_DEPTH, subscription='AskBid', symbols=symbols)
328325

329326
def subscribe_option(self, symbols):
330327
"""

0 commit comments

Comments
 (0)