tradingview-webhooks-bot
tradingview-webhooks-bot copied to clipboard
403 FORBIDDEN
Im getting the 403 message, Im not sure what to do.
If you are on Bitmex make sure the API key is order instead of "order cancel" which means cancel only.
hey, were you able to find the solution to this? what address did you get the error on?
Potential issues here:
A) PIN CODE Maybe you have just copied/pasted the example alert message template?
This may be due to the verification hash generated from the PIN code in https://github.com/Robswc/tradingview-webhooks-bot/blob/079f50343fe77bbd03cb8f62fc04e332d3a08395/tradingview-webhooks-bot/auth.py#L14
Suggestion:
- enter your own PIN to generate your own hash in auth.py
- move generate_alert_message.py to main folder
- execute generate_alert_message.py to generate the template alert message
- paste the generated template message on TV (this one contains your hashed key)
B) HOOKING
Another thing is: using the generated template will make TV send the POST as JSON. If you're not hooking via ngrok, line 30 won't work. You have to:
-
add the following on the import section of webhook-bot.py:
import json
-
change https://github.com/Robswc/tradingview-webhooks-bot/blob/079f50343fe77bbd03cb8f62fc04e332d3a08395/tradingview-webhooks-bot/webhook-bot.py#L30
to:
data = json.loads(request.data,encoding='utf-8')
Hello @esturilio I don't use ngrok and when the alert received from Tradingview, webhooks continuously giving http 405.
I entered an unique key to PIN, not from Bitmex secret etc. And ran generate_alert_message.py, got the line like below. I copied this line into TV alert message box. Is this correct?
{"type": "market", "side": "buy", "amount": "500", "symbol": "XBTUSD", "price": "None", "key": "90fca5b............"}
Also, I am not sure that understand your B) part. I only replaced 30th line with below, but problem persist.
data = json.loads(request.data,encoding='utf-8')
thanks
i have the same problem as i dont get an output with they to use