KuCoin market buy order types
See original GitHub issue- OS: Windows
- Programming Language version: python
- CCXT version: 3.18.387
- Exchange: Kucoin
- Method: create market buy order
Kucoin’s API allows two types of market orders (link here) by specify either one of the two (not both):
- specify ‘size’ = base currency amount, e.g. how much BTC one wants to buy in the BTC/USDT pair;
- specify ‘funds’ = quote currency amount, e.g how much USDT one wants to spend to buy BTC.
The latter is very handy in creating market buy orders, since one does not need to analyse the order book to find out how much base currency he is able to buy, with the quote currency he’s got. But the option seems to be not enabled in the kucoin.py code (from line 542), i.e. one can only specify ‘size’:
def create_order(self, symbol, type, side, amount, price=None, params={}):
self.load_markets()
marketId = self.market_id(symbol)
# required param, cannot be used twice
clientOid = self.uuid()
request = {
'clientOid': clientOid,
'side': side,
'size': self.amount_to_precision(symbol, amount),
'symbol': marketId,
'type': type,
}
would be great to enable the second market order type as well, thanks very much!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Spot Trade: Order Types - KuCoin
1. Limit Order: A “Limit Order” is an order placed to buy or sell a specified quantity of assets at a specified limit...
Read more >Order Types Included in KuCoin Futures Trading
KuCoin supports three type orders currently: Limit Order, Market Order, Stop Order. Limit Order: A limit order is an order placed to buy...
Read more >Stop Limit & Stop Market & Stop Loss in Futures Trading
There are three trigger types for stop order on KuCoin Futures: 1) Last price, 2) Mark price and 3) Index price. When the...
Read more >How to Make a Trade on KuCoin
KuCoin is built for all types of investors. ... Select Market Order, enter 1000 USDT in the amount box, then click Buy KCS...
Read more >What Advanced Types of Order Are Included on Futures ...
We only support three types of advanced orders currently: Hidden, Post Only, and Reduce Only. Users may set the advanced types of orders...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@lampardlb no worries, will resolve it anyway, thx, really appreciate your reporting!
@kroitor Thanks for your reply - you should take some rest in the weekend mate! I’m a bit embarrassed to say that I do not know how to run github properly, and do not know js… I’ve modified the python codes in kucoin.py (by just removing ‘size’ out of ‘request’ initialisation to allow ‘funds’ in params), hope these can somehow help a little: