Skip to content

Commit 8a9d514

Browse files
authored
refactor/auto_gen_streams_list (deriv-com#12)
* separate streams_list from subscription_manager * update streams_list * update again * refactor/auto_gen_streams_list
1 parent d68358e commit 8a9d514

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

deriv_api/deriv_api_calls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was automatically generated by scripts/regen-py.pl at 20220612-012818
1+
# This file was automatically generated by scripts/regen-py.pl at 20220627-142751
22

33

44
from numbers import Number

deriv_api/streams_list.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This file was automatically generated by scripts/regen-py.pl at 20220627-142751
2+
3+
# streams_list is the list of subscriptions msg_types available.
4+
# Please update it by scripts/regen-py.pl
5+
# Refer https://developers.binary.com/
6+
streams_list = [ 'balance', 'buy', 'cashier_payments', 'exchange_rates', 'p2p_advert_info', 'p2p_advertiser_create', 'p2p_advertiser_info', 'p2p_order_create', 'p2p_order_info', 'p2p_order_list', 'proposal', 'proposal_open_contract', 'ticks', 'ticks_history', 'transaction', 'website_status', ]

deriv_api/subscription_manager.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
from deriv_api.utils import dict_to_cache_key
22
from deriv_api.errors import APIError
3+
from deriv_api.streams_list import streams_list
34
from reactivex import operators as op
45
from reactivex.subject import Subject
56
from reactivex import Observable
67
from typing import Optional, Union
7-
8-
# streams_list is the list of subscriptions msg_types available.
9-
# Please add / remove based on current available streams in api.
10-
# Refer https://developers.binary.com/
11-
# TODO NEXT auto generate this one
12-
streams_list = ['balance', 'candles', 'p2p_advertiser', 'p2p_order', 'proposal',
13-
'proposal_array', 'proposal_open_contract', 'ticks', 'ticks_history', 'transaction',
14-
'website_status', 'buy']
15-
168
__pdoc__ = {
179
'deriv_api.subscription_manager.SubscriptionManager.complete_subs_by_ids': False,
1810
'deriv_api.subscription_manager.SubscriptionManager.complete_subs_by_key': False,

0 commit comments

Comments
 (0)