There doesn't seem to be an endpoint for an OCO order or stop limit order in the kucoin api. I can place the stop loss order as a limit order but it is never fulfilled as the funds are held up in the limit sell order. Has anyone found a way around this?
I am trying to place a limit order with a stop loss in python with the kucoin api
467 Views Asked by Patrick Dillon At
2
There are 2 best solutions below
0
Benjamin Gichuru
On
def set_stoploss(symbol,side,lever,size,price):
try:
return client_trade.create_limit_order(symbol=symbol,side=side,lever=lever, size=size,price=price,stopPrice=price,stop='down',stopPriceType='TP',reduceOnly=True)
except Exception as e:
print('set_stoploss():: '+str(e))
print(set_stoploss("LUNCUSDTM",'buy',90,1,0.00014))
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in LIMIT
- Almost empty git repo has huge size
- Limit object movement to one axis only in Powerpoint
- Why is this PostgreSQL query with LIMIT so slow?
- Why does Elastic search limit the maximum shard number to 1k per node?
- AWS S3 presigned Url > 5gb limit
- Android bluetooth GATT connection limit per OS
- python input() function cuts off really long inputs
- Can images be blocked from being pushed to Harbor based on the number of artifacts for that image?
- How to pass arguments for LIMIT and OFFSET in a Snowflake SQL stored procedure?
- MySQL-Query with LIMIT 25 is slower?
- SecurityException: The number of child package elements exceeded the max allowed in queries
- Error: max retries exceeded:get Get "https://xyz.z2.cloudflarestorage.com/ollama/docker/registry/v2/blobs/sha256/78/numbers/data?X-A-Algorithm=xyz&xy
- In C, why can I not cast pow(2,64) to an unsigned long?
- SQLite: how to LIMIT a subquery for GROUP_CONCAT
- Are there any ways to set disk size limit for each docker container?
Related Questions in KUCOIN
- JS KuCoin API - Invalid KC-API-SIGN - How to do the signature
- Kucoin Spot Trading Balance Retrieval Error: Invalid KC-API-SIGN (400005)
- how to set a stop loss for a future position in Kucoin using python
- Create order with Python script in kucoin return kc invalid sign
- Invalid KC-API-SIGN error with Kucoin API
- Kucoin API error 401: Unauthorized -- Invalid API Key
- Kucoin Futures order has been canceled. Caused by: Cannot close a position of size 0
- How can I get a closed trade data from Kucoin Futures account using ccxt?
- Get sub-account's Futures account balance using KuCoin API and Google Apps Script
- Can't create Kucoin private token with C#
- KuCoin get STOP ORDER status
- Python code to make spot order with Kucoin api
- I am trying to place a limit order with a stop loss in python with the kucoin api
- Issue with KuCoin Futures API to create limit order
- Unable to create order in kucoin futures from python
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
KuCoin API doesn't support OCO orders yet, but you can place your order normally then use STOP orders for your stop loss or take profit orders, and STOP orders doesn't freeze assets, so you're good to go.
Place a new order: https://docs.kucoin.com/#place-a-new-order Place a stop order for stop loss / take profit: https://docs.kucoin.com/#stop-order