Skip to content

下载账单

下载账单API为通用接口,交易/资金账单都可以通过该接口获取到对应的账单。

请求参数类型描述
queryobject声明请求的查询参数
tokenstring
tartypestring
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' => '',
    'tartype' => '',
  ],
])
->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' => '',
    'tartype' => '',
  ],
])
->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' => '',
    'tartype' => '',
  ],
])
->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' => '',
    'tartype' => '',
  ],
]);
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' => '',
    'tartype' => '',
  ],
]);
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' => '',
    'tartype' => '',
  ],
]);
返回字典类型描述
文件流(需解析为对应数据)

参阅 官方文档

Published on the GitHub by TheNorthMemory