Skip to content

Instantly share code, notes, and snippets.

@noelrocha
Last active February 12, 2026 20:36
Show Gist options
  • Select an option

  • Save noelrocha/174da7433319b680d63739be49dcb9ba to your computer and use it in GitHub Desktop.

Select an option

Save noelrocha/174da7433319b680d63739be49dcb9ba to your computer and use it in GitHub Desktop.
Placing TP Order
The problem.
If I create two or more positions without inline TP and then select any open positions except the first on and try to create a TP order, the tp order is always linked with the first open position.
Follow in the comments the step by step to reproduce.
@wardamussa
Copy link

Hello NK,

This is SAJAD from Telegram (@sirjady_y). This is my GitHub account.

When you send the TP request in Step 2, please try setting the TP order explicitly with reduceOnly=true in the request parameters. This will allow us to see how the system responds and what the result will be.

After you have tested it with reduceOnly=true, please document the subsequent screenshots and share them here if it does not work. If it works, just let me know via Telegram. I will know what to do next.

Do not give up you are on the right track. If this does not work, I will escalate the issue to the development team.

@noelrocha
Copy link
Author

Setting the reduceOnly=true, it give the following error. The account is configured as SEPARATE ISOLATED MARGIN and Im forced to use Hedge Mode:

{ "code": 109400, "msg": "In the Hedge mode, the 'ReduceOnly' field can not be filled.", "data": {} }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment