下载账单
下载账单API为通用接口,交易/资金账单都可以通过该接口获取到对应的账单。
请求参数 | 类型 | 描述 |
---|---|---|
query | object | 声明请求的查询参数 |
token | string | 前序接口返回的URL.query.token |
tartype | string | 前序接口返回的URL.query.tartype |
php
$savedTo = \GuzzleHttp\Psr7\Utils::tryFopen('./somehowfile.csv.gz', 'w+');
$stream = \GuzzleHttp\Psr7\Utils::streamFor($savedTo);
$instance->v3->billdownload->file->getAsync([
'sink' => $stream,
'query' => [
'token' => 'dN7J6yDgUzbX8Uk3sD4a4e',
'tartype' => 'GZIP',
],
])
->wait();
php
$savedTo = \GuzzleHttp\Psr7\Utils::tryFopen('./somehowfile.csv.gz', 'w+');
$stream = \GuzzleHttp\Psr7\Utils::streamFor($savedTo);
$instance->chain('v3/billdownload/file')->getAsync([
'sink' => $stream,
'query' => [
'token' => 'dN7J6yDgUzbX8Uk3sD4a4e',
'tartype' => 'GZIP',
],
])
->wait();
php
$savedTo = \GuzzleHttp\Psr7\Utils::tryFopen('./somehowfile.csv.gz', 'w+');
$stream = \GuzzleHttp\Psr7\Utils::streamFor($savedTo);
$instance['v3/billdownload/file']->getAsync([
'sink' => $stream,
'query' => [
'token' => 'dN7J6yDgUzbX8Uk3sD4a4e',
'tartype' => 'GZIP',
],
])
->wait();
php
$savedTo = \GuzzleHttp\Psr7\Utils::tryFopen('./somehowfile.csv.gz', 'w+');
$stream = \GuzzleHttp\Psr7\Utils::streamFor($savedTo);
$instance->v3->billdownload->file->get([
'sink' => $stream,
'query' => [
'token' => 'dN7J6yDgUzbX8Uk3sD4a4e',
'tartype' => 'GZIP',
],
]);
php
$savedTo = \GuzzleHttp\Psr7\Utils::tryFopen('./somehowfile.csv.gz', 'w+');
$stream = \GuzzleHttp\Psr7\Utils::streamFor($savedTo);
$instance->chain('v3/billdownload/file')->get([
'sink' => $stream,
'query' => [
'token' => 'dN7J6yDgUzbX8Uk3sD4a4e',
'tartype' => 'GZIP',
],
]);
php
$savedTo = \GuzzleHttp\Psr7\Utils::tryFopen('./somehowfile.csv.gz', 'w+');
$stream = \GuzzleHttp\Psr7\Utils::streamFor($savedTo);
$instance['v3/billdownload/file']->get([
'sink' => $stream,
'query' => [
'token' => 'dN7J6yDgUzbX8Uk3sD4a4e',
'tartype' => 'GZIP',
],
]);
返回字典 | 类型 | 描述 |
---|---|---|
文件流(需解析为对应数据) |
参阅 官方文档