Futures
Access hundreds of perpetual contracts
TradFi
Gold
One platform for global traditional assets
Options
Hot
Trade European-style vanilla options
Unified Account
Maximize your capital efficiency
Demo Trading
Futures Kickoff
Get prepared for your futures trading
Futures Events
Join events to earn rewards
Demo Trading
Use virtual funds to experience risk-free trading
Launch
CandyDrop
Collect candies to earn airdrops
Launchpool
Quick staking, earn potential new tokens
HODLer Airdrop
Hold GT and get massive airdrops for free
Launchpad
Be early to the next big token project
Alpha Points
Trade on-chain assets and earn airdrops
Futures Points
Earn futures points and claim airdrop rewards
The prediction market strategy's single-market position limit has always been ineffective, despite multiple fixes that didn't resolve the issue.
Today, I finally identified the root cause: using the wrong order type.
Issue Description
Since the launch of the H12 Weather Strategy, there have been two strange bugs:
1. The total position in a single market always exceeds $10 limit
2. Placed 32 orders, none filled (0% fill rate)
Initially, I thought it was a logic problem. I checked the deduplication function, position calculation, and order status checks—all seemed correct. The code looked fine from all angles.
But it simply didn't work online.
Root Cause Diagnosis
After reviewing the code, I discovered: I had been using IOC ( Immediate-Or-Cancel ) orders.
The IOC logic is: place an order, immediately match it against the order book; if it doesn't match, cancel.
This caused two issues:
• Position limit exceeded: IOC orders are canceled immediately and don't stay in pending status, causing deduplication checks to fail (orders can't be detected), leading the strategy to place duplicate orders in the same market within a single scan cycle
• 0% fill rate: Weather markets have poor liquidity, the order book is often empty, so IOC orders are canceled immediately upon placement
Solution
Switch to GTC Maker orders:
• GTC ( Good-Till-Cancel ) - keep the order open until matched by a counterparty
• Orders stay in pending status, allowing deduplication checks to work
• Before each scan, check if the previous order has been filled
Validation (see Figure 1)
After deploying on VPS:
• Position limit issue disappeared
• 5 out of 29 orders filled within 5 minutes (17.2% fill rate vs. previous 0%)
• Makers receive rebates, Takers pay fees (after the change, it’s even cheaper)
One change fixed two bugs. If you're also working on Polymarket strategies, the order type matrix in Figure 2 can be directly referenced.