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. קרא עוד ב־תנאי השימוש.