# How to Change the Okx’s Position Type to Long/Short Mode?

[Skip to content](https://www.antrade.io/guide/docs/en/okxs-to-long-short-mode/#content)[AntBot | Crypto Trading Bot](https://www.antrade.io/guide/docs/en/)[Free AntBot](https://antrade.io/)

* [Home](https://www.antrade.io/guide/docs/en)
* [Beginner](https://www.antrade.io/guide/docs/en/en-beginner/)
* [Learning](https://www.antrade.io/guide/docs/en/en-learning/)
* [Questions](https://www.antrade.io/guide/docs/en/en-questions/)
* [How to Change the Okx’s Position Type to Long/Short Mode?](https://www.antrade.io/guide/docs/en/okxs-to-long-short-mode/)

Search for:

BEGINNER

* * [How to Create Bitget API Key?](https://www.antrade.io/guide/docs/en/binding_bitget/)
  * [How to Create Gate.io API Key?](https://www.antrade.io/guide/docs/en/binding_gateio/)
  * [How to Create Kucoin API Key?](https://www.antrade.io/guide/docs/en/binding_kucoin/)
  * [Insufficient API Key Trading Permissions: How to Modify API Key Trading Permissions?](https://www.antrade.io/guide/docs/en/insufficient-api-trading-permissions/)
  * [How Do I Fill in an IP Address in Binance?](https://www.antrade.io/guide/docs/en/ip-address-of-binance/)
  * [Can Automated Trading Bots Really Make Money?](https://www.antrade.io/guide/docs/en/robots-make-money/)
  * [How are AntBot’s Initial Positions Calculated?](https://www.antrade.io/guide/docs/en/antbots-initial-positions-calculated/)
  * [Can API-Keys of Two Exchanges Be Imported Under One Account?](https://www.antrade.io/guide/docs/en/two-api-keys-under-one-account/)
  * [Binance Trading Fees](https://www.antrade.io/guide/docs/en/binance-trading-fees/)
  * [Binance Fee Calculator: How To Calculate Binance Fees?](https://www.antrade.io/guide/docs/en/binance-fee-calculator-how-to-calculate-binance-fees/)
  * [Can One Crypto Run Multiple Bots at the Same Time?](https://www.antrade.io/guide/docs/en/one-crypto-run-multiple-bots/)
  * [Which Robot Should a Novice Choose to Start and Which Crypto to Choose?](https://www.antrade.io/guide/docs/en/novice-choose-bot-and-crypto/)
  * [Why Is the Profit of AI Grid Different From the Profit of the Exchange?](https://www.antrade.io/guide/docs/en/the-profit-difference-in-ai-grid-and-exchange/)
  * [Why AntBot Doesn’t Get My Assets on the Exchange?](https://www.antrade.io/guide/docs/en/why-doesnt-get-assets/)
  * [Will AntBot Sell the Funds I Bought Manually on the Exchange?](https://www.antrade.io/guide/docs/en/will-antbot-sell-funds-i-bought/)
  * [What Should I Do About the Position Limit of the Exchange Account?](https://www.antrade.io/guide/docs/en/position-limit-of-exchange-account/)
  * [Why Is the Position not Added After the Price Has Reached the Position Increase Price?](https://www.antrade.io/guide/docs/en/why-is-position-not-added/)
  * [Can Energy Be Exchanged for USDT?](https://www.antrade.io/guide/docs/en/energy-exchange-usdt/)
  * [How Many Funds Do I Need to Start a Bot?](https://www.antrade.io/guide/docs/en/funds-to-start-bot/)
  * [How to Reduce Fee on Exchange?](https://www.antrade.io/guide/docs/en/reduce-fee-on-exchange/)

## How to Change the Okx’s Position Type to Long/Short Mode?

4 months ago[AntBot](https://www.antrade.io/guide/docs/en/author/antbot/)1 minute

Normally, if you have **no positions** in your **Okx’s account** when you use **AntBot** for the **first time**, the position type will automatically switch to **\[Long/Short mode]**, so that the robot can be **started** smoothly.

Of course, it cannot be ruled out that you may also encounter situations where **automatic switching cannot be performed**. Then you need to go to **Okx** to **manually select** the **\[Long/Short mode**] which supports long and short positions at the same time.

The following are the operation steps:

1\.

<figure><img src="https://antrade.io/guide/docs/en/wp-content/uploads/2022/11/1-4.jpg" alt=""><figcaption></figcaption></figure>

2\.

<figure><img src="https://antrade.io/guide/docs/en/wp-content/uploads/2022/11/2-3.jpg" alt=""><figcaption></figcaption></figure>

3\. Since AntBot opens long and short positions on the same crypto at the same time, it is necessary to choose **\[Long/Short mode**].

<figure><img src="https://antrade.io/guide/docs/en/wp-content/uploads/2022/11/3-4.jpg" alt=""><figcaption><p>Note: Position type applies to all futures and perpetual swap contracts. To adjust this mode, close all open positions or cancel pending orders.</p></figcaption></figure>

**\[Long/Short mode]**: You can place both open (long/short) and close (long/short) orders. This mode allows you to hold two-way positions.

**\[Buy/Sell mode]**: You can only place buy or sell orders, and hold one-way positions under either isolated or cross margin mode.

[#AntBot](https://www.antrade.io/guide/docs/en/tag/antbot/)[#Futures](https://www.antrade.io/guide/docs/en/tag/futures/)[#Long/Short Mode](https://www.antrade.io/guide/docs/en/tag/long-short-mode/)[#Okx](https://www.antrade.io/guide/docs/en/tag/okx/)@AntBot free trading bot\\


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.bfm-unity.org/antbot-doc/en/questions/how-to-change-the-okxs-position-type-to-long-short-mode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
