KUCOIN API
HomeChange LogAPI DOC V2
Language
  • 繁體中文
HomeChange LogAPI DOC V2
Language
  • 繁體中文
SDK
Telegram
Kucoin
  1. Broker Pro
  • Introduction
  • Authentication
  • Enums Definitions
  • Terms Definitions
  • SDK
  • OpenClaw
  • Rate Limit Rule (UTA)
  • Rate Limit Rule (Classic)
  • Change Log
  • User Service
    • Market Making Incentive Scheme
    • VIP Fast Track
    • Broker Program
  • UTA REST V2
    • Introduction
    • Market Data
      • Get Announcements
      • Get Currency
      • Get Currencies
      • Get Ticker
      • Get Symbol
      • Get Klines
      • Get OrderBook
      • Get Index Price
      • Get Trades
      • Get Position Tiers
      • Get Collateral Ratio
      • Get Borrowable Currencies
      • Get Current Funding Rate
      • Get History Funding Rate
      • Get Futures Open Interest
      • Get Interest Rate Index
      • Platform 24h Market Statistics
      • Get Call Auction Info
      • Get Fiat Price
      • Get Third-Party Custody Currencies
      • Get Service Status
      • Get KYC Regions
      • Get Client IP Address
    • Account Info
      • Account & Funding
        • Get Account Overview (UTA)
        • Get Account Currency Assets (UTA)
        • Get Account Currency Assets (Classic)
        • Get Apikey Info
        • Get Account Mode
        • Set Account Mode
        • Get Leverage (UTA)
        • Modify Futures Leverage (UTA)
        • Modify Cross Margin Leverage (UTA)
        • Get Borrowing Rates and Limits
        • Get Account Ledger
        • Get Interest History (UTA)
        • Get API Rate Limit
        • Get All API Rate Limit
        • Get API Rate Limit Cap
        • Get Fee Rate
        • KCS Fee Deduction Management
        • Get Third-Party Custody Account Currency Limits
      • Sub Account
        • Get Sub Account Currency Assets
        • Get Sub Account List
        • Get Sub Account API List
        • Set Sub Account Transfer Permission
        • Add Sub Account
        • Add Sub Account API
        • Modify Sub Account API
        • Set Sub Accounts API Rate Limit
        • Delete Sub Account API
      • Deposit
        • Get Deposit Address
        • Get Deposit History
      • Transfer
        • Get Transfer Quotas
        • Flex Transfer
      • Withdraw
        • Get Withdrawal Quotas
        • Get Withdrawal History
        • Withdraw
        • Cancel Withdrawal
    • Orders
      • Place Order
      • Amend Order
      • Cancel Order
      • Batch Cancel Orders By ID
      • Batch Cancel Orders By Symbol
      • Get Order Details
      • Get Open Order List
      • Get Order History
      • Get Trade History
      • Get Max Order Quantity
    • Positions
      • Get Position List
      • Get Positions History
      • Get Private Funding Fee History
      • Modify Margin Mode
      • Modify Position Margin
      • Get Margin Mode
    • Affiliate
      • Introduction
      • Get Invited
      • Get Commission
      • Get Trade History
      • Get Transaction
      • Get Kumining
    • VIP Lending
      • Introduction
      • Get Collateral Ratio
      • Get Loan Info
      • Get Accounts
  • UTA WebSocket V2
    • Introduction
    • Public Channels
      • Ticker
      • Kline
      • Trade
      • Orderbook
      • Mark Price
      • Funding Fee Rate
      • All Funding Fee Rates
      • Call Auction Data
    • Private Channels
      • Order
      • Execution Lite
      • Execution
      • Balance
      • Position
      • LiquidationWarning
      • Leverage
    • Trade
      • Add Order
      • Cancel Order
      • Amend Order
  • Classic REST
    • Account Info
      • Account & Funding
        • Get Account Summary Info
        • Get Apikey Info
        • Get Account Type - Spot
        • Get Account List - Spot
        • Get Account Detail - Spot
        • Get Account - Cross Margin
        • Get Account - Isolated Margin
        • Get Account - Futures
        • Get Account Ledgers - Spot/Margin
        • Get Account Ledgers - Trade_hf
        • Get Account Ledgers - Margin_hf
        • Get Account Ledgers - Futures
      • Sub Account
        • Add sub-account
        • Add sub-account Margin Permission
        • Add sub-account Futures Permission
        • Get sub-account List - Summary Info
        • Get sub-account Detail - Balance
        • Get sub-account List - Spot Balance (V2)
        • Get sub-account List - Futures Balance (V2)
      • Sub Account API
        • Get sub-account API List
        • Add sub-account API
        • Modify sub-account API
        • Delete sub-account API
      • Deposit
        • Add Deposit Address (V3)
        • Get Deposit Address (V3)
        • Get Deposit History
      • Withdrawals
        • Get Withdrawal Quotas
        • Withdraw (V3)
        • Cancel Withdrawal
        • Get Withdrawal History
        • Get Withdrawal History By ID
      • Transfer
        • Get Transfer Quotas
        • Flex Transfer
      • Trade Fee
        • Get Basic Fee - Spot/Margin
        • Get Actual Fee - Spot/Margin
        • Get Actual Fee - Futures
    • Spot Trading
      • Market Data
        • Get Announcements
        • Get Currency
        • Get All Currencies
        • Get Symbol
        • Get All Symbols
        • Get Ticker
        • Get All Tickers
        • Get Trade History
        • Get Klines
        • Get Part OrderBook
        • Get Full OrderBook
        • Get Call Auction Part OrderBook
        • Get Call Auction Info
        • Get Fiat Price
        • Get 24hr Stats
        • Get Market List
        • Get Client IP Address
        • Get Server Time
        • Get Service Status
        • Get KYC Regions
      • Orders
        • Add Order
        • Add Order Sync
        • Add Order Test
        • Batch Add Orders
        • Batch Add Orders Sync
        • Cancel Order By OrderId
        • Cancel Order By OrderId Sync
        • Cancel Order By ClientOid
        • Cancel Order By ClientOid Sync
        • Cancel Partial Order
        • Cancel All Orders By Symbol
        • Cancel All Orders
        • Modify Order
        • Get Order By OrderId
        • Get Order By ClientOid
        • Get Symbols With Open Order
        • Get Open Orders
        • Get Open Orders By Page
        • Get Closed Orders
        • Get Trade History
        • Get DCP
        • Set DCP
        • Add Stop Order
        • Cancel Stop Order By ClientOid
        • Cancel Stop Order By OrderId
        • Batch Cancel Stop Orders
        • Get Stop Orders List
        • Get Stop Order By OrderId
        • Get Stop Order By ClientOid
        • Add OCO Order
        • Cancel OCO Order By OrderId
        • Cancel OCO Order By ClientOid
        • Batch Cancel OCO Order
        • Get OCO Order By OrderId
        • Get OCO Order By ClientOid
        • Get OCO Order Detail By OrderId
        • Get OCO Order List
    • Margin Trading
      • Market Data
        • Get Symbols - Cross Margin
        • Get Symbols - Isolated Margin
        • Get Mark Price Detail
        • Get Margin Config
        • Get Mark Price List
        • Get Margin Collateral Ratio
        • Get Market Available Inventory
      • Orders
        • Add Order
        • Add Order Test
        • Cancel Order By OrderId
        • Cancel Order By ClientOid
        • Cancel All Orders By Symbol
        • Get Symbols With Open Order
        • Get Open Orders
        • Get Closed Orders
        • Get Trade History
        • Get Order By OrderId
        • Get Order By ClientOid
        • Add Stop Order
        • Cancel Stop Order By OrderId
        • Cancel Stop Order By ClientOid
        • Batch Cancel Stop Orders
        • Get Stop Orders List
        • Get Stop Order By OrderId
        • Get Stop Order By ClientOid
        • Add OCO Order
        • Cancel OCO Order By OrderId
        • Cancel OCO Order By ClientOid
        • Batch Cancel OCO Order
        • Get OCO Order By OrderId
        • Get OCO Order By ClientOid
        • Get OCO Order Detail By OrderId
        • Get OCO Order List
      • Debit
        • Get Borrow Interest Rate
        • Borrow
        • Get Borrow History
        • Repay
        • Get Repay History
        • Get Interest History
        • Modify Leverage
      • Credit
        • Get Loan Market
        • Get Loan Market Interest Rate
        • Purchase
        • Modify Purchase
        • Get Purchase Orders
        • Redeem
        • Get Redeem Orders
      • Risk Limit
        • Get Margin Risk Limit
    • Futures Trading
      • Introduction
      • Market Data
        • Get Symbol
        • Get All Symbols
        • Get Ticker
        • Get All Tickers
        • Get Full OrderBook
        • Get Part OrderBook
        • Get Trade History
        • Get Klines
        • Get Mark Price
        • Get Spot Index Price
        • Get Interest Rate Index
        • Get Premium Index
        • Get 24hr stats
        • Get Server Time
        • Get Service Status
      • Orders
        • Add Order
        • Add Order Test
        • Batch Add Orders
        • Add Take Profit And Stop Loss Order
        • Cancel Order By OrderId
        • Cancel Order By ClientOid
        • Batch Cancel Orders
        • Cancel All Orders
        • Cancel All Stop orders
        • Get Order By OrderId
        • Get Order By ClientOid
        • Get Order List
        • Get Recent Closed Orders
        • Get Stop Order List
        • Get Open Order Value
        • Get Recent Trade History
        • Get Trade History
      • Positions
        • Get Margin Mode
        • Switch Margin Mode
        • Batch Switch Margin Mode
        • Get Position Mode
        • Switch Position Mode
        • Get Max Open Size
        • Get Position Details
        • Get Position List
        • Get Positions History
        • Get Max Withdraw Margin
        • Get Cross Margin Leverage
        • Modify Cross Margin Leverage
        • Add Isolated Margin
        • Remove Isolated Margin
        • Get Cross Margin Risk Limit
        • Get Cross Margin Requirement
        • Get Isolated Margin Risk Limit
        • Modify Isolated Margin Risk Limit
      • Funding Fees
        • Get Current Funding Rate
        • Get Public Funding History
        • Get Private Funding History
    • Earn
      • Simple Earn
        • Purchase
        • Get Redeem Preview
        • Redeem
        • Get Savings Products
        • Get Promotion Products
        • Get Staking Products
        • Get KCS Staking Products
        • Get ETH Staking Products
        • Get Account Holding
      • Structured Earn - Dual
        • Structured Product Purchase
        • Get Dual Investment Products
        • Get Structured Product Orders
    • VIP Lending
      • Introduction
      • Get Collateral Ratio
      • Get Loan Info
      • Get Accounts
    • Affiliate
      • Introduction
      • Get Invited
      • Get Commission
      • Get Trade History
      • Get Transaction
      • Get Kumining
    • Broker
      • Introduction
      • Broker Application
      • Instructions
      • Broker Pro
        • Introduction
        • Broker Fast API Service
        • Apply for Fast Withdrawal
          POST
        • Get Broker Rebate
          GET
        • Get Commission
          GET
        • Get User List
          GET
        • Get User Transactions
          GET
      • Exchange Broker
        • Introduction
        • Get Broker Rebate
        • Get Broker RebateV3
        • Submit KYC
        • Get KYC Status
        • Get KYC Status List
        • Get Broker Info
        • Add sub-account
        • Get sub-account
        • Add sub-account API
        • Get sub-account API
        • Modify sub-account API
        • Delete sub-account API
        • Transfer
        • Get Transfer History
        • Get Deposit List
        • Get Deposit Detail
        • Get Withdraw Detail
        • Set Markup Fee
        • Get Markup Fee
    • Copy Trading
      • Introduction
      • Add Order
      • Add Order Test
      • Add Take Profit And Stop Loss Order
      • Cancel Order By OrderId
      • Cancel Order By ClientOid
      • Get Max Open Size
      • Get Max Withdraw Margin
      • Add Isolated Margin
      • Remove Isolated Margin
      • Modify Isolated Margin Risk Limit
      • Modify Isolated Margin Auto-Deposit Status
      • Switch Margin Mode
      • Modify Cross Margin Leverage
      • Get Cross Margin Requirement
      • Switch Position Mode
    • Convert
      • Introduction
      • Get Convert Symbol
      • Get Convert Currencies
      • Get Convert Quote
      • Add Convert Order
      • Get Convert Order Detail
      • Get Convert Order History
      • Add Convert Limit Order
      • Get Convert Limit Quote
      • Get Convert Limit Order Detail
      • Get Convert Limit Orders
      • Cancel Convert Limit Order
  • Classic WebSocket
    • Base Info
      • Introduction
      • Get Public Token - Classic Spot/Margin
      • Get Private Token - Classic Spot/Margin
      • Get Public Token - Classic Futures
      • Get Private Token - Classic Futures
    • Spot Trading
      • Public Channels
        • Ticker
        • All Tickers
        • Orderbook - Level 1
        • Orderbook - Level 5
        • Orderbook - Level 50
        • Orderbook - Increment
        • Call Auction Orderbook - Level 50
        • Call Auction Data
        • Klines
        • Trade
        • Symbol Snapshot
        • Market Snapshot
      • Private Channels
        • Order V2
        • Order V1
        • Balance
        • Stop Order
    • Margin Trading
      • Public Channels
        • Index Price
        • Mark Price
      • Private Channels
        • Order V2
        • Order V1
        • Balance
        • Stop Order
        • Cross Margin Position
        • Isolated Margin Position
    • Futures Trading
      • Public Channels
        • Ticker V2
        • Ticker V1
        • Orderbook - Level 5
        • Orderbook - Level 50
        • Orderbook - Increment
        • Klines
        • Trade
        • Instrument
        • Funding Fee Settlement
        • Symbol Snapshot
      • Private Channels
        • Orders
        • Balance
        • Positions
        • Margin Mode
        • Cross Margin Leverage
        • Stop Orders
    • Add/Cancel Order
      • Add Order
      • Cancel Order
  • Web3 Wallet
    • Browser Extension Wallet
  • Error Code
    • UTA API V2
    • UTA API V1
    • Pro API
    • Classic
      • HTTP
      • Spot
      • Margin
      • Futures
      • Earn
      • Broker
      • CopyTrading
      • Websocket
  • Abandoned Endpoints
    • Introduction
    • UTA REST
      • Introduction
      • Market Data
        • Get Announcements
        • Get Currency
        • Get Currencies
        • Get Symbol
        • Get Ticker
        • Get OrderBook
        • Get Klines
        • Get Trades
        • Get Collateral Ratio
        • Get Index Price
        • Get Current Funding Rate
        • Get History Funding Rate
        • Get Position Tiers
        • Get Futures Open Interest
        • Get Service Status
        • Get Third-Party Custody Currencies
        • Get Borrowable Currencies
        • Get KYC Regions
        • Get Client IP Address
        • Get Fiat Price
        • Get Interest Rate Index
        • Platform 24h Market Statistics
        • Get max order quantity
        • Get Call Auction Info
      • Account
        • Get Account Overview (UTA)
        • Get Account Currency Assets (UTA)
        • Get Account Currency Assets (Classic)
        • Get Sub Account Currency Assets
        • Get Transfer Quotas
        • Flex Transfer
        • Set Sub Account Transfer Permission
        • Get Account Mode
        • Set Account Mode
        • Get Fee Rate
        • Get Account Ledger
        • Get Interest History (UTA)
        • Modify Futures Leverage (UTA)
        • Get Third-Party Custody Account Currency Limits
        • Modify Cross Margin Leverage (UTA)
        • Get Leverage (UTA)
        • Get Borrowing Rates and Limits
        • Get Apikey Info
        • Add sub-account
        • Get Sub-account List
        • Get sub-account API List
        • Add sub-account API
        • Modify sub-account API
        • Delete sub-account API
        • Get Deposit Address
        • Get Deposit History
        • Get Withdrawal Quotas
        • Withdraw
        • Cancel Withdrawal
        • Get Withdrawal History
        • KCS Fee Deduction Management
        • Get API Rate Limit Cap
        • Set Sub Accounts API Rate Limit
        • Get API Rate Limit
        • Get All API Rate Limit
      • Orders
        • Place Order
        • Amend Order
        • Cancel Order
        • Batch Cancel Orders By ID
        • Batch Cancel Orders By Symbol
        • Get Order Details
        • Get Open Order List
        • Get Order History
        • Get Trade History
      • Positions
        • Get Position List (UTA)
        • Get Positions History (UTA)
        • Get Private Funding Fee History
        • Batch Modify Margin Mode
        • Modify Position Margin
        • Get Margin Mode
      • VIP Lending
        • Introduction
        • Get Collateral Ratio
        • Get Loan Info
        • Get Accounts
    • UTA WebSocket
      • Base Info
        • Introduction
        • Get Private Token - Pro API Private Channels
      • Private Channels
        • Order
        • Balance
        • Execution
        • Execution Lite
        • Position
        • Leverage
        • LiquidationWarning
      • Public Channels
        • Kline
        • Ticker
        • Orderbook
        • Call Auction Data
        • Trade
        • Funding Fee
        • Mark Price
      • Manage Order
        • Add Order
        • Cancel Order
        • Amend Order
    • PRO REST
      • Get Cross Margin Config
      • Batch Place Order (Classic)
      • Set DCP (Classic)
      • Get DCP (Classic)
      • Get Account Position Tiers
    • Classic
      • Account & Funding
        • Get Deposit Addresses (V2)
        • Get Deposit Addresses - V1
        • Add Deposit Address - V1
        • Get sub-account List - Summary Info (V1)
        • Get sub-account List - Spot Balance (V1)
        • Sub-account Transfer
        • Get Deposit History - Old
        • Internal Transfer
        • Get Futures Account Transfer Out Ledger
        • Get Withdrawal History - Old
        • Futures Account Transfer Out
        • Futures Account Transfer In
        • Withdraw - V1
      • Spot Trading
        • Orders
          • Add Order - Old
          • Add Order Test - Old
          • Batch Add Orders - Old
          • Cancel Order By OrderId - Old
          • Cancel Order By ClientOid - Old
          • Batch Cancel Order - Old
          • Get Orders List - Old
          • Get Recent Orders List - Old
          • Get Order By OrderId - Old
          • Get Order By ClientOid - Old
          • Get Trade History - Old
          • Get Recent Trade History - Old
      • Margin Trading
        • Get ETF Info
        • Get Account Detail - Margin
        • Add Order - V1
        • Add Order Test - V1
        • Get Account List - Isolated Margin - V1
        • Get Account Detail - Isolated Margin - V1
      • Futures Trading
        • Modify Isolated Margin Auto - Deposit Status
        • Cancel All Orders - V1
        • Get Position Details - V1
      • Affiliate
        • Get Account
      • Broker
        • Broker Pro
          • Get Broker Rebate
  • Developing
    • Introduction
  1. Broker Pro

Broker Fast API Service

1. Introduction#

KuCoin has launched the Fast API Service, enabling broker users to seamlessly connect to a broker’s website or application through KuCoin OAuth 2.0 login. With a one-click authorization flow, users can securely link their KuCoin accounts to third-party applications without the need to manually create or bind an API key (Version 3) or passphrase. No manual API key creation or passphrase setup is required.
Once authorized, an API key is automatically generated and linked to the broker platform with default permissions for:
Read-Only
Spot Trading
Spot Margin Trading
Futures Trading
KuCoin Earn
Flexible Transfer
If the broker requires a customized default permission set—for example, Read-Only access only, OAuth withdrawal permission, or another combination of permissions—the broker should contact their Account Manager to arrange a dedicated permission group.
Supported Use Cases
Payouts to KuCoin Users: Generate deposit addresses for seamless fund transfers to KuCoin users. Suitable for airdrop aggregators and arbitrage solutions.
Pay with KuCoin: Enable users to pay with their KuCoin accounts across third-party apps and DeFi ecosystems. Ideal for payment apps, DeFi bridges, and Web3 gateways.
Trading Integration: Integrate KuCoin trading into your platform for efficient trade execution. Suitable for trading bots and portfolio trackers.
Accounting & Audit: Export trading and transaction data for accounting, auditing, and financial reporting.

2. Preparation before Integration#

To utilize the KuCoin Fast API Service, Broker partners need to prepare the below three parts and submit from this form.
Broker’s full IP list for requesting KuCoin’s Fast API Service. This is the IP that the Broker server requests to our KuCoin fast api service server.
Broker’s full IP list for trading.
Redirect URL(s) after KuCoin's OAuth login.
Once the broker provides the above, KuCoin will send the broker's unique client_id

3. Fast API Service#

Broker users can use KuCoin Oauth login to authorize brokers obtaining their API key. Authentication and authorization are mandatory for every permission creation action in Fast API 2.0.
Users can now customize API permissions based on their actual needs during authorization, including:
Read-only permission
Spot Trading permission
Margin Trading permission
Futures Trading permission
Earn permission
Flexible transfers permission
Withdrawal permission
Unified account permission
This gives users greater transparency and control over account authorization while helping brokers support more diverse business scenarios.

4. Authorization Code Mode#

KuCoin offers authorization code mode only. Access token and refresh token can be retrieved based on authorization codes. The broker saves keys and interacts with the KuCoin OAuth2.0 server.
image.png

5. Use of Token#

5.1 Differences between tokens#

After the broker calls the token exchange endpoint through authorization code, there will be two types of tokens.
access token : Used for the broker to call KuCoin OpenAPI endpoint.
refresh token : Used for obtaining a new access token when the previous one expires.

5.2 How to use tokens#

After the broker completes the authorization and obtains the token, it will be able to call the KuCoin OpenAPI endpoint through the access token. When requesting, broker needs to carry the following information in the request header:
Header ParametersRequiredDescriptions
AuthorizationYesFill in the access token as bearer to this field.

5.3 Token validity#

access token : Valid within 1 hour
refresh token : Valid within 3 days
If the access token expires, the endpoint will no longer be accessible. If the refresh token is still within the valid period, the broker needs to call the refresh token endpoint to obtain a new pair of access token and refresh token. The new access token can continue to be used. When a new access token is retrieved via refresh token, the old access token cannot be used regardless of whether it has expired or not.

6. OAuth Controller API Design#

6.1 OAuth Login Page and Permission Editing#

URI:
http://www.kucoin.com/oauth?response_type=code&client_id=XXXX&redirect_uri=XXX&scope=OAUTH_CREATE_API&state=123
Method: GET
Parmas:
Response TypePlease use the autorization_code mode
Client_idUnique identity of the broker
Redirect_urlBroker website Tips: please don’t encode the redirect URL.
ScopeScope of access_token
StateBrokers can determine what you need here. But this is a compulsory field. You can put your system’s user ID here
After the user completes authorization, KuCoin redirects the user to the broker’s redirect_uri with the authorization result and permission information.
Example:
When withdrawal permission is not enabled: redirect_url?code=XXX&state=XXX&API_COMMON=true&API_SPOT=true&API_MARGIN=true&API_FUTURES=true&API_EARN=true&API_TRANSFER=true&API_WITHDRAW_OAUTH=false
When withdrawal permission is enabled:
redirect_url?code=XXX&state=XXX&API_COMMON=true&API_SPOT=true&API_MARGIN=true&API_FUTURES=true&API_EARN=true&API_TRANSFER=true&API_WITHDRAW_OAUTH=true&isAddressbookOnly=false
The authorization result includes the following permission fields:
{ 

  "code": "668*********c711", 
   
  "state": XXX
  "authGroupMap": {
    "API_COMMON": true,
    "API_SPOT": true,
    "API_MARGIN": true,
    "API_FUTURES": true,
    "API_EARN": true,
    "API_TRANSFER": true,
    "API_WITHDRAW_OAUTH": true
  },
  "isAddressbookOnly": false
}
Users can log in to their KuCoin accounts using their registered email address or phone number and grant the broker the requested permissions to access the corresponding functionalities.
If a broker requires withdrawal permission from users, the broker should either:
Guide users to select and authorize the withdrawal permission during the authorization process; or
Contact the Account Manager in advance to configure a default permission group.
image.png
When configuring the authGroupMap, please ensure that the permissions are mapped accordingly based on the permissions selected and granted by the user.
The user’s authorization details will then be shared with the broker through the OAuth login and permission-editing URL callback, specifically via the authGroupMap and isAddressbookOnly fields. When requesting the user’s API key later, please pass these fields exactly as they are returned in KuCoin’s response, without modifying their content.
Note:
If the user does not enable withdrawal permission, API_WITHDRAW_OAUTH will be returned as false.
When API_WITHDRAW_OAUTH=false, isAddressbookOnly will not be returned in the callback.
In this case, the broker must not pass isAddressbookOnly when requesting the user’s API key. Passing this field when it is not returned will result in an error.
If withdrawal permission is enabled, isAddressbookOnly will be returned and must also be passed exactly as received when creating the API key.

6.2 Request A Token#

URI: https://www.kucoin.com/_oauth/access-token?grant_type=authorization_code&code=xxxxxxxxxx&redirect_uri=https://www.xxxxxxxxxxxxx.com&client_id=xxxxxxxxx
Methond: GET
Params:
Grant_typeCompulsorygrant_type=authorization_code
CodeCompulsory
Redirect_urlCompulsory
Client_idCompulsoryUnique identity of the broker
Response:
{
    "access_token":"",  	//access token received from user authorization
    "token_type":"bearer"     //token type, extension point to facilitate the addition of more secure tokens in the future
    "expires_in":3600,  	//token expiration time, in seconds
    "refresh_token":,   	//token used to obtain a new access token after the access token expires
    "scope": ["", ""]   	//scope of permissions for the access token
}
Tips: please don’t encode the redirect URL.

6.3 Refresh A Token#

URI:https://www.kucoin.com/_oauth/refresh-token
Method: POST
Params:
Grant_typeCompulsoryauthorization_code
Refresh_tokenCompulsoryToken used to refresh the authentication
ScopeCompulsory
response:
{
    "access_token":"",  	//token used to access resources
    "token_type":"bearer",  //token type, an extension point to facilitate the addition of more secure tokens in the future, such as MAC (Message Authentication Code). Bearer indicates a token that does not contain any information
    "expires_in":3600,  	//token expiration time, in seconds
    "refresh_token":,   	//token used to obtain a new access token after the access token expires
    "scope": [""OAUTH_CREATE_API""]  //scope of permissions for the access token
}

6.4 Oauth - Get User API Key#

URl :https://www.kucoin.com/_oauth/resource/cyber-truck-vault/v2/outer/api-key/add
method :POST
content-type :application/json
header:
"Authorization":"bearer {token}"
parameter: //The parameters for this step are the same as the permission group parameters selected by the user in section 7.2
{
"authGroupMap": {
"API_COMMON": true,
"API_SPOT": true,
"API_MARGIN": true,
"API_FUTURES": true,
"API_EARN": true,
"API_TRANSFER": true,
"API_WITHDRAW_OAUTH": false
},
"isAddressbookOnly": false
}
response:
{
"success": true,
"code": "200",
"msg": "success",
"retry": false,
"data": {
"apiName": "",
"apiKey": "",
"secret": "",
"passphrase": "",
"brokerId": "",
"authGroup": API_COMMON,API_FUTURES,API_SPOT,API_EARN,API_TRANSFER,API_MARGIN,
"ipWhiteList": ""
}
}
Errors:
1.
Repeated apiName
2.
The number of user’s apiKey reaches to the maximum level

7. Withdraw Use Case#

7.1. Security Setup and Broker page redirect#

Step 1: Security Verification Check
If the user’s account security level is insufficient (for example, if 2FA is not enabled), KuCoin will return a security setup link to the broker, allowing the user to complete the required verification steps. The API error response will return a message similar to the following:
"You need to bind more factors to continue this operation. Please visit the following link: https://xxx.kucoin.xxx/account/security/g2fa"
Step 2: Add Redirect Parameters (Optional)
When presenting the security setup link to users, brokers may append the following parameters to support automatic redirection after the security setup is completed:
client_id: Broker/Supplier ID
redirect_uri: The URL to redirect the user back to after completion (pay attention to the URL-encoded)
Demo link after URL:
construction:https://www.kucoin.com/account/security/g2fa?client_id=demo_client_id&redirect_uri=https%3a%2f%2fwww.kucoin.com
Step 3: User Completes Security Setup
Once the user clicks the link, they will be redirected to the KuCoin webpage to complete the required security verification setup. After the setup is completed, the user will be automatically redirected back to the broker’s designated page.

7.2. Withdrawal Endpoint#

Please be aware that the withdrawal for OAuth Service is an independent withdrawal endpoint under the broker section.
URI:https://api.kucoin.com/api/v2/broker/withdrawal
Method: POST
Headers:
HeaderRequiredDescription
KC-API-KEYYesYour API key, provided as a string.
KC-API-SIGNYesThe Base64-encoded signature generated for the request.
KC-API-TIMESTAMPYesThe timestamp of the request in milliseconds.
KC-API-PASSPHRASEYesThe passphrase specified when the API key was created.
KC-API-KEY-VERSIONYesThe API key version. This value can be checked on the API Management page.
Content-TypeYesAll requests and responses use the application/json content type.
Params:
currencyCompulsorycurrency
addressCompulsoryWithdrawal address
amountCompulsoryWithdrawal amount. Must be a positive number and a multiple of the specified amount precision.
withdrawTypeCompulsoryWithdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time)
chainOptionalThe chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface.
memoOptionalAddress remark (memo/tag). Leave this field empty if no remark is required. When withdrawing to an external platform or wallet, please confirm with the receiving address whether a memo/tag is required. Failure to provide the correct memo/tag may result in the receiving platform being unable to credit your funds.
isInnerOptionalInternal withdrawal or not. Default: False
remarkOptionalRemark
feeDeductTypeOptionalWithdrawal fee deduction type. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC.
response fields:
withdrawalIdOptionalWithdrawal ID, a unique ID for a withdrawal
transactionIdOptionaltransaction id, a unique ID for a validation transaction
allFactorsOptionalAll 2FA factors need to be verified during the validation transaction
sentFactorsOptional2FA factors sent to user side, only include those factors that need to be sent
Get 2FA factors response:
{
    "code": "200000",
    "data": {
        "transactionId": "sample transactionId",
        "allFactors": [
            ["GAV", "EMV"]
        ],
        "sentFactors": [
            ["EMV"]
        ]
    }
}
withdraw success response:
{
    "code": "200000",
    "data": {
        "withdrawalId": "sample withdrawalId"
    }
}
Withdraw success response:
{
    "code": "200000",
    "data": {
        "withdrawalId": "sample withdrawalId"
    }
}

8. Fee Structure#

Trading & Withdrawal Fees: Standard trading and withdrawal fees apply. Please refer to the fee schedule here: KuCoin VIP Fee Schedule
OAuth Service Fee: For deposit and withdrawal transactions initiated via the Fast API OAuth Service, KuCoin will charge an OAuth service fee based on transaction volume.
DepositWithdrawal
0 USDT per transaction10% of withdrawal amount Minimum fee: equivalent of 1 USDT per withdrawal Maximum fee: equivalent of 30 USDT per withdrawal
For the latest OAuth withdrawal service fee structure, please refer to: https://www.kucoin.com/announcement/en-oauth-withdrawal-service-fee
Thank you for your time and attention.
The KuCoin Broker Team
Telegram: @KuCoin_Broker
Modified at 2026-09-08 08:59:32
Previous
Introduction
Next
Apply for Fast Withdrawal