Questions tagged [kucoin]

For questions on the APIs provided by the cryptocurrency exchange KuCoin.

KuCoin is a global cryptocurrency exchange that offers a variety of features and trading options.

They offer a REST API and Websocket feed, for both spot trading and futures trading.

63 questions
0
votes
1 answer

I am trying to place a limit order with a stop loss in python with the kucoin api

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…
0
votes
1 answer

Issue with KuCoin Futures API to create limit order

I've been working on a python solution to create limit orders on with requests on KuCoin futures API. I've looked at the library: kucoin-futures-python-sdk, but I had issues with this so am testing with the provided example on the KuCoin Futures…
user2864591
  • 76
  • 1
  • 5
0
votes
0 answers

Why does the buy operation not change the account balance despite quote currency being available (after sell opertaion commenced first)?

if condition2 < condition1: # Call the function to get the account balances balances = get_balances() quote_balance = balances['quote'] base1_balance = balances['base1'] base2_balance = balances['base2'] …
qas2100
  • 61
  • 1
  • 4
0
votes
1 answer

Unable to create order in kucoin futures from python

I was wondering how i can create kucoin futures order with python. Any help would be appreciated I tried kucoin-futures documentation but it did not work
0
votes
0 answers

What is the equivalent of stepSize in the Kucoin api?

In the Binance API there is a value for every market pair called stepSize which is used for rounding the float values of cryptocurrencies. For instance, the BNB-USDT pair's stepSize is 0.0001, which means you can't submit a transaction with a value…
rihekopo
  • 3,241
  • 4
  • 34
  • 63
0
votes
0 answers

Unable to connect to Kucoin API using Secure WebSockets, JDK 17 and Vert.x

I'm trying to connect to the Kucoin API using Secure WebSockets (WSS). I'm using JDK 17 and Vert.x 4.3.8 (the latest version at this time). I followed the instructions here. So currently I have a basic app with two verticles: the first one uses a…
foundationer
  • 85
  • 2
  • 9
0
votes
2 answers

Kucoin API 'Invalid KC-API-SIGN'

api_secret etc. not left blank in run code. only to hide it here. get output : {'code': '400005', 'msg': 'Invalid KC-API-SIGN'} it works for other POST orders, eg. buy/sell. def borrow_margin(currency, amount): api_key = **************** …
0
votes
0 answers

Kucoin Exchange Api 400005 msg

I tried to make an exchange code in python for Kucoin.I checked that the Key,Secret are correct and the endpoint is correct so why do i get the error 400005?The Kucoin documentation says that there is a bug is the code but i cant see any bug. import…
0
votes
0 answers

Is it possible the use a dict as header in PyCurl?

I'm writing a trading bot for KuCoin in python, but I have trouble authenticating myself with the API. It is working fine when I use the requests library, but I want to use PyCurl instead, problem is when I switch to PyCurl I get "Invalid…
elapidae
  • 39
  • 4
0
votes
0 answers

How can I fix the error code 400600 on python-KuCoin API's?

I've been working on creating a trading bot for KuCoin using API's recently and have been getting into some small roadblocks. I overcame all except one which is an error code "400600" I've looked everywhere and can't even find a website or…
loserpcs
  • 1
  • 1
0
votes
0 answers

Why does Kucoin spot order URL seem to be causing KeyError?

I tried to create a simple trading execution code for one-time spot market buy order in Python (using Pycharm). The code is provided below. API key, API passphrase and API secret key are correct, as well as a signature encoded in base64. The problem…
qas2100
  • 61
  • 1
  • 4
0
votes
1 answer

Cannot serialize non-str key error with a function in async that did not have an issue when it was synchronous

I have an api request function that works properly. My signature serializes fine, and the api request will go through, but the moment i turn this in to an asynchronous function it gives me a serializing issue somewhere that is genuinely unaffected…
Liamdaniel
  • 11
  • 3
0
votes
1 answer

Is there any way to work in the Futures market with the kucoin or binance API

I am making a bot with python that works with the Kucoin api, but I would like to make orders with leverage and for this I need to access futures, but for now I have not found any library or any end point in the Kucoin api that let me access that…
0
votes
1 answer

How to set leverage for Kucoin futures using ccxt in Python?

I am trying to place a market order with the leverage of 20 but when the order is placed I am getting the leverage of 1. I placed the market order like this: exchange = ccxt.kucoinfutures({ 'adjustForTimeDifference': True, "apiKey": '...', #…
0
votes
1 answer

Run Websocket in a separate Thread, updating class attributes

I want to implement a class with the possibility to start various websockets in different threads to retrieve market data and update the class attributes. I am using the kucoin-python-sdk library to that purpose. The below works fine in spyder,…
user2518293
  • 43
  • 1
  • 4