PositionSide decides which direction a position is allowed to face. On Binance Futures it is an account-level position mode — one-way or hedge — that governs how the exchange books your orders. Inside HafizeBot it is the /setPositionSide command, which takes LONGONLY, SHORTONLY or BOTH and decides which half of the signal stream is permitted to reach your account at all.
They are two separate switches sharing a name, and mixing them up is the commonest reason a working bot suddenly has every order rejected. This page separates them, then explains when narrowing to one direction is a decision rather than a guess.
PositionSide means two things — separate them first
The exchange-side setting is Position Mode. It lives in your Binance Futures preferences, applies to the whole USDT-M account rather than one symbol, and has two states: one-way and hedge. It answers can this account hold a long and a short in the same contract at once?
The bot-side setting is a direction filter, answering a different question: of the signals arriving, which am I willing to have opened on my behalf? It changes nothing on Binance. It drops signals pointing the wrong way before an order is sent.
One-way mode: one net position per symbol
One-way mode is the default on a new Binance Futures account and the simpler of the two. Each symbol carries one net position. Long 0.5 BTC and you sell 0.2 BTC, you are long 0.3 BTC. Sell 0.8 BTC and you are short 0.3 BTC — the position flipped; it did not split.
At the API level every one-way order carries positionSide=BOTH. The value misleads on first reading: it does not mean "trade both directions", it means "this order applies to the single position, whichever way it faces".
The practical consequences:
- Margin is held once, on the net size. A long partly offset by a sell frees margin immediately.
- Average entry price is recalculated as the position grows, and preserved when it merely shrinks.
- Stops can be marked
reduceOnly, so they can never accidentally open a position the other way round. - You cannot express two views at once. A long-term long and a short-term short in the same contract collapse into one number.
Hedge mode: a long and a short at the same time
Hedge mode lets one symbol hold two independent positions, long and short, each with its own entry price, margin and liquidation price. Every order must state its leg: positionSide=LONG or positionSide=SHORT. There is no netting — a sell tagged SHORT against an open long opens a second position rather than reducing the first.
reduceOnly is not accepted in hedge mode, because it is redundant — order side plus position side already says whether you are opening or closing a leg. Bots written for one-way mode that send reduceOnly unconditionally break the moment you flip the account over.
Hedge mode earns its keep in two situations: running more than one strategy on an account and keeping their positions separate, or freezing an open position's profit and loss without closing it. Neither is free insurance, as the section below explains.
How to switch position mode on Binance
The switch lives under Preference → Position Mode on the Binance Futures trading screen. Binance accepts the change only when the account is completely flat: no open USDT-M positions and no resting orders, stops and take-profits included. A single forgotten stop on an obscure pair is enough to have the change refused, and the error will not tell you which one.
The setting is per account and per margin family. Switching USDT-M futures to hedge mode does not touch COIN-M, which keeps its own. And because it covers every USDT-M symbol at once, you cannot run one pair in hedge mode and the rest in one-way.
If your bot is connected, turn autotrading off first, change the mode, then turn it back on and place one small manual order to confirm it is accepted. Two minutes, and it saves a session of rejected orders.
What LONGONLY, SHORTONLY and BOTH do
Now the bot side. /setPositionSide accepts exactly three values:
LONGONLY— only signals pointing up are acted on. Short signals arrive, are logged, and are discarded without an order.SHORTONLY— the mirror image. Only signals pointing down produce orders.BOTH— every signal that clears your other limits is acted on, in whichever direction it points.
Two things it does not do get assumed constantly. It does not change your Binance position mode — you do that yourself, on the exchange. And it does not close anything you already hold: switching from BOTH to LONGONLY while a short is open leaves that short exactly where it was and only stops new ones being opened.
Using /setPositionSide and /myPositionSide
The commands are typed into the bot chat exactly like this:
/setPositionSide LONGONLY
/setPositionSide SHORTONLY
/setPositionSide BOTH
/myPositionSide
The value is one word, uppercase, one space after the command. /myPositionSide takes no argument and replies with whichever of the three is active. Type it after every change: the failure mode nobody expects is a setting you believe you changed and did not.
Direction is one link in a chain, and not the first. A signal clears your minimum strength setting, then direction, then coin filters, then your cap on simultaneous positions. Only what survives all four becomes an order. Seeing fewer trades than expected? Check the whole chain — the autotrader walkthrough covers the other settings in order.
What happens when BOTH meets an opposite signal
This is where the two settings collide, and it surprises people.
With the bot on BOTH and the account in one-way mode, a short signal on a symbol you are already long does not open a short. Binance nets it. A 0.2 BTC sell against an open 0.5 BTC long leaves you long 0.3 BTC. You have not taken a short trade; you have partially closed a long, paid the fees for doing so, and changed your exposure in a way you did not plan.
Signals can point different ways on different horizons — a pair can look constructive on a daily view and broken on a five-minute one — and one-way mode has nowhere to put the second view except into the first position.
In hedge mode the same sell opens a separate 0.2 BTC short leg. The long stays intact, with its own entry and liquidation price. Both legs run to their own exits.
Neither behaviour is wrong. But if you run BOTH, know which one your account does: the difference shows up in your balance rather than in any message from the bot.
When restricting direction is the right call
Restricting direction is a bet that you know something about the regime a per-signal filter does not. Sometimes you do. The honest cases:
- A structural view you actually hold. If you are accumulating an asset over years and will not be short it,
LONGONLYmakes your automation agree with the rest of your portfolio instead of quietly fighting it. - A regime you have already been burned by. Traders squeezed out of shorts in a strong uptrend often set
LONGONLYfor the duration — not because shorts cannot work, but because they know they will manage them badly. - Tax or accounting constraints. Some jurisdictions and some employers treat short positions differently. That beats any market view.
- A test you are running. Isolating one direction for a set period shows how that half of the stream behaves in the conditions you actually trade.
What is not a good reason: a hunch about next week. Regimes are far easier to name after they end, and a lock held on a hunch usually ends up inverted at the worst moment.
What restricting direction costs you
The cost is arithmetic you can redo yourself. If a month's signals split 55 long to 45 short, LONGONLY acts on 55 of every 100 and SHORTONLY on 45. The bars use that illustrative split; the real one moves with the period, and in a hard downtrend it inverts.
Three consequences follow from cutting the stream roughly in half:
- Fewer trades means a noisier result. Halve the sample and the gap between a good month and a bad one widens, even if the signals never changed.
- You are concentrated in one regime. A long-only account has no offset at all when the market turns; the whole book moves together.
- The filter has no expiry. A lock set in a bull market stays set through the bear market unless you remember it.
/myPositionSideexists partly for this.
To reduce risk without giving up half the stream, the other levers are usually better: smaller position size, a lower cap on simultaneous positions, a higher minimum strength. Understanding financial risk is worth reading first, because size and direction are not interchangeable.
The risk claim this page used to make, corrected
An earlier version of this article repeated a familiar line: that going long risks only what you invested while going short exposes you to unlimited losses. On Binance USDT-M perpetual futures that is wrong, and it is worth being precise about why.
A short in an equity margin account can in principle run against you without limit, because nothing forces it closed. A perpetual futures position is collateralised and liquidated: under isolated margin your loss is capped at that position's margin, under cross margin at your wallet balance. The exchange closes you out long before either side becomes unbounded.
At the same leverage, the distance from entry to liquidation is roughly symmetric. Where real asymmetry exists it is smaller and more specific than the folk version:
- A price can only fall to zero, so a short's maximum gain on the notional is bounded while a long's is not. That caps profit, not loss.
- Funding is positive more often than negative on perpetuals, so longs pay shorts most of the time — a small persistent drag on one side, a small credit on the other.
- Upside squeezes move faster than declines in thin crypto markets, so a short is likelier to meet its liquidation in one violent candle than in a slow drift.
Those are the trade-offs worth planning around. "Unlimited losses" is not one of them here, and believing it leads people to size shorts too small and longs too large.
Hedge mode is not a free hedge
A perfectly hedged pair — equal long and short in the same contract — has an unrealised profit and loss that barely moves. It is not free, and it is not risk-free.
You paid entry fees on both legs and will pay exit fees on both, and you hold margin against two positions instead of one — capital that cannot back anything else. Funding is paid on one leg and received on the other, so it roughly nets out, but "roughly" is doing work: the legs opened at different prices and that gap is locked in. Most of the time, simply closing the position achieves the same thing with fewer moving parts.
When Binance rejects the order: -4061 and friends
The classic symptom of a mismatch is Binance error -4061, "Order's position side does not match user's setting" — the order named a position side the account is not in: a LONG tag sent to a one-way account, or a BOTH tag sent to a hedge account. Nothing is broken; the two settings disagree.
You will also meet -4059, "No need to change position side" — what the exchange returns when you ask it to switch to the mode it is already in. Harmless, and usually means a script ran twice.
The fix is the same both times: decide which mode you want, make the account flat, set it once on Binance, confirm the bot side with /myPositionSide. If you are still setting up access, the Binance API key guide covers which permissions to enable — and the one that must stay off.
Where direction sits among your other limits
Direction is one of several limits you set yourself, alongside minimum signal strength, position size, the cap on simultaneous positions, and which coins are eligible at all. Autotrading runs on API keys that cannot withdraw, so funds stay on your own Binance account — a crypto trading bot asking for withdrawal rights is asking for something it does not need.
The signals are AI-generated: a model evaluating 240+ indicators, formulas and components across 500+ Binance USDT-M perpetual pairs, rating each call by strength. How it weighs any of that is proprietary. What is public is the record — 33 monthly spreadsheet reports covering June 2021 to February 2024 and 33,694 signals, at a median monthly accuracy of 98.9% as reported in those sheets, downloadable from the reports archive. Since June 2026 the live performance page is rebuilt hourly from the trade database, with expirations counted against the hit rate and losing months shown as they happen.
You can watch the same calls before committing anything: the free channel at t.me/getbinancefutures carries them on a twenty-minute delay, with around 3,980 members as of August 2026. Apply your direction filter there in your head first, and see how a month of one-sided trading would have felt.
This is information, not investment advice. Restricting direction changes which risks you take, never how large they are — trade only what you can afford to lose, and size on the assumption that the next position is one of the losing ones.
FAQ
What is position side on Binance Futures?
It is the account-level setting deciding whether a symbol can hold one net position or two opposing ones. One-way mode gives a single position per contract, every order tagged BOTH. Hedge mode lets a long and a short coexist, every order tagged LONG or SHORT.
What is the difference between one-way mode and hedge mode? One-way mode nets opposing orders, so selling into an open long reduces or flips it. Hedge mode keeps the legs separate, each with its own entry, margin and liquidation price. One-way is simpler and cheaper; hedge mode is for when you genuinely need two positions at once.
How do I enable hedge mode on Binance? Open Preference → Position Mode on the Binance Futures screen. The account has to be completely flat first: no open USDT-M positions and no resting orders of any kind, stops included. The change applies to every USDT-M symbol at once, and COIN-M futures keeps its own setting.
What does /setPositionSide LONGONLY do? It tells the bot to act only on signals pointing upward and discard short signals without sending an order. It does not touch your Binance position mode, and it does not close a short you already hold.
Why is my bot's order rejected with error -4061?
Because the order's position side does not match the account's mode: a LONG or SHORT tag sent to a one-way account, or a BOTH tag sent to a hedge-mode account. Make the account flat, set the mode you want on Binance, then confirm with /myPositionSide.
Should I trade long only in a bull market? Only if you hold that view for reasons that will still be there next month. A direction lock halves your sample, concentrates the book in one regime, and stays set after the regime ends unless you remember it. Size and position caps are usually better levers.