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.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.