本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.6api.net/cybermoney/assets");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&search=bitcoin&ids=bitcoin,ethereum,monero&limit=3&offset=1");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.6api.net/cybermoney/assets/{id}");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&id=bitcoin");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.6api.net/cybermoney/assets/{id}/history");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&id=bitcoin&interval=d1&start=参数3&end=参数4");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.6api.net/cybermoney/assets/{id}/markets");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&id=bitcoin&limit=5&offset=1");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.6api.net/cybermoney/rates");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.6api.net/cybermoney/rates/{id}");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&id=bitcoin");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.6api.net/cybermoney/exchanges");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.6api.net/cybermoney/exchanges/{id}");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&id=kraken");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.6api.net/cybermoney/markets");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&exchangeId=poloniex&baseSymbol=BTC"eSymbol=ETH&baseId=bitcoin"eId=ethereum&assetSymbol=BTC&assetId=bitcoin&limit=5&offset=1");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}
本代码示例是基于C 的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
//post请求
#include <iostream>
//引入第三方库libcurl(需要配置相应环境)
#include <curl/curl.h>
int main(int argc, const char * argv[]) {
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://open.6api.net/cybermoney/candles");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "appkey=yourappsecret&exchange=poloniex&interval=m1&baseId=ethereum"eId=bitcoin&start=参数5&end=参数6");
res = curl_easy_perform(curl);
std::cout << res << std::endl;
curl_easy_cleanup(curl);
}
//清空环境
curl_global_cleanup();
return 0;
}