पॉलीमार्केट Bot ट्यूटोरियल · अध्याय 24 / 32
पॉलीमार्केट perpetual futures (perps) bot: native 2-25x leverage, funding rate carry, liquidation distance math, ATR-based sizing, vs Binance/Bybit perps. Production-grade rules and code skeleton.
इस अध्याय में क्या शामिल है
पॉलीमार्केट Perps एक नया instrument है जिसमें native 2-25x leverage और funding rates होते हैं। यह binary markets से अलग तरह से behave करता है - liquidation वास्तविक है, sizing math अलग है, और edge sources prediction-market side जैसी नहीं हैं। यह अध्याय perps-specific bot patterns को कवर करता है।
- पर्प्स क्या हैं और वे अलग क्यों हैं
- पॉलीमार्केट पर नेटिव लीवरेज (2-25x)
- फंडिंग रेट की कार्यप्रणाली
- लिक्विडेशन दूरी का गणित
- ATR-आधारित पोजीशन साइज़िंग
- तुलना: पॉलीमार्केट पर्प्स बनाम Binance/Bybit
- खतरा: लिक्विडेशन कैस्केड के परिदृश्य
- Code: स्टॉप के साथ लीवरेज्ड पर्प ऑर्डर लगाना
पर्प्स क्या हैं और वे अलग क्यों हैं
पॉलीमार्केट Perpetual Futures (late 2025 में launched) binary prediction markets से अलग instrument हैं। Perps किसी underlying - BTC, ETH, या अन्य - पर continuous price exposure देते हैं, साथ में native leverage और funding rate भी होता है।
Binaries से differences:
- Continuous: कोई expiration date नहीं, कोई resolution नहीं।
- Leveraged: 2x-25x native रूप से available, बिना proxy contract gymnastics के।
- Funded: positive funding shorts को pay करता है; negative funding longs को pay करता है। Funding continuously accrue होता है।
- Liquidatable: अगर margin खत्म हो जाए, तो exchange आपकी position force-close कर देता है। Real loss.
Strategy के हिसाब से, perps CFD trading हैं, prediction market trading नहीं। Edge sources पूरी तरह अलग हैं - technicals, funding-arb, basis trades, जिनमें से कोई भी binaries पर लागू नहीं होता।
पॉलीमार्केट पर नेटिव लीवरेज (2-25x)
पॉलीमार्केट Perps 2x से 25x leverage offer करते हैं। Leverage जितना अधिक होगा, आपको liquidate करने वाला price move उतना ही छोटा होगा।
10x leverage पर, 10% adverse price move position को wipe कर देता है। BTC एक हफ्ते में 10% नियमित रूप से move कर सकता है, इसलिए days तक hold की गई 10x+ positions में liquidation odds non-trivial होते हैं।
Practical guidance: days-to-weeks तक hold की जाने वाली swing trades के लिए 2-5x leverage; day trades के लिए 5-10x; 10x+ केवल sub-hour trades के लिए tight stops के साथ। 10x से ऊपर retail के लिए gambling है; funding cost + liquidation tail expected return को खा जाते हैं।
फंडिंग रेट की कार्यप्रणाली
Funding वह per-hour payment है जो longs shorts को pay करते हैं (या vice versa), ताकि perp price spot price से tethered रहे। Rate price gap से compute होती है: positive gap → longs pay; negative gap → shorts pay।
Typical magnitudes: normal conditions में 0.01-0.05% प्रति 8-hour period; extreme moves में 0.5% प्रति period तक। Annualized, यह 1-50% है - एक ऐसी strategy के लिए substantial जो positions को days तक hold करती है।
Funding strategy में पूरा edge हो सकता है: उस side पर enter करें जिसे payment मिलती है, और price exposure को spot या दूसरे perp से hedge करें। यही classic basis-trade arb है।
लिक्विडेशन दूरी का गणित
Long के लिए liquidation price है: entry × (1 - 1/leverage). 10x पर, $50,000 BTC पर entered long $45,000 पर liquidate होगा (10% adverse)।
Short के लिए: entry × (1 + 1/leverage). $50k पर 10x short, liquidation $55k पर।
Math को maintenance margin buffer को ignore करके simplify किया गया है (आमतौर पर theoretical liquidation price से 0.5-1% आपके favor में)। Sanity के लिए simple math इस्तेमाल करें; precise number के लिए exchange का actual maintenance margin check करें।
Practical: position size + leverage ऐसा हो कि liquidation distance underlying की daily volatility से > 2x हो। BTC की ~3% daily volatility के लिए, no-stop position के लिए leverage ≤ 16x होना चाहिए।
ATR-आधारित पोजीशन साइज़िंग
Average True Range (ATR) एक volatility measure है: पिछले N दिनों के दौरान average daily price range। ATR पर position sizing risk को current market conditions से जोड़ता है।
Pattern: हर trade पर fixed dollar amount risk करें (जैसे $50)। Position size = risk / (ATR × leverage). अगर BTC का daily ATR $1,500 है ($50k का 3%), और आप 10x leveraged हैं, तो position size = $50 / (1500 × 0.1) = लगभग $3,300 notional।
यह high-vol regimes में positions को automatically छोटा करता है और low-vol regimes में बड़ा। मुख्य benefit: market regime चाहे जो हो, एक bad day आपकी equity को bounded amount से ही move करेगा।
तुलना: पॉलीमार्केट पर्प्स बनाम Binance/Bybit
पॉलीमार्केट Perps बनाम major CEX perp venues, मई 2026.
| पॉलीमार्केट Perps | Binance Perps | Bybit Perps | |
|---|---|---|---|
| Max leverage | 25x | 125x | 100x |
| Settlement | USDC on Polygon | USDT on BSC/internal | USDT |
| KYC required | region के अनुसार varies | yes (most regions) | yes |
| API maturity | new, growing | mature, deep | mature |
| Liquidity (BTC) | moderate | extremely deep | deep |
जब आप पहले से पॉलीमार्केट पर हैं और एक venue की operational simplicity महत्वपूर्ण है, तब पॉलीमार्केट Perps सही विकल्प हैं। केवल perp strategies at scale के लिए, liquidity के मामले में CEXes जीतते हैं। जिन builders को हम जानते हैं, उनमें से अधिकांश पॉलीमार्केट Perps का उपयोग अपने binary positions के साथ basis-arb के लिए करते हैं, standalone perp venue के रूप में नहीं।
खतरा: लिक्विडेशन कैस्केड के परिदृश्य
Catastrophic perp failure: एक single adverse move जो liquidate करने के लिए पर्याप्त बड़ा हो, और liquidation खुद book pressure बनाकर और positions liquidate करा दे।
2024-25 CEX history में, BTC में कई 10-20% intraday moves हुए हैं जहाँ 10x+ longs कुछ ही घंटों में cascade होकर बाहर हो गए। पॉलीमार्केट Perps इससे immune नहीं हैं; liquidity अधिक thin है और ऐसा similar move और भी तेज़ liquidation कर सकता है।
Defenses:
- Manual stop above liquidation price: liquidation से 30-50% पहले एक hard limit रखें, ताकि auto-liquidator से पहले आप exit कर जाएँ (जिससे liquidation fee बचती है)।
- Position size limits: एक single perp position पर कभी भी equity का 10% से अधिक risk न करें।
- Halt on regime change: अगर 24h volatility baseline से 2x से अधिक हो, तो position sizes कम करें या नई entries pause करें।
Code: स्टॉप के साथ लीवरेज्ड पर्प ऑर्डर लगाना
Reference: hard stop के साथ पॉलीमार्केट Perp position के लिए order-placement skeleton.
def open_long_with_stop(symbol, entry_px, leverage, risk_usd):
# Compute position size from risk budget
liquidation_px = entry_px * (1 - 1/leverage)
stop_px = entry_px * (1 - 0.7/leverage) # 70% to liquidation
risk_per_share = entry_px - stop_px
shares = risk_usd / risk_per_share
# Place long entry
long_order = perp_api.place_order(
symbol=symbol, side="long", size=shares, leverage=leverage,
order_type="market"
)
if long_order.status != "filled": return None
# Place hard stop just below entry
stop_order = perp_api.place_order(
symbol=symbol, side="close", size=shares, stop_price=stop_px,
order_type="stop_market", reduce_only=True
)
return {"long": long_order, "stop": stop_order}
reduce-only stop यह सुनिश्चित करता है कि वह केवल existing position को close कर सके, आपको short में flip न करे। Production additions: profit पर trailing stop, funding-cost monitor, position-size halt.


