Bybit spot command reference
This is the full reference for writing Bybit spot orders from an Autoview alert, using e=BYBITSPOT. Spot is the simpler of Bybit's two product lines. It is the order types, conditional entries, and sizing, and not much else: no positions, no leverage, no attached stop or target. Pay close attention to the section on what spot does not accept, because a few perpetual parameters are accepted on spot and then quietly ignored. If you want leverage or brackets, those live on the perpetual surface, covered in the Bybit perpetuals command reference.
On Bybit, the symbol is BTCUSDT, one word, no separator. Spot also enforces a minimum order value of about 5 USDT, so a very small quantity is rejected even when it clears the minimum step. Size your orders to clear that floor.
How Autoview reads a command
A command is a single line of key=value tokens separated by spaces. e=BYBITSPOT s=BTCUSDT b=sell t=market q=0.001 is five tokens. The order you write them in does not matter.
- First occurrence wins. If a key appears twice, Autoview keeps the first and ignores the rest. Write each key once.
- A line starting with
//is a comment and places nothing. Useful for labelling an alert without triggering a trade. - You can send several commands at once by separating them with a new line or a pipe (
|). Each is parsed on its own. - A token that starts with a colon is ignored. TradingView sometimes inserts placeholder tokens like
:plot_0=; Autoview skips anything with a leading colon so those never affect the order.
Four tokens matter for every spot order: e=BYBITSPOT (the spot product line), s= (the symbol), b= (the side), and q= (the size). The size is not optional in practice. Read the sizing section before you send a real order.
The parameter table
Spot reads a small set of parameters. These are the ones that do something on spot.
| Parameter | Meaning |
|---|---|
e= | The product line. e=BYBITSPOT is spot. |
s= | The symbol, for example s=BTCUSDT. Required. |
b= | Side: b=buy or b=sell. Required, no default. |
q= | Quantity, in base units (the BTC in BTCUSDT), for example q=0.001. A percent of balance works (q=50%), and u=currency reads it as a notional amount. Defaults to 100% of balance when omitted, so set it on every order. |
u=currency | Read q= as a notional amount in the quote currency. q=20 u=currency commits about 20 USDT, which Bybit converts to the base quantity at the current price. |
t= | Order type: market, limit, ioc (immediate-or-cancel), fok (fill-or-kill), or post (post-only maker). Defaults to limit. |
fp= / p= | Limit price. fp= is a fixed, absolute price; p= is an offset from a reference price set with price=. |
fpx= / px= | Trigger price for a conditional entry. fpx= is absolute; px= is an offset. The order waits on Bybit until the market hits the trigger. See conditional entries. |
price= | The reference price the relative parameters (p=, px=) offset from. Use price={{close}} in a TradingView alert. |
c=order | Cancel your resting orders on the symbol. |
w= / y= | Move balances between account types. w= is the coin and y= the destination type. |
d= | Dry run. d=1 parses and reports the order but places nothing. |
Order types and what each resolves to
Here is each spot order type with the command on the left and the order Bybit actually built on the right. These are the same five order types you get on perpetuals; spot supports the full set.
| Command | Bybit resolves |
|---|---|
e=BYBITSPOT s=BTCUSDT b=buy t=market q=0.001 | Market buy, time-in-force immediate-or-cancel. |
e=BYBITSPOT s=BTCUSDT b=sell t=limit fp=200000 q=0.001 | Limit sell at 200000, good-till-cancelled. |
e=BYBITSPOT s=BTCUSDT b=buy t=ioc fp=60000 q=0.001 | Limit at 60000, immediate-or-cancel: fills what it can at once and cancels the rest. |
e=BYBITSPOT s=BTCUSDT b=buy t=fok fp=60000 q=0.001 | Limit at 60000, fill-or-kill: fills in full at once or not at all. |
e=BYBITSPOT s=BTCUSDT b=buy t=post fp=60000 q=0.001 | Post-only limit at 60000: it joins the book as a maker order and is rejected rather than crossing the spread. |
Spot prices a market order in the coin you are trading. A market buy of q=0.001 buys 0.001 BTC, and a market sell of q=0.001 sells 0.001 BTC. The quantity is always in the base coin, both ways. Spot also keeps prices within a band, so a limit set far from the current market is rejected rather than rested.
Conditional entries
A conditional entry waits for the price to reach a trigger before it places, and Bybit supports it on spot natively. Add fpx= (absolute) or px= (relative) to a market or limit order. The side stays as you wrote it, because this is an entry, not an exit.
| Command | Bybit resolves |
|---|---|
e=BYBITSPOT s=BTCUSDT b=buy t=market fpx=200000 q=0.001 | Conditional market buy that arms at 200000. The order rests with stopOrderType=Stop, the trigger intact, and shows as Untriggered until the market reaches it. |
e=BYBITSPOT s=BTCUSDT b=buy t=limit fp=205000 fpx=200000 q=0.001 | Conditional limit buy: arms at 200000, then rests a limit at 205000. |
A waiting conditional entry counts as a working order, so c=order cancels it like any other. Use a conditional entry to enter on a breakout, where you want the order to wait until the market confirms the move.
Sizing: base units, percent, and notional
q= sets the size, and it reads three ways.
- A plain number is base units.
q=0.001is 0.001 BTC onBTCUSDT, passed straight through. - A percent is a share of your balance, sized at the current price.
q=50%commits half of the relevant balance. - With
u=currency, the number is a notional amount in the quote currency.q=20 u=currencycommits about 20 USDT, which Bybit converts to a small BTC quantity at the current price.
Leave q= off and Autoview uses 100% of the balance. This is the single most important line on the page. A buy with no q= spends your whole quote balance, and a sell with no q= sells your whole coin balance. Set the size you mean, explicitly, on every order, every time.
Cancelling and exiting
Spot has no positions, so there is nothing to close in the perpetual sense. You cancel resting orders, and you exit a holding by selling it.
| Command | Effect |
|---|---|
e=BYBITSPOT s=BTCUSDT c=order | Cancel your resting orders on the symbol, a waiting conditional entry included. |
e=BYBITSPOT s=BTCUSDT b=sell t=market q=0.001 | Exit a spot holding by selling the amount you want to release. |
Moving balances between wallets
Bybit keeps balances in account types, and a command can move balance between them. w= names the coin and y= names the destination.
e=BYBITSPOT w=USDT y=UNIFIED q=1That moves 1 USDT into the unified account. The amount follows the same rules as an order size, so set it explicitly.
What spot does not accept
This is the section to read before you move a perpetual alert to spot. Spot has no positions, no leverage, and no attached stop or target, and the way each one is refused differs. The accepted-then-dropped group is the dangerous one, because the order goes through without an error.
- Attached stop and target are rejected outright.
fsl=andftp=return an error on spot, because a spot order has no attached protective stop or target. Place a separate order instead. - Leverage and closing a position are rejected outright.
l=andc=positionreturn a clear error, because spot has no positions to lever or to close. Exit a holding by selling it. - Trailing stops, reduce-only, and close-on-trigger are accepted and then ignored. Send
fts=,ro=1, orcot=1on a spot order and Bybit accepts it without an error, then drops the parameter: the trail is not set and the flags stay off. The order rests as a plain limit. On spot, treat those three as not available, even though the order goes through. - No
c=all, and one command, one account. Cancel withc=order; you cannot list several accounts witha=acct1,acct2.
The honest summary: on spot, stick to the order types, conditional entries, and sizing. Market, limit, immediate-or-cancel, fill-or-kill, post-only, a conditional trigger, and your choice of size are the spot surface. Anything that protects or manages a position belongs to the perpetual surface, e=BYBIT, covered in the Bybit perpetuals command reference.
Testing and going live
Append d=1 to any command and Autoview parses it, reports what it would have done, and places nothing:
e=BYBITSPOT s=BTCUSDT b=sell t=market q=0.001 d=1That is the safest first run for a command you have just written. Read the log, confirm the symbol and side are right and the size is what you meant, then drop d=1 to send it for real. Bybit spot orders are real money from the first fill on the live exchange, so keep your first live size small and grow it once the alert behaves. For more on reading the log, see test and debug your setup.