Skip to content

Commit

Permalink
refactor/auto_gen_streams_list (#12)
Browse files Browse the repository at this point in the history
* separate streams_list from subscription_manager

* update streams_list

* update again

* refactor/auto_gen_streams_list
  • Loading branch information
chylli-deriv authored Aug 30, 2022
1 parent d68358e commit 8a9d514
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion deriv_api/deriv_api_calls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was automatically generated by scripts/regen-py.pl at 20220612-012818
# This file was automatically generated by scripts/regen-py.pl at 20220627-142751


from numbers import Number
Expand Down
6 changes: 6 additions & 0 deletions deriv_api/streams_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file was automatically generated by scripts/regen-py.pl at 20220627-142751

# streams_list is the list of subscriptions msg_types available.
# Please update it by scripts/regen-py.pl
# Refer https://developers.binary.com/
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', ]
10 changes: 1 addition & 9 deletions deriv_api/subscription_manager.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
from deriv_api.utils import dict_to_cache_key
from deriv_api.errors import APIError
from deriv_api.streams_list import streams_list
from reactivex import operators as op
from reactivex.subject import Subject
from reactivex import Observable
from typing import Optional, Union

# streams_list is the list of subscriptions msg_types available.
# Please add / remove based on current available streams in api.
# Refer https://developers.binary.com/
# TODO NEXT auto generate this one
streams_list = ['balance', 'candles', 'p2p_advertiser', 'p2p_order', 'proposal',
'proposal_array', 'proposal_open_contract', 'ticks', 'ticks_history', 'transaction',
'website_status', 'buy']

__pdoc__ = {
'deriv_api.subscription_manager.SubscriptionManager.complete_subs_by_ids': False,
'deriv_api.subscription_manager.SubscriptionManager.complete_subs_by_key': False,
Expand Down

0 comments on commit 8a9d514

Please sign in to comment.