Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Cindicator/CindicatorArbitrageBot
/ functions
Functions
87 in github.com/Cindicator/CindicatorArbitrageBot
⨍
Functions
87
◇
Types & classes
2
↓ 12 callers
Function
exchange_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 callers
Method
send_message
(self, *args, **kwargs)
ArbitrageBot.py:57
↓ 2 callers
Method
_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 callers
Method
_update
Update price of specific coin on specific exchange in db Args: :param coin: <string> coin name (in db)
crawler/crawler.py:91
↓ 1 callers
Function
_coin_map
()
mongo_queries.py:34
↓ 1 callers
Function
_coins
()
mongo_queries.py:40
↓ 1 callers
Function
_default_settings
()
mongo_queries.py:54
↓ 1 callers
Function
_exchange_map
()
mongo_queries.py:46
↓ 1 callers
Function
_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 callers
Method
_load
Return bid and ask price on specific coin/exchange pair. Args: :param coin: <string> coin name (on exchange)
crawler/crawler.py:62
↓ 1 callers
Method
_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 callers
Function
_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 callers
Function
crawl
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 callers
Function
exchange_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 callers
Function
get_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 callers
Function
get_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 callers
Method
history_cleaner
Clean history from old prices
crawler/crawler.py:199
↓ 1 callers
Function
launch
()
ArbitrageBot.py:61
↓ 1 callers
Method
launch
Start function of Crawler (start asynchronous load_and_update() tasks for all available combinations of coins and exchanges).
crawler/crawler.py:222
↓ 1 callers
Method
load_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 callers
Method
load_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 callers
Function
loader
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 callers
Function
notify_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 callers
Function
switch_off
Remove the job if the user changed their mind
services/commands.py:101
↓ 1 callers
Function
switch_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
Function
about
(bot, update)
services/helpers.py:46
Function
add_coin
Add new coin with emtpy exchange list to collection Args: :param coin: <string> coin name
mongo_queries.py:190
Function
add_coin
Add coin to coins list by which the bot will notify the user
services/commands.py:165
Function
add_coin_dialog
Add coin to user's list and send message to user about operation's result
services/alerts.py:58
Function
add_coin_h
Add new coin with emtpy exchange list to collection Args: :param coin: <string> coin name
mongo_queries.py:269
Function
add_exchange
Add new exchange to coin's list Args: :param coin: <string> coin name :param exchange: <string> exchange name
mongo_queries.py:222
Function
add_exchange
Add exchange to exchanges list by which the bot will notify the user
services/commands.py:223
Function
add_exchange_dialog
Add exchange to user's list and send message to user about operation's result
services/alerts.py:125
Function
add_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
Function
add_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
Function
add_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
Function
add_remove_exchange
Begin dialog for change exchange's list Returns: :return: change exchange's list dialog identifier
services/alerts.py:110
Function
add_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
Function
add_user
Add new user to collection Args: :param msg: <telegram.message.Message> telegram's message with user data :param email:
mongo_queries.py:72
Function
alerts_settings
Open the menu for alerts settings Returns: :return: alerts settings menu identifier
services/settings.py:152
Function
back
(bot, update)
services/helpers.py:58
Function
back_to_alerts
Return user to alerts menu Returns: :return: alerts menu identifier
services/alerts.py:197
Function
back_to_settings
Return user to settings menu Returns: :return: settings menu identifier
services/settings.py:165
Function
coins_help
Send message to user when bot gets unavailable coin
services/alerts.py:102
Function
contacts
(bot, update)
services/helpers.py:52
Function
default_response
Return user to the main menu if user text something unexpectable
services/commands.py:283
Function
error
Throw out user from conversation if error occur
services/commands.py:298
Function
ex_help
Send message to user when bot gets unavailable exchange
services/alerts.py:171
Function
faq
(bot, update)
services/helpers.py:40
Function
get_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
Function
get_exchange
Return coin's data where coin contains specific exchange Args: :param coin: <string> coin name :param exchange: <string>
mongo_queries.py:201
Function
get_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
Function
get_exchange_history
Return coin's price history on exchange Args: :param coin: <string> coin name :param exchange: <string> exchange name
mongo_queries.py:327
Function
get_registration
Show user about and get registration text if user is unauthorized
services/commands.py:290
Function
get_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
Function
get_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
Function
get_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
Function
get_users
Return all users data Returns: :return: <list> of dict with user's data
mongo_queries.py:61
Function
interval
Send static message for interval setting Returns: :return: interval menu identifier
services/settings.py:106
Function
interval_help
Send static helper message for interval setting
services/settings.py:121
Function
notify
Send notification to user Args: :param bot: <telegram.Bot> bot instance :param job: <telegram.ext.jobqueue.Job> user's j
services/core.py:162
Function
parse_kraken
(data, coin)
crawler/data_loader.py:48
Function
remove_coin
Remove coin from coins list by which the bot will notify the user
services/commands.py:191
Function
remove_coin_dialog
Remove coin from user's list and send message to user about operation's result
services/alerts.py:77
Function
remove_exchange
Remove exchange to exchanges list by which the bot will notify the user
services/commands.py:250
Function
remove_exchange_dialog
Remove exchange from user's list and send message to user about operation's result
services/alerts.py:144
Function
remove_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
Function
restart_jobs
Notify users about bot's restart and restart users notifications Args: :param dispatcher: <telegram.ext.dispatcher.Dispatcher> b
services/core.py:186
Function
set_interval
Set interval between notifications in seconds
services/commands.py:114
Function
set_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
Function
set_threshold
Set the threshold between cryptocurrencies by which the bot will notify the user
services/commands.py:140
Function
set_threshold_dialog
Begin the dialog with for setting an threshold value Returns: :return: settings menu identifier
services/settings.py:74
Function
settings
(bot, update)
services/helpers.py:34
Function
show_all_coins
Send message to user with all available coins
services/alerts.py:94
Function
show_all_exchanges
Send message to user with all available exchanges
services/alerts.py:162
Function
show_settings
Send message to user with his current settings
services/alerts.py:180
Function
show_your_coins
Show the user's coins list
services/commands.py:213
Function
show_your_exchanges
Show user's exchanges list
services/commands.py:273
Function
start
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
Function
switch
Switch notifications on/off
services/settings.py:95
Function
threshold
Send static message for threshold setting Returns: :return: threshold menu identifier
services/settings.py:129
Function
threshold_help
Send static helper message for threshold setting
services/settings.py:144
Function
update_exchange
Update coin's price on exchange Args: :param coin: <string> coin name :param exchange: <string> exchange name :
mongo_queries.py:237
Function
update_exchange_h
Update coin's history on exchange Args: :param coin: <string> coin name :param exchange: <string> exchange name :pa
mongo_queries.py:347
Function
update_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