C2CX提供公开市场数据和授权交易的REST JSON API,以便外部应用程序访问关键的C2CX功能和数据. 当前的'v1'API旨在仅提供核心功能. 未来版本将部署 在新终端上,并将扩展当前功能. 如果您有任何反馈或功能请求,请随时将详细信息发送到我们的支持渠道之一. C2CX提供了几个示例库,可帮助您使用所选 语言. 如果您愿意分享您用其他语言创建的库,请告诉我们.
虽然可以添加不影响现有请求的新API,参数和响应值,但API参数和结果在版本中将保持一致.
当前的API版本是'v1'。 可以在 https://api.c2cx.com/beta/找到以前版本的文档。 以前版本的API将被弃用,2017年9月1日后将不再可用.
中文: [QQ群:129483457]
每个终端每分钟60个API请求
Error Response: {“error”:”rate_limit”}
如果每分钟向端点发送超过60个API请求,则发送IP将被阻止30到60秒.
每个API请求的结果也限制为100个. 可能返回超过100个结果的API将具有分页选项.
以下提供的库,仅供参考. 请在将代码集成到您的应用程序之前审查代码.
可以通过登录C2CX帐户并选择'设置'菜单项来生成API密钥. 进入左侧的'API'选项卡,您可以生成新的API公钥和密钥. 复制这些并将它们保存在安全的地方. 您的私钥只会显示一次.
所有经过授权的请求与通过获取包含公钥,所有参数和密钥的字符串的MD5生成的签名一起发送.
参数必须按字母顺序排列,并将密钥作为最后一个参数. 字符串的格式应如下例所示:
Signature = stringToUppercase( md5(“apiKey=[Public_Key]& param1=value& param2=value&secretKey=[Secret_Key]”) )
然后将该签名与post请求一起作为'sign'的附加参数发送.
市场数据API需要symbol参数来返回适当的交易数据. 符号必须大写, 目前支持的符号如下:
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"
示例ticker请求:
https://api.c2cx.com/v1/ticker/?symbol=LONG_BTC
错误响应值:
code 200: Success
code 400: Error
获取货币交易规则
请求
类型 GET
https://api.c2cx.com/v1/ExchangePolicy
参数
无
响应
SupportPairs: 支持的货币对
TransferFee: 提现手续费
OrderPolicy: 订单规则
示例
https://api.c2cx.com/v1/ExchangePolicy
响应
{
"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
}
}
公共ticker接口返回给定货币对的关键定价数据
请求
类型 GET
https://api.c2cx.com/v1/ticker/?symbol=[symbol]
参数
Symbol ( 必填 ): 您要检索数据的货币对(必须大写)
响应
Timestamp: UNIX时间戳
High: 24小时最高价
Last: 最终订单执行价
Low: 24小时最低价
Buy: orderbook当前最高买价
Sell: orderbook当前最低卖价
Volume: 24小时交易量 (不是所有货币都显示该项)
示例
https://api.c2cx.com/v1/ticker/?symbol=LONG_BTC
响应
{
'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
}
}
返回给定货币对的完整orderbook
请求
类型 GET
https://api.c2cx.com/v1/getorderbook?symbol=[symbol]
参数
symbol(必填): 您要检索数据的货币对(必须大写)
响应
Timestamp: UNIX时间戳
Bids: 一组未完成买单, 每个订单都包含订单价格和订单数量
Asks: 一组未完成卖单, 每个订单都包含订单价格和订单数量
示例
https://api.c2cx.com/v1/getorderbook?symbol=LONG_BTC
响应
{
"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]]
}
}
获取指定交易对的最近50条交易历史
请求
类型 GET
https://api.c2cx.com/v1/Trades?symbol=[symbol]
参数
symbol(必填): 您要检索数据的货币对(必须大写)
响应
JSON数组序列依次为:
Unix时间戳
数量
最近价格
示例
https://api.c2cx.com/v1/Trades?symbol=LONG_BTC
响应
{
"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]"
}
返回用户的余额详细信息
类型 POST
https://api.c2cx.com/v1/getbalance
参数
apiKey: 公钥
sign: 公钥/私钥签名
响应
balance: 给定货币的余额 frozen: 给定货币的未完成订单的余额
示例
https://api.c2cx.com/v1/getbalance
Post 参数
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[sign] => XXXXXXXXXXXXXXXXXXXXXX
响应
{
"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
}
}
}
创建新订单
类型 POST
https://api.c2cx.com/v1/createOrder
参数
quantity(必填): 订单数量
apiKey: 公钥
price(必填): 订单价格
symbol(必填): 您要检索数据的货币对(必须大写).
priceTypeId(必填): 'limit':限价单, 'market':市价单
orderType(必填): “buy” 或者 “sell”,
isAdvancedOrder: '0': 非高级订单 '1': 高级订单
// 仅当设置了'isAdvancedOrder'时才需要高级选项. 有关高级订单的更多信息,请参阅常见问题.
takeProfit: 获利价格
stopLoss: 止损价格
triggerPrice: 计划委托价
sign: 公钥/私钥签名
cid: 用户自定义字符串, 不可重复
expirationDate: 过期时间
备注:
priceTypeId为market时:
orderType为买: 不传quantity,或者quantity传0
orderType为卖: 不传price,或者price传0
响应
orderId: 提交订单的ID
示例
https://api.c2cx.com/v1/createOrder
Post 参数
[quantity] => 1
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[price] => 10
[symbol] => LONG_ETC
[priceTypeId] => limit
[orderType] => Buy
[isAdvanceOrder] => 0
[sign] => XXXXXXXXXXXXXXXXXXXXXX
响应
{
"code":200,
"message":"success",
"data":{
"orderId":223424243
}
}
获取最近订单
类型 POST
https://api.c2cx.com/v1/getRecentOrder
参数
apiKey: 公钥
symbol(必填): 您要检索数据的货币对(必须大写)
start: 开始时间
end: 结束时间
sort: desc:倒序, asc:正序
statusId: 110--未完成,0---所有,2---活跃,3---部分完成,4---已完成,5---已取消,7---挂起,11---已过期,12---取消中
typeId:0---所有,1---买单,2---卖单,3---市价单,4----计划委托单,5----获利单,6----止损单
sign: 公钥/私钥签名
响应
orderId: 提交订单的ID例如
https://api.c2cx.com/v1/getRecentOrder
Post 参数
[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
响应
{
'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
}]
}
取消未完成的订单
类型 POST
https://api.c2cx.com/v1/cancelorder
参数
apiKey: 公钥
orderId(必填): 提交订单的ID
sign: 公钥/私钥签名
响应
success数组非空,失败则fail数组非空. fail数组将包含错误信息的描述
示例
https://api.c2cx.com/v1/cancelorder
Post 参数
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[orderid] => 1761386
[sign] => XXXXXXXXXXXXXXXXXXXXXX
响应
{'code': 200, 'message': 'Success', 'data': {}}
获取所有未完成订单或特定订单的列表
类型 POST
https://api.c2cx.com/v1/getorderinfo
参数
apiKey: 公钥
orderid(必填): '-1'返回所有未完成订单, 订单号返回订单详情
symbol(必填): 您要检索数据的货币对(必须大写)
sign: 公钥/私钥签名
响应
frozen: 对于给定货币的未完成订单使用的金额和转换为人民币的所有货币的总冻结金额
示例
https://api.c2cx.com/v1/getbalance
Post 参数
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[orderid] => 335358
[symbol] => LONG_BTC
[sign] => XXXXXXXXXXXXXXXXXXXXXX
响应
{
'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'
}
}
获取具有特定状态的所选orderbook的订单列表
类型 POST
https://api.c2cx.com/v1/getorderbystatus
参数
apiKey:公钥
symbol(必填): 您要检索数据的货币对(必须大写)
statusid(必填): 0 = 所有,2=活跃,3=部分完成,4=已完成,5=已取消,6=挂起
duration: 几秒前
pageindex(必填):第几页
pagesize(必填): 每页列表数量[1,100]
sign: 公钥/私钥签名
响应
amount: 订单数量
avgPrice: 订单平均成交价
completedAmount: 订单已完成数量
createDate: 订单创建UNIX时间戳
updateDate: 订单更新UNIX时间戳
orderId: 订单ID
price: 订单价格
status:
Example
https://api.c2cx.com/v1/getorderbystatus
Post 参数
[apiKey] => XXXXX-XXX-XXXX-XXXX-XXXXXXXX
[statusid] => 2
[symbol] => LONG_BTC
[sign] => XXXXXXXXXXXXXXXXXXXXXX
响应
{
'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
}
}