KuCoin Learning Center
652 subscribers
150 photos
5 videos
10 files
164 links
Kucoin Learning Center (API Knowledge)

Discussion Group: https://t.me/KuCoin_API
API Notification Channel: https://t.me/KuCoin_API_Notify
Download Telegram
General FAQ Book

In this book, a collection of general users questions have been gathered.

Click HERE

Version 1.0

Kucoin Learning Center
πŸ† Last Chance for wining a Prize

Don't miss your last chance to take part in our survey and win a prize.πŸŽ–πŸ…πŸ΅

It is easy and just takes 3 Minutes to be completed.

You can find the form and more explanations HERE

Kucoin Learning Center
πŸ”…Where to start with KuCoin API

KuCoin API provides the possibility of getting connected to trading features of SPOT, MARGIN and FUTURE sections of trading platform via application interface. You can use it for the following goals:
1. Using Third Part trading platforms
2. Making a trading Bot
3. Making your own trading panel
4. Making a trading phone application
5. Running a broker

In all of above cases, you need to have some knowledge of basic programming and API understanding. You need also to be familiar with HTTP Request Methods. KuCoin uses REST API and WebSocket standards.

πŸ“šGeneral Guide
βœ… Choose your desire SDK
βœ… Check the Help Doc and GitHub page of that SDK to see the demo description
βœ… Start coding and implement your code first on Sandbox environment (Spot and Future)
βœ… Debug your code, get support from API Group
βœ… Move to Production environment

Full Sources are HRER

KuCoin Learning Center
Next KuCoin API AMA is coming.

πŸ›Ž Stay tuned ...


KuCoin Learning Channel
⏰ Timestamp

Selecting a Timestamp
The UNIX timestamp is an integer that represents the number of seconds elapsed since January 1 1970.
Example: 2022-01-17 00:00:00 UTC -> startAt:1642377600000

KC-API-TIMESTAMP header MUST be number of milliseconds since Unix Epoch in UTC. e.g. 1547015186532

Decimal values are allowed, e.g. 1547015186532. But you need to be aware that timestamp between match and order is nanosecond.The difference between your timestamp and the API service time must be less than 5 seconds, or your request will be considered expired and rejected. We recommend using the time endpoint to query for the API server time if you believe there may be time skew between your server and the API server.

K-Line data
To get the kline of the specified symbol, times are also the timestamp.

How to get local timestamp
you can use this tool to convert your local times zone to Epoch Unix Timestamp. CLICK HERE

How to get Network Time Protocol (SNTP)
Click HERE

How to get the current timestamp in JavaScript
Trading Fees Level

You can read and see the table for the fee levels HERE

KuCoin Learning Channel
Latency
Latency is the time it takes for data to pass from one point on a network to another. Suppose Server A in New York sends a data packet to Server B in London. Server A sends the packet at 04:38:00.000 GMT and Server B receives it at 04:38:00.145 GMT. The amount of latency on this path is the difference between these two times: 0.145 seconds or 145 milliseconds.
The amount of time it takes for a response to reach a client device after a client request is known as round trip time (RTT). RTT is equal to double the amount of latency, since data has to travel in both directions β€” there and back again.

Most reasons of Latency
1. Distance
2. Internet infrastructure equipment
3. The more networks that an HTTP response needs to pass through

How to reduce Latency
1. Use of a CDN (content delivery network)
2. Minimize render-blocking resources
3. Providing more Band-width
4. Avoiding using VPN
5. Using a VPS near to server location
(KuCoin API server is located in AWS Tokyo zone A (subnet ap-northeast-1a)
πŸ’₯πŸ’₯KuCoin Second API AMAπŸ’₯πŸ’₯

The Next KuCoin API AMA is loading...

This is the second AMA. The first one was organized on 15th Dec 2021.

AMA will happen on last Wednesday of every month.

This month AMA Date: 26 of Jan 2022, next Wednesday.

πŸ›ŽWe will have Gifts for those who join us thereπŸŽ–

The details of AMA will be announced soon...

KuCoin Learning Channel
πŸ—’Reason for Cancellation of Futures Orders

When trading on KuCoin Futures, you may encounter one of the following circumstances that could lead to the cancellation or failure of your orders:

1. The order is canceled by user. / Stop Order Cancel: cancel stop order setting
2. Executed the preset IOC
3. Executed the preset PostOnly
4. No contra order in the market
5. The position is taken over by the liquidation engine
6. No position opened, the close order is canceled
7. Batch Stop Order Cancel: Position Liquidation
8. No contra orders in the specified price range
9. Order margin insufficient
10. The position is being auto-leveraged (ADL)
11. No-margin-frozen position size exceeded the current position size
12. Batch Stop Order Cancel: Position change to 0 or reverse side
13. Batch Stop Order Cancel: BrawlStars Finish

Read Full Article Here

KuCoin Learning Center Channel
Types of advanced orders in Futures

Supported types: Hidden, Post Only, and Reduce Only. Guide for UI Website

On API
1. reduceOnly: A mark to reduce the position size only. Set the position size when reduceOnly is true. (optional) (default=false)
2. postOnly: Post only flag, invalid when timeInForce is IOC. When postOnly chose, not allowed choose hidden or iceberg.
3. hidden: Orders not displaying in order book. When hidden chose, not allowed choose postOnly.

Description
1. Post Only: When selected, the order will not execute immediately against the market, and thus a maker fee is ensured. If it crosses the market, it will be canceled instead.
2. Reduce Only: A Reduce-Only order will only reduce your position (does not require margin to be frozen). If the order would increase your position, it is amended down or canceled automatically.
3. Hidden: A hidden order is normally a large single order that has been divided into smaller limit orders, for the purpose of hiding the actual order quantity.
How to Manage Position Risk in KuCoin Futures

In Futures it is of vital importance to manage the position risk. Following are 3 ways to control the position risks.

When will the position bear high risks?
a)When the mark price is close to the liquidation price
b)When the profit rate is negative
c)When you receive the liquidation alert sent by the system
To control risks, you can simply increase the margin and lower the leverage to avoid the mark price reaching the liquidation price and therefore reduce the margin loss. When the market reverses, you can even turn the loss to profit!


How to control position risk?
a) increase margin b) reduce or close positions c) set take profit and stop loss.

Watch on Youtube

Full Content
Funding Rate
The funding rate is a unique feature for the Perpetual contract to reduce the price difference between the Perpetual contract market and the Spot market, and the rate is based on the position value. It can influence the position PNL or even the liquidation price.
The funding mechanism can make the Perpetual contract price anchor to the spot one.

The funding fee is settled between users who go long and those who go short; the platform will not charge for it. When the funding rate is positive, the long pay the short; if the rate is negative, the short pay the long.

How to Control Position Risk
1. Close positions before the settlement time
2. Control leverage when placing an order

Calculation

Funding Fee = Position Value * Funding Rate

The position value is determined by the mark price at the settlement time

Full Content
API FAQ V 1.5 .pdf
407.1 KB
KuCoin API FAQ Book V1.5 is released.
You can find answers to some of most asked questions by users here.
πŸ”₯KuCoin API AMA with Prizes and GiftsπŸ”₯

πŸ’₯We are pleased to announce our Second API AMA on KuCoin API Programming GroupπŸ’₯β˜„οΈ

πŸ’ΈπŸ’΅In this AMA, there’s a 1000 USDT prize pool waiting for you to share! Including 2 big red envelopes and 5 USDT per user for the best questions from the KuCoin API AMA Questionnaire form or free asking in AMA, first served!πŸ…

⏰ Time: Wednesday January 26th, 2022 at 4:30 P.M (UTC)
Add to Google Calendar
βŒ›οΈ Duration: 35 minutes

πŸ”΅ Where: KuCoin Programming Group (Text AMA) and Learning Center Channel (Voice AMA)


βœ… You need to be a member of our main API Telegram Group
βœ…
You should be a KuCoin user. If not, register HERE
βœ… You can submit your questions to be answered during AMA via this Question Form

πŸ’₯Good Questions will have rewardsπŸ’₯

We can't wait to meet you there🌷

🎀Agenda

Part 1️⃣ A brief talk about KuCoin API and some users questions and upcoming events.

Part 2️⃣ An overview on recent changes and upgrades
Part 3️⃣ AMA and Free Talk

KuCoin Learning Center channel
πŸ’₯πŸ’₯πŸ’₯
Less than one hour has left to our AMA...

Get ready for the awesome AMA.

Where

1. Text AMA in Kucoin API Programming Group

After that...

2. Voice AMA in KuCoin Learning Channel

See you soonπŸ˜ƒ

KuCoin Learning Center channel