βοΈ Config#
Dynaconf#
Dynaconf is a powerful and easy-to-use configuration management library for Python. Talky settings are based on Dynaconf. It supports TOML settings file, .env file or environment variable , and other types. Refer to dynaconf/dynaconf for more information.
Settings Structure#
- Config will load:
talky default: talky_settings.toml
default from library if the library support it: default_settings.toml
user settings: settings.toml
user secrets: .secrets.toml
- Your settings should be setup in settings.toml, .secrets.toml, .env or environment variable.
Settings.toml or .env can be located in
/app/settings.tomlor/app/.envfor docker. If deployed locally, place your file in/tt/folder.
1Password#
In case, you use 1Password to store your settings, you can use .secrets.toml to retrieve and store your settings from a notesPlain item.
in order to use 1Password, you need to add the following to your .env file:
OP_SERVICE_ACCOUNT_TOKEN: your 1Password service account token
OP_VAULT: your 1Password vault
OP_ITEM: your 1Password item
OP_PATH: your one 1Password path (optional and default value /usr/bin/op)
The .secrets.toml will located in /tt/.secrets.toml and be created by the OP client via op read op://vault/item/notesPlain > .secrets.toml
Talky Settings#
More than 100 settings customizable via settings.toml or .env. Most of them are predefined and you only need to update the credentials realted to your exchange and chat platform
1########################################
2### DEFAULT SETTINGS ###
3########################################
4
5# Any of those settings can be changed.
6# To overwrite a setting, create a
7# a file named settings.toml or load from
8# .env file or env vars.
9# As an example, to change the port:
10#
11# settings.toml
12# [default]
13# port = 8081
14#
15# or via .env
16# export TT_PORT=8081
17
18
19########################################
20### DYNACONF SETTINGS ###
21########################################
22
23[default]
24# Dynaconf settings verification
25VALUE = "Production"
26
27########################################
28### PYTHON SETTINGS ###
29########################################
30
31# Log level to troubleshoot
32# loglevel = "DEBUG"
33loglevel = "DEBUG"
34# Log level for third party library
35thirdparty_lib_loglevel = "ERROR"
36
37# URL to verify the latest version
38repo = "https://api.github.com/repos/mraniki/tt/releases/latest"
39# Enable/Disable Version Check
40version_check = true
41
42
43########################################
44### FASTAPI SETTINGS ###
45########################################
46
47# Uvicorn Server settings
48host = "0.0.0.0"
49port = 8080
50
51# Experiemental, If set to true,
52# provide a ui at http://0.0.0.0:8080/
53# refer to frontend documentation
54# ui_enabled = true
55ui_enabled = false
56
57# Your webhook secret to send
58# trade alert directly to your chat.
59# If you use Trading view, the webhook
60# to be set in the trading view notification
61# will be https://0.0.0.0/webhook/123abc
62# as per the above and below data
63
64webhook_secret = "123abc"
65
66# Forward the webhook data
67# to another endpoint like another bot
68# or webhook service.
69
70# Forwarded Enable/Disable
71forwarder = false
72# Forwarder URL
73forwarder_url = ""
74
75########################################
76### APPRISE SETTINGS ###
77########################################
78
79# Refer to
80# https://github.com/caronc/apprise/wiki
81# Apprise endpoint URL can be a URL
82# for the chat, a URL to an Apprise config
83# or a URL to the Apprise API endpoint
84# apprise_url = "tgram://BOTTOKEN/CHANNEL"
85# apprise_url = "discord://token1/channel"
86apprise_url = "json://localhost"
87
88#Format of the apprise notification.
89# apprise_format = "NotifyFormat.MARKDOWN"
90apprise_format = "NotifyFormat.HTML"
91
92########################################
93### IAMLISTENING SETTINGS ###
94########################################
95
96# Enable/Disable IAMListening
97iamlistening_enabled = true
98
99########################################
100### COMMON BOT COMMAND SETTINGS ###
101########################################
102
103# Bot Prefix
104bot_prefix = "/"
105# Character to ignore
106bot_ignore = "βΉοΈ π¦ β οΈ π π¦ πΊ β¬οΈ π¬ π»"
107# Command for help
108bot_command_help = "help"
109# Command for info
110bot_command_info = "info"
111# Command for user balance
112bot_command_bal = "bal"
113# Command for user position
114bot_command_pos = "pos"
115# Command for daily pnl
116bot_command_pnl_daily = "d"
117# Command for instrument quote
118bot_command_quote = "q"
119# Command for switch trading on or off
120bot_command_trading = "trading"
121# Command to retrieve network info
122bot_command_network = "network"
123# Command to restart the bot
124bot_command_restart = "restart"
125# Command to get live tv link
126bot_command_tv = "live"
127# Command to get trading view trend
128bot_command_trend = "trend"
129# Command to get latest news
130bot_command_news = "news"
131# Command to scrape data
132bot_command_scraper = "scraper"
133# command for conversation
134bot_command_aichat = "ai"
135# command to toggle aimode
136bot_command_aimode = "aimode"
137# command to export conversation
138bot_command_aiexport = "export"
139# command for reset conversation
140bot_command_aiclear = "clear"
141
142# Help Message
143helper_commands = """
144π /help
145βΉοΈ /info
146π /trading
147π /restart
148πΈοΈ /network
149πΊ /live
150π° /news
151π /trend
152π¬ /ai
153β° /aimode
154π§½ /clear
155βπ¨ /export
156βοΈ /q WBTC
157π¦ /bal
158π¦ /pos
159π― BUY WBTC
160π― buy BTCUSDT sl=200 tp=400 q=2%
161"""
162
163########################################
164### TRADING SETTINGS ###
165########################################
166
167# Enable/Disable Trading
168trading_enabled = true
169trading_control = true
170trading_days_allowed = ["tue", "wed", "thu"]
171trading_hours_start = "08:00"
172trading_hours_end = "16:00"
173
174########################################
175### FINDMYORDER SETTINGS ###
176########################################
177
178# Enable/Disable FindMyOrder
179findmyorder_enabled = true
180
181# Keyword to be use to identify an order
182action_identifier = "BUY SELL LONG SHORT"
183# Keyword identifier for stoploss
184stop_loss_identifier = "sl="
185# Keyword identifier for take-profit
186take_profit_identifier = 'tp='
187# Keyword identifier for quantity
188quantity_identifier = 'q='
189# Keyword identifier for order type
190order_type_identifier = "spot future margin"
191# Keyword identifier for leverage
192leverage_type_identifier = "cross isolated"
193# Keyword identifier for comments
194comment_identifier = "comment="
195
196# Stoploss default value is none is provided
197stop_loss = 1000
198# Take-Profit default value is none is provided
199take_profit = 1000
200# Quantity default value is none is provided
201quantity = 1
202
203# Settings to enable or disable
204# instrument mapping
205instrument_mapping = true
206# instrument mapping to use and alternative
207# symbol when generating the order
208mapping = [
209 { id = "EURUSD", alt = "EUR/sUSD" },
210 { id = "GOLD", alt = "XAU" },
211 { id = "BTC", alt = "WBTC" },
212 { id = "ETH", alt = "WETH" },
213]
214
215# Instruments to be ignored
216# when generating an order
217ignore_instrument = "DOGE"
218
219########################################
220### PLUGINS SETTINGS ###
221########################################
222
223# Enable/Disable Plugins
224plugin_enabled = true
225# Plugins Locations
226plugin_directory = "tt.plugins.default_plugins"
227
228# Plugins name list to load at the start
229# of the bot to allow a reduced memory
230# usage and footprint if needed
231# if you want all the plugins to be loaded
232# at the start, set it to
233authorized_plugins = []
234# Here the value has been set for helper
235# and dex exchange plugins only
236# authorized_plugins = [
237# 'helper_plugin',
238# 'dex_exchange_plugin',
239# ]
240
241# Enable/Disable Example Plugin
242# example_plugin_enabled = true
243example_plugin_enabled = false
244# Enable/Disable User Plugins
245# Not yet implemented
246# user_plugins_allowed = true
247user_plugins_allowed = false
248
249# plugin cron scheduler
250user_day_of_week="tue-thu"
251user_hours="6,12,18"
252user_timezone="UTC"
253
254########################################
255### HELPER SETTINGS ###
256########################################
257
258
259# Enable/Disable Helper
260helper_enabled = true
261# helper_enabled = false
262#name of the bot
263bot_name = "Talky"
264# URL endpoint for latency ping.
265ip_check_url = "8.8.8.8"
266
267
268########################################
269### TALKYTREND SETTINGS ###
270########################################
271
272# Enable/Disable Talkytrend
273talkytrend_enabled = true
274# talkytrend_enabled = false
275
276# Enable/Disable Signals
277enable_signals = true
278# enable_signals = false
279
280# instrument trend to be monitored
281# use https://tvdb.brianthe.dev
282# for the list of supported instrument
283assets = [
284 { id ="EURUSD", exchange='FX_IDC',screener="forex"},
285 { id ="UKOIL", exchange='FX',screener="cfd"},
286 { id ="GOLD", exchange='TVC',screener="cfd"},
287 { id ="BTCUSD", exchange='BINANCE',screener="crypto"},
288]
289
290# Enable/Disable Yfinance
291enable_yfinance = true
292
293# yahoo finance ticker reference
294# https://finance.yahoo.com/lookup/
295yfinance_ticker_reference = "TSLA"
296
297# Enable/Disable Events
298enable_events = true
299# Events calendar
300economic_calendar = "https://nfs.faireconomy.media/ff_calendar_thisweek.json"
301# Adhoc date to add in event tracker
302fomc_decision_date = [
303 "2023-11-01",
304 "2023-12-13",
305 "2024-01-31",
306 "2024-03-20",
307 "2024-05-01",
308 "2024-06-12",
309 "2024-07-31",
310 "2024-09-18",
311 "2024-11-07",
312 "2024-12-18",
313 "2025-01-29"
314 ]
315
316# TV url
317live_tv_url = "https://bloomberg.com/media-manifest/streams/us.m3u8"
318
319# RSS Feeds Enable/Disable
320enable_feed = true
321feed_url = "https://www.dailyfx.com/feeds/market-news"
322
323# Finnhub news fetcher
324enable_finnhub = false
325finnhub_api_key = ""
326finnhub_news_category = "forex"
327
328# web scraper
329enable_scraper = false
330scraper_page_url = ""
331scraper_page_id = ""
332
333########################################
334### CEFI SETTINGS ###
335########################################
336
337# Enable/Disable CEFI
338cex_enabled = true
339
340########################################
341### DXSP SETTINGS ###
342########################################
343
344# Enable/Disable DXSP
345dxsp_enabled = true
346
347# Header to use for retrieving urls content below
348headers = {User-Agent= 'Mozilla/5.0'}
349
350# DEX ABI to use in case you have no explorer setup
351dex_erc20_abi_url = "https://raw.githubusercontent.com/Uniswap/interface/44c355c7f0f8ab5bdb3e0790560e84e59f5666f7/src/abis/erc20.json"
352
353# token list using uniswap tokenlist format
354# https://github.com/mraniki/tokenlist
355# this can be used to avoid using coingecko
356# or if token are not listed yet or for testnet
357# token_mainnet_list = "https://raw.githubusercontent.com/mraniki/tokenlist/main/all.json"
358# token_testnet_list = "https://raw.githubusercontent.com/mraniki/tokenlist/main/testnet.json"
359token_mainnet_list = ""
360token_testnet_list = ""
361token_personal_list = "https://raw.githubusercontent.com/mraniki/tokenlist/main/TT.json"
362
363#################################
364### MYLLM SETTINGS ###
365#################################
366myllm_enabled = true
367
368# [default.myllm.g4f]
369# llm_library = "g4f" # options are bard, openai or g4f
370# enabled = false # options are true or false to enable or disable the llm
371# llm_model= "gpt-4-turbo" # model to use e.g. gpt-3.5-turbo, gpt-4, gpt-4-32k
372# llm_provider = "g4f.Provider.Bing" # only for g4f. Refer to https://github.com/xtekky/gpt4free
373# llm_provider_key = "" # only for bard and openai to pass either the cookie or the api key
374# max_memory = 100 # Conversation history size
375# timeout = 5 # time lag to wait ai response
376# temperature = 0 # not used
377# token_limit = 400 # not used
378# llm_prefix = "π»" # prefix use to filter the AI response
379# llm_template = """
380# You are a friendly AI helping me with
381# trade monitoring and execution.
382# """
383
384# [default.myllm.openai]
385# enabled = false
386# llm_library = "openai"
387# llm_model= "gpt-3.5-turbo"
388# llm_provider = ""
389# llm_provider_key = "DEADBEEF1234567890KEY"
390# max_memory = 100 # Conversation history size
391# timeout = 5 # time lag to wait ai response
392# temperature = 0
393# token_limit = 400
394# llm_prefix = "" # prefix use to filter the AI response
395# llm_template = """
396# You are a friendly AI helping me with
397# trade monitoring and execution.
398# """
399
400
401########################################
402### CHAT PLATFORM SETTINGS ###
403########################################
404
405# [default.platform.template]
406# platform = ""
407# enabled = false
408# bot_token = ""
409# bot_channel_id = ""
410# bot_api_id = ""
411# bot_api_hash = ""
412# bot_hostname = ""
413# bot_user = ""
414# bot_pass = ""
415# bot_auth_token = ""
416# iteration_enabled = false
417# iteration_limit = -1
418
419# # discord example
420# [default.platform.discord]
421# platform="discord"
422# enabled = true
423# bot_token = "mytoken"
424# bot_channel_id = "mychannelid"
425# bot_api_id = ""
426# bot_api_hash = ""
427# bot_hostname = ""
428# bot_user = ""
429# bot_pass = ""
430# bot_auth_token = ""
431# iteration_enabled = false
432# iteration_limit = -1
433
434########################################
435### DEX SETTINGS ###
436########################################
437
438# DEX template
439# [default.dex.template]
440# wallet_address = ""
441# private_key = ""
442# rpc = "" # https://chainlist.org for rpc url example
443# protocol = "" # uniswap or 0x
444# protocol_version = 2 # your protocol version | used for uniswap
445# api_endpoint = "" # your api endpoint | used for 0x
446# api_key = "" # your api key | used for 0x
447# router_contract_addr = "" # your router contract address | used for uniswap
448# factory_contract_addr = "" # your factory contract address | used for uniswap
449# trading_asset_address = "" # your trading asset address
450# trading_risk_percentage = true # Use risk amount as percetage of the balance or real amount
451# trading_risk_amount = 10 # Risk amount
452# trading_slippage = 2 # Slippage percentage
453# trading_amount_threshold = 0 # Trading amount threshold
454# block_explorer_url = "" # your block explorer url
455# block_explorer_api = "" # your block explorer api
456# mapping to use to change instrument per exchange
457# mapping = [
458# { id = "BTC", alt = "WBTC" },
459# { id = "ETH", alt = "WETH" },
460# { id = "GOLD", alt = "XAUT" },
461# { id = "EURUSD", alt = "AgEUR" },
462# ]
463
464# # uniswap v2 protocol type and router uniswap
465# [default.dex.eth]
466# wallet_address = "0x1234567890123456789012345678901234567890"
467# private_key = "0xdeadbeef88"
468# rpc = "https://rpc.ankr.com/eth"
469# protocol = "uniswap"
470# protocol_version = 2
471# api_endpoint = ''
472# api_key = ""
473# router_contract_addr = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
474# factory_contract_addr = "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"
475# trading_risk_percentage = true
476# trading_risk_amount = 10
477# trading_slippage = 2
478# trading_amount_threshold = 0
479# trading_asset_address = "0xdAC17F958D2ee523a2206206994597C13D831ec7"
480# trading_asset_separator = ""
481# block_explorer_url = "https://api.etherscan.io/api?"
482# block_explorer_api = "123123123123123"
483# mapping = [
484# { id = "BTC", alt = "WBTC" },
485# ]
486
487# # uniswap v2 protocol type and router pancakeswap on BSC chain 56
488# [default.dex.bsc]
489# wallet_address = "0x1234567890123456789012345678901234567890"
490# private_key = "0xdeadbeef88"
491# rpc = "https://rpc.ankr.com/bsc"
492# protocol = "uniswap"
493# protocol_version = 2
494# api_endpoint = ''
495# api_key = ""
496# router_contract_addr = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
497# factory_contract_addr = "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73"
498# trading_risk_percentage = true
499# trading_risk_amount = 10
500# trading_slippage = 2
501# trading_amount_threshold = 0
502# trading_asset_address = "0xdAC17F958D2ee523a2206206994597C13D831ec7"
503# trading_asset_separator = ""
504# block_explorer_url = "https://api.bscscan.com/api?"
505# block_explorer_api = "123123123123123"
506# mapping = [
507# { id = "BTC", alt = "BTCB" },
508# ]
509
510# # uniswap v3 and router uniswap v3 on arbitrum chain
511# [default.dex.arb]
512# wallet_address = "0x1234567890123456789012345678901234567890"
513# private_key = "0xdeadbeef88"
514# rpc = "https://arbitrum.llamarpc.com"
515# protocol = "uniswap"
516# protocol_version = 3
517# api_endpoint = ''
518# api_key = ""
519# router_contract_addr = ""
520# factory_contract_addr = ""
521# trading_risk_percentage = true
522# trading_risk_amount = 10
523# trading_slippage = 2
524# trading_amount_threshold = 0
525# trading_asset_address = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"
526# trading_asset_separator = ""
527# block_explorer_url = "https://api.arbiscan.io/api?"
528# block_explorer_api = "123123123123123"
529# mapping = [
530# { id = "BTC", alt = "WBTC" },
531# ]
532
533# # ZeroX 0x protocol type on polygon chain 137
534# [default.dex.polygon]
535# wallet_address = "0x1234567890123456789012345678901234567890"
536# private_key = "0xdeadbeef88"
537# rpc = "https://rpc.ankr.com/polygon"
538# protocol = "0x"
539# protocol_version = 4
540# api_endpoint = "https://polygon.api.0x.org/"
541# api_key = ""
542# router_contract_addr = "0xdef1c0ded9bec7f1a1670819833240f027b25eff"
543# factory_contract_addr = "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"
544# trading_risk_percentage = true
545# trading_risk_amount = 10
546# trading_slippage = 2
547# trading_amount_threshold = 0
548# trading_asset_address = "0xdAC17F958D2ee523a2206206994597C13D831ec7"
549# trading_asset_separator = ""
550# block_explorer_url = "https://api.polygonscan.com/api?"
551# block_explorer_api = "123123123123123"
552# mapping = [
553# { id = "BTC", alt = "WBTC" },
554# ]
555
556# # kwenta protocol type on OPTIMISM chain 10
557# [default.dex.opt]
558# wallet_address = "0x1234567890123456789012345678901234567890"
559# private_key = "0xdeadbeef88"
560# rpc = "https://optimism.llamarpc.com"
561# protocol = "kwenta"
562# protocol_version = 2
563# api_endpoint = ""
564# api_key = ""
565# router_contract_addr = "0xa062aE8A9c5e11aaA026fc2670B0D65cCc8B2858"
566# factory_contract_addr = "0xF4c67CdEAaB8360370F41514d06e32CcD8aA1d7B"
567# trading_risk_percentage = true
568# trading_risk_amount = 1
569# trading_slippage = 2
570# trading_amount_threshold = 0
571# trading_asset_address = "0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9"
572# trading_asset_separator = ""
573# block_explorer_url = "https://optimistic.etherscan.com/api?"
574# block_explorer_api = "123123123123123"
575# mapping = [
576# { id = "BTC", alt = "WBTC" },
577# ]
578
579# # uniswap v3 protocol type using pancakeswap on zkSync chain 324
580# [default.dex.zkSync]
581# wallet_address = "0x1234567890123456789012345678901234567890"
582# private_key = "0xdeadbeef88"
583# rpc = "https://zksync.drpc.org"
584# protocol = "uniswap"
585# protocol_version = 3
586# api_endpoint = ""
587# api_key = ""
588# router_contract_addr = "0xD70C70AD87aa8D45b8D59600342FB3AEe76E3c68"
589# factory_contract_addr = "0x1BB72E0CbbEA93c08f535fc7856E0338D7F7a8aB"
590# trading_risk_percentage = true
591# trading_risk_amount = 1
592# trading_slippage = 2
593# trading_amount_threshold = 0
594# trading_asset_address = "0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9"
595# trading_asset_separator = ""
596# block_explorer_url = "https://explorer.zksync.io/api?"
597# block_explorer_api = "123123123123123"
598# mapping = [
599# { id = "BTC", alt = "WBTC" },
600# ]
601
602########################################
603### CEX SETTINGS ###
604########################################
605
606# CEFI template
607# [default.cex.template]
608# protocol = ""
609# api_key= ""
610# secret= ""
611# password = ""
612# testmode = true
613# defaulttype = ""
614# ordertype = ""
615# leverage_type = ""
616# leverage = 1
617# trading_risk_percentage = true
618# trading_risk_amount = 10
619# trading_slippage = 2
620# trading_amount_threshold = 0
621# trading_asset = "USDT"
622# trading_asset_separator = ""
623# mapping = [
624# { id = "BTC", alt = "BTC/USDT" },
625# ]
626# balance_limit = false
627# balance_limit_value = 10
628
629# # CEFI example using ccxt binance
630# protocol = "ccxt"
631# api_key= ""
632# secret= ""
633# password = ""
634# testmode = true
635# defaulttype = "spot"
636# ordertype = "market"
637# leverage_type = "isolated"
638# leverage = 1
639# trading_risk_percentage = true
640# trading_risk_amount = 10
641# trading_slippage = 2
642# trading_amount_threshold = 0
643# trading_asset = "USDT"
644# trading_asset_separator = ""
645# mapping = [
646# { id = "BTC", alt = "BTC/USDT" },
647# ]
648# balance_limit = true
649# balance_limit_value = 10
650
651# [default.cex.capital]
652# protocol = "capital"
653# enabled = false
654# user_id = "12345678"
655# api_key= "myapi_DEADBEEF"
656# password = "12345678"
657# testmode = false
658# defaulttype = ""
659# ordertype = ""
660# leverage_type = ""
661# leverage = 1
662# trading_risk_percentage = true
663# trading_risk_amount = 10
664# trading_slippage = 2
665# trading_amount_threshold = 0
666# trading_asset = "USD"
667# trading_asset_separator = ""
668# mapping = [
669# { id = "EURUSD", alt = "EURUSD" },
670# { id = "BTC", alt = "BTCUSD" },
671# { id = "ETH", alt = "ETHUSD" },
672# { id = "CRUDE", alt = "OIL_CRUDE" },
673# { id = "BRENT", alt = "OIL_BRENT" },
674# { id = "GOLD", alt = "GOLD" },
675# { id = "SILVER", alt = "SILVER" },
676# { id = "US500", alt = "US500" },
677# ]
678# balance_limit = false
679# balance_limit_value = 10
680
681
682########################################
683### END OF DEFAULT SETTINGS ###
684########################################
Settings Example#
Settings.toml#
1########################################
2### EXAMPLE SETTINGS ###
3#######################################
4# [default]
5# loglevel = "INFO"
6# ui_enabled = false
7
8# DISCORD BOT on ethereum chain using
9# uniswap v2 router
10 #[default.platform.main]
11 # bot_token = '12122121'
12 # bot_channel_id = '1221212'
13 # apprise_url = 'discord://12121/121212'
14 # [default.dex.uniswap]
15 # wallet_address = ""
16 # private_key = ""
17 # rpc = "https://rpc.ankr.com/eth"
18 # protocol = "uniswap"
19 # protocol_version = 2
20 # api_endpoint = ""
21 # api_key = ""
22 # router_contract_addr = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
23 # factory_contract_addr = "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"
24 # trading_risk_percentage = true
25 # trading_risk_amount = 10
26 # trading_slippage = 2
27 # trading_asset_address = "0xdAC17F958D2ee523a2206206994597C13D831ec7"
28 # trading_asset_separator = ""
29 # block_explorer_url = "https://api.etherscan.com/api?"
30 # block_explorer_api = ""
31 # mapping = [
32 # { id = "BTC", alt = "WBTC" },
33 # ]
34
35# TELEGRAM BOT on CEX Binance
36 #[default.platform.main]
37 # bot_token = '121212121'
38 # bot_channel_id = '-1122121'
39 # bot_api_id = '1212912'
40 # bot_api_hash = '121212121'
41 # apprise_url = 'tgram://121221/-11211212121'
42 # [default.cex.binance]
43 # name ="binance"
44 # api_key= ''
45 # secret = ''
46 # password = ""
47 # testmode = true
48 # defaulttype = "spot"
49 # ordertype = "market"
50 # trading_risk_percentage = true
51 # trading_risk_amount = 4
52 # trading_slippage = 2
53 # trading_asset = "USDT"
54 # trading_asset_separator = ""
55 # mapping = [
56 # { id = "BTC", alt = "BTCUSDT" },
57 # ]
58
59#DISCORD BOT on BSC chain using pancakeswap v2 router
60 #[default.platform.main]
61 # bot_token = '1212121212121'
62 # bot_channel_id = '121212121212'
63 # apprise_url = 'discord://121121/1212212'
64 # [default.dex.pancake]
65 # wallet_address = ""
66 # private_key = ""
67 # rpc = "https://rpc.ankr.com/bsc"
68 # protocol = "uniswap"
69 # protocol_version = 2
70 # api_endpoint = ""
71 # api_key = ""
72 # router_contract_addr = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
73 # factory_contract_addr = "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73"
74 # trading_risk_percentage = true
75 # trading_risk_amount = 10
76 # trading_slippage = 2
77 # trading_asset_address = "0x55d398326f99059ff775485246999027b3197955"
78 # trading_asset_separator = ""
79 # block_explorer_url = "https://api.bscscan.com/api?"
80 # block_explorer_api = ""
81 # mapping = [
82 # { id = "BTC", alt = "BTCB" },
83 # ]
84
85#MATRIX BOT on Polygon chain using zerox protocol
86 #[default]
87 # bot_token = '12122121'
88 # bot_channel_id = '12121212'
89 # bot_hostname='matrix.org'
90 # bot_user='itsme'
91 # bot_pass='mario'
92 # apprise_url = 'discord://1212121/1211212'
93 # [default.dex.polygon]
94 # wallet_address = ""
95 # private_key = ""
96 # rpc = "https://polygon.llamarpc.com"
97 # protocol = "0x"
98 # protocol_version = 4
99 # api_endpoint = "https://polygon.api.0x.org"
100 # api_key = ""
101 # router_contract_addr = "0xdef1c0ded9bec7f1a1670819833240f027b25eff"
102 # factory_contract_addr = "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"
103 # trading_risk_percentage = true
104 # trading_risk_amount = 10
105 # trading_slippage = 2
106 # trading_asset_address = "0xc2132D05D31c914a87C6611C10748AEb04B58e8F"
107 # trading_asset_separator = ""
108 # block_explorer_url = "https://api.polygonscan.com/api?"
109 # block_explorer_api = ""
110 # mapping = [
111 # { id = "BTC", alt = "WBTC" },
112 # ]
.env or ENV VARS#
1########################################
2### EXAMPLE SETTINGS ###
3########################################
4
5# Below are examples for minimum setup
6#
7# If you use env vars, you need to
8# prefix them with 'TT_'
9# refer to example_settings.toml for
10# toml setup and complete settings list
11
12########################################
13# TELEGRAM BOT #
14# on Binance #
15########################################
16# TT_LOGLEVEL = 'INFO'
17# TT_PLATFORM__MAIN__BOT_TOKEN = '121212121'
18# TT_PLATFORM__MAIN__BOT_CHANNEL_ID = '-1122121'
19# TT_PLATFORM__MAIN__BOT_API_ID = '1212912'
20# TT_PLATFORM__MAIN__BOT_API_HASH = '121212121'
21# TT_APPRISE_URL = 'tgram://121221/-11211212121'
22# TT_CEX__PRIMARY__NAME ="binance"
23# TT_CEX__PRIMARY__API_KEY= ''
24# TT_CEX__PRIMARY__SECRET = ''
25# TT_CEX__PRIMARY__PASSWORD = ""
26# TT_CEX__PRIMARY__TESTMODE = true
27# TT_CEX__PRIMARY__DEFAULTTYPE = "spot"
28# TT_CEX__PRIMARY__ORDERTYPE = "market"
29# TT_CEX__PRIMARY__TRADING_RISK_PERCENTAGE = true
30# TT_CEX__PRIMARY__TRADING_RISK_AMOUNT = 4
31# TT_CEX__PRIMARY__TRADING_SLIPPAGE = 2
32# TT_CEX__PRIMARY__TRADING_ASSET = "USDT"
33# TT_CEX__PRIMARY__TRADING_ASSET_SEPARATOR = ""
34# TT_CEX__PRIMARY__MAPPING = [{ id = "BTC", alt = "BTCUSDT" },]
Config#
- TalkyTrader Settings, Scheduling and Logging,
π§β±οΈβοΈ
- tt.config.settings = <dynaconf.base.LazySettings object>#
Scheduling is managed via asyncz lib More info: tarsil/asyncz
It allows you to schedule tasks at plugin level. Refer to the plugin documentation
tt.plugins.plugin_manager
- tt.config.scheduler = AsyncIOScheduler(global_config={}, trigger_plugins={'date': 'asyncz.triggers.date:DateTrigger', 'interval': 'asyncz.triggers.interval:IntervalTrigger', 'cron': 'asyncz.triggers.cron.trigger:CronTrigger', 'and': 'asyncz.triggers.date:DateTrigger', 'or': 'asyncz.triggers.combining:OrTrigger'}, trigger_classes={}, executor_plugins={'debug': 'asyncz.executors.debug:DebugExecutor', 'threadpool': 'asyncz.executors.pool:ThreadPoolExecutor', 'processpool': 'asyncz.executors.pool:ProcessPoolExecutor', 'asyncio': 'asyncz.executors.asyncio:AsyncIOExecutor'}, executor_classes={}, store_plugins={'memory': 'asyncz.stores.memory:MemoryTaskStore', 'mongo': 'asyncz.stores.mongo:MongoDBStore', 'redis': 'asyncz.stores.redis:RedisStore'}, store_classes={}, executors={}, executor_lock=<unlocked _thread.RLock object owner=0 count=0>, stores={}, store_lock=<unlocked _thread.RLock object owner=0 count=0>, listeners=[], listeners_lock=<unlocked _thread.RLock object owner=0 count=0>, pending_tasks=[], state=<SchedulerState.STATE_STOPPED: 0>, logger=<loguru.logger handlers=[(id=1, level=10, sink=<stdout>)]>, event_loop=None, timezone=_PytzShimTimezone(zoneinfo.ZoneInfo(key='Etc/UTC'), 'Etc/UTC'), store_retry_interval=10.0, task_defaults=TaskDefaultStruct(mistrigger_grace_time=None, coalesce=True, max_instances=1), timeout=None)#
Logging is managed via loguru