Login:  Password:  

TRADE

VOTE

SUPPORT
API documentation | Old API documentation =>

Our platform provides a simple and powerful REST API to allow you to programatically retreive any market information and perform nearly all trading actions. All requests use the application/json content type and go over https. All requests are GET requests and all responses come in a default response object with the result in the result field. Always check the success flag to ensure that your API call succeeded.

Our API works with "public" and "private" calls. Public calls available for all without any authorization. "Private" calls can be performed only with proper authentication.

Base URL for public calls:
https://c-cex.com/t/api_pub.html?a=METHOD


Base URL for private calls:
https://c-cex.com/t/api.html?a=METHOD&apikey=APIKEY


Tickers:



Public API:



Private API:



Tickers



Tickers

[COIN1]-[COIN2].json

Online market data for given trading pair.

Parameters: none

Request example:
https://c-cex.com/t/dash-btc.json


Response:
{
"ticker": {
"high": 0.016,
"low": 0.01560006,
"avg": 0.01580003,
"lastbuy": 0.01560009,
"lastsell": 0.016,
"buy": 0.01560012,
"sell": 0.016999,
"lastprice": 0.01560009,
"buysupport": 35.84405079,
"updated": 1459411200
}
}


Trading pairs list

pairs.json

List of available trading pairs.

Parameters: none

Request example:
https://c-cex.com/t/pairs.json


Response:
{
"pairs": ["usd-btc", "1337-btc", ... "zny-doge"]
}


All market data

prices.json

All online trading pairs market data.

Parameters: none

Request example:
https://c-cex.com/t/prices.json


Response:
{
"1337-btc": {
"high": 0,
"low": 0,
"avg": 0,
"lastbuy": 0.00000007,
"lastsell": 0.00000008,
"buy": 0.00000007,
"sell": 0.00000008,
"lastprice": 0.00000008,
"updated": 1459411200
},
"acp-btc": {
"high": 0,
"low": 0,
"avg": 0,
"lastbuy": 0.00000403,
"lastsell": 0.000005,
"buy": 0.00000413,
"sell": 0.00000661,
"lastprice": 0.00000403,
"updated": 1459411200
}, ... 


Coin names list

coinnames.json

Full names for all coin tickers.

Parameters: none

Request example:
https://c-cex.com/t/coinnames.json


Response:
{
"usd": "USD",
"btc": "Bitcoin",
"1337": "1337",
...
"zny": "BitZeny"
}


24h volume report

volume_[COIN MARKET].json

Online volume report for last 24 hours at a given coin market.

Parameters: none

Request example:
https://c-cex.com/t/volume_btc.json


Response:
{
"ticker": {
"usd": {
"last": 0.00240391,
"vol": 0.08700954
},
"1337": {
"last": 0.00000008,
"vol": 0.05472871
}, ... }
}




Public API



Public API

getmarkets

Get the open and available trading markets along with other meta data.

Parameters: none

Request example:
https://c-cex.com/t/api_pub.html?a=getmarkets


Response:
{
"success": true,
"message": "",
"result": [{
"MarketCurrency": "USD",
"BaseCurrency": "BTC",
"MarketCurrencyLong": "USD",
"BaseCurrencyLong": "Bitcoin",
"MinTradeSize": 0.01000000,
"MarketName": "USD-BTC",
"IsActive": true,
"Created": "2014-01-01T00:00:00"
}, {
"MarketCurrency": "1337",
"BaseCurrency": "BTC",
"MarketCurrencyLong": "1337",
"BaseCurrencyLong": "Bitcoin",
"MinTradeSize": 0.01000000,
"MarketName": "1337-BTC",
"IsActive": true,
"Created": "2014-01-01T00:00:00"
}, ... ]
}


Public API

getorderbook

Retrieve the orderbook for a given market.

Parameters:
marketrequiredMarket name (ex: USD-BTC)
typerequiredType of orders to return: "buy", "sell" or "both"
depthoptionalDepth of an order book to retrieve. Default is 50, max is 100


Request example:
https://c-cex.com/t/api_pub.html?a=getorderbook&market=btc-usd&type=buy&depth=2


Response:
{
"success": true,
"message": "",
"result": {
"buy": [{
"Quantity": 0.01029604,
"Rate": 430.00010000
}, {
"Quantity": 0.10000000,
"Rate": 423.00000000
}]
}
}


Public API

getmarketsummaries

Get the last 24 hour summary of all active markets.

Parameters: none

Request example:
https://c-cex.com/t/api_pub.html?a=getmarketsummaries


Response:
{
"success": true,
"message": "",
"result": [{
"MarketName": "USD-BTC",
"High": 0.00000000,
"Low": 0.00000000,
"Volume": 121.99200025,
"Last": 0.00226757,
"BaseVolume": 0.27662540,
"TimeStamp": "1451462400",
"Bid": 0.00226757,
"Ask": 0.00235294,
"OpenBuyOrders": 100,
"OpenSellOrders": 100,
"PrevDay": 0.00235294,
"Created": "1451462400",
"DisplayMarketName": null
}, {
"MarketName": "1337-BTC",
"High": 0.00000000,
"Low": 0.00000000,
"Volume": 0.00000000,
"Last": 0.00000006,
"BaseVolume": 0.00000000,
"TimeStamp": "1451462400",
"Bid": 0.00000006,
"Ask": 0.00000009,
"OpenBuyOrders": 100,
"OpenSellOrders": 100,
"PrevDay": 0.00000009,
"Created": "1451462400",
"DisplayMarketName": null
}, ... ]
}


Public API

getmarkethistory

Latest trades that have occured for a specific market.

Parameters:
marketrequiredMarket name (ex: USD-BTC)
countoptionalNumber of entries to return. Range 1-100, default is 50


Request example:
https://c-cex.com/t/api_pub.html?a=getmarkethistory&market=btc-usd&count=2


Response:
{
"success": true,
"message": "",
"result": [{
"Id": 1248410,
"TimeStamp": "2015-12-28 20:44:45",
"Quantity": 0.01355442,
"Price": 441.00000000,
"Total": 5.97750000,
"FillType": "FILL",
"OrderType": "BUY"
}, {
"Id": 1248409,
"TimeStamp": "2015-12-28 20:44:45",
"Quantity": 0.02500000,
"Price": 440.90000000,
"Total": 11.02250000,
"FillType": "FILL",
"OrderType": "BUY"
}]
}


Public API

getbalancedistribution

Exchange's wallet balance distribution for specific currency.

Parameters:
currencynamerequiredName of currency (ex: GRC)


Request example:
https://c-cex.com/t/api_pub.html?a=getbalancedistribution&currencyname=grc


Response:
{
"success": true,
"message": "",
"result": {
"Distribution": [{
"Balance": 622267.16657259
}, {
"Balance": 451260.06171487
}, ... ]
}
}



Private API



Authentication

We use a standard HMAC-SHA512 signing. Append apikey and nonce to your request and calculate the HMAC hash and include it under an apisign header.

PHP example:
$apikey='xxxxxxx';
$apisecret='xxxxxxx';
$nonce=time();
$uri='https://c-cex.com/t/api.html?a=getbalance&currency=BTC&apikey='.$apikey.'&nonce='.$nonce;
$sign=hash_hmac('sha512',$uri,$apisecret);
$ch = curl_init($uri);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('apisign:'.$sign));
$execResult = curl_exec($ch);
$obj = json_decode($execResult);


Private API

buylimit

Place a buy limit order in a specific market. Make sure you have the proper permissions set on your API keys.

Parameters:
marketrequiredMarket name (ex: USD-BTC)
quantityrequiredAmount to purchase
raterequiredRate at which to place the order


Request example:
https://c-cex.com/t/api.html?a=buylimit&apikey=APIKEY&market=grc-btc&quantity=100&rate=0.00001


Response:
{
"success": true,
"message": "",
"result": {
"uuid": "8228499"
}
}


Private API

selllimit

Place a sell limit order in a specific market. Make sure you have the proper permissions set on your API keys.

Parameters:
marketrequiredMarket name (ex: USD-BTC)
quantityrequiredAmount to purchase
raterequiredRate at which to place the order


Request example:
https://c-cex.com/t/api.html?a=selllimit&apikey=APIKEY&market=grc-btc&quantity=100&rate=0.00001


Response:
{
"success": true,
"message": "",
"result": {
"uuid": "8228499"
}
}


Private API

cancel

Cancel a buy or sell order.

Parameters:
uuidrequireduuid of buy or sell order


Request example:
https://c-cex.com/t/api.html?a=cancel&apikey=APIKEY&uuid=6049562


Response:
{
"success" : true,
"message" : "",
"result" : null
}


Private API

getbalance

Retrieve the balance from your account for a specific currency.

Parameters:
currencyrequiredCurrency name (ex: BTC)


Request example:
https://c-cex.com/t/api.html?a=getbalance&apikey=APIKEY&currency=BTC


Response:
{
"success" : true,
"message" : "",
"result" : {
"Currency" : "BTC",
"Balance" : 20,
"Available" : 3.78231923,
"Pending" : 0.00000000,
"CryptoAddress" : "1Euo2hfrw9cSWZGstPcRwDaHtcvL8iyJXP",
"Requested" : false,
"Uuid" : null
}
}


Private API

getbalances

Retrieve all balances from your account.

Parameters: none

Request example:
https://c-cex.com/t/api.html?a=getbalances&apikey=APIKEY


Response:
{
"success": true,
"message": "",
"result": [{
"Currency": "USD",
"Balance": 0.00000000,
"Available": 0,
"Pending": 0.00000000,
"CryptoAddress": ""
}, {
"Currency": "BTC",
"Balance": 53.04269984,
"Available": 3.41248203,
"Pending": 0.00000000,
"CryptoAddress": "1Euo2hfrw9cSWZGstPcRwDaHtcvL8iyJXP"
}, ... ]
}


Private API

getorder

Retrieve a single order by uuid.

Parameters:
uuidrequireduuid of the buy or sell order


Request example:
https://c-cex.com/t/api.html?a=getorder&apikey=APIKEY&uuid=UUID


Response:
{
"success": true,
"message": "",
"result": [{
"AccountId": null,
"OrderUuid": "2137716",
"Exchange": "NVC-BTC",
"Type": "LIMIT_SELL",
"Quantity": 228.70070713,
"QuantityRemaining": 228.70070713,
"Limit": 0.00289999,
"Reserved": 228.70070713,
"ReserveRemaining": 228.70070713,
"CommissionReserved": 0.00000000,
"CommissionReserveRemaining": 0.00000000,
"CommissionPaid": 0.00000000,
"Price": 0.00000000,
"PricePerUnit": null,
"Opened": "2015-12-28 23:20:04",
"Closed": null,
"IsOpen": true,
"Sentinel": "2137716",
"CancelInitiated": false,
"ImmediateOrCancel": false,
"IsConditional": false,
"Condition": "NONE",
"ConditionTarget": null
}]
}


Private API

getopenorders

Get all orders that you currently have opened. A specific market can be requested.

Parameters:
marketoptionalMarket name (ex: USD-BTC)


Request example:
https://c-cex.com/t/api.html?a=getopenorders&apikey=APIKEY


Response:
{
"success": true,
"message": "",
"result": [{
"Uuid": null,
"OrderUuid": "2227714",
"Exchange": "NVC-BTC",
"OrderType": "LIMIT_SELL",
"Quantity": 200,
"QuantityRemaining": 200,
"Limit": 0.00215000,
"CommissionPaid": 0.00000000,
"Price": 0.00000000,
"PricePerUnit": null,
"Opened": "2015-11-28 23:19:22",
"Closed": null,
"CancelInitiated": false,
"ImmediateOrCancel": false,
"IsConditional": false,
"Condition": "NONE",
"ConditionTarget": null
}, {
"Uuid": null,
"OrderUuid": "2071587",
"Exchange": "LTC-BTC",
"OrderType": "LIMIT_BUY",
"Quantity": 999.99999999,
"QuantityRemaining": 999.99999999,
"Limit": 0.00300000,
"CommissionPaid": 0.00000000,
"Price": 0.00000000,
"PricePerUnit": null,
"Opened": "2015-11-16 02:25:29",
"Closed": null,
"CancelInitiated": false,
"ImmediateOrCancel": false,
"IsConditional": false,
"Condition": "NONE",
"ConditionTarget": null
}, ... ]
}


Private API

getorderhistory

Retrieve your order history.

Parameters:
marketoptionalMarket name (ex: USD-BTC). If ommited, will return for all markets
countoptionalNumber of records to return


Request example:
https://c-cex.com/t/api.html?a=getorderhistory&count=2&apikey=APIKEY


Response:
{
"success": true,
"message": "",
"result": [{
"OrderUuid": "2228451",
"Exchange": "GRC-BTC",
"TimeStamp": "2015-11-29 01:55:54",
"OrderType": "LIMIT_BUY",
"Limit": 0.00002096,
"Quantity": 0.00020960,
"QuantityRemaining": 0.00000000,
"Commission": 0.00000042,
"Price": 0,
"PricePerUnit": 0.00002096,
"IsConditional": false,
"Condition": null,
"ConditionTarget": null,
"ImmediateOrCancel": false
}, {
"OrderUuid": "2202320",
"Exchange": "BTC-DASH",
"TimeStamp": "2015-11-25 11:06:23",
"OrderType": "LIMIT_SELL",
"Limit": 0.00630000,
"Quantity": 183.48472577,
"QuantityRemaining": 178.82359683,
"Commission": 0.36696945,
"Price": 1.15595377,
"PricePerUnit": 0.00630000,
"IsConditional": false,
"Condition": null,
"ConditionTarget": null,
"ImmediateOrCancel": false
}]
}


Private API

mytrades

Retrieve detailed trading history.

Parameters:
marketidrequiredMarket name (ex: GRC-BTC)


Request example:
https://c-cex.com/t/api.html?a=mytrades&apikey=APIKEY&marketid=grc-btc&limit=2


Response:
{
"success": true,
"return": [{
"tradeid": "248725grc",
"tradetype": "Sell",
"datetime": "2015-10-28 03:18:29",
"marketid": "GRC-BTC",
"tradeprice": "0.00002900",
"quantity": "30000.00000000",
"fee": "0.00174000",
"total": "0.87000000",
"initiate_ordertype": "Buy",
"order_id": "7324857"
}, {
"tradeid": "248724grc",
"tradetype": "Sell",
"datetime": "2015-10-28 03:18:20",
"marketid": "GRC-BTC",
"tradeprice": "0.00002900",
"quantity": "20000.00000000",
"fee": "0.00116000",
"total": "0.58000000",
"initiate_ordertype": "Buy",
"order_id": "7324856"
}]
}