Commodities have always been awkward for retail traders. Futures accounts, contract expiries, rollover, physical delivery clauses you have to read carefully to avoid. Commodity perpetuals on LMEX strip that away. Contracts like gold and oil track the underlying commodity price, never expire, trade around the clock, and settle in USDT. For a Python bot, a gold perpetual behaves almost exactly like a crypto perpetual, which means the strategies and code you already have mostly transfer. This article covers what is the same, what is different, and how to build a bot for them.
The main draw is diversification that actually works. Gold in particular often moves independently of crypto, and sometimes opposite to it during risk-off events. A book that runs crypto strategies alone is exposed to a single risk narrative. Adding an uncorrelated commodity leg can smooth the equity curve more than any single strategy tweak. This is the multi-asset argument we make in LMEX 24/7 trading.
Oil brings a different flavour: it is driven by supply news, inventory reports, and geopolitics, events with schedules a systematic trader can prepare for.
Building a bot for a commodity perp uses the identical API surface as crypto. You authenticate, subscribe to market data, and place orders exactly as in our crypto perpetuals bot guide. Only the symbol changes.
What differs is behaviour. Gold trends slowly and cleanly and punishes overtrading, so it rewards patient trend approaches like supertrend or EMA crossover on higher timeframes. Oil is jumpier and news-sensitive, closer in character to a volatile crypto, so tighter risk control and event awareness matter more.
Because gold trends, a straightforward trend filter with volatility-scaled sizing is a sensible base. Enter in the direction of a long moving average, size the position to a volatility target so a calm month and a wild month contribute similar risk.
Pair the sizing with the volatility targeting approach so gold's lower volatility does not leave the position too small to matter, and oil's higher volatility does not leave it too large.
Liquidity on commodity perps is generally thinner than the flagship crypto contracts, so spreads are wider and large market orders slip more. Prefer limit orders and size with that in mind. Oil especially can gap on scheduled inventory reports and geopolitical headlines, so avoid carrying oversized leverage into known event windows. And funding still applies, so a position held for weeks accrues carry that you must include in any expected-return math.
Q: Do commodity perpetuals expire or require rollover?
No. Like crypto perps, they never expire and use funding to track the underlying. There is no contract rollover and no delivery, which is the main advantage over traditional commodity futures.
Q: Is gold really uncorrelated with crypto?
Often, though correlation is not constant and can rise during broad liquidations when traders sell everything. On average, adding gold tends to diversify a crypto-only book, which is the point, but verify the correlation on current data rather than assuming.
Q: What strategy suits oil perpetuals?
Oil is event-driven and volatile, so approaches with tight risk control and awareness of inventory and geopolitical schedules fit better than slow trend following. Treat it more like a high-volatility asset than like gold.
Q: Can I use my existing crypto bot code?
Largely yes. The API and order mechanics are identical, so you mostly change the symbol and retune parameters and risk to the asset's volatility and liquidity profile.