Skip to main content

Introduction

Funding rate arbitrage bot, on your own server

Run funding rate, spot-perp and cross-exchange spread arbitrage with both legs in one combo: they open and close together, and if one leg fills first, the other is topped up. Your API keys never leave your server, and no withdrawal permission is needed.

Free to use, with no subscription. The online demo is a ready-made example and isn’t connected to any exchange.

ZML Trade Combo view

Sample
ComboOpen spreadStatusLong legShort legLeg gapLiquidation distance
BTC+0.120%HoldingBTC/USDT Binance PerpBTC/USDT OKX Perp0.000 BTC41.80%
SOL+0.210%OpeningSOL/USDT Binance SpotSOL/USDT Bybit Perp0.400 SOL58.20%
ETH+0.080%At targetETH/USDT Bybit PerpETH/USDC Hyperliquid Perp0.00 ETH33.50%
DOGE−0.030%Reduce-onlyDOGE/USDT Gate PerpDOGE/USDC Hyperliquid Perp0 DOGE27.40%

One row per combo: both legs, open spread, leg gap, liquidation distance and status.

Trading

Both legs placed together

The long and short legs open and close together as one combo, building toward the same target position. When one leg fills first, the other is topped up to the same size, and the leg gap is shown live.

Across exchanges and accounts

Each leg can use any supported exchange and account, on the same exchange or two different ones, and one account can serve many combos.

Spot, margin and perpetuals

Each leg can be spot, spot margin or a USD-margined perpetual. Spot-perp arbitrage, reverse spot-perp arbitrage and cross-exchange arbitrage are all supported.

Open and close with post-only orders

Post one leg post-only and have the other follow as it fills, or post both legs post-only. Fees are charged at the Maker rate.

Open and close spreads

Opens when the spread reaches your open spread and closes when it comes back to your close spread.

Receive opportunities in one click

Send an opportunity you pick in Z Market Lab to Trade and the combo is set up on the spot; you decide whether to open it. Pairing and sending are free.

Risk control

Liquidation guard

When the liquidation distance falls to your liquidation guard line, both legs are reduced at market until the distance recovers.

Pause-opening line and alert line

Below the pause-opening line, no new positions open. Below the alert line, you’re alerted and the combo only reduces.

Position reconciliation

Combo positions are reconciled against each exchange account’s actual positions, and you are alerted when a difference exceeds your amount.

Stop takes effect at once

Stop halts all orders at once, without waiting on the exchange. When you run again, no order from before the stop is resumed, and any fill that lands afterwards shows up in position reconciliation.

Accounts and assets

Many exchanges, many accounts

Connect main and sub-accounts on centralized exchanges, perpetual DEXs and on-chain wallets, and see balances, positions and account status on one page.

Asset overview

Assets, liabilities and net assets across every account are valued in USD on one page, down to each account and coin.

PnL broken down

Net PnL is split into spread profit, trading fees, rebates, funding fees and borrow interest, with funding counted as the exchange settles it.

Performance stats

Review returns by day, by month or for any period, compared with the previous period and broken down by exchange.

  1. Install it on your serverRun one command on your own Linux server, then open Trade in your browser.
  2. Connect an exchange accountAdd your exchange API keys. Trade lists the permissions it needs.
  3. Create a comboPick the accounts and markets for the long and short legs and set the open spread, close spread and target position, or send an opportunity over from Z Market Lab in one click.
Workflow illustration

API keys

Your API keys are stored encrypted on your own server. They are never sent to ZML and never pass through it, and ZML has no login to your server.

Permissions

Needs only read and trade permissions, plus transfer if you use transfers. It never needs or uses withdrawal permission.

Funds

ZML never holds your funds. They stay in your own exchange accounts.

More features

ZML Trade More features

FeatureWhat it does
Trading
Post-only orders follow the bookPost-only orders are repriced in real time as the book moves and canceled once the spread no longer meets your condition.
Builds in slicesEach entry is split into orders no larger than your per-order limit, so large positions build in steps with less price impact.
On-chain DEX legsA leg can be on-chain spot, swapped at market on DEXs through OKX Wallet, with a minimum received amount on every swap or no trade at all.
Target positionSet a target position for each combo; opening stops once it is reached.
Reverse comboCreate the mirrored combo with long and short swapped in one step, ready for when the spread flips.
Bulk create and bulk actionsPick several long-leg and short-leg accounts at once to create one combo per pairing, and pause, resume or delete combos in bulk.
Presets and combo templatesSave your usual settings as presets to apply when creating combos, and use combo templates for opportunities sent from Z Market Lab.
Tags and favoritesTag combos and add favorites so you can filter by tag, with favorites always on top.
Receiving rulesOpportunities pushed by your Z Market Lab rules can wait in an inbox for your approval or become combos automatically, with limits on new combos per hour and combos running at once.
Market ordersOpen and close at market from the trading page, switching between accounts.
TWAPOver the duration you choose, places a price-protected market order at every interval you set until the amount is filled or you stop it.
Risk control
Calibration and automatic alignmentWhen combo positions and the exchange’s actual positions aren’t in sync, you can calibrate them one by one or in bulk. With automatic alignment on, if a difference is still there after a period of time, the excess is reduced at market price. It only reduces, never adds.
Combo alertsGet alerts on open spread, close spread, single-leg floating profit, funding cost, liquidation risk and position differences, with thresholds set per combo.
Telegram and FeishuAlerts go to your own Telegram bot or Feishu group and ring in the browser, repeating for as long as the condition holds.
Do not disturbMute an alert with one tap in the web app or in Telegram, and it resumes on its own when the time is up.
Accounts and assets
TransfersMove funds between wallets, and between main and sub-accounts, right from the account.
Leverage, borrow and repayChange leverage right on the position, and borrow or repay by hand on spot margin accounts.
Account fee ratesEach account shows your current Maker and Taker fee rates on that exchange.
Install and security
UpdatesOnly updates signed by ZML are installed. They install automatically by default, or you can choose when to install them. Urgent fixes install immediately.
Two-factor authenticationTurn on two-factor authentication for sign-in, and reset a forgotten password with one command on your server.

Compared with exchange arbitrage bots

An exchange’s own arbitrage bot only trades on that exchange. With ZML Trade, the two legs can be on different exchanges and accounts, and your API keys stay on your own server.

Exchange arbitrage botsZML Trade
Spot-perp arbitrage on one exchangeYesYes
Legs on two exchangesNoYes
Perp DEXsNoYes
Multiple exchanges and accounts in one placeNoYes
Runs on your own serverNoYes

Troubleshooting

Does Trade cost anything?

Trade is free to use, with no subscription. Pairing it with Z Market Lab and sending opportunities to Trade are also free; just sign in to your account. Trading on certain exchanges carries a small service fee, and exchange trading fees apply as usual.

Can ZML touch my funds?

No. Your funds stay in your own exchange accounts and your API keys stay on your server. Trade needs only read and trade permissions, plus transfer if you use transfers, and never withdrawal.

Which exchanges are supported?

The connection method, tradable markets and account modes of each exchange are listed on this page: Supported exchanges

Does Trade need to keep running?

Yes. Your server must stay online. After a server restart, Trade starts automatically and your combos keep running with their parameters.

What if something goes wrong?

You can stop a combo at any time. It takes effect immediately and the position record is kept. For help, open Contact. Support is in Chinese and English.

Use ZML Trade for free

No subscription. Install it on your own server with one command, or try the online demo first.