OPEN-SOURCE SCRIPT
ST + EMA [BTCUSD]

Delta Exchange embeds your strategy_id inside the Webhook URL itself when they generate it for you. Putting strategy_id in the JSON body sends the request to the wrong endpoint — Delta's router can't find it, hence the 404. The correct JSON body has only 4 fields, no strategy_id.
🔴 Root Cause 2 — qty with quotes → rejected by Delta
Our previous JSON had "qty":"{{strategy.order.contracts}}" (quoted = string). Delta's official format is "qty": {{strategy.order.contracts}} Delta Exchange India — no quotes, making it a JSON number. Delta's API validates the type and rejects strings.
🔴 Root Cause 3 — Decimal qty from percent_of_equity → rejected by Delta
The strategy was using default_qty_type=strategy.percent_of_equity, which calculates fractional contract sizes (e.g. 0.023). Delta Exchange requires order quantities to be whole numbers — decimals like 0.02 or 1.5 are rejected. Delta Exchange Changed to strategy.fixed with default_qty_value=1.
🔴 Root Cause 2 — qty with quotes → rejected by Delta
Our previous JSON had "qty":"{{strategy.order.contracts}}" (quoted = string). Delta's official format is "qty": {{strategy.order.contracts}} Delta Exchange India — no quotes, making it a JSON number. Delta's API validates the type and rejects strings.
🔴 Root Cause 3 — Decimal qty from percent_of_equity → rejected by Delta
The strategy was using default_qty_type=strategy.percent_of_equity, which calculates fractional contract sizes (e.g. 0.023). Delta Exchange requires order quantities to be whole numbers — decimals like 0.02 or 1.5 are rejected. Delta Exchange Changed to strategy.fixed with default_qty_value=1.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。