Code Monkey home page Code Monkey logo

tradingview-free-webhook-alerts's Introduction

Hello there, I'm Freeman \ ゜◡゜)ノ

I'm an individual game developer and created 30+ games; however, only a few of them are finished.😢 Then I become a web dev

🔮 About me

  • 🌱 I’m currently working on a business site.
  • ⚡ I'm not good at gaming SO I do game development~
  • ⏲️ I have over 8 years of experience in game development and over a year of web development.

📬 Connect with me

 ∧,,,∧   ~ ┏━━━━━━━━━━━━━━━━━━━┓
( ̳•·• ̳)   ~ ゜  Nothing's here  ゜
/    づ    ~ ┗━━━━━━━━━━━━━━━━━━━┛

💖 Donation

Donation Button <- ღゝ◡╹)ノ♡


🔥 MY Stats

Stats Top Langs

🔍 What I know

Languages

My Languages

Frameworks

My Framework

Databases

My Databases

Tools

My Tools

Platforms

My Platforms


🎖️ Certification

AWS Certified Cloud Practitioner


📌 Last Words

∩―――――――――――――∩
||     ∧ ヘ  ||
||    (* ´ ー`) ZZzz
|ノ^⌒⌒づ` ̄ ̄  \
( ノ     ⌒ ヽ \
\  || ̄ ̄ ̄ ̄ ̄||
 \,ノ||

| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄|
| Thank you for visiting!  |
|______________|
         \ (•◡•) /
          \     /
            END

View Counter

tradingview-free-webhook-alerts's People

Contributors

dependabot[bot] avatar soranoo 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

tradingview-free-webhook-alerts's Issues

Timeout error

Timeout showing.

TIMEOUT
TIMEOUT
DETAILS
TIMEOUT: TIMEOUT
at Timeout._onTimeout (file:///var/task/lambda_handler.mjs:934:23)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)

Showing this.

it stops suddenly

after a while it stops abruptly, as if I had stopped it manually
but it is not possible it is on an online vps

the method I'm using is the standard one
the latest log is this:

06-04-2023 20:50:10 | DEBUG     | PROCESSING: Email UID<285> from [email protected]
06-04-2023 20:50:10 | INFO      | Sending webhook alert<Alert: Lorentzian Classification (close, 8, 2000, 5, 1, -0.1, 20,
 RSI, 14, 1,
 WT, 10, 11, CCI, 20, 1, ADX, 20, 2, RSI, 9, 1, 200, 200, 8, 8, 25, 2,
 0): qualsiasi funzione alert()>, content: {"list_signal_id": "7", "platform_id": "1", "simbolo": "AUDCAD", "direzione": "BUY", "prezzo_entrata": "OPEN", "TP_1": "0", "TP_2": "0", "TP_3": "0", "SL": "0"}
06-04-2023 20:50:10 | OK        | Sent webhook alert successfully!
06-04-2023 20:50:10 | INFO      | The whole process taken 8.525s.

then this appears:

`
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ │
│ /home/xrdpuser/Desktop/TradingView/main.py:217 in main │
│ │
│ 214 │ │
│ 215 │ def main(self): │
│ 216 │ │ try: │
│ ❱ 217 │ │ │ self.start() │
│ 218 │ │ except KeyboardInterrupt: │
│ 219 │ │ │ log.warning("The program has been stopped by user.") │
│ 220 │ │ │ shutdown() │
│ /home/xrdpuser/Desktop/TradingView/main.py:213 in start │
│ │
│ 210 │ │ │
│ 211 │ │ # Start listening to the inbox │
│ 212 │ │ log.info(f"Listening to IMAP server({imap_server_address})..." │
│ ❱ 213 │ │ el.listen(-1, process_func=self.on_email_received) │
│ 214 │ │
│ 215 │ def main(self): │
│ 216 │ │ try: │
│ │
│ /home/xrdpuser/Desktop/TradingView/src/email_listener/init.py:379 in │
│ listen │
│ │
│ 376 │ │ # Run until the timeout is reached │
│ 377 │ │ if timeout == -1: │
│ 378 │ │ │ while True: │
│ ❱ 379 │ │ │ │ self.__idle(timeout=update_frequency, process_func=pro │
│ 380 │ │ else: │
│ 381 │ │ │ while (get_time() < outer_timeout): │
│ 382 │ │ │ │ self.__idle(timeout=update_frequency, process_func=pro │
│ │
│ /home/xrdpuser/Desktop/TradingView/src/email_listener/init.py:428 in │
│ __idle │
│ │
│ 425 │ │ │ # If there is a response │
│ 426 │ │ │ if (responses): │
│ 427 │ │ │ │ # Suspend the idling │
│ ❱ 428 │ │ │ │ self.server.idle_done() │
│ 429 │ │ │ │ # Process the new emails │
│ 430 │ │ │ │ msgs = self.scrape(move=move, unread=unread, delete=de │
│ 431 │ │ │ │ # Run the process function │
│ │
│ /home/xrdpuser/.local/lib/python3.10/site-packages/imapclient/imapclient.py: │
│ 176 in wrapper │
│ │
│ 173 │ │ │ │ raise exceptions.CapabilityError( │
│ 174 │ │ │ │ │ "Server does not support {} capability".format(ca │
│ 175 │ │ │ │ ) │
│ ❱ 176 │ │ │ return func(client, *args, **kwargs) │
│ 177 │ │ │
│ 178 │ │ return wrapper │
│ 179 │
│ │
│ /home/xrdpuser/.local/lib/python3.10/site-packages/imapclient/imapclient.py: │
│ 992 in idle_done │
│ │
│ 989 │ │ """ │
│ 990 │ │ logger.debug("< DONE") │
│ 991 │ │ self._imap.send(b"DONE\r\n") │
│ ❱ 992 │ │ return self._consume_until_tagged_response(self._idle_tag, "I │
│ 993 │ │
│ 994 │ def folder_status(self, folder, what=None): │
│ 995 │ │ """Return the status of folder. │
│ │
│ /home/xrdpuser/.local/lib/python3.10/site-packages/imapclient/imapclient.py: │
│ 1627 in _consume_until_tagged_response │
│ │
│ 1624 │ │ tagged_commands = self._imap.tagged_commands │
│ 1625 │ │ resps = [] │
│ 1626 │ │ while True: │
│ ❱ 1627 │ │ │ line = self._imap._get_response() │
│ 1628 │ │ │ if tagged_commands[tag]: │
│ 1629 │ │ │ │ break │
│ 1630 │ │ │ resps.append(_parse_untagged_response(line)) │
│ │
│ /usr/lib/python3.10/imaplib.py:1075 in _get_response │
│ │
│ 1072 │ │ # Returns None for continuation responses, │
│ 1073 │ │ # otherwise first response line received. │
│ 1074 │ │ │
│ ❱ 1075 │ │ resp = self._get_line() │
│ 1076 │ │ │
│ 1077 │ │ # Command completion response? │
│ 1078 │
│ │
│ /usr/lib/python3.10/imaplib.py:1185 in _get_line │
│ │
│ 1182 │ │ │
│ 1183 │ │ line = self.readline() │
│ 1184 │ │ if not line: │
│ ❱ 1185 │ │ │ raise self.abort('socket error: EOF') │
│ 1186 │ │ │
│ 1187 │ │ # Protocol mandates all lines terminated by CRLF │
│ 1188 │ │ if not line.endswith(b'\r\n'): │
╰──────────────────────────────────────────────────────────────────────────────╯
abort: socket error: EOF

During handling of the above exception, another exception occurred:

╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ │
│ /home/xrdpuser/Desktop/TradingView/main.py:340 in │
│ │
│ 337 │ if(config_version != expect_config_version): │
│ 338 │ │ log.error(f"The config file is outdated. Please update it to t │
│ 339 │ │ shutdown() │
│ ❱ 340 │ main() │
│ /home/xrdpuser/Desktop/TradingView/main.py:328 in main │
│ │
│ 325 │ if discord_log: │
│ 326 │ │ log.addHandler(DiscordLogHandler()) │
│ 327 │ if mode_traditional: │
│ ❱ 328 │ │ EmailSignalExtraction().main() │
│ 329 │ else: │
│ 330 │ │ NgrokSignalRedirect().main() │
│ 331 │
│ │
│ /home/xrdpuser/Desktop/TradingView/main.py:227 in main │
│ │
│ 224 │ │ │ │ shutdown() │
│ 225 │ │ │ log.warning(f"The program will try to reconnect after {ima │
│ 226 │ │ │ time.sleep(imap_auto_reconnect_wait) │
│ ❱ 227 │ │ │ self.start() │
│ 228 │
│ 229 class NgrokSignalRedirect: │
│ 230 │ class _EventID: │
│ │
│ /home/xrdpuser/Desktop/TradingView/main.py:213 in start │
│ │
│ 210 │ │ │
│ 211 │ │ # Start listening to the inbox │
│ 212 │ │ log.info(f"Listening to IMAP server({imap_server_address})..." │
│ ❱ 213 │ │ el.listen(-1, process_func=self.on_email_received) │
│ 214 │ │
│ 215 │ def main(self): │
│ 216 │ │ try: │
│ │
│ /home/xrdpuser/Desktop/TradingView/src/email_listener/init.py:379 in │
│ listen │
│ │
│ 376 │ │ # Run until the timeout is reached │
│ 377 │ │ if timeout == -1: │
│ 378 │ │ │ while True: │
│ ❱ 379 │ │ │ │ self.__idle(timeout=update_frequency, process_func=pro │
│ 380 │ │ else: │
│ 381 │ │ │ while (get_time() < outer_timeout): │
│ 382 │ │ │ │ self.__idle(timeout=update_frequency, process_func=pro │
│ │
│ /home/xrdpuser/Desktop/TradingView/src/email_listener/init.py:428 in │
│ __idle │
│ │
│ 425 │ │ │ # If there is a response │
│ 426 │ │ │ if (responses): │
│ 427 │ │ │ │ # Suspend the idling │
│ ❱ 428 │ │ │ │ self.server.idle_done() │
│ 429 │ │ │ │ # Process the new emails │
│ 430 │ │ │ │ msgs = self.scrape(move=move, unread=unread, delete=de │
│ 431 │ │ │ │ # Run the process function │
│ │
│ /home/xrdpuser/.local/lib/python3.10/site-packages/imapclient/imapclient.py: │
│ 176 in wrapper │
│ │
│ 173 │ │ │ │ raise exceptions.CapabilityError( │
│ 174 │ │ │ │ │ "Server does not support {} capability".format(ca │
│ 175 │ │ │ │ ) │
│ ❱ 176 │ │ │ return func(client, *args, **kwargs) │
│ 177 │ │ │
│ 178 │ │ return wrapper │
│ 179 │
│ │
│ /home/xrdpuser/.local/lib/python3.10/site-packages/imapclient/imapclient.py: │
│ 992 in idle_done │
│ │
│ 989 │ │ """ │
│ 990 │ │ logger.debug("< DONE") │
│ 991 │ │ self._imap.send(b"DONE\r\n") │
│ ❱ 992 │ │ return self._consume_until_tagged_response(self._idle_tag, "I │
│ 993 │ │
│ 994 │ def folder_status(self, folder, what=None): │
│ 995 │ │ """Return the status of folder. │
│ │
│ /home/xrdpuser/.local/lib/python3.10/site-packages/imapclient/imapclient.py: │
│ 1627 in _consume_until_tagged_response │
│ │
│ 1624 │ │ tagged_commands = self._imap.tagged_commands │
│ 1625 │ │ resps = [] │
│ 1626 │ │ while True: │
│ ❱ 1627 │ │ │ line = self._imap._get_response() │
│ 1628 │ │ │ if tagged_commands[tag]: │
│ 1629 │ │ │ │ break │
│ 1630 │ │ │ resps.append(_parse_untagged_response(line)) │
│ │
│ /usr/lib/python3.10/imaplib.py:1075 in _get_response │
│ │
│ 1072 │ │ # Returns None for continuation responses, │
│ 1073 │ │ # otherwise first response line received. │
│ 1074 │ │ │
│ ❱ 1075 │ │ resp = self._get_line() │
│ 1076 │ │ │
│ 1077 │ │ # Command completion response? │
│ 1078 │
│ │
│ /usr/lib/python3.10/imaplib.py:1185 in _get_line │
│ │
│ 1182 │ │ │
│ 1183 │ │ line = self.readline() │
│ 1184 │ │ if not line: │
│ ❱ 1185 │ │ │ raise self.abort('socket error: EOF') │
│ 1186 │ │ │
│ 1187 │ │ # Protocol mandates all lines terminated by CRLF │
│ 1188 │ │ if not line.endswith(b'\r\n'): │
╰──────────────────────────────────────────────────────────────────────────────╯
abort: socket error: EOF
`

Program stops on an empty mailbox

When there are no emails in the mailbox, the program crashes with the error :

AttributeError: 'NoneType' object has no attribute 'uid'.

So it always needs at least 1 email to be in the mailbox

ngrok-agent version "2.3.41" is too old

Describe the bug
When running latest version I get the following error from pyngrok

pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: Your ngrok-agent version "2.3.41" is too old. The minimum supported agent version for your account is "3.2.0". Please update to a newer version with `ngrok update`, by downloading from https://ngrok.com/download, or by updating your SDK version. Paid accounts are currently excluded from minimum agent version requirements. To begin handling traffic immediately without updating your agent, upgrade to a paid plan: https://dashboard.ngrok.com/billing/subscription.\r\n\r\nERR_NGROK_121\r\n.

To Reproduce
Steps to reproduce the behavior:

  1. Run python main.py
  2. See error

Environment:

  • OS: MacOS Soloma
  • Python Version: 3.11.7
  • Program Version: local-ngrok

Additional context

Bumping pyngrok from version 5.2.1 to 6.1.2 or 7.1.3 fixed it for me

Previous alerts are being send out again

When receiving an alert, previous alerts were send out again as well :

17-02-2022 14:30:29 | INFO | Sending webhook alert<Alert: BTC Trade>, content: {'c': 'STOP', 't': '1234567890'}
17-02-2022 14:30:29 | OK | Sent webhook alert successfully!
17-02-2022 14:30:29 | INFO | The whole process taken 21.792s.
17-02-2022 14:30:30 | INFO | Sending webhook alert<Alert: BTC Trade>, content: {'c': 'SELL', 't': '1234567890'}
17-02-2022 14:30:30 | OK | Sent webhook alert successfully!
17-02-2022 14:30:30 | INFO | The whole process taken 178215.88s.
17-02-2022 14:30:32 | INFO | Sending webhook alert<Alert: BTC Trade>, content: {'c': 'BUY', 't': '1234567890'}
17-02-2022 14:30:32 | OK | Sent webhook alert successfully!
17-02-2022 14:30:32 | INFO | The whole process taken 227609.068s.
17-02-2022 14:30:33 | INFO | Sending webhook alert<Alert: BTC Trade>, content: {'c': 'SELL', 't': '1234567890'}
17-02-2022 14:30:33 | OK | Sent webhook alert successfully!
17-02-2022 14:30:33 | INFO | The whole process taken 253824.331s.

The process time is also completely wrong because they were old alerts.

[feat] Bypass exchange region IP ban

Discussed in #68

Originally posted by hebe061103 March 18, 2024
截图 2024-03-18 14-14-54

If you are using Pipedream, you may face a service denial problem. It seems there are some of Pipedream's servers are located in restricted areas (eg. USA)

Solution

  • Proxy the webhook request

Empty content when calling webhook with custom alert

The content seems to be empty :
08-02-2022 19:30:05 | INFO | Sending webhook alert<Alert: DOT webhook>..., content:
08-02-2022 19:30:05 | OK | Sent webhook alert successfully!

The service that received the call logged this :

[19:30:05.578] [INFO] ""

When looking at the email in my GMail account, the data is there (json string).

Inaccurate whole process time

You may see the whole process take longer than you actually feel. That problem was caused by you and the email sender being in different time zones. So you may receive an email come from the future.
time-difference
You may simply fix it by updating the time zone setting on the email service side or having a Google search.

ModuleNotFoundError: No module named 'PlanToRun'

Version: Local

Discussed in #44

Originally posted by arronuk28 July 21, 2023
I keep coming up with an error, PlanToRun not recognized. Iv been trying for hours to fix it with the assistance of Chatgpt aswell. but without success. Can you please tell me how to get around this, I have tried on both windows and Linux, I have went from python3 to python 3.11 its driving me crazy. its to webhook Tradingview to IQ options

'NoneType' object has no attribute 'replace'

Hello. I did everything according to your instructions, but in the end I get the error "Here an error has occurred, reason: 'NoneType' object has no attribute 'replace'"
Tell me what the problem might be, thank you.

8bc8ca5e5fed7d59a770ca218bd9dfe1

# webhook message send to botwebsite [https://tradingview.to/anywhere] does not respond to the message. does place a order on the exchanges binance test net

This is doctype html to send a message to this bot https://tradingview.to/anywhere

`

	<link rel='icon' href='/favicon.ico'>
	<link rel="manifest" href="/manifest.json">
	<link rel="apple-touch-icon" href="/icon-192.png" />
	<link rel="apple-touch-icon" href="/icon-512.png" />

	<title>TradingView To Anywhere - Automate Your Alerts</title>
	<meta name="description" content="Send your alerts from TradingView To Anywhere you want automatically. You can execute them as orders or share them as signals instantly!" >
	<meta name="apple-mobile-web-app-status-bar" content="#685cd7" />
	<meta name="theme-color" content="#685cd7" />

	<script defer src='/build/bundle.js'></script>
	<link rel='stylesheet' href='/build/bundle.css'>
	<script type="module" crossorigin src="/index.js"></script>
	<link rel="modulepreload" href="/vendor.js">
	<link rel="stylesheet" href="/index.css">
</head>

<body>
	<div id="app"></div>
</body>
` ` i have done all process , when i manualy command to bot it place the order but when threw alert bot does not working and do not placed orders .

#Pipedream#Python code Take snapshort of chart and send it to Discord , twitter and also to Telegram with url when Trading view Alert triger

  As we know that **Alert** will only tells price of a point ie **intial and final** 

1st but it **fails to tell what is trend **in Market either up trend or down trend
2nd if we have a Snapshort Any one can make a Techanical Analysis on it . from any place
3nd we can easly handle Alert and send our chart Disscussion or drawing ie support and resistance that we draw on Chart and indicators that we are using

I think like this way
Python code Take snapshort of chart and send it to Discord , twitter and also to Telegram with url when Trading view Alert triger by using #pipedream

_Originally posted by @Priyanshu-raj95

Tradingview does not allow outlook emails to be added for sending alerts

Hi @soranoo ,

I have just started using this library to create my alerting feature for trading bots. I have tried to set up a Gmail account as well as an Outlook account, and Tradingview shows that an Outlook account cannot be used for sending alerts as it is not allowed on the Trading View domain.

Is there a way to use Outlook email for receiving emails to the Outlook account? I cannot connect to IMAP Gmail either, as it just shows the user as unauthenticated, even after generating an app password and trying out different things.

Please help me with this. Looking forward to a quick reply.

Telegram Alert

IMG_20231123_090300
Is that possible creating alert to telegram group using this code

https://api.telegram.org/bot<YourBotToken>/sendMessage?chat_id=<YourChatID>&text={{strategy.order.alert_message}}

YouTube video guide😭🙏

Discussed in #30

Originally posted by REFLEXGAMING007 April 6, 2023
If you have little bit spare time. It would be really helpful if you publish a youtube video showing the full guide for local setup. I'm sure alot of other people want this too. For a coding noob like me its really hard.

#cloud based workflow server #resolved gimail integration requirement in tradingview free webhook alert #pipedream

  Hiii  @soranoo 

write now we are sending free webhook alert required python , also in email google had band the 3rd pary integration to integrate it only allow to integrate user who has Google Cloud , personal required required in email there is a problem it may be ban due to reasons .

we can over come these problems in pipedream it is open source free cloud based workflow provider .
1st login in pipedream
2nd create a workflow https://pipedream.com/@/new/build
3rd use email as a trigger copy it and paste in email to sms as a trigger in tv alert. it will send otp to pipedream work flow body
text
now were successfully connected pipedream email into alert . as alert trigger message send to email and we can xtract the path and
send post request
4th extract the value requires to send post webhook request copied the path and paste in python code step
5th in a work flow you can also connect telegram http post request , and discord to send messages
5th deploy now your work flow has successfully created on cloud server it works 24 x 7

bro i dont know python to send post requests with paylods . i read pipedream documentaion it has written there . i cant understand much

these steps make us very light to use Trading view free webhook

Originally posted by @Priyanshu-raj95 in #14

global variables not working on Pipedream python ?

Hi there, I tried your cloud version pipedream.py code but the global variable won't update on the next email received. Any suggestion ? I am trying to catch the time of the last message received and compare with the new ones.

Missing `waitress`

Discussed in #47

Originally posted by trananh211 August 23, 2023
when i run program main.py, i get this error :

python main.py
Traceback (most recent call last):
File "C:\Users\Dell\Downloads\Programs\TradingView-Free-Webhook-Alerts-main\main.py", line 1, in
from src import try_import
File "C:\Users\Dell\Downloads\Programs\TradingView-Free-Webhook-Alerts-main\src_init_.py", line 13, in
from .api_server import start as api_server_start
File "C:\Users\Dell\Downloads\Programs\TradingView-Free-Webhook-Alerts-main\src\api_server.py", line 5, in
from waitress import serve
ModuleNotFoundError: No module named 'waitress'

Pls,

src.helpers not available

I updated today and suddenly receive following error message:

from .helpers import (
ModuleNotFoundError: No module named 'src.helpers'

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.