本代码示例是基于PHP的六派数据接口进行数据请求 资产排行榜单 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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 "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 资产排行榜单 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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 "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 资产排行榜单 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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 "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 资产排行榜单 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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 "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 资产排行榜单 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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 "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 资产排行榜单 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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 "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 资产排行榜单 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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 "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 资产排行榜单 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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 "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 资产排行榜单 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 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 "发送请求失败" ;
|
本代码示例是基于PHP的六派数据接口进行数据请求 资产排行榜单 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/cybermoney/ 申请API服务
以下是完整代码示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | require_once ( "curl.func.php" );
$method = "POST" ;
$url = "http://open.6api.net/cybermoney/candles" ;
$headers = NULL;
$params = array (
"appkey" => "yourappsecret" ,
"exchange" => "poloniex" ,
"interval" => "m1" ,
"baseId" => "ethereum" ,
"quoteId" => "bitcoin" ,
"start" => "参数5" ,
"end" => "参数6"
);
$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 "发送请求失败" ;
|