Create an alert

Changed

create_alertChanges the chart

The app creates an alert.

Details#

Create a chart alert on the same list as the chart's Alerts panel. A price condition needs price (for example 0.6318); without it the call fails and nothing is created. The open chart reloads its Alerts panel and price lines. email is on when omitted. trigger is once when omitted. webhook true requires webhook_url, an https link checked the same way as the alert dialog. Omit webhook and webhook_url for no webhook. webhook false stores no link, and passing webhook_url with it is refused. The answer includes email, trigger, webhook and webhook_url. A saved link can create a security key that this answer does not return. Call get_alert_webhook for delivery status and rotate_alert_webhook_key to receive a key once. A webhook turned off after three failed deliveries stays off until Turn back on in the alert dialog succeeds. This tool does not send that test. Price example: symbol BTCUSDT, venue BINANCE, timeframe 1D, condition crossing_up, price 100000. Money Line example: condition flip_up.

Inputs#

NameTypeRequiredDescription
symbolstringRequiredTicker or pair, for example BTCUSDT or AAPL.
venuestringOptionalOptional venue, for example BINANCE, COINBASE, BITSTAMP or NASDAQ. BINANCE is Binance spot, not Binance futures.
timeframestringRequiredOne of 1H, 4H, 1D, 1W, 1M. Example: 1D.
conditionstringRequiredcrossing, crossing_up, crossing_down, greater, less, flip_up, flip_down, or flip_any.
pricestringOptionalPrice for a price condition, for example 100000.
messagestringOptionalOptional note, shown with the alert.
emailbooleanOptionaltrue sends email, false does not. Omit to leave email on.
triggeronce | once_per_bar_closeOptionalonce fires one time. once_per_bar_close can fire again on a later bar. Omit for once.
webhookbooleanOptionaltrue sends the alert to webhook_url. false stores no link; do not also pass webhook_url. Omit this and webhook_url for no webhook.
webhook_urlstringOptionalAn https link, checked the same way as the alert dialog. Required when webhook is true. A blank value stores no link.