question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to create a close order in Bybit BTC/USDT market??

See original GitHub issue
  • OS: Window10
  • Programming Language version: Python 3.8
  • CCXT version: latest version
What function should i use to make the close order in Bybit BTC/USDT market??
Open Long : create_limit_buy_order('BTC/USDT', Qty, Price) 
Open Short : create_limit_sell_order('BTC/USDT', Qty, Price)
Close Short : ??????
Close Long : ??????

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
moki2744commented, Mar 19, 2021

Thanks, it works very well!!!

1reaction
moki2744commented, Mar 18, 2021

For example, If I have 3bit long position but I want to make 2bit long position. Then, I have to make 1bit close order for the 3bit long position. (Position : 2bit Long → Good!!) But, If I use the create_limit_sell_order, it makes the new 1bit short position and 3bit long position is still alive. (Position : 3bit Long + 1bit Short → Bad!!)

I just want to decrease the Qty of my Long position But it makes another Short position. Is there any way to solve this problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Close a Trade on Bybit
1. Click the “+Add” button under TP/SL (web). Click “Set TP/SL” (app) · 2. To enter a Take Profit order: Enter the take...
Read more >
BTCUSDT | Bybit Spot Trading
Buy, sell, and trade BTCUSDT securely with Bybit's spot exchange. Trade with confidence and enjoy ... Limit & Market Orders; TP/SL Order; Conditional...
Read more >
Introduction to Take Profit and Stop Loss (TP/SL) - Bybit
Order Execution Logic After Trigger Price is Met. Entire position is closed using a market order. A portion of the position is closed...
Read more >
How to Trade on Spot - Bybit Official Help
For traders who use the web, please go to Current Orders → Limit & Market Orders to view order details. 14.png. Traders using...
Read more >
Bybit | USDT Perpetual Contracts
Grab up to 200,000 USDT in Bonuses Today! Contract Details BTCUSDT. Expiration Date. Perpetual. Index Price.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found