C2CX offers both public market data and authenticate trade REST JSON APIs to give external applications access to key C2CX functionality and data.
Current ‘v1’ APIs are designed to offer core functionality only. Future version will be deployed on new endpoints and will expand on current functionality. If you have any feedback or feature requests feel free to send the details to one of our support channels.
C2CX supplies several example libraries to help you get started in your chosen language. If you create a library in an additional language that you would like to share please let us know.
API parameters and results will remain consistent within versions though new API, parameters, responses may be added that do not affect existing requests.
The current API version is “v1”. Documentation for the previous version may be found at https://api.c2cx.com/beta/. This API will be depreciated and will no longer be available after September 1st 2017.
Chinese: [QQ Group:129483457 ]
60 API request per minute per endpoint.
Error Response: {“error”:”rate_limit”}
If more then 60 API requests are sent per minute to an endpoint the sending IP will be blocked for between 30 and 60 seconds.
Results are also limited to 100 results per API request. APIs that may return more than 100 result will have a pagination option.
Libraries are offered as is with no warranty. Please review the code before integrating them into your application.
API keys can be generated by logging into your C2CX account and selecting the “Settings” menu item. Using the “API” tab on the left you can generate a new API public and secret key. Copy these and keep them in a safe place. Your private key will only be shown once.
All authenticated request are sent along with a signature generated by getting the MD5 of a string containing the public key, all parameters, and the secret key.
The parameters must be orders alphabetically with the secret key as the last parameter. The string should be formatted as in the example below.
Signature = stringToUppercase( md5(“apiKey=[Public_Key]& param1=value& param2=value&secretKey=[Secret_Key]”) )
This signature is then send along with the post request as an additional parameter called “sign”.
Market data API’s require a “symbol” argument to return the appropriate trading data. Symbols must be capitalized. Currently support symbols are:
LONG to BTC: "LONG_BTC"
LONG to EOS: "LONG_EOS"
LONG to OMG: "LONG_OMG"
LONG to RCN: "LONG_RCN"
LONG to WAX: "LONG_WAX"
LONG to XRP: "LONG_XRP"
USDT to EOS: "USDT_EOS"
USDT to OMG: "USDT_OMG"
USDT to RCN: "USDT_RCN"
USDT to WAX: "USDT_WAX"
USDT to XRP: "USDT_XRP"
BTC to EOS: "BTC_EOS"
BTC to OMG: "BTC_OMG"
BTC to RCN: "BTC_RCN"
BTC to WAX: "BTC_WAX"
BTC to XRP: "BTC_XRP"
LONG to XLM: "LONG_XLM"
USDT to XLM: "USDT_XLM"
BTC to XLM: "BTC_XLM"
BTC to ETC: "BTC_ETC"
BTC to LTC: "BTC_LTC"
BTC to BTG: "BTC_BTG"
BTC to ZEC: "BTC_ZEC"
BTC to BCH: "BTC_BCH"
BTC to DASH: "BTC_DASH"
BTC to ETH: "BTC_ETH"
BTC to FUN: "BTC_FUN"
BTC to SKY: "BTC_SKY"
BTC to TNB: "BTC_TNB"
BTC to UCASH: "BTC_UCASH"
BTC to ZRX: "BTC_ZRX"
LONG to BCH: "LONG_BCH"
LONG to BTG: "LONG_BTG"
LONG to DASH: "LONG_DASH"
LONG to ETC: "LONG_ETC"
LONG to ETH: "LONG_ETH"
LONG to FUN: "LONG_FUN"
LONG to LTC: "LONG_LTC"
LONG to SKY: "LONG_SKY"
LONG to TNB: "LONG_TNB"
LONG to ZEC: "LONG_ZEC"
LONG to ZRXBCH: "LONG_ZRX"
USDT to BCH: "USDT_BCH"
USDT to BTC: "USDT_BTC"
USDT to BTG: "USDT_BTG"
USDT to DASH: "USDT_DASH"
LONG to USDT: "LONG_USDT"
USDT to ETC: "USDT_ETC"
USDT to ETH: "USDT_ETH"
USDT to LTC: "USDT_LTC"
USDT to SKY: "USDT_SKY"
USDT to TNB: "USDT_TNB"
USDT to UCASH: "USDT_UCASH"
USDT to ZEC: "USDT_ZEC"
USDT to ZRX: "USDT_ZRX"
BTC to BEZ: "BTC_BEZ"
BTC to TRIA: "BTC_TRIA"
USDT to FUN: "USDT_FUN"
USDT to PAX: "USDT_PAX"
USDT to BSV: "USDT_BSV"
LONG to BSV: "LONG_BSV"
BTC to BSV: "BTC_BSV"
Example Ticker Request:
https://api.c2cx.com/v1/ticker/?symbol=LONG_BTC
Error Responses:
code 200: Success
code 400: Error
Get Exchange Policy
Request
Type GET
https://api.c2cx.com/v1/ExchangePolicyV3
Parameters
none
Response
SupportPairs: Support Pairs
TransferFee: Transfer Fee
OrderPolicy: Order Policy
Example
https://api.c2cx.com/v1/ExchangePolicyV3
Response
{
"MarketProportion": 0.98,
"Transfers": {
"CNY": {
"FullName": "CNY",
"Enable": "False",
"AssetTypeId": 1,
"BalanceDigits": 4,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": null,
"Address": null,
"AddressFormat": null
},
"BTC": {
"FullName": "BTC",
"Enable": "True",
"AssetTypeId": 2,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://blockchain.info/tx/",
"Address": "https://blockchain.info/address/",
"AddressFormat": "btc-address"
},
"LTC": {
"FullName": "LTC",
"Enable": "True",
"AssetTypeId": 3,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://live.blockcypher.com/ltc/tx/",
"Address": "http://live.blockcypher.com/ltc/address/",
"AddressFormat": "none"
},
"ETH": {
"FullName": "ETH",
"Enable": "True",
"AssetTypeId": 5,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"ETC": {
"FullName": "ETC",
"Enable": "True",
"AssetTypeId": 6,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://gastracker.io/tx/",
"Address": "https://gastracker.io/addr/",
"AddressFormat": "etc-address"
},
"SKY": {
"FullName": "SKY",
"Enable": "Limit",
"AssetTypeId": 7,
"BalanceDigits": 2,
"AllowDeposit": false,
"AllowWithdrawal": false,
"AllowVoucher": false,
"Txlink": "https://explorer.skycoin.net/transaction/",
"Address": "https://explorer.skycoin.net/app/address/",
"AddressFormat": "sky-address"
},
"SHL": {
"FullName": "SHL",
"Enable": "False",
"AssetTypeId": 8,
"BalanceDigits": 2,
"AllowDeposit": false,
"AllowWithdrawal": false,
"AllowVoucher": false,
"Txlink": "#",
"Address": "#",
"AddressFormat": "none"
},
"BCH": {
"FullName": "BCH",
"Enable": "True",
"AssetTypeId": 9,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://blockdozer.com/tx/",
"Address": "https://blockdozer.com/address/",
"AddressFormat": "btc-address"
},
"ZEC": {
"FullName": "ZEC",
"Enable": "True",
"AssetTypeId": 10,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://zcashnetwork.info/tx/",
"Address": "https://zcashnetwork.info/address",
"AddressFormat": "none"
},
"LONG": {
"FullName": "LONG",
"Enable": "True",
"AssetTypeId": 11,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "#",
"Address": "#",
"AddressFormat": "eth-address"
},
"CABS": {
"FullName": "CABS",
"Enable": "False",
"AssetTypeId": 12,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": null,
"Address": null,
"AddressFormat": null
},
"BTG": {
"FullName": "BTG",
"Enable": "True",
"AssetTypeId": 13,
"BalanceDigits": 2,
"AllowDeposit": false,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://btgexplorer.com/tx/",
"Address": "https://btgexplorer.com/address/",
"AddressFormat": "btc-address"
},
"FCABS": {
"FullName": "FCABS",
"Enable": "False",
"AssetTypeId": 14,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": null,
"Address": null,
"AddressFormat": null
},
"USDT": {
"FullName": "USDT",
"Enable": "True",
"AssetTypeId": 15,
"BalanceDigits": 4,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"DASH": {
"FullName": "DASH",
"Enable": "True",
"AssetTypeId": 16,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://live.blockcypher.com/dash/tx/",
"Address": "https://live.blockcypher.com/dash/address/",
"AddressFormat": "none"
},
"ZRX": {
"FullName": "ZRX",
"Enable": "True",
"AssetTypeId": 17,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"FUN": {
"FullName": "FUN",
"Enable": "True",
"AssetTypeId": 18,
"BalanceDigits": 1,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"TNB": {
"FullName": "TNB",
"Enable": "True",
"AssetTypeId": 19,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "none"
},
"UCASH": {
"FullName": "UCASH",
"Enable": "True",
"AssetTypeId": 21,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"OMG": {
"FullName": "OMG",
"Enable": "True",
"AssetTypeId": 23,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"RCN": {
"FullName": "RCN",
"Enable": "True",
"AssetTypeId": 24,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"XRP": {
"FullName": "XRP",
"Enable": "True",
"AssetTypeId": 25,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://bithomp.com/explorer/",
"Address": "https://bithomp.com/explorer/",
"AddressFormat": "none"
},
"EOS": {
"FullName": "EOS",
"Enable": "True",
"AssetTypeId": 26,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://bloks.io/transaction/",
"Address": "https://bloks.io/account/",
"AddressFormat": "eos-address"
},
"SPK": {
"FullName": "SPK",
"Enable": "False",
"AssetTypeId": 27,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": null,
"Address": null,
"AddressFormat": null
},
"WAX": {
"FullName": "WAX",
"Enable": "True",
"AssetTypeId": 28,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"XLM": {
"FullName": "XLM",
"Enable": "True",
"AssetTypeId": 29,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://stellarscan.io/transaction/",
"Address": "https://stellarscan.io/ledger/",
"AddressFormat": "none"
},
"TRIA": {
"FullName": "TRIA",
"Enable": "True",
"AssetTypeId": 30,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"BEZ": {
"FullName": "BEZ",
"Enable": "True",
"AssetTypeId": 31,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"SLRM": {
"FullName": "SLRM",
"Enable": "Limit",
"AssetTypeId": 32,
"BalanceDigits": 2,
"AllowDeposit": false,
"AllowWithdrawal": false,
"AllowVoucher": false,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "none"
},
"APPL": {
"FullName": "APPL",
"Enable": "True",
"AssetTypeId": 35,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"AGRS": {
"FullName": "AGRS",
"Enable": "Limit",
"AssetTypeId": 37,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": null,
"Address": null,
"AddressFormat": null
},
"PAX": {
"FullName": "PAX",
"Enable": "True",
"AssetTypeId": 39,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"USDTO": {
"FullName": "USDTO",
"Enable": "False",
"AssetTypeId": 41,
"BalanceDigits": 4,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": null,
"Address": null,
"AddressFormat": null
},
"BAB": {
"FullName": "BAB",
"Enable": "False",
"AssetTypeId": 42,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": null,
"Address": null,
"AddressFormat": null
},
"BSV": {
"FullName": "BSV",
"Enable": "True",
"AssetTypeId": 43,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://bchsvexplorer.com/tx/",
"Address": "https://bchsvexplorer.com/address/",
"AddressFormat": "btc-address"
},
"HLT": {
"FullName": "HLT",
"Enable": "True",
"AssetTypeId": 45,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"GALT": {
"FullName": "GALT",
"Enable": "True",
"AssetTypeId": 46,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "http://explorer.galtcoin.io/app/blocks/",
"Address": "http://explorer.galtcoin.io/app/blocks/",
"AddressFormat": "none"
},
"UCAD": {
"FullName": "UCAD",
"Enable": "True",
"AssetTypeId": 47,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": null,
"Address": null,
"AddressFormat": null
},
"LEO": {
"FullName": "LEO",
"Enable": "True",
"AssetTypeId": 48,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": "https://etherscan.io/tx/",
"Address": "https://etherscan.io/address/",
"AddressFormat": "eth-address"
},
"UCNY": {
"FullName": "UCNY",
"Enable": "True",
"AssetTypeId": 49,
"BalanceDigits": 2,
"AllowDeposit": true,
"AllowWithdrawal": true,
"AllowVoucher": true,
"Txlink": null,
"Address": null,
"AddressFormat": null
}
},
"Trades": {
"BTC": {
"Name": "BTC",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "LONG_BTC",
"Pricedigits": 3,
"Quantitydigits": 5,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "PAX_BTC",
"Pricedigits": 0,
"Quantitydigits": 4,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_BTC",
"Pricedigits": 2,
"Quantitydigits": 4,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "UCAD_BTC",
"Pricedigits": 0,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "UCNY_BTC",
"Pricedigits": 0,
"Quantitydigits": 6,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"LTC": {
"Name": "LTC",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "LONG_LTC",
"Pricedigits": 3,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_LTC",
"Pricedigits": 5,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_LTC",
"Pricedigits": 1,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"ETH": {
"Name": "ETH",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "LONG_ETH",
"Pricedigits": 1,
"Quantitydigits": 3,
"AllowTriggerOrder": false,
"AllowStoplossOrder": false,
"AllowTakeprofitOrder": false,
"Enable": false
},
{
"Name": "BTC_ETH",
"Pricedigits": 4,
"Quantitydigits": 1,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_ETH",
"Pricedigits": 1,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "UCAD_ETH",
"Pricedigits": 0,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "UCNY_ETH",
"Pricedigits": 0,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"ETC": {
"Name": "ETC",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "LONG_ETC",
"Pricedigits": 3,
"Quantitydigits": 5,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_ETC",
"Pricedigits": 4,
"Quantitydigits": 1,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_ETC",
"Pricedigits": 6,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"SKY": null,
"BCH": {
"Name": "BCH",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "USDT_BCH",
"Pricedigits": 1,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "LONG_BCH",
"Pricedigits": 2,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_BCH",
"Pricedigits": 4,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "UCNY_BCH",
"Pricedigits": 0,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"ZEC": {
"Name": "ZEC",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "LONG_ZEC",
"Pricedigits": 2,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_ZEC",
"Pricedigits": 1,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_ZEC",
"Pricedigits": 4,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"LONG": {
"Name": "LONG",
"BalanceDigits": 2,
"Group": "stable",
"Pairs": [
{
"Name": "CNY_LONG",
"Pricedigits": 0,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "UCNY_LONG",
"Pricedigits": 2,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_LONG",
"Pricedigits": 2,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"BTG": {
"Name": "BTG",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "LONG_BTG",
"Pricedigits": 3,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_BTG",
"Pricedigits": 2,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_BTG",
"Pricedigits": 5,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"USDT": null,
"DASH": {
"Name": "DASH",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "LONG_DASH",
"Pricedigits": 2,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_DASH",
"Pricedigits": 1,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_DASH",
"Pricedigits": 4,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"ZRX": {
"Name": "ZRX",
"BalanceDigits": 2,
"Group": "tokens",
"Pairs": [
{
"Name": "LONG_ZRX",
"Pricedigits": 4,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_ZRX",
"Pricedigits": 3,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_ZRX",
"Pricedigits": 7,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"FUN": {
"Name": "FUN",
"BalanceDigits": 1,
"Group": "tokens",
"Pairs": [
{
"Name": "LONG_FUN",
"Pricedigits": 3,
"Quantitydigits": 3,
"AllowTriggerOrder": true,
"AllowStoplossOrder": false,
"AllowTakeprofitOrder": true,
"Enable": false
},
{
"Name": "USDT_FUN",
"Pricedigits": 3,
"Quantitydigits": 5,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_FUN",
"Pricedigits": 3,
"Quantitydigits": 3,
"AllowTriggerOrder": true,
"AllowStoplossOrder": false,
"AllowTakeprofitOrder": true,
"Enable": false
}
]
},
"TNB": {
"Name": "TNB",
"BalanceDigits": 2,
"Group": "tokens",
"Pairs": [
{
"Name": "LONG_TNB",
"Pricedigits": 6,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_TNB",
"Pricedigits": 5,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_TNB",
"Pricedigits": 8,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"UCASH": {
"Name": "UCASH",
"BalanceDigits": 2,
"Group": "tokens",
"Pairs": [
{
"Name": "USDT_UCASH",
"Pricedigits": 5,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_UCASH",
"Pricedigits": 8,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"SYN1": null,
"OMG": {
"Name": "OMG",
"BalanceDigits": 2,
"Group": "tokens",
"Pairs": [
{
"Name": "LONG_OMG",
"Pricedigits": 4,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_OMG",
"Pricedigits": 3,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_OMG",
"Pricedigits": 6,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"RCN": {
"Name": "RCN",
"BalanceDigits": 2,
"Group": "tokens",
"Pairs": [
{
"Name": "LONG_RCN",
"Pricedigits": 6,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_RCN",
"Pricedigits": 5,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_RCN",
"Pricedigits": 8,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"XRP": {
"Name": "XRP",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "LONG_XRP",
"Pricedigits": 4,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_XRP",
"Pricedigits": 3,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_XRP",
"Pricedigits": 7,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"EOS": {
"Name": "EOS",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "LONG_EOS",
"Pricedigits": 4,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_EOS",
"Pricedigits": 7,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_EOS",
"Pricedigits": 2,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"WAX": {
"Name": "WAX",
"BalanceDigits": 2,
"Group": "tokens",
"Pairs": [
{
"Name": "LONG_WAX",
"Pricedigits": 5,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_WAX",
"Pricedigits": 4,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_WAX",
"Pricedigits": 7,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"XLM": {
"Name": "XLM",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "LONG_XLM",
"Pricedigits": 5,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_XLM",
"Pricedigits": 7,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "USDT_XLM",
"Pricedigits": 4,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"TRIA": {
"Name": "TRIA",
"BalanceDigits": 2,
"Group": "tokens",
"Pairs": [
{
"Name": "BTC_TRIA",
"Pricedigits": 6,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"BEZ": {
"Name": "BEZ",
"BalanceDigits": 2,
"Group": "tokens",
"Pairs": [
{
"Name": "BTC_BEZ",
"Pricedigits": 8,
"Quantitydigits": 3,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"SLRM": null,
"APPL": null,
"ORNG": null,
"AGRS": null,
"PAX": {
"Name": "PAX",
"BalanceDigits": 2,
"Group": "stable",
"Pairs": [
{
"Name": "USDT_PAX",
"Pricedigits": 4,
"Quantitydigits": 0,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"SYN2": null,
"BSV": {
"Name": "BSV",
"BalanceDigits": 2,
"Group": "ccoins",
"Pairs": [
{
"Name": "USDT_BSV",
"Pricedigits": 1,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "LONG_BSV",
"Pricedigits": 2,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_BSV",
"Pricedigits": 5,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"CXB": null,
"HLT": {
"Name": "HLT",
"BalanceDigits": 2,
"Group": "tokens",
"Pairs": [
{
"Name": "USDT_HLT",
"Pricedigits": 3,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"GALT": {
"Name": "GALT",
"BalanceDigits": 2,
"Group": "new",
"Pairs": [
{
"Name": "USDT_GALT",
"Pricedigits": 4,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"UCAD": {
"Name": "UCAD",
"BalanceDigits": 2,
"Group": null,
"Pairs": [
{
"Name": "USDT_UCAD",
"Pricedigits": 3,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"LEO": {
"Name": "LEO",
"BalanceDigits": 2,
"Group": "new",
"Pairs": [
{
"Name": "USDT_LEO",
"Pricedigits": 3,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
},
{
"Name": "BTC_LEO",
"Pricedigits": 7,
"Quantitydigits": 2,
"AllowTriggerOrder": true,
"AllowStoplossOrder": true,
"AllowTakeprofitOrder": true,
"Enable": true
}
]
},
"UCNY": null
}
}
The public ticker API returns key pricing data for a give currency pair.
Request
Type GET
https://api.c2cx.com/v1/ticker/?symbol=[symbol]
Parameters
Symbol ( required ): The currency pair you are retrieve data for ( must be capitalized ).
Response
Timestamp: Epoch timestamp of data.
High: Trailing 24 hour highest price.
Last: Last order execution price.
Low: Trailing 24 hour lowest price.
Buy: Current highest buy price in order book.
Sell: Current lowest sell price in order book.
Volume: 24 hour trailing volume (not all currencies may report this number).
Example
https://api.c2cx.com/v1/ticker/?symbol=LONG_BTC
Response
{
'code': 200,
'message': 'success',
'data': {
'timestamp': '1544086142',
'high': 0.00483,
'last': 0.00465,
'low': 0.00446,
'buy': 0.00458,
'sell': 0.00466,
'volume': 156590.21818550225
}
}
Return the full order book for a given currency pair.
Request
Type GET
https://api.c2cx.com/v1/getorderbook?symbol=[symbol]
Parameters
symbol(Required): The currency pair you are retrieve data for ( must be capitalized ).
Response
Timestamp: Epoch timestamp of data.
Bids: Array of open buy orders. Each order contains the order price and order quantity.
Asks: Array of open sell orders. Each order contains the order price and order quantity.
Example
https://api.c2cx.com/v1/getorderbook?symbol=LONG_BTC
Response
{
"code":200,
"message":"success",
"data":
{
"timestamp":"1495518849",
"bids":[[16990.0,52.49],[16980.0,0.12],[16960.0,0.03],[16950.0,2.51],[16940.0,2.2],[16930.0,1.19],[16920.0,4.15],
[16910.0,1.82],[16900.0,1.21],[16880.0,14.27],[16870.0,1.27],[16860.0,1.00],[16850.0,0.58],[16840.0,1.21],
[16830.0,1.34],[16820.0,1.06],[16800.0,15.10],[16790.0,1.04],[16780.0,1.21],[16770.0,3.96]],
"asks":[[17850.0,6.52],[17840.0,3.94],[17830.0,1.99],[17810.0,2.86],[17800.0,3.69],
[17790.0,0.46],[17780.0,0.34],[17770.0,0.73],[17760.0,0.22],[17740.0,0.30],[17730.0,0.37],[17720.0,25.84],
[17710.0,2.84],[17700.0,0.55],[17690.0,5.11],[17670.0,2.79],[17660.0,0.42],[17650.0,3.29],[17640.0,16.07],
[17630.0,3.94],[17620.0,2.30],[17600.0,1.72],[17590.0,0.32],[17580.0,2.00],[17570.0,11.08],[17560.0,18.06],
[17550.0,16.36],[17530.0,3.94],[17520.0,21.44],[17510.0,3.35]]
}
}
Return the latest 50 trades history for a given currency pair.
Request
Type GET
https://api.c2cx.com/v1/Trades?symbol=[symbol]
Parameters
symbol(Required): The currency pair you are retrieve data for ( must be capitalized ).
Response
the json array content order by index:
UnixTimestam
number
lastprice
Example
https://api.c2cx.com/v1/Trades?symbol=LONG_BTC
Response
{
"code": 200,
"message": "success",
"data": "[1557902953,0.0002,560.9],[1557902951,0.0001,560.8],[1557902947,0.0002,560.8],[1557902943,0.0003,560.8],
[1557902939,0.0043,560.8],[1557902936,0.0001,560.8],[1557902933,0.0002,560.8],[1557902929,0.0002,560.8],[1557902927,0.0002,560.8],
[1557902923,0.0003,560.8],[1557902922,0.0001,560.8],[1557902918,0.0002,560.8],[1557902915,0.0003,560.8],[1557902912,0.0001,560.8],
[1557902909,0.0001,560.8],[1557902907,0.0001,560.8],[1557902904,0.0003,560.9],[1557902891,0.006,561.4],[1557902884,0.0058,561.4],
[1557902879,0.1522,561.4],[1557902876,0.0013,561.4],[1557902873,0.0092,561.4],[1557902870,0.0003,561.4],[1557902868,0.102,561.4],
[1557902866,0.001,561.4],[1557902862,0.0005,561.1],[1557902860,0.0117,561.5],[1557902857,0.0004,561.1],[1557902855,0.087,561.1],
[1557902852,0.0166,561.1],[1557902850,0.0006,561.1],[1557902845,0.0004,561.1],[1557902843,0.0006,561.1],[1557902840,0.0008,561.0],
[1557902836,0.0025,561.0],[1557902834,0.0113,561.0],[1557902830,0.001,561.0],[1557902828,0.0018,561.0],[1557902821,0.048,561.0],
[1557902819,0.0257,561.0],[1557902816,0.128,561.0],[1557902815,0.003,561.0],[1557902813,0.021,561.0],[1557902811,0.0001,561.0],
[1557902809,0.0058,561.0],[1557902806,0.0141,561.0],[1557902805,0.0375,561.0],[1557902801,0.0012,561.2],[1557902799,0.006,561.2],[1557902796,0.0001,561.2]"
}
Returns a user’s balance details.
Type POST
https://api.c2cx.com/v1/getbalance
Parameters
getBalance: Public API Key
sign: Public/Private key signature.
Response
balance: Balance of a given currency frozen: Amount used on open order for a given currency.
Example
https://api.c2cx.com/v1/getbalance
Post Parameters
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[sign] => XXXXXXXXXXXXXXXXXXXXXX
Response
{
"code":200,
"message":"success",
"data":{
"balance":{
"btc":21.02938304,
"cny":107132.59597700,
"eth":10.46997897,
"etc":109.34651160,
"sky":501.09096000
},
"frozen":{
"btc":0.11800000,
"cny":1000.00000000,
"eth":9.46800000,
"etc":24.91900000,
"sky":0.00000000
}
}
}
Create a new order.
Type POST
https://api.c2cx.com/v1/createOrder
Parameters
quantity(Required): Quantity of order.
apiKey: Public API key
price(Required): Order Price
symbol(Required): Symbol for the order book you would like to place an order for.
priceTypeId(Required): “limit” for limit orders, “market” for market orders.
orderType(Required): “buy” or “sell”,
isAdvancedOrder: “0” if no advanced options are used, “1” if advanced options are used.
// Advanced options are only required if “isAdvancedOrder” is set. For more information of advanced orders see the FAQ.
takeProfit: Take profit price.
stopLoss: Stop loss price.
triggerPrice: Trigger price.
sign: Public/Private key signature.
cid: custom string, distinct
expirationDate: expiration date
Notes:
Under [priceTypeId] => "Market" condition:
If [orderType] => Buy: Not passing the quantity parameter or passing the quantity value as 0.
If [orderType] => Sell:Not passing the price parameter or passing the price value as 0.
Response
orderId: ID of submitted order.
Example
https://api.c2cx.com/v1/createOrder
Post Parameters
[quantity] => 1
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[price] => 10
[symbol] => LONG_ETC
[priceTypeId] => limit
[orderType] => Buy
[isAdvanceOrder] => 0
[sign] => XXXXXXXXXXXXXXXXXXXXXX
Response
{
"code":200,
"message":"success",
"data":{
"orderId":223424243
}
}
Get recent order
Type POST
https://api.c2cx.com/v1/getRecentOrder
Parameters
apiKey: Public API key
symbol(Required): Symbol for the order book you would like to place an order for.
start: start time.
end: end time
sort: desc/asc
statusId: 110--Open,0---All,2---Active,3---Partial,4---Completed,5---Cancelled,7---Suspended,11---Expired,12---Cancelling
typeId: 0---All,1---Buy,2---Sell,3---Market,4----Trigger,5----Take_Profit,6----Stop_Loss
sign: Public/Private key signature.
Response
orderId: ID of submitted order.Example
https://api.c2cx.com/v1/getRecentOrder
Post Parameters
[statusId] => 110
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[typeId] => 0
[start] => 2018-3-8 10:04:12
[end] => 2018-3-8 16:04:33
[sort] => desc
[symbol] => LONG_ETC
[sign] => XXXXXXXXXXXXXXXXXXXXXX
Response
{
'code': 200,
'message': 'success',
'data': [{
'Date': '2018-11-12 16:39:13.733',
'Time': '16:39',
'OrderId': 4925276,
'TypeName': 'Buy',
'Quantity': ' 6000',
'Price': '$0.0126',
'CompletedAmount': '$75.0374',
'OrderStatus': 'Completed',
'OrderStatusId': 4,
'Type': 'buy',
'Linheight': 'N/A',
'MarketOrder': False,
'OrderBookStatusId': 0,
'BaseOrderId': None,
'Notified': False,
'OrderClassId': 1
}, {
'Date': '2018-11-26 21:02:41.737',
'Time': '21:02',
'OrderId': 4965810,
'TypeName': 'Buy',
'Quantity': ' 1700',
'Price': '$0.0051',
'CompletedAmount': '$8.67',
'OrderStatus': 'Completed',
'OrderStatusId': 4,
'Type': 'buy',
'Linheight': 'N/A',
'MarketOrder': False,
'OrderBookStatusId': 0,
'BaseOrderId': None,
'Notified': False,
'OrderClassId': 1
}, {
'Date': '2018-11-26 21:30:16.530',
'Time': '21:30',
'OrderId': 4968187,
'TypeName': 'Buy',
'Quantity': ' 1700',
'Price': '$0.0051',
'CompletedAmount': '$8.67',
'OrderStatus': 'Completed',
'OrderStatusId': 4,
'Type': 'buy',
'Linheight': 'N/A',
'MarketOrder': False,
'OrderBookStatusId': 0,
'BaseOrderId': None,
'Notified': False,
'OrderClassId': 1
}, {
'Date': '2018-11-26 21:39:14.670',
'Time': '21:39',
'OrderId': 4968226,
'TypeName': 'Buy',
'Quantity': ' 1700',
'Price': '$0.0051',
'CompletedAmount': '$8.67',
'OrderStatus': 'Completed',
'OrderStatusId': 4,
'Type': 'buy',
'Linheight': 'N/A',
'MarketOrder': False,
'OrderBookStatusId': 0,
'BaseOrderId': None,
'Notified': False,
'OrderClassId': 1
}, {
'Date': '2018-11-29 05:46:06.307',
'Time': '05:46',
'OrderId': 4969198,
'TypeName': 'Buy',
'Quantity': ' 2721.09',
'Price': '$0.00735',
'CompletedAmount': '$19.9183',
'OrderStatus': 'Completed',
'OrderStatusId': 4,
'Type': 'buy',
'Linheight': 'N/A',
'MarketOrder': False,
'OrderBookStatusId': 0,
'BaseOrderId': None,
'Notified': False,
'OrderClassId': 1
}]
}
Cancel an open order.
Type POST
https://api.c2cx.com/v1/cancelorder
Parameters
apiKey: Public API key.
orderId(Required): Id of order you wish to cancel.
sign: Public/Private key signature.
Response
“success” array will not be empty if successfully, “fail” array will not be empty if there is an error. The fail array will contain a description of the error.
Example
https://api.c2cx.com/v1/cancelorder
Post Parameters
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[orderid] => 1761386
[sign] => XXXXXXXXXXXXXXXXXXXXXX
Response
{'code': 200, 'message': 'Success', 'data': {}}
Get a list of all open orders or a specific order.
Type POST
https://api.c2cx.com/v1/getorderinfo
Parameters
apiKey: Public API key
orderid(Required): “-1” to return all open orders or the order number to return a specific order number.
symbol(Required): Symbol of order book you are trying to retrieve orders from.
sign: Public/Private key signature.
Response
frozen: Amount used on open order for a given currency and “total” frozen of all currencies converted to RMB.
Example
https://api.c2cx.com/v1/getbalance
Post Parameters
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[orderid] => 335358
[symbol] => LONG_BTC
[sign] => XXXXXXXXXXXXXXXXXXXXXX
Response
{
'code': 200,
'message': 'Success',
'data': {
'amount': 27.5,
'avgPrice': 0.0,
'completedAmount': '0',
'createDate': 1544077845917,
'orderId': 4970058,
'price': 0.00029,
'status': 5,
'type': 'sell',
'fee': 0.0,
'cid': None,
'source': 'API'
}
}
Get a list of orders for a selected order book with a specific status.
Type POST
https://api.c2cx.com/v1/getorderbystatus
Parameters
apiKey: Public API key
symbol(Required): Symbol of order book you are trying to retrieve orders from.
statusid(Required): 0 = all,2=Active,3=Partially Completed,4=completed,5=cancelled,6=Suspended
duration: the duration time (second)
pageindex(Required):
pagesize(Required): [1,100]
sign: Public/Private key signature.
Response
amount: Order quantity,
avgPrice: Average execution price of order.
completedAmount: Amount of the order that is completed.
createDate: Epoch timestamp of the orders creation.
updateDate: Epoch timestamp of the orders last update.
orderId: 320255,
price: 2,
status:
Example
https://api.c2cx.com/v1/getorderbystatus
Post Parameters
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[statusid] => 2
[symbol] => LONG_BTC
[sign] => XXXXXXXXXXXXXXXXXXXXXX
Response
{
'code': 200,
'message': 'success',
'data': {
'rows': [{
'amount': 5300.0,
'avgPrice': 0.00379,
'completedAmount': '5300',
'createDate': 1544151083157,
'updateDate': 1544151084233,
'orderId': 4970265,
'price': 0.0,
'status': 4,
'fee': 0.030131,
'type': 'marketsell',
'trigger': 0.00379,
'cid': None,
'source': 'API'
}, {
'amount': 4400.0,
'avgPrice': 0.00459999,
'completedAmount': '4400',
'createDate': 1544077580090,
'updateDate': 1544078181810,
'orderId': 4970057,
'price': 0.0046,
'status': 4,
'fee': 0.0,
'type': 'sell',
'trigger': 0.00459999,
'cid': None,
'source': 'API'
}],
'pageindex': 0,
'pagesize': 2,
'recordcount': 61,
'pagecount': 31.0
}
}