Skip to main content

API

Ashley Felton avatar
Written by Ashley Felton
Updated over 7 months ago

Where can I find API documentation for the CEX.IO Prime Liquidity?

Please find CEX.IO Prime Liquidity API documentation by the following link: https://docs.prime.cex.io/

How can I receive API credentials to connect to the CEX.IO Prime Liquidity Demo environment?

Please ask your account manager to request API credentials for Demo Environment. We need the client's IPs in order to add them to the whitelist for providing access to Demo APIs.

How can I receive WebSocket/REST API Keys to connect to the CEX.IO Prime Liquidity Live environment?

*This option is available only to account owner due to security restrictions.
You can create and manage API Keys for your account via Prime Liquidity web page (https://liquidity.prime.cex.io/ ).

After login in to Prime Liquidity, switch to API Keys Management section on Settings page. In this section you can create, edit, activate, deactivate or delete API Keys.

For creation of new API Key just click on the "+ NEW API KEY" button in the upper right part of the section, indicate the desirable API Key Name, permission level(s) and ip addresses for whitelisting and confirm your actions via 2FA.

How can I request FIX API Credentials to connect to the CEX.IO Prime Liquidity Live environment?

*This option is available only to account owner due to security restrictions.
You can request and deactivate FIX Credentials for your account via Prime Liquidity web page (https://liquidity.prime.cex.io/ ).

After login in to Prime Liquidity, switch to API Keys Management section on Settings page. In this section you can create and deactivate FIX Credentials.

For creation of new FIX Credentials just click on the "+ NEW FIX CREDENTIALS" button in the right part of the section, choose desirable FIX Credentials type (for Market Data Session or for Trade Session) and confirm your actions via 2FA.

After creation of FIX Credentials, please apply to your account manager for their activation and proper configuration in the system.

How can I add IP addresses to the whitelist for connection via WebSocket/REST APIs?

Please ask your account manager to add your IPs to the whitelist.

Do you have a client for connection to CEX.IO Prime Liquidity?

You can find an official Node.js client for CEX.IO Prime Liquidity WebSocket/REST APIs by the following link: https://github.com/cex-io-prime/liquidity-nodejs-client

Is CEX.IO Prime Liquidity API different from CEX.IO API?

Yes, it is a completely different service with its own API credentials, URLs, methods and documentation.

What is a rate limit for connection to CEX.IO Prime Liquidity?

The Client should not send more than 300 messages per calendar minute to the CEX.IO Prime Liquidity.

Can I get information about my balance and past transactions via FIX?

This information is not available via CEX.IO Prime Liquidity FIX API. Please use WebSocket/REST APIs to get information about your balances and previous transactions.

What are the minimum and maximum order amounts for pairs on CEX.IO Prime Liquidity?

The min\max order amounts differs for each instrument (pair). This information, as well as information concerning other instrument parameters, can be received by using WebSocket/REST APIs method get_my_trading_conditions.

What do Tick Size, Lot Size mean?

Tick Size describes the smallest change in price.
For example, if tickSize is 0.01 then it means the price has 2 decimal places. In such case orders with limit prices 23587, 657.8, 10.32 are allowed, while amounts 12300.312, 6.123456, 0.98765432 are not allowed.


Order Lot Size - such limitation allows only order amount that is a multiple of lot size. For example, if order lot size is 0.1, then order amounts 1.1, 4, 10.3, are allowed, while amounts 0.31, 1.22, 10.944 are not allowed.

How to get an indicative exchange rate via WebSocket/REST APIs?

Order book contains 2 sides: bid and ask. Get Exchange Rate request allows to perform rate estimation on both sides of the order book. There are 4 possible cases for rate estimation:

  • When Client sends BUY BTC-USD Get Exchange Rate request and specifies amount X and currency USD that means that he wants to buy BTC for X USD. In this case ask side of the order book will be used to perform the measurement.

  • When Client sends BUY BTC-USD Get Exchange Rate request and specifies amount Y and currency BTC that means that he wants to buy Y BTC for USD. In this case ask side of the order book will be used to perform the measurement.

  • When Client sends SELL BTC-USD Get Exchange Rate request and specifies amount X and currency USD that means that he wants to sell BTC to X USD. In this case bid side of the order book will be used to perform the measurement.

  • When Client sends SELL BTC-USD Get Exchange Rate request and specifies amount Y and currency BTC that means that he wants to sell Y BTC to USD. In this case bid side of the order book will be used to perform the measurement.

Can I subscribe to account events for the specified sub-account?

You are automatically subscribed to account events within all sub-accounts and main account when connecting via WS. Please be informed that receiving account events is not guaranteed, for example, if the WS client is not online at the moment of the account event.
As for now we do not support subscription to account events as to specific sub-account.

Can I add my crypto addresses to the whitelist in order to allow crypto withdrawals via CEX.IO Prime Liquidity API to these addresses only?

Yes, sure. You can add the addresses of your crypto wallets to the whitelist. Please ask your account manager to add your crypto addresses to the whitelist.

Are the rate limits for API requests via REST and WebSocket common or separate?

The rate limit as to the max amount of requests is common for both REST and WS as to each API Key.

Are there any limits as to allowed number of active (open) orders? For what types of orders does this limit apply and what is a limit for us?

By default, the Client can have a maximum of 20 active taker orders (Market orders, Limit IOC orders) and 50 active maker orders (Limit GTC/GTD orders).

Once the limit is reached, the system will reject any new orders with a reject reason “Too many active orders” until the total number of active orders is below the limit.

Please contact your account manager in order to increase this limit.

Did this answer your question?