Skip to main content

API Introduction

Welcome to the CoinEx API documentation.

This documentation aims to provide developers with detailed information on how to integrate and interact with the CoinEx exchange.

CoinEx offers a wide range of features and flexible options, allowing you to build your own trading applications, automate trading strategies, or develop other tools related to the exchange.

API Documentation Structure

Our API documentation is organized according to the following structures:

  • API Introduction: Provides an overview of the API, document structure and related information index.
  • Integration Guide: Describes how to proceed with the entire access process and the corresponding best practices.
  • Authentication: Describes how to generate an API key and authenticate.
  • Rate Limit: Provides detailed information on the function, usage and sample code of each API endpoint.
  • Error Handling:Lists common error codes and corresponding error handling methods.
  • Enumeration of Definitions: Lists the enumeration values used in the endpoints and the corresponding detailed description.
  • FAQ: Our API documentation also provides answers to frequently asked questions to help you better understand and utilize the API.


CoinEx provides services through HTTP protocol and WebSockets protocol. The base URL for accessing these services is as follows:


The base URL of HTTP is:

The base URL for spot and futures WS are different, as follows:

Authentication and Security

To ensure the security of transaction and accessing account information, our API utilizes an authentication mechanism. Before using the API, you need to create an API secret key and use it for authentication. The API secret key will be associated with your exchange account and used to authenticate and authorize API requests.

For the detailed authentication process, please refer to this link.

Module Grouping

CoinEx API is grouped according to business modules. The specific grouping is as follows:

AccountSubaccountSubaccount management
Subaccount API key management
Subaccount balance inquiry
Asset transfer between subaccounts
FeesAccount trading fee inquiry
SettingsModify account settings
Assets Balance Get balances of various types of accounts
Borrow & RepayMargin borrow, Margin repay, and borrowing record inquiry
Deposit & WithdrawalDeposit, withdrawal, and related record inquiry
Asset TransferAsset transfer between various types of accounts and related record inquiry
SpotMarketGet market list, market data, depth, trades, K-line, index, etc.
TradeGet trading records
OrderPlace order, batch orders
Get order status
Get unfilled and filled order lists
Modify order
Cancel order, batch cancel orders, cancel order by client_id
FuturesMarketGet market list, market data, depth, trades, K-line, index, funding rate, etc.
TradeGet trading records
OrderPlace order, batch orders
Get order status
Get unfilled and filled order lists
Modify order
Cancel order, batch cancel orders, cancel order by client_id
PositionClose position
Adjust position margin
Take profit, stop loss
Get current position, historical positio
Get position margin changes, funding rate, auto deleveraging, auto settlement history

Before using this exchange API, you may need to know the following resources:

  • API Documentation: Provides detailed information about each API endpoint, including request methods, parameters, and response results, etc.
  • API Management Console: Offers functions for generating, managing, and setting permissions for API keys.
  • Sample code: To ensure developers can easily get started, the exchange provides sample code in various programming languages for reference and usage.

Support and Feedback

If you encounter any issues or need further assistance while using the API, please feel free to contact our Support Team. We are happy to answer your questions and provide support and guidance during the development process.

We highly value your feedback. If you have any suggestions or improvement ideas for the API documentation, please let us know. We will continuously improve and update the documentation to ensure it stays in sync with our API and meets your needs.

Thank you for choosing CoinEx API services. We look forward to seeing you build outstanding applications and integrate with our exchange. Good luck with your trading!