| 参数名称 | 类型 | 必填 | 说明 |
| search | string | 否 | 按资产 ID(bitcoin)或 symbol (BTC)搜索 |
| ids | string | 否 | 查询多个 id=bitcoin,ethereum,monero |
| limit | int | 否 | 最大限制 2000 |
| offset | int | 否 | 起始值 |
| 参数名称 | 类型 | 说明 | |
| id | int | 资产的唯一标识符 | |
| rank | int | 排名按升序排列 - 这个数字与市值直接相关,而最高市值获得排名 1 | |
| symbol | string | 用于在交易所识别此资产的最常见标识符 | |
| name | string | 资产的专有名称 | |
| supply | decimal | 可供交易的资产量 | |
| maxSupply | decimal | 发行资产总量 | |
| marketCapUsd | decimal | 资产总量价格(美元) | |
| volumeUsd24Hr | decimal | 过去 24 小时内以美元表示的交易量 | |
| priceUsd | decimal | 基于实时市场数据的成交量加权价格,换算成美元 | |
| changePercent24Hr | decimal | 过去 24 小时内的方向和价值变化 | |
| vwap24Hr | string | 过去 24 小时的成交量加权平均价格 | |
| explorer | string | 资产浏览器 |
require_once("curl.func.php");
$method = "POST";
$url = "http://open.6api.net/cybermoney/assets";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"search" => "bitcoin",
"ids" => "bitcoin,ethereum,monero",
"limit" => "3",
"offset" => "1"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/cybermoney/assets";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("search", "bitcoin");
params.put("ids", "bitcoin,ethereum,monero");
params.put("limit", "3");
params.put("offset", "1");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 测试环境: python2.7
# 安装requests依赖 => pip install requests/ easy_install requests
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def api_send_request(method, url, params=None, headers=None):
'''
转发请求到目的主机
@param method str 请求方法
@param url str 请求地址
@param params dict 请求参数
@param headers dict 请求头
'''
method = str.upper(method)
if method == "POST":
return requests.post(url=url, data=params, headers=headers)
elif method == "GET":
return requests.get(url=url, params=params, headers=headers)
else:
return None
method = "POST"
url = "http://open.6api.net/cybermoney/assets"
headers = None
params = {
"appkey" : "yourappsecret",
"search" : "bitcoin",
"ids" : "bitcoin,ethereum,monero",
"limit" : "3",
"offset" : "1"
}
result = api_send_request(method=method, url=url, params=params, headers=headers)
if result:
body = result.result
response = json.loads(body)
status_code = response["status"]
if (status_code == "200"):
print("请求成功:%s" % (body,))
else:
print("请求失败: %s" % (body,))
else:
print("发送请求失败"){
"status": 200,
"msg": "OK",
"result": [
{
"id": "bitcoin",
"rank": "1",
"symbol": "BTC",
"name": "Bitcoin",
"supply": "18978268.0000000000000000",
"maxSupply": "21000000.0000000000000000",
"marketCapUsd": "792554532964.6249811263416108",
"volumeUsd24Hr": "16818865750.2392233165428456",
"priceUsd": "41761.1624498413122381",
"changePercent24Hr": "7.0963962410732726",
"vwap24Hr": "39327.9535908918253001",
"explorer": "https://blockchain.info/"
},
{
"id": "ethereum",
"rank": "2",
"symbol": "ETH",
"name": "Ethereum",
"supply": "119885007.9365000000000000",
"maxSupply": null,
"marketCapUsd": "327679211998.6911999305382537",
"volumeUsd24Hr": "9701163647.7606412262067369",
"priceUsd": "2733.2793118907281237",
"changePercent24Hr": "6.0411451247126651",
"vwap24Hr": "2611.9399074931061322",
"explorer": "https://etherscan.io/"
},
{
"id": "tether",
"rank": "3",
"symbol": "USDT",
"name": "Tether",
"supply": "80028316059.0952900000000000",
"maxSupply": null,
"marketCapUsd": "80042964549.7871170159367268",
"volumeUsd24Hr": "31297833515.5172399217260175",
"priceUsd": "1.0001830413460282",
"changePercent24Hr": "-0.1007819234970915",
"vwap24Hr": "1.0003748178859497",
"explorer": "https://www.omniexplorer.info/asset/31"
}
]
}| 参数名称 | 类型 | 必填 | 说明 |
| id | int | 是 | 资产编号 |
| 参数名称 | 类型 | 说明 | |
| id | string | 资产的唯一标识符 | |
| rank | int | 排名按升序排列 - 这个数字与市值直接相关,而最高市值获得排名 1 | |
| symbol | string | 用于在交易所识别此资产的最常见标识符 | |
| name | string | 资产的专有名称 | |
| supply | decimal | 可供交易的资产量 | |
| maxSupply | decimal | 发行资产总量 | |
| marketCapUsd | decimal | 资产总量价格(美元) | |
| volumeUsd24Hr | decimal | 过去 24 小时内以美元表示的交易量 | |
| priceUsd | decimal | 基于实时市场数据的成交量加权价格,换算成美元 | |
| changePercent24Hr | decimal | 过去 24 小时内的方向和价值变化 | |
| vwap24Hr | decimal | 过去 24 小时的成交量加权平均价格 | |
| explorer | string | 资产浏览器 |
require_once("curl.func.php");
$method = "POST";
$url = "http://open.6api.net/cybermoney/assets/{id}";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"id" => "bitcoin"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/cybermoney/assets/{id}";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("id", "bitcoin");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 测试环境: python2.7
# 安装requests依赖 => pip install requests/ easy_install requests
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def api_send_request(method, url, params=None, headers=None):
'''
转发请求到目的主机
@param method str 请求方法
@param url str 请求地址
@param params dict 请求参数
@param headers dict 请求头
'''
method = str.upper(method)
if method == "POST":
return requests.post(url=url, data=params, headers=headers)
elif method == "GET":
return requests.get(url=url, params=params, headers=headers)
else:
return None
method = "POST"
url = "http://open.6api.net/cybermoney/assets/{id}"
headers = None
params = {
"appkey" : "yourappsecret",
"id" : "bitcoin"
}
result = api_send_request(method=method, url=url, params=params, headers=headers)
if result:
body = result.result
response = json.loads(body)
status_code = response["status"]
if (status_code == "200"):
print("请求成功:%s" % (body,))
else:
print("请求失败: %s" % (body,))
else:
print("发送请求失败"){
"status": 200,
"msg": "OK",
"result": {
"id": "bitcoin",
"rank": "1",
"symbol": "BTC",
"name": "Bitcoin",
"supply": "18978437.0000000000000000",
"maxSupply": "21000000.0000000000000000",
"marketCapUsd": "796483968908.1586919368366746",
"volumeUsd24Hr": "17502502152.0769764034512781",
"priceUsd": "41967.8379683299890258",
"changePercent24Hr": "7.7937600508477179",
"vwap24Hr": "40520.7981706886925014",
"explorer": "https://blockchain.info/"
}
}| 参数名称 | 类型 | 必填 | 说明 |
| id | string | 是 | 资产编号 |
| interval | string | 是 | m1、m5、m15、m30、h1、h2、h6、h12、d1 |
| start | string | 否 | 开始时间 1528470720000 |
| end | string | 否 | 结束时间 1528470820000 |
| 参数名称 | 类型 | 说明 | |
| priceUsd | string | 基于实时市场数据的成交量加权价格,换算成美元 | |
| time | string | UNIX时间戳(以毫秒为单位) |
require_once("curl.func.php");
$method = "POST";
$url = "http://open.6api.net/cybermoney/assets/{id}/history";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"id" => "bitcoin",
"interval" => "d1",
"start" => "参数3",
"end" => "参数4"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/cybermoney/assets/{id}/history";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("id", "bitcoin");
params.put("interval", "d1");
params.put("start", "参数3");
params.put("end", "参数4");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 测试环境: python2.7
# 安装requests依赖 => pip install requests/ easy_install requests
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def api_send_request(method, url, params=None, headers=None):
'''
转发请求到目的主机
@param method str 请求方法
@param url str 请求地址
@param params dict 请求参数
@param headers dict 请求头
'''
method = str.upper(method)
if method == "POST":
return requests.post(url=url, data=params, headers=headers)
elif method == "GET":
return requests.get(url=url, params=params, headers=headers)
else:
return None
method = "POST"
url = "http://open.6api.net/cybermoney/assets/{id}/history"
headers = None
params = {
"appkey" : "yourappsecret",
"id" : "bitcoin",
"interval" : "d1",
"start" : "参数3",
"end" : "参数4"
}
result = api_send_request(method=method, url=url, params=params, headers=headers)
if result:
body = result.result
response = json.loads(body)
status_code = response["status"]
if (status_code == "200"):
print("请求成功:%s" % (body,))
else:
print("请求失败: %s" % (body,))
else:
print("发送请求失败"){
"status": 200,
"msg": "OK",
"result": [
{
"priceUsd": "57740.5879076736194260",
"time": 1617494400000,
"date": "2021-04-04T00:00:00.000Z"
},
{
"priceUsd": "58097.0633999067806230",
"time": 1617580800000,
"date": "2021-04-05T00:00:00.000Z"
},
{
"priceUsd": "58471.0289234004571113",
"time": 1617667200000,
"date": "2021-04-06T00:00:00.000Z"
}
]
}| 参数名称 | 类型 | 必填 | 说明 |
| id | string | 是 | 资产编号 |
| limit | int | 否 | 最大限制 2000 |
| offset | int | 否 | 起始值 |
| 参数名称 | 类型 | 说明 | |
| exchangeId | string | 交换的唯一标识符 | |
| baseId | string | 此资产的唯一标识符,基础是购买的资产 | |
| quoteId | string | 此资产的唯一标识符,报价是用于购买的资产 | |
| baseSymbol | string | 用于识别资产的最常见符号,基础是购买的资产 | |
| quoteSymbol | string | 用于识别资产的最常见符号,报价是用于购买基础的资产 | |
| volumeUsd24Hr | decimal | 过去24小时内该市场的交易量 | |
| priceUsd | decimal | 一单位基础资产交易的报价资产数量 | |
| volumePercent | decimal | 报价资产量的百分比 |
require_once("curl.func.php");
$method = "POST";
$url = "http://open.6api.net/cybermoney/assets/{id}/markets";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"id" => "bitcoin",
"limit" => "5",
"offset" => "1"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/cybermoney/assets/{id}/markets";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("id", "bitcoin");
params.put("limit", "5");
params.put("offset", "1");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 测试环境: python2.7
# 安装requests依赖 => pip install requests/ easy_install requests
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def api_send_request(method, url, params=None, headers=None):
'''
转发请求到目的主机
@param method str 请求方法
@param url str 请求地址
@param params dict 请求参数
@param headers dict 请求头
'''
method = str.upper(method)
if method == "POST":
return requests.post(url=url, data=params, headers=headers)
elif method == "GET":
return requests.get(url=url, params=params, headers=headers)
else:
return None
method = "POST"
url = "http://open.6api.net/cybermoney/assets/{id}/markets"
headers = None
params = {
"appkey" : "yourappsecret",
"id" : "bitcoin",
"limit" : "5",
"offset" : "1"
}
result = api_send_request(method=method, url=url, params=params, headers=headers)
if result:
body = result.result
response = json.loads(body)
status_code = response["status"]
if (status_code == "200"):
print("请求成功:%s" % (body,))
else:
print("请求失败: %s" % (body,))
else:
print("发送请求失败"){
"status": 200,
"msg": "OK",
"result": [
{
"exchangeId": "Zaif",
"baseId": "nem",
"quoteId": "bitcoin",
"baseSymbol": "XEM",
"quoteSymbol": "BTC",
"volumeUsd24Hr": null,
"priceUsd": "45934.5935030906467649",
"volumePercent": null
},
{
"exchangeId": "Crypto.com Exchange",
"baseId": "bitcoin",
"quoteId": "tether",
"baseSymbol": "BTC",
"quoteSymbol": "USDT",
"volumeUsd24Hr": "1856761697.3033583400168252",
"priceUsd": "46333.9802609478193182",
"volumePercent": "14.9951853634203133"
},
{
"exchangeId": "Binance",
"baseId": "bitcoin",
"quoteId": "tether",
"baseSymbol": "BTC",
"quoteSymbol": "USDT",
"volumeUsd24Hr": "1513756387.1913645943502198",
"priceUsd": "46332.6366808809931912",
"volumePercent": "12.2250785622961843"
},
{
"exchangeId": "Kucoin",
"baseId": "bitcoin",
"quoteId": "tether",
"baseSymbol": "BTC",
"quoteSymbol": "USDT",
"volumeUsd24Hr": "1331449402.2018042235245527",
"priceUsd": "46338.4722301264618920",
"volumePercent": "10.7527695218118657"
},
{
"exchangeId": "HitBTC",
"baseId": "bitcoin",
"quoteId": "tether",
"baseSymbol": "BTC",
"quoteSymbol": "USDT",
"volumeUsd24Hr": "691210301.9257834856193418",
"priceUsd": "46318.9201321390667604",
"volumePercent": "5.5822061697718419"
}
]
}| 参数名称 | 类型 | 必填 | 说明 |
| ids | int | 是 | 以逗号分隔的待筛选标签列表 |
| 参数名称 | 类型 | 说明 | |
| id | string | 资产或法定货币的唯一标识符 | |
| symbol | string | 用于识别资产或法定货币的最常见符号 | |
| currencySymbol | string | 用于识别资产或法定货币的货币符号 | |
| rateUsd | string | 汇率转换为美元 | |
| type | string | 货币类型 - 法定货币或加密货币 |
require_once("curl.func.php");
$method = "POST";
$url = "http://open.6api.net/cybermoney/rates";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/cybermoney/rates";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 测试环境: python2.7
# 安装requests依赖 => pip install requests/ easy_install requests
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def api_send_request(method, url, params=None, headers=None):
'''
转发请求到目的主机
@param method str 请求方法
@param url str 请求地址
@param params dict 请求参数
@param headers dict 请求头
'''
method = str.upper(method)
if method == "POST":
return requests.post(url=url, data=params, headers=headers)
elif method == "GET":
return requests.get(url=url, params=params, headers=headers)
else:
return None
method = "POST"
url = "http://open.6api.net/cybermoney/rates"
headers = None
params = {
"appkey" : "yourappsecret"
}
result = api_send_request(method=method, url=url, params=params, headers=headers)
if result:
body = result.result
response = json.loads(body)
status_code = response["status"]
if (status_code == "200"):
print("请求成功:%s" % (body,))
else:
print("请求失败: %s" % (body,))
else:
print("发送请求失败"){
"status": 200,
"msg": "OK",
"result": [
{
"id": "malaysian-ringgit",
"symbol": "MYR",
"currencySymbol": "RM",
"type": "fiat",
"rateUsd": "0.2375014843842774"
},
{
"id": "sierra-leonean-leone",
"symbol": "SLL",
"currencySymbol": "Le",
"type": "fiat",
"rateUsd": "0.0000849220827619"
},
{
"id": "bermudan-dollar",
"symbol": "BMD",
"currencySymbol": "$",
"type": "fiat",
"rateUsd": "1.0000000000000000"
}
]
}| 参数名称 | 类型 | 必填 | 说明 |
| id | int | 是 | 资产编号 |
| 参数名称 | 类型 | 说明 | |
| id | string | 资产或法定货币的唯一标识符 | |
| symbol | string | 用于识别资产或法定货币的最常见符号 | |
| currencySymbol | string | 用于识别资产或法定货币的货币符号 | |
| rateUsd | string | 汇率转换为美元 | |
| type | string | 货币类型 - 法定货币或加密货币 |
require_once("curl.func.php");
$method = "POST";
$url = "http://open.6api.net/cybermoney/rates/{id}";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"id" => "bitcoin"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/cybermoney/rates/{id}";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("id", "bitcoin");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 测试环境: python2.7
# 安装requests依赖 => pip install requests/ easy_install requests
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def api_send_request(method, url, params=None, headers=None):
'''
转发请求到目的主机
@param method str 请求方法
@param url str 请求地址
@param params dict 请求参数
@param headers dict 请求头
'''
method = str.upper(method)
if method == "POST":
return requests.post(url=url, data=params, headers=headers)
elif method == "GET":
return requests.get(url=url, params=params, headers=headers)
else:
return None
method = "POST"
url = "http://open.6api.net/cybermoney/rates/{id}"
headers = None
params = {
"appkey" : "yourappsecret",
"id" : "bitcoin"
}
result = api_send_request(method=method, url=url, params=params, headers=headers)
if result:
body = result.result
response = json.loads(body)
status_code = response["status"]
if (status_code == "200"):
print("请求成功:%s" % (body,))
else:
print("请求失败: %s" % (body,))
else:
print("发送请求失败"){
"status": 200,
"msg": "OK",
"result": {
"id": "bitcoin",
"symbol": "BTC",
"currencySymbol": "₿",
"type": "crypto",
"rateUsd": "46305.2899838795218064"
}
}| 参数名称 | 类型 | 必填 | 说明 |
| 暂无参数 | |||
| 参数名称 | 类型 | 说明 | |
| id | string | 交换的唯一标识符 | |
| name | string | 交易所的专有名称 | |
| rank | string | 排名按升序排列 - 此数字与总交易量直接相关,而交易量最高的交易所获得排名 1 | |
| percentTotalVolume | string | 单个交易所的每日交易量相对于所有交易所的每日总交易量 | |
| volumeUsd | string | 以美元表示的每日交易量 | |
| tradingPairs | string | 交易所提供的交易对(或市场)数量 | |
| socket | string | true/false, true = 交易接口可用,false = 交易接口不可用 | |
| exchangeUrl | string | 交换网站 | |
| updated | string | 自本次交换收到信息以来的 UNIX 时间戳(毫秒) |
require_once("curl.func.php");
$method = "POST";
$url = "http://open.6api.net/cybermoney/exchanges";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/cybermoney/exchanges";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 测试环境: python2.7
# 安装requests依赖 => pip install requests/ easy_install requests
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def api_send_request(method, url, params=None, headers=None):
'''
转发请求到目的主机
@param method str 请求方法
@param url str 请求地址
@param params dict 请求参数
@param headers dict 请求头
'''
method = str.upper(method)
if method == "POST":
return requests.post(url=url, data=params, headers=headers)
elif method == "GET":
return requests.get(url=url, params=params, headers=headers)
else:
return None
method = "POST"
url = "http://open.6api.net/cybermoney/exchanges"
headers = None
params = {
"appkey" : "yourappsecret"
}
result = api_send_request(method=method, url=url, params=params, headers=headers)
if result:
body = result.result
response = json.loads(body)
status_code = response["status"]
if (status_code == "200"):
print("请求成功:%s" % (body,))
else:
print("请求失败: %s" % (body,))
else:
print("发送请求失败"){
"status": 200,
"msg": "OK",
"result": [
{
"exchangeId": "binance",
"name": "Binance",
"rank": "1",
"percentTotalVolume": "32.330201366172712942000000000000000000",
"volumeUsd": "14778220963.8606767868305750",
"tradingPairs": "932",
"socket": true,
"exchangeUrl": "https://www.binance.com/",
"updated": 1648985975785
},
{
"exchangeId": "hitbtc",
"name": "HitBTC",
"rank": "2",
"percentTotalVolume": "10.102564189064871887000000000000000000",
"volumeUsd": "4617908938.9711614619931330",
"tradingPairs": "933",
"socket": true,
"exchangeUrl": "https://hitbtc.com/",
"updated": 1648985964171
},
{
"exchangeId": "crypto",
"name": "Crypto.com Exchange",
"rank": "3",
"percentTotalVolume": "7.084312834588380970000000000000000000",
"volumeUsd": "3238258223.6621253224814192",
"tradingPairs": "195",
"socket": false,
"exchangeUrl": "https://api.crypto.com/",
"updated": 1648985926851
}
]
}| 参数名称 | 类型 | 必填 | 说明 |
| id | string | 是 | 交易所编号 |
| 参数名称 | 类型 | 说明 | |
| id | string | 交换的唯一标识符 | |
| name | string | 交易所的专有名称 | |
| rank | string | 排名按升序排列 - 此数字与总交易量直接相关,而交易量最高的交易所获得排名 1 | |
| percentTotalVolume | string | 单个交易所的每日交易量相对于所有交易所的每日总交易量 | |
| volumeUsd | string | 以美元表示的每日交易量 | |
| tradingPairs | string | 交易所提供的交易对(或市场)数量 | |
| socket | string | true/false, true = 交易接口可用,false = 交易接口不可用 | |
| exchangeUrl | string | 交换网站 | |
| updated | string | 自本次交换收到信息以来的 UNIX 时间戳(毫秒) |
require_once("curl.func.php");
$method = "POST";
$url = "http://open.6api.net/cybermoney/exchanges/{id}";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"id" => "kraken"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/cybermoney/exchanges/{id}";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("id", "kraken");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 测试环境: python2.7
# 安装requests依赖 => pip install requests/ easy_install requests
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def api_send_request(method, url, params=None, headers=None):
'''
转发请求到目的主机
@param method str 请求方法
@param url str 请求地址
@param params dict 请求参数
@param headers dict 请求头
'''
method = str.upper(method)
if method == "POST":
return requests.post(url=url, data=params, headers=headers)
elif method == "GET":
return requests.get(url=url, params=params, headers=headers)
else:
return None
method = "POST"
url = "http://open.6api.net/cybermoney/exchanges/{id}"
headers = None
params = {
"appkey" : "yourappsecret",
"id" : "kraken"
}
result = api_send_request(method=method, url=url, params=params, headers=headers)
if result:
body = result.result
response = json.loads(body)
status_code = response["status"]
if (status_code == "200"):
print("请求成功:%s" % (body,))
else:
print("请求失败: %s" % (body,))
else:
print("发送请求失败"){
"status": 200,
"msg": "OK",
"result": {
"exchangeId": "kraken",
"name": "Kraken",
"rank": "17",
"percentTotalVolume": "1.065297502557493459000000000000000000",
"volumeUsd": "486978026.8489009107130360",
"tradingPairs": "375",
"socket": false,
"exchangeUrl": "https://kraken.com",
"updated": 1648986221331
}
}| 参数名称 | 类型 | 必填 | 说明 |
| exchangeId | string | 否 | 交换ID |
| baseSymbol | string | 否 | 返回所有包含基本符号的 |
| quoteSymbol | string | 否 | 计量货币 |
| baseId | string | 否 | 此资产的唯一标识符 |
| quoteId | string | 否 | 返回所有包含报价 ID |
| assetSymbol | string | 否 | 返回包含符号(基础和报价)的所有资产 |
| assetId | string | 否 | 返回所有包含 id 的资产(base 和 quote) |
| limit | string | 否 | 最大限制 2000 |
| offset | string | 否 | 起始值 |
| 参数名称 | 类型 | 说明 | |
| exchangeId | string | 交换的唯一标识符 | |
| rank | int | 排名按升序排列 - 此数字代表该市场相对于该交易所其他市场的交易量 | |
| baseSymbol | string | 用于识别资产的最常见符号 | |
| baseId | string | 此资产的唯一标识符 | |
| quoteSymbol | string | 用于识别资产的最常见符号 | |
| quoteId | string | 此资产的唯一标识符 | |
| priceQuote | string | 一单位基础资产交易的报价资产数量 | |
| priceUsd | string | 报价转换为美元 | |
| volumeUsd24Hr | string | 过去 24 小时内该市场的交易量 | |
| percentExchangeVolume | string | 单个市场的每日交易量相对于交易所所有市场的每日总交易量 | |
| tradesCount24Hr | string | 过去 24 小时内该市场的交易数量 | |
| updated | string | 自从该特定市场收到信息以来的 UNIX 时间戳(毫秒) |
require_once("curl.func.php");
$method = "POST";
$url = "http://open.6api.net/cybermoney/markets";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"exchangeId" => "poloniex",
"baseSymbol" => "BTC",
"quoteSymbol" => "ETH",
"baseId" => "bitcoin",
"quoteId" => "ethereum",
"assetSymbol" => "BTC",
"assetId" => "bitcoin",
"limit" => "5",
"offset" => "1"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/cybermoney/markets";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("exchangeId", "poloniex");
params.put("baseSymbol", "BTC");
params.put("quoteSymbol", "ETH");
params.put("baseId", "bitcoin");
params.put("quoteId", "ethereum");
params.put("assetSymbol", "BTC");
params.put("assetId", "bitcoin");
params.put("limit", "5");
params.put("offset", "1");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 测试环境: python2.7
# 安装requests依赖 => pip install requests/ easy_install requests
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def api_send_request(method, url, params=None, headers=None):
'''
转发请求到目的主机
@param method str 请求方法
@param url str 请求地址
@param params dict 请求参数
@param headers dict 请求头
'''
method = str.upper(method)
if method == "POST":
return requests.post(url=url, data=params, headers=headers)
elif method == "GET":
return requests.get(url=url, params=params, headers=headers)
else:
return None
method = "POST"
url = "http://open.6api.net/cybermoney/markets"
headers = None
params = {
"appkey" : "yourappsecret",
"exchangeId" : "poloniex",
"baseSymbol" : "BTC",
"quoteSymbol" : "ETH",
"baseId" : "bitcoin",
"quoteId" : "ethereum",
"assetSymbol" : "BTC",
"assetId" : "bitcoin",
"limit" : "5",
"offset" : "1"
}
result = api_send_request(method=method, url=url, params=params, headers=headers)
if result:
body = result.result
response = json.loads(body)
status_code = response["status"]
if (status_code == "200"):{
"status": 200,
"msg": "OK",
"result": [
{
"exchangeId": "bitstamp",
"rank": "1",
"baseSymbol": "BTC",
"baseId": "bitcoin",
"quoteSymbol": "USD",
"quoteId": "united-states-dollar",
"priceQuote": "46283.3300000000000000",
"priceUsd": "46283.3300000000000000",
"volumeUsd24Hr": "29392681.7053357090000000",
"percentExchangeVolume": "29.5159040796895084",
"tradesCount24Hr": null,
"updated": 1648987015251
}
]
}| 参数名称 | 类型 | 必填 | 说明 |
| exchange | string | 是 | 资产编号 |
| interval | string | 否 | 时间间隔 m1, m5, m15, m30, h1, h2, h4, h8, h12, d1 |
| start | int | 否 | UNIX 时间,以毫秒为单位。省略将返回最近的数据 |
| end | int | 否 | 结束时间 |
| 参数名称 | 类型 | 说明 | |
| name | string | 资产的专有名称 | |
| symbol | string | 用于在交易所识别此资产的最常见标识符 | |
| priceUsd | decimal | 基于实时市场数据的成交量加权价格,换算成美元 | |
| volumeUsd24Hr | decimal | 过去 24 小时内以美元表示的交易量 | |
| changePercent24Hr | decimal | 过去 24 小时内的方向和价值变化 | |
| open | decimal | 在给定时间段内完成第一笔交易的价格(报价) | |
| high | decimal | 在该时间段内交易基础的最高价格(报价) | |
| low | decimal | 基准在该时间段内交易的最低价(报价) | |
| close | decimal | 在给定时间段内完成最后一笔交易的价格(报价) | |
| interval | string | 数据时间间隔 | |
| kline | array | 数据列 | |
| priceUsd | decimal | 基于实时市场数据的成交量加权价格,换算成美元 | |
| period | string | 该时间段开始的时间戳,以 UNIX 毫秒表示 |
require_once("curl.func.php");
$method = "POST";
$url = "http://open.6api.net/cybermoney/kline";
$headers = NULL;
$params = array(
"appkey" => "yourappsecret",
"exchange" => "bitcoin",
"interval" => "m5",
"start" => "参数3",
"end" => "参数4"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
$body = json_decode($result["body"], TRUE);
$status_code = $body["status"];
if ($status_code == "200") {
var_dump($body["result"]);
}else
var_dump($body);
}else
echo "发送请求失败";
/**
* 主函数
* @param args
*/
public static void main(String args[])
{
//请求地址设置
String url = "http://open.6api.net/cybermoney/kline";
//请求方法设置
String requestMethod = "POST";
//请求头部设置
Map<String, String> headers = new HashMap<String, String>();
//请求参数设置
Map<String, String> params = new HashMap<String, String>();
params.put("appkey", "yourappsecret");
params.put("exchange", "bitcoin");
params.put("interval", "m5");
params.put("start", "参数3");
params.put("end", "参数4");
String result = proxyToDesURL(requestMethod, url, headers, params);
if (result != null) {
JSONObject jsonObject = JSONObject.parseObject(result);
String status_code = jsonObject.getString("status");
if (status_code.equals("200")) {
System.out.println("请求成功:" + jsonObject.getString("result"));
} else {
System.out.println("请求失败:" + jsonObject.getString("msg"));
}
} else {
System.out.println("发送请求异常");
}
}
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 测试环境: python2.7
# 安装requests依赖 => pip install requests/ easy_install requests
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
def api_send_request(method, url, params=None, headers=None):
'''
转发请求到目的主机
@param method str 请求方法
@param url str 请求地址
@param params dict 请求参数
@param headers dict 请求头
'''
method = str.upper(method)
if method == "POST":
return requests.post(url=url, data=params, headers=headers)
elif method == "GET":
return requests.get(url=url, params=params, headers=headers)
else:
return None
method = "POST"
url = "http://open.6api.net/cybermoney/kline"
headers = None
params = {
"appkey" : "yourappsecret",
"exchange" : "bitcoin",
"interval" : "m5",
"start" : "参数3",
"end" : "参数4"
}
result = api_send_request(method=method, url=url, params=params, headers=headers)
if result:
body = result.result
response = json.loads(body)
status_code = response["status"]
if (status_code == "200"):
print("请求成功:%s" % (body,))
else:
print("请求失败: %s" % (body,))
else:
print("发送请求失败"){
"status": 200,
"msg": "OK",
"result": {
"name": "Bitcoin",
"symbol": "BTC",
"priceUsd": "114422.009999999994761311",
"marketCapUsd": "2277230733368.339843750000000000",
"changePercent24Hr": "0.1120882216811226",
"volumeUsd24Hr": "17321608763.191513061523437500",
"open": "114347.5",
"high": "115673",
"low": "114157.01",
"close": "114332.18",
"interval": "m5",
"kline": [
{
"priceUsd": "114347.5",
"period": 1754286912025
},
{
"priceUsd": "114404.4",
"period": 1754287212027
},
{
"priceUsd": "114406.74",
"period": 1754287512118
},
{
"priceUsd": "114413",
"period": 1754287812119
},
{
"priceUsd": "114309",
"period": 1754288112121
},
{
"priceUsd": "114239.54",
"period": 1754288412125
},
{
"priceUsd": "114232.82",
"period": 1754288712127
},
{
"priceUsd": "114270.3",
"period": 1754289012131
},
{
"priceUsd": "114239",
"period": 1754289312219
},
{
"priceUsd": "114240.7",
"period": 1754289612219
},
{
"priceUsd": "114405.88",
"period": 1754289912219
},
{
"priceUsd": "114327.2",
"period": 1754290212220
},
{
"priceUsd": "114476.47",
"period": 1754290512221
},
{
"priceUsd": "114437.77",
"period": 1754290812221
},
{
"priceUsd": "114468.75",
"period": 1754291112222
},
{
"priceUsd": "114480",
"period": 1754291412222
},
{
"priceUsd": "114524.75",
"period": 1754291712222
},
{
"priceUsd": "114538.01",
"period": 1754292012223
},
{
"priceUsd": "114500.59",
"period": 1754292312224
},
{
"priceUsd": "114521.5",
"period": 1754292612225
},
{
"priceUsd": "114534.5",
"period": 1754292912229
},
{
"priceUsd": "114680.8",
"period": 1754293212229
},
{
"priceUsd": "114670",
"period": 1754293512231
},
{
"priceUsd": "114746.88",
"period": 1754293812318
},
{
"priceUsd": "114740.98",
"period": 1754294112319
},
{
"priceUsd": "114678.29",
"period": 1754294412319
},
{
"priceUsd": "114742.23",
"period": 1754294712319
},
{
"priceUsd": "114691.36",
"period": 1754295012322
},
{
"priceUsd": "114677.31",
"period": 1754295312322
},
{
"priceUsd": "114724.84",
"period": 1754295612326
},
{
"priceUsd": "114691",
"period": 1754295912328
},
{
"priceUsd": "114501.99",
"period": 1754296212418
},
{
"priceUsd": "114446",
"period": 1754296512423
},
{
"priceUsd": "114564.69",
"period": 1754296812424
},
{
"priceUsd": "114571.55",
"period": 1754297112520
},
{
"priceUsd": "114583.39",
"period": 1754297412521
},
{
"priceUsd": "114555.22",
"period": 1754297712523
},
{
"priceUsd": "114516",
"period": 1754298012527
},
{
"priceUsd": "114581.99",
"period": 1754298312530
}
]
}
}
| 状态码 | 描述 |
| 107 | 返回失败,请检查参数是否正确 |
| 状态码 | 描述 |
| 101 | APPKEY为空或不存在 |
| 102 | APPKEY已过期 |
| 103 | APPKEY无请求此数据权限 |
| 104 | 请求超过次数限制 |
| 105 | IP被禁 |
| 106 | IP请求超过限制 |
| 107 | 接口维护中 |
| 108 | 接口已停用 |
| 计次套餐 | 权限 | 原价 | 优惠价 | 单价 |
| 测试套餐 | 50次 | 免费 | / | ≈0.00000元/次 |
| level1 | 30000次 | 450.00 | / | ≈0.01500元/次 |
| level2 | 120000次 | 1500.00 | / | ≈0.01250元/次 |
| level3 | 300000次 | 3000.00 | / | ≈0.01000元/次 |
| 更多优惠,请咨询 010-8639-9970 周一至周五(9:30-18:30) | ||||
| 包月套餐 | 权限 | 原价 | 优惠价 | 单价 |
| M-Level1 | 10000次/天 | 2500.00 | / | ≈0.00833元/次 |
| * 套餐使用时限为订购之日起30日。 | ||||
| 包年套餐 | 权限 | 原价 | 优惠价 | 单价 |
| Y-Level1 | 10/QPS | 12800.00 | / | 不限次 |
| * 套餐使用时限为订购之日起1年。 | ||||
| 用户 | 购买时间 | 周期 | 套餐 |
| 176****1888 | 2025-11-01 11:24:39 | 一年 | **** |
| 182****3730 | 2025-06-06 20:39:51 | 一年 | **** |
| 153****1252 | 2024-12-05 19:00:50 | 一年 | **** |
| 175****8021 | 2024-09-01 13:13:10 | 一年 | **** |
| 182****8802 | 2024-06-21 03:30:50 | 一年 | **** |
| 182****8802 | 2024-06-01 19:10:53 | 一年 | **** |
| 176****2049 | 2024-05-25 19:41:33 | 一年 | **** |
| 182****8802 | 2024-03-09 20:39:27 | 一年 | **** |
| 182****8802 | 2024-03-09 20:39:27 | 一年 | **** |
| 188****9413 | 2023-08-09 09:40:16 | 一年 | **** |
