BLACK FRIDAY IS BACKNov 24 to 30. Join the list and get in a day early.Join the list

Spot margin trading, by exchange

Autoview · Guide · Updated November 7, 2026

In an Autoview command, b=buy and b=sell trade spot. b=long and b=short ask for a margin order instead: a buy or a sell through your margin account, where the exchange can lend you the coin or the cash. Whether that happens depends on the exchange. Some send the order to margin, some refuse it, and some quietly treat it as a plain spot buy or sell.

This page goes through each spot exchange. It comes from the Autoview integrations code that runs on our servers today. We read the code; we did not send these orders live for this guide. Futures and perpetuals are margined anyway and are not covered here; for those, see leverage by exchange.

The trap: b=short on a spot-only connection

On Binance.US, Coinbase Advanced and Bitget spot, Autoview has no margin path. It reads b=long as a buy and b=short as a sell, from your spot balance. So b=short sells coins you already hold. It does not borrow and it does not open a short. If you copy a margin strategy to one of these accounts, change the sides to buy and sell so the log says what really happens.

Gemini goes the other way: a b=long or b=short line is refused with a margin trading not supported error, and nothing is sent.

Exchange by exchange

  • Binance. b=long and b=short go to Binance margin. Cross margin is the default; lt=isolated uses the isolated account for that pair. Percent sizes come from the margin wallet you picked. c=position is not supported here, so you exit with an opposite long or short order. Full detail is on the Binance command reference.
  • Bybit. Autoview tells Bybit to borrow on b=long and b=short, and not on b=buy or b=sell. Bybit's order docs call this field "Whether to borrow" and ask you to turn on margin trading and set the currency as collateral first.
  • Bitfinex. b=long and b=short place a margin order instead of an exchange (spot) order. If the pair has no margin market, the order is refused. A stop or target that Autoview attaches to a margin order goes out reduce-only, so a leftover exit cannot open a position the other way.
  • Crypto.com. On a spot pair, Autoview marks the order as margin. It first checks that Crypto.com allows margin buying (for long) or margin selling (for short) on that pair, and refuses the order if not.
  • Gate.io. b=long and b=short trade from cross margin, or from isolated margin with lt=isolated. See the next section for borrowing. c=position is not supported.
  • HTX. Orders go through your isolated margin account, or cross margin with lt=cross. If that margin account doesn't exist on HTX yet, the order is refused with an account not found error.
  • Kraken. A b=long or b=short line needs l=, or it is refused. The leverage goes on the order. Percent sizes come from your free margin. c=position works and uses the open position's leverage.
  • KuCoin. Margin lines go to KuCoin's margin order endpoint. lt=isolated or lt=cross is sent as the margin mode. Percent sizes come from your KuCoin margin account balance, also with lt=isolated.
  • OKX. Margin is used only on pairs where OKX offers it; on other pairs the order goes out as a cash (spot) order. Isolated is the default, and l=0 asks for cross, which also sets the pair's maximum leverage (see leverage by exchange). A percent size on a margin line comes from your quote currency on both sides, so b=short q=50% works from half your USDT, not half your coins. ro=1 is sent only on long and short lines.

Borrowing and repaying for you

Autoview has three ways to ask an exchange to borrow, and each exchange reads only one of them, if any.

ExchangeBorrowRepay
Binancey=borrowy=repay
Gate.ioab=1ar=1 (Gate.io applies it to cross margin only)
KuCoinab=1Not read
BybitAny b=long or b=short lineNot read
Everyone elseab= and y=borrow are not read on a tradear= and y=repay are not read on a trade

A few details:

  • ab= and ar= only switch on with the value 1. ab=true is read as off.
  • On Gate.io, ab= and ar= go on a plain order only. A line with px= becomes a triggered order without them. See the Gate.io command reference.
  • On KuCoin, ab=1 also lets the order through when your margin account shows no balance of the coin, so KuCoin can borrow it. Without ab=1 that order is refused before it is sent.
  • On Binance, ab= and ar= do nothing. Use y=borrow or y=repay on the long or short order.
e=gate s=BTC_USDT b=short p=1% q=0.001 ab=1 d=1

That is a limit sell 1% above the ask on Gate.io cross margin, with automatic borrowing on, as a d=1 test.

Test it once before you rely on it

Add d=1 to see how Autoview reads your line without sending it. Then place one small margin order on the exchange and check that it shows in your margin account, not spot, and that the loan is what you expected. For how a close and a reversal work, see close or reverse on an opposite signal.

Open the command reference