Giter Club home page Giter Club logo

tt's Introduction

👀 interested in algotrading,defi, continous integration and devops
📫 Reach out on mastodon

Metrics

📈 More Stats

Metrics

tt's People

Contributors

actions-user avatar dependabot[bot] avatar exoaihq[bot] avatar github-actions[bot] avatar mergify[bot] avatar mraniki avatar northflank-cloud-build-run[bot] avatar renovate[bot] avatar talkytrader avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tt's Issues

♻️ Refactor the Baseplugin

# def should_handle(self, message):
#     if not self.enabled:
#         return False
#     if message.startswith(settings.bot_ignore):
#         return False
#     return True

# async def handle_message(self, msg):
#     if not self.should_handle(msg):
#         return

#     command, *args = msg.split(" ")
#     command = command[1:]

#     command_mapping = self.get_command_mapping()

#     if command in command_mapping:
#         function = command_mapping[command]
#         await self.send_notification(f"{await function()}")

# def get_command_mapping(self):
#     return {}

and for a given plugin:

# def get_command_mapping(self):
#     return 
# {
#             settings.bot_command_help: self.trend.get_talkytrend_help,
#             settings.bot_command_info: self.trend.get_talkytrend_info,
#             settings.bot_command_tv: self.trend.get_tv,
#             settings.bot_command_trend: self.trend.check_signal,
#             settings.bot_command_news: self.trend.fetch_key_feed,
#         }

💬 A Connection error occurred sending JSON notification to localhost.

2023-08-10 13:06:23.752 | DEBUG | asyncio.proactor_events:init:633 - Using proactor: IocpProactor
2023-08-10 13:06:25.036 | DEBUG | tt.plugins.plugin_manager:load_plugins:40 - Loading plugins from: <module 'tt.plugins.default_plugins' (<_frozen_importlib_external.NamespaceLoader object at 0x000001EDAB03CAD0>)>
2023-08-10 13:06:25.037 | DEBUG | tt.plugins.plugin_manager:load_plugins:45 - Module loaded: <module 'tt.plugins.default_plugins. init' from 'F:\code\trade-bot\tt\plugins\default_plugins\ init.py'>
2023-08-10 13:06:25.038 | DEBUG | tt.plugins.plugin_manager:load_plugin:62 - plugin_name: init
2023-08-10 13:06:25.432 | DEBUG | tt.plugins.plugin_manager:load_plugins:45 - Module loaded: <module 'tt.plugins.default_plugins.cex_exchange_plugin' from 'F:\code\trade-bot\tt\plugins\default_plugins\cex_exchange_plugin.py'>
2023-08-10 13:06:25.432 | DEBUG | tt.plugins.plugin_manager:load_plugin:62 - plugin_name: cex_exchange_plugin
2023-08-10 13:06:25.432 | DEBUG | tt.plugins.plugin_manager:load_plugin:69 - Plugin loaded: CexExchangePlugin
2023-08-10 13:06:25.831 | DEBUG | rlp.codec::26 - Consider installing rusty-rlp to improve pyrlp performance with a rust based backend
2023-08-10 13:06:26.433 | DEBUG | tt.plugins.plugin_manager:load_plugins:45 - Module loaded: <module 'tt.plugins.default_plugins.dex_exchange_plugin' from 'F:\code\trade-bot\tt\plugins\default_plugins\dex_exchange_plugin.py'>
2023-08-10 13:06:26.433 | DEBUG | tt.plugins.plugin_manager:load_plugin:62 - plugin_name: dex_exchange_plugin
2023-08-10 13:06:26.918 | DEBUG | web3.manager:_make_request:187 - Making request. Method: net_listening
2023-08-10 13:06:26.918 | DEBUG | web3.providers.rpc:make_request:86 - Making request HTTP. URI: https://rpc.ankr.com/eth, Method: net_listening
2023-08-10 13:06:26.919 | DEBUG | web3._utils.request:cache_and_return_session:68 - Session cached: https://rpc.ankr.com/eth, <requests.sessions.Session object at 0x000001EDAFA38DD0>
2023-08-10 13:06:26.922 | DEBUG | urllib3.connectionpool:_new_conn:1048 - Starting new HTTPS connection (1): rpc.ankr.com:443
2023-08-10 13:06:28.668 | DEBUG | urllib3.connectionpool:_make_request:546 - https://rpc.ankr.com:443 "POST /eth HTTP/1.1" 200 38
2023-08-10 13:06:28.670 | DEBUG | web3.providers.rpc:make_request:94 - Getting response HTTP. URI: https://rpc.ankr.com/eth, Method: net_listening, Response: {'jsonrpc': '2.0', 'id': 0, 'result': True}
2023-08-10 13:06:28.671 | DEBUG | web3.manager:_make_request:187 - Making request. Method: net_version
2023-08-10 13:06:28.672 | DEBUG | web3.providers.rpc:make_request:86 - Making request HTTP. URI: https://rpc.ankr.com/eth, Method: net_version
2023-08-10 13:06:29.007 | DEBUG | urllib3.connectionpool:_make_request:546 - https://rpc.ankr.com:443 "POST /eth HTTP/1.1" 200 37
2023-08-10 13:06:29.007 | DEBUG | web3.providers.rpc:make_request:94 - Getting response HTTP. URI: https://rpc.ankr.com/eth, Method: net_version, Response: {'jsonrpc': '2.0', 'id': 1, 'result': '1'}
2023-08-10 13:06:29.008 | DEBUG | tt.plugins.plugin_manager:load_plugin:69 - Plugin loaded: DexExchangePlugin
2023-08-10 13:06:29.009 | DEBUG | tt.plugins.plugin_manager:load_plugins:45 - Module loaded: <module 'tt.plugins.default_plugins.example_plugin' from 'F:\code\trade-bot\tt\plugins\default_plugins\example_plugin.py'>
2023-08-10 13:06:29.009 | DEBUG | tt.plugins.plugin_manager:load_plugin:62 - plugin_name: example_plugin
2023-08-10 13:06:29.010 | DEBUG | tt.plugins.plugin_manager:load_plugin:69 - Plugin loaded: ExamplePlugin
2023-08-10 13:06:29.016 | DEBUG | tt.plugins.plugin_manager:load_plugins:45 - Module loaded: <module 'tt.plugins.default_plugins.helper_plugin' from 'F:\code\trade-bot\tt\plugins\default_plugins\helper_plugin.py'>
2023-08-10 13:06:29.016 | DEBUG | tt.plugins.plugin_manager:load_plugin:62 - plugin_name: helper_plugin
2023-08-10 13:06:29.016 | DEBUG | tt.plugins.plugin_manager:load_plugin:69 - Plugin loaded: HelperPlugin
2023-08-10 13:06:30.778 | DEBUG | tt.plugins.plugin_manager:load_plugins:45 - Module loaded: <module 'tt.plugins.default_plugins.llm_plugin' from 'F:\code\trade-bot\tt\plugins\default_plugins\llm_plugin.py'>
2023-08-10 13:06:30.778 | DEBUG | tt.plugins.plugin_manager:load_plugin:62 - plugin_name: llm_plugin
2023-08-10 13:06:30.778 | DEBUG | tt.plugins.plugin_manager:load_plugin:69 - Plugin loaded: LlmPlugin
2023-08-10 13:06:32.107 | DEBUG | tt.plugins.plugin_manager:load_plugins:45 - Module loaded: <module 'tt.plugins.default_plugins.talkytrend_plugin' from 'F:\code\trade-bot\tt\plugins\default_plugins\talkytrend_plugin.py'>
2023-08-10 13:06:32.107 | DEBUG | tt.plugins.plugin_manager:load_plugin:62 - plugin_name: talkytrend_plugin
2023-08-10 13:06:32.108 | DEBUG | tt.plugins.plugin_manager:load_plugin:69 - Plugin loaded: TalkyTrendPlugin
2023-08-10 13:06:32.109 | DEBUG | tt.plugins.plugin_manager:load_plugins:45 - Module loaded: <module 'tt.plugins.default_plugins.www_plugin' from 'F:\code\trade-bot\tt\plugins\default_plugins\www_plugin.py'>
2023-08-10 13:06:32.109 | DEBUG | tt.plugins.plugin_manager:load_plugin:62 - plugin_name: www_plugin
2023-08-10 13:06:32.110 | DEBUG | tt.plugins.plugin_manager:load_plugin:69 - Plugin loaded: WwwPlugin
2023-08-10 13:06:32.110 | DEBUG | iamlistening.platform.clients.telegram:start:33 - Telegram setup
2023-08-10 13:06:32.112 | DEBUG | tt.plugins.default_plugins.example_plugin:start:27 - example plugin started
2023-08-10 13:06:32.114 | DEBUG | apprise.Apprise:instantiate:190 - Loaded JSON URL: json://localhost/?method=POST&format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes
2023-08-10 13:06:32.115 | INFO | apprise.Apprise:_notify_parallel_asyncio:639 - Notifying 1 service(s) asynchronously.
2023-08-10 13:06:32.116 | DEBUG | apprise.plugins.NotifyJSON:send:350 - JSON POST URL: http://localhost (cert_verify=True)
2023-08-10 13:06:32.116 | DEBUG | apprise.plugins.NotifyJSON:send:353 - JSON Payload: {'version': '1.0', 'title': '', 'message': '🗿TalkyTrader v4.9.1', 'attachments': [], 'type': 'info'}
2023-08-10 13:06:32.119 | DEBUG | urllib3.connectionpool:_new_conn:244 - Starting new HTTP connection (1): localhost:80
2023-08-10 13:06:36.234 | WARNING | apprise.plugins.NotifyJSON:send:407 - A Connection error occurred sending JSON notification to localhost.
2023-08-10 13:06:36.234 | DEBUG | apprise.plugins.NotifyJSON:send:410 - Socket Exception: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001EDDB800750>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
2023-08-10 13:06:39.051 | DEBUG | urllib3.connectionpool:_new_conn:1048 - Starting new HTTPS connection (1): query2.finance.yahoo.com:443
2023-08-10 13:06:39.934 | DEBUG | urllib3.connectionpool:_make_request:546 - https://query2.finance.yahoo.com:443 "GET /v1/finance/search?q=MSFT HTTP/1.1" 200 None
2023-08-10 13:06:39.938 | DEBUG | urllib3.connectionpool:_new_conn:1048 - Starting new HTTPS connection (1): scanner.tradingview.com:443
2023-08-10 13:06:41.372 | DEBUG | urllib3.connectionpool:_make_request:546 - https://scanner.tradingview.com:443 "POST /forex/scan HTTP/1.1" 200 None
2023-08-10 13:06:41.378 | DEBUG | urllib3.connectionpool:_new_conn:1048 - Starting new HTTPS connection (1): scanner.tradingview.com:443
2023-08-10 13:06:50.869 | DEBUG | urllib3.connectionpool:_make_request:546 - https://scanner.tradingview.com:443 "POST /crypto/scan HTTP/1.1" 200 None
2023-08-10 13:06:52.978 | INFO | iamlistening.platform.chat_manager:connected:102 - listener handler is online

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid schedule: 'Invalid schedule: Failed to parse "every day at 19:00"'

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

dockerfile
.registry/Dockerfile
  • python 3.11-slim
github-actions
.github/workflows/👷Flow.yml
pip_requirements
.requirements/requirements.txt
  • dynaconf >=3.1.12
  • fastapi >=0.96.0
  • uvicorn >=0.21.0
  • apprise >=1.3.0
  • ccxt >=3.0.75
  • ping3 >=4.0.4
  • dxsp >= 2.6.13
  • findmyorder >= 1.4.4
  • iamlistening >= 0.1.14
  • talkytrend >= 1.3.2
poetry
pyproject.toml
  • dynaconf ^3.1.12
  • apprise ^1.4.0
  • httpx ^0.24.1
  • uvicorn ^0.23.0
  • fastapi ^0.100.0
  • ping3 ^4.0.4
  • httpimport ^1.3.0
  • schedule ^1.2.0
  • ccxt ^4.0.0
  • dxsp ^4.0.5
  • findmyorder ^1.6.0
  • iamlistening ^1.1.0
  • talkytrend ^1.9.0
  • python-semantic-release ^8.0.0
  • ruff ^0.0.278
  • pytest ^7.0
  • pytest-cov ^4.1
  • pytest-asyncio ^0.21.0
  • pytest-mock ^3.11.1
  • sphinx ^7.0.0
  • sphinx_bootstrap_theme ^0.8.1
  • sphinx-autoapi ^2.1.1
  • sphinx-copybutton ^0.5.2
  • myst-parser ^2.0.0
  • sphinx-notfound-page ^0.8.3

  • Check this box to trigger a request for Renovate to run again on this repository

💄 Plugin - playwright

import asyncio
from playwright.async_api import async_playwright

async def main():
async with async_playwright() as p:
for browser_type in [p.chromium, p.firefox, p.webkit]:
browser = await browser_type.launch()
page = await browser.new_page()
await page.goto('http://playwright.dev')
await page.screenshot(path=f'example-{browser_type.name}.png')
await browser.close()

asyncio.run(main())

🥚 Plugin - Support user defined plugin import capability

    # if settings.user_plugins_allowed:
    #     with httpimport.github_repo('mraniki', 'tt_plugins'):
    #         import user_plugins
    #         user_package = importlib.import_module(user_plugins)
    #         logger.debug("Loading plugins from: %s", user_package)
    #         for _, plugin_name, _ in pkgutil.iter_modules(user_plugins):
    #             try:
    #                 module = importlib.import_module(
    #                     f"{user_plugins.__name__}.{plugin_name}")
    #                 logger.debug("Module loaded: %s", module)
    #                 self.load_plugin(module, plugin_name)
    #             except Exception as e:
    #                 logger.warning("Error loading user plugin %s: %s",
    # plugin_name, e)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.