KuCoin Futures command reference
This page lists every command parameter Autoview reads for KuCoin Futures, and what each one does there. Autoview takes a webhook from whatever sends it: a charting alert, a script, your own server. The command inside that webhook is what this page covers. KuCoin Futures is its own connection with its own API key, so if you've only set up spot, start with getting started with KuCoin and then add a futures key the same way.
We built this list by reading Autoview's KuCoin Futures connector line by line. If a parameter isn't here, the connector doesn't read it. These commands were not run live for this page, so send each one with d=1 first and read the log before you trade.
Use KuCoin's contract names: XBTUSDTM for the bitcoin USDT perpetual, not BTCUSDT. Every example below ends in d=1, which builds the order and sends nothing. Remove it only when the log shows what you meant.
The basics
A command is one line of key=value pairs separated by spaces. The order of the pairs doesn't matter. Here is a limit buy of 1 lot, 2% under the market, at 5x leverage:
e=kucoinfutures s=XBTUSDTM b=buy p=-2% q=1 l=5 d=1e=kucoinfutures tells the Chrome extension to route the order to KuCoin Futures. kucoin-futures works too. Plain e=kucoin goes to the spot connection instead. On the webhook platform the webhook already belongs to your KuCoin Futures account, so you can leave e= off.
Three parameters need care on every order. b= is required; without it the command fails. q= defaults to 100% of your free margin, so set it every time. l= defaults to 1, so write the leverage you mean.
Parameter table
| Parameter | What it does on KuCoin Futures |
|---|---|
e= | Routes the command to KuCoin Futures on the Chrome extension. Accepts kucoinfutures or kucoin-futures. |
a= | Picks which saved KuCoin Futures key to use, by the name you gave it. Leave it off if you only have one key. |
s= | The contract, for example s=XBTUSDTM. Autoview checks it against KuCoin's list of active contracts and rejects one it can't find. |
b= | Side: buy or sell. long and short work the same way. Required. |
t= | Order type: limit (the default), post, market, or ioc. fok returns an error. |
p= / fp= | Limit price. p= is an offset from the current best price, fp= is a fixed price. |
q= | Size in lots. A percent like q=25% uses that share of your free margin, times your leverage. |
u=currency | Reads q= as an amount of the quote coin instead of lots. |
y=equity | Makes a percent q= count your account equity, not only free margin. |
l= | Leverage sent with the order. The default is 1. |
lt= | Margin mode: lt=isolated or lt=cross. Left off, Autoview sends nothing and KuCoin uses isolated. |
ro= | ro=1 makes the order reduce-only. |
id= | Your own order ID, sent as KuCoin's client order ID. Also a filter for c=order. |
h= | h=100% hides a limit order from the book. A smaller value makes an iceberg that shows only that share. |
sl= / fsl=, tp= / ftp= | Turns the order into a stop order with a trigger price. See stop orders. |
pxs= | Which price fires a stop order: last (the default), mark, or index. |
c=order | Cancels open orders on the contract, stop orders included. |
c=position | Closes open positions on the contract. |
cm= / cmo= | Cancel or close only some. cm= is how many, cmo= is which ones, such as oldest or newest. |
d= | d=1 builds the order, logs it, and sends nothing to KuCoin. |
Order types
| Command | What Autoview sends |
|---|---|
e=kucoinfutures s=XBTUSDTM b=buy p=-2% q=1 d=1 | A limit buy 2% under the best bid, good until cancelled. t=limit is the default. |
e=kucoinfutures s=XBTUSDTM b=buy t=post p=-2% q=1 d=1 | A post-only limit. KuCoin cancels it rather than let it fill as a taker. |
e=kucoinfutures s=XBTUSDTM b=sell t=market q=1 d=1 | A market sell of 1 lot. |
e=kucoinfutures s=XBTUSDTM b=buy t=ioc p=0.1% q=1 d=1 | A limit buy, immediate or cancel. Whatever doesn't fill at once is cancelled. |
With no p=, a limit buy sits at the best bid and a limit sell at the best ask. The sign of p= is the direction: p=-2% is 2% lower, p=50 is 50 higher. fp= sets a fixed price. Autoview rounds the price to KuCoin's tick size for the contract.
h= only applies to limit orders, and KuCoin won't take it together with t=post.
Sizing in lots
KuCoin sizes futures orders in lots, and each contract has its own lot value. On some contracts one lot is a small slice of a coin, so check the contract's multiplier on KuCoin before you write a number.
- A number is lots.
q=3is 3 lots. - A percent is a share of your free margin, with leverage. Autoview reads your balance in the contract's settle coin, multiplies by
l=, and converts to lots at the order price.y=equityuses your equity instead. - With
u=currency, a number is quote coin.q=100 u=currencyonXBTUSDTMis about 100 USDT of bitcoin, converted to lots.
Autoview rounds the size to whole lots. A size that rounds to zero comes back rejected.
Leverage and margin mode
l= goes out with every order, and it also scales percent sizing. Without it, Autoview sends 1.
lt= sets the margin mode on the order. Write lt=cross or lt=isolated to match how the contract is set on your KuCoin account. Without lt=, Autoview leaves the field off and KuCoin's API treats the order as isolated.
e=kucoinfutures s=XBTUSDTM b=buy t=market q=10% l=3 lt=cross d=1Stop orders with sl= and tp=
On KuCoin Futures, sl= and tp= don't attach a bracket to a position. They make the order you're sending a stop order. KuCoin holds it until the trigger price is hit, then places it as a limit at p=, or at market with t=market.
The trigger direction comes from the side and from which name you use, not from where the price sits:
| Command has | Fires when the price |
|---|---|
b=buy sl= | falls to the trigger |
b=buy tp= | rises to the trigger |
b=sell sl= | rises to the trigger |
b=sell tp= | falls to the trigger |
So a protective stop under a long position is a sell that fires on a fall, which is b=sell tp= here:
e=kucoinfutures s=XBTUSDTM b=sell t=market tp=-5% q=1 ro=1 pxs=mark d=1Check the stop in the log before you trust it. sl= and tp= share one trigger field, so a command with both sends only tp=. Read the stop and stopPrice values in the d=1 output and confirm the direction is the one you want.
Cancelling orders
c=order cancels open orders on the contract. That covers regular orders and stop orders.
e=kucoinfutures s=XBTUSDTM c=order d=1Narrow it with these:
b=buyorb=sellkeeps one side.fp=keeps orders at that exact price.id=keeps one client order ID.l=keeps orders at that leverage.ro=1keeps reduce-only orders.t=limitort=marketkeeps one type.t=openskips stop orders,t=stopcancels only stop orders.cm=andcmo=cancel a subset.cm=1 cmo=oldestcancels just the oldest one.
Closing positions
c=position reads your open position on the contract and sends the opposite order for its size.
e=kucoinfutures s=XBTUSDTM c=position t=market ro=1 d=1- Without
t=market, the close goes in as a limit at the best price on its side, so it may not fill at once. q=here is a share of the position.q=50%closes half.b=longorb=shortcloses only that side.lt=closes only positions in that margin mode.- Add
ro=1so the close can never open a position the other way.
What KuCoin Futures doesn't support
These look like they should work and don't:
- No
c=allorb=flat. Both return an unsupported feature error. Usec=orderandc=positionas two commands. - No transfers.
w=returns an unsupported feature error. Move funds between spot and futures on KuCoin. - No fill or kill.
t=fokreturns an error. - No trailing stops or separate trigger orders. The connector reads no
ts=,px=, oret=. - Copy trading is separate. KuCoin Futures copy trading is another Autoview connection, not covered here.
When a command does something you didn't expect, put d=1 back on it and compare the log with this page. For more on reading the log, see test and debug your setup.