MCPcopy Create free account

hub / github.com/Cindicator/CindicatorArbitrageBot / functions

Functions87 in github.com/Cindicator/CindicatorArbitrageBot

↓ 12 callersFunctionexchange_convert
Convert exchange name (or list of exchanges names) to name (names) from DB Args: :param exchanges: <str> (or <list> of <str>'s)
services/core.py:216
↓ 3 callersMethodsend_message
(self, *args, **kwargs)
ArbitrageBot.py:57
↓ 2 callersMethod_check_existing
Check existence of coin/exchange pair in db and if not exist add them. Args: :param coin: <string> coin name (in
crawler/crawler.py:107
↓ 2 callersMethod_update
Update price of specific coin on specific exchange in db Args: :param coin: <string> coin name (in db)
crawler/crawler.py:91
↓ 1 callersFunction_coin_map
()
mongo_queries.py:34
↓ 1 callersFunction_coins
()
mongo_queries.py:40
↓ 1 callersFunction_default_settings
()
mongo_queries.py:54
↓ 1 callersFunction_exchange_map
()
mongo_queries.py:46
↓ 1 callersFunction_generate_string
Generate notification text Args: :param data: <list> of lists that contains 4 items: [coin name, first exchange name,
services/core.py:89
↓ 1 callersMethod_load
Return bid and ask price on specific coin/exchange pair. Args: :param coin: <string> coin name (on exchange)
crawler/crawler.py:62
↓ 1 callersMethod_load_exchange
Return bid and ask prices of specific coins on specific exchange. Args: :param coins: <list> of <string> coin name (in d
crawler/crawler.py:76
↓ 1 callersFunction_price_checker
If bid price on one of two exchanges is bigger than ask price on another exchange, than return tuple with next structure: (coin name, bid exc
services/core.py:61
↓ 1 callersFunctioncrawl
Return list of lists that contains coin name, two exchanges names, and diff in percent between bid and ask on coin on this exchanges (diff al
services/core.py:108
↓ 1 callersFunctionexchange_loader
Retrieve data from exchange and return best bid and ask prices on exchange coins. Args: :param coins: <list> of <string> coin na
crawler/data_loader.py:112
↓ 1 callersFunctionget_coin
Return coin's data Args: :param coin: <string> coin name Returns: :return: <dict> with coin's data or None if c
mongo_queries.py:176
↓ 1 callersFunctionget_user
Return user's data Args: :param chat_id: <int> or <string> user's chat id Returns: :return: <dict> with user's
mongo_queries.py:90
↓ 1 callersMethodhistory_cleaner
Clean history from old prices
crawler/crawler.py:199
↓ 1 callersFunctionlaunch
()
ArbitrageBot.py:61
↓ 1 callersMethodlaunch
Start function of Crawler (start asynchronous load_and_update() tasks for all available combinations of coins and exchanges).
crawler/crawler.py:222
↓ 1 callersMethodload_and_update
Check availability of coin/exchange pair. If available start infinite loop that gets new coin prices from exchange site and updates t
crawler/crawler.py:127
↓ 1 callersMethodload_and_update_exchange
Check availability of coins on exchange. For all available start infinite loop that gets new coins prices from exchange site and upda
crawler/crawler.py:161
↓ 1 callersFunctionloader
Retrieve data from exchange and return best bid and ask prices on specific coin. Args: :param coin: <string> coin name (on excha
crawler/data_loader.py:78
↓ 1 callersFunctionnotify_users
Send all users specific text (in 'msg_time_limit' can be send only 'msg_num_limit' messages) Args: :param bot: <telegram.b
notify_users.py:33
↓ 1 callersFunctionswitch_off
Remove the job if the user changed their mind
services/commands.py:101
↓ 1 callersFunctionswitch_on
Add the job to the queue
services/commands.py:85
Method__init__
(self, *args, is_queued_def=True, msg_queue=None, **kwargs)
ArbitrageBot.py:50
Method__init__
(self, coin_map, db, logger, timeout=1, history=True, h_update_time=3600, h_threshold_time=1)
crawler/crawler.py:52
Functionabout
(bot, update)
services/helpers.py:46
Functionadd_coin
Add new coin with emtpy exchange list to collection Args: :param coin: <string> coin name
mongo_queries.py:190
Functionadd_coin
Add coin to coins list by which the bot will notify the user
services/commands.py:165
Functionadd_coin_dialog
Add coin to user's list and send message to user about operation's result
services/alerts.py:58
Functionadd_coin_h
Add new coin with emtpy exchange list to collection Args: :param coin: <string> coin name
mongo_queries.py:269
Functionadd_exchange
Add new exchange to coin's list Args: :param coin: <string> coin name :param exchange: <string> exchange name
mongo_queries.py:222
Functionadd_exchange
Add exchange to exchanges list by which the bot will notify the user
services/commands.py:223
Functionadd_exchange_dialog
Add exchange to user's list and send message to user about operation's result
services/alerts.py:125
Functionadd_exchange_h
Add new exchange with empty coin's price history to coin's list Args: :param coin: <string> coin name :param exchange: <st
mongo_queries.py:295
Functionadd_price_to_exchange_h
Add coin's price on exchange and time when this price get to history Args: :param coin: <string> coin name :param exchange:
mongo_queries.py:309
Functionadd_remove_coin
Begin dialog for change coin's list Args: :param bot: <telegram.Bot> bot instance :param update: <telegram.update.Update
services/alerts.py:39
Functionadd_remove_exchange
Begin dialog for change exchange's list Returns: :return: change exchange's list dialog identifier
services/alerts.py:110
Functionadd_to_list
Add new value to user's list Args: :param chat_id: <int> or <string> user's chat id :param list: <string> list name
mongo_queries.py:146
Functionadd_user
Add new user to collection Args: :param msg: <telegram.message.Message> telegram's message with user data :param email:
mongo_queries.py:72
Functionalerts_settings
Open the menu for alerts settings Returns: :return: alerts settings menu identifier
services/settings.py:152
Functionback
(bot, update)
services/helpers.py:58
Functionback_to_alerts
Return user to alerts menu Returns: :return: alerts menu identifier
services/alerts.py:197
Functionback_to_settings
Return user to settings menu Returns: :return: settings menu identifier
services/settings.py:165
Functioncoins_help
Send message to user when bot gets unavailable coin
services/alerts.py:102
Functioncontacts
(bot, update)
services/helpers.py:52
Functiondefault_response
Return user to the main menu if user text something unexpectable
services/commands.py:283
Functionerror
Throw out user from conversation if error occur
services/commands.py:298
Functionex_help
Send message to user when bot gets unavailable exchange
services/alerts.py:171
Functionfaq
(bot, update)
services/helpers.py:40
Functionget_coin_h
Return coin's data Args: :param coin: <string> coin name Returns: :return: <dict> with coin's data or None if coin does
mongo_queries.py:255
Functionget_exchange
Return coin's data where coin contains specific exchange Args: :param coin: <string> coin name :param exchange: <string>
mongo_queries.py:201
Functionget_exchange_h
Return coin's data where coin contains specific exchange Args: :param coin: <string> coin name :param exchange: <string> exc
mongo_queries.py:280
Functionget_exchange_history
Return coin's price history on exchange Args: :param coin: <string> coin name :param exchange: <string> exchange name
mongo_queries.py:327
Functionget_registration
Show user about and get registration text if user is unauthorized
services/commands.py:290
Functionget_user_by_email
Return user's data Args: :param email: <string> user's email Returns :return: <dict> with user's data or None
mongo_queries.py:104
Functionget_user_email
Return subscriber's e-mail Args: :param key: <string> Returns: :return: <string> user's e-mail or None if subs
mongo_queries.py:369
Functionget_user_settings
Return settings for specific user Args: :param chat_id: <int> or <string> user's chat id Returns: :return: <dict> w
mongo_queries.py:118
Functionget_users
Return all users data Returns: :return: <list> of dict with user's data
mongo_queries.py:61
Functioninterval
Send static message for interval setting Returns: :return: interval menu identifier
services/settings.py:106
Functioninterval_help
Send static helper message for interval setting
services/settings.py:121
Functionnotify
Send notification to user Args: :param bot: <telegram.Bot> bot instance :param job: <telegram.ext.jobqueue.Job> user's j
services/core.py:162
Functionparse_kraken
(data, coin)
crawler/data_loader.py:48
Functionremove_coin
Remove coin from coins list by which the bot will notify the user
services/commands.py:191
Functionremove_coin_dialog
Remove coin from user's list and send message to user about operation's result
services/alerts.py:77
Functionremove_exchange
Remove exchange to exchanges list by which the bot will notify the user
services/commands.py:250
Functionremove_exchange_dialog
Remove exchange from user's list and send message to user about operation's result
services/alerts.py:144
Functionremove_from_list
Remove value from user's list Args: :param chat_id: <int> or <string> user's chat id :param list: <string> list name
mongo_queries.py:160
Functionrestart_jobs
Notify users about bot's restart and restart users notifications Args: :param dispatcher: <telegram.ext.dispatcher.Dispatcher> b
services/core.py:186
Functionset_interval
Set interval between notifications in seconds
services/commands.py:114
Functionset_interval_dialog
Begin the dialog with for setting an interval value Args: :param bot: <object> bot instance :param update: <dict> updat
services/settings.py:43
Functionset_threshold
Set the threshold between cryptocurrencies by which the bot will notify the user
services/commands.py:140
Functionset_threshold_dialog
Begin the dialog with for setting an threshold value Returns: :return: settings menu identifier
services/settings.py:74
Functionsettings
(bot, update)
services/helpers.py:34
Functionshow_all_coins
Send message to user with all available coins
services/alerts.py:94
Functionshow_all_exchanges
Send message to user with all available exchanges
services/alerts.py:162
Functionshow_settings
Send message to user with his current settings
services/alerts.py:180
Functionshow_your_coins
Show the user's coins list
services/commands.py:213
Functionshow_your_exchanges
Show user's exchanges list
services/commands.py:273
Functionstart
Main entry point of the bot. This command starts the bot interface and checks user authorization. Args: :param bot: <object> bot
services/commands.py:41
Functionswitch
Switch notifications on/off
services/settings.py:95
Functionthreshold
Send static message for threshold setting Returns: :return: threshold menu identifier
services/settings.py:129
Functionthreshold_help
Send static helper message for threshold setting
services/settings.py:144
Functionupdate_exchange
Update coin's price on exchange Args: :param coin: <string> coin name :param exchange: <string> exchange name :
mongo_queries.py:237
Functionupdate_exchange_h
Update coin's history on exchange Args: :param coin: <string> coin name :param exchange: <string> exchange name :pa
mongo_queries.py:347
Functionupdate_setting
Update user's setting with new value Args: :param chat_id: <int> or <string> user's chat id :param setting: <string> se
mongo_queries.py:132