Polymarket Bot Tutorial · Chapter 24 of 32
Polymarket 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.
यह अध्याय क्या कवर करता है
Polymarket Perps एक नया instrument है जिसमें native 2-25x leverage और funding rates होते हैं। यह binary markets से अलग तरह से behave करता है - liquidation वास्तविक है, sizing math अलग है, और edge sources prediction-market side जैसी नहीं हैं। यह अध्याय perps-specific bot patterns को कवर करता है।
- perps क्या हैं और वे अलग क्यों हैं
- Polymarket पर native leverage (2-25x)
- Funding rate mechanics
- Liquidation distance math
- ATR-based position sizing
- Comparison: Polymarket perps vs Binance/Bybit
- Risk: liquidation cascade scenarios
- Code: stop के साथ leveraged perp order place करना
Perps क्या हैं और वे अलग क्यों हैं
Polymarket 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 पर लागू नहीं होता।
Polymarket पर native leverage (2-25x)
Polymarket 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 rate mechanics
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 है।
Liquidation distance math
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-based position sizing
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 करेगा।
Comparison: Polymarket perps vs Binance/Bybit
Polymarket Perps बनाम major CEX perp venues, मई 2026.
| Polymarket Perps | Binance Perps | Bybit Perps | |
|---|---|---|---|
| Max leverage | 10x | 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 |
जब आप पहले से Polymarket पर हैं और एक venue की operational simplicity महत्वपूर्ण है, तब Polymarket Perps सही विकल्प हैं। केवल perp strategies at scale के लिए, liquidity के मामले में CEXes जीतते हैं। जिन builders को हम जानते हैं, उनमें से अधिकांश Polymarket Perps का उपयोग अपने binary positions के साथ basis-arb के लिए करते हैं, standalone perp venue के रूप में नहीं।
Risk: liquidation cascade scenarios
Catastrophic perp failure: एक single adverse move जो liquidate करने के लिए पर्याप्त बड़ा हो, और liquidation खुद book pressure बनाकर और positions liquidate करा दे।
2024-25 CEX history में, BTC में कई 10-20% intraday moves हुए हैं जहाँ 10x+ longs कुछ ही घंटों में cascade होकर बाहर हो गए। Polymarket 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: stop के साथ leveraged perp order place करना
Reference: hard stop के साथ Polymarket 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.





