Public ws
快速入门¶
Restful API¶
公共接口¶
用户接口¶
订单接口¶
WebSocket API¶
WebSocket接入说明¶
公共接口¶
用户接口¶
订单接口¶
1. 查询最新成交价¶
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"method": "market.last_price",
"params": {
"symbol": "BTC",
"nonce": "17832",
"timestamp": 1724285700000,
"apiKey": "9a25209b66004da404d9ddcb48d1e11f",
"sign": "--signature here--"
}
}
请求参数
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| symbol | string | Y | 币对 |
返回数据
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"code": "0",
"msg": "success",
"data": "10000.00" //最新成交价
}
2. 查询深度数据¶
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"method": "market.depth",
"params": {
"symbol": "BTC",
"precision": 5,
"nonce": "17832",
"timestamp": "1724285700000",
"apiKey": "9a25209b66004da404d9ddcb48d1e11f",
"sign": "--signature here--"
}
}
请求参数
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| symbol | string | Y | 币对 |
| precision | number | Y | 精度 |
返回数据
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"code": "0",
"msg": "success",
"data": {
"asks": [//卖盘
{
"price": "10000.00",//委托价
"volume": "10.00"//委托量
}
],
"bids": [//买盘
{
"price": "9990.00",//委托价
"volume": "10.00"//委托量
}
],
"ts": "1724285700000"//时间戳
}
}
3. 查询K线数据¶
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"method": "market.kline",
"params": {
"symbol": "BTC",
"interval": "1",
"nonce": "17832",
"timestamp": "1724285700000",
"apiKey": "9a25209b66004da404d9ddcb48d1e11f",
"sign": "--signature here--"
}
}
请求参数
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| symbol | string | Y | 币对 |
| interval | string | Y | kline粒度,默认1min(1,3,5,15,30,60,120,240,360,720,D,M,W) |
返回数据
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"code": "0",
"msg": "success",
"data": {
"symbol": "BTC",//币对
"open": "10000.00",//开盘价
"high": "10010.00",//最高价
"low": "9990.00",//最低价
"close": "10000.00",//最新价
"ts": "1724285700000"//kline开始时间ISO8601
}
}
4. 查询币对数据¶
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"method": "common.coin_pair.list",
"params": {
"nonce": "17832",
"timestamp": "1724285700000",
"apiKey": "9a25209b66004da404d9ddcb48d1e11f",
"sign": "--signature here--"
}
}
请求参数
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| 无 |
返回数据
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"code": "0",
"msg": "success",
"data": [
{
"id": "1",//id
"base": "BTC",//基准币
"quote": "USDT",//计价币
"basePrecision": "8",//基准币精度
"quotePrecision": "2",//计价币精度
"minPrice": "0.01",//最小交易额
"minVolume": "0.001",//最小交易量
"isOpen": "1",//是否开放
"isHot": "1",//是否热门
"isRecommend": "1",//是否推荐
"isShow": "1",//是否显示
"tradeArea": "USDT",//交易区
"sort": "1",//排序
"openTime": "2020-01-01 00:00:00",//开放时间
"precisions": [//交易精度
"0.01",
"0.001"
]
}
]
}
5. 查询汇率数据¶
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"method": "common.rate.list",
"params": {
"nonce": "17832",
"timestamp": "1724285700000",
"apiKey": "9a25209b66004da404d9ddcb48d1e11f",
"sign": "--signature here--"
}
}
请求参数
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| 无 |
返回数据
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"code": "0",
"msg": "success",
"data": [//汇率数据
{
"baseSymbol": "USD",//基准币
"quoteSymbol": "CNY",//计价币
"rate": "6.5"//汇率
}
]
}
6. 查询币种数据¶
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"method": "common.coin.coin_network.list",
"params": {
"nonce": "17832",
"timestamp": "1724285700000",
"apiKey": "9a25209b66004da404d9ddcb48d1e11f",
"sign": "--signature here--"
}
}
请求参数
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| 无 |
返回数据
{
"id": "2d812f20c9e1030f5551eab0e039f613",
"code": "0",
"msg": "success",
"data": [//币种数据
{
"name": "BTC",//币种
"fullName": "Bitcoin",//币种全称
"logo": "https://www.bitunix.com/logo.png",//币种图标
"track": "BTC",//赛道
"quotePrecision": "8",//计价币精度
"minPrice": "0.01",//最小交易额
"isOpen": "1",//是否开放
"isHot": "1",//是否热门
"depositOpen": "1",//是否开放充值,0关闭充值,1开放充值;
"isShow": "1",//是否可见
"withdrawOpen": "1",//是否开启提现,0关闭提现,1开启提现;
"withdrawMin": "0.001",//最小提币数量
"withdrawMax": "1000.00",//最大提币数量
"networks": [//币种的网络相关数据
{
"contractPrecision": "8",//合约精度
"contractAddress": "0x1234567890",//币种合约地址
"requireMemo": "0",//是否需要memo.0:不必填,1:选填,2:必填
"chain": "ETH",//币种所在链
"depositConfirm": "3",//充币确认数
"addressRegular": "0x[0-9a-fA-F]{40}",//地址正则
"network": "ETH",//网络名称
"isOpen": "1",//是否开启;0关闭,1开启
"depositOpen": "1",//是否开放充值,0关闭充值,1开放充值;
"isShow": "1",//是否可见
"withdrawOpen": "1",//是否开启提现,
"withdrawMin": "0.001",//最小提币数量
"withdrawMax": "1000.00",//最大提币数量
"depositMin": "0.001"//单笔充币最小值
}
]
}
]
}