Skip to content
Longport Whale
Statement Query

Statement Export

Export the Statement list to a file. In sync mode (mode:0) the download URL is returned directly; in async mode (mode:1) a file_download_id is returned, to be polled via the shared GET/DELETE /v1/datasets/download/{id} endpoint for status and the final download URL.

POSThttps://b-api.longbridge.xyz/v1/datasets/atm_statement_histories/download

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Request body application/json

filtersobject

Filters. Same fields as the filters of atm_statement_histories.yaml (the query capability).

Child attributes
filters.dtstring

Biz Date

filters.aaidstring

Client

filters.file_typestring

Statement Type. Options: 0 = Daily Statement; 1 = Monthly Statement; 2 = Temp Statement

012

filters.langstring

Language. Options: en = English; zh-CN = Simplified Chinese; zh-HK = Traditional Chinese; hk-EN = Traditional Chinese & English

enzh-CNzh-HKhk-EN

filters.statement_sendstring

Offline Send. Options: -1 = True; 1 = 否

-11

filters.statestring

Status. Options: -1 = Creation Failed; 0 = Creation In Progress; 1 = Created Successfully; 2 = Sent Successfully; 3 = Regenerated

-10123

filters.broker_codestring

A.E. Code. Values are dynamically queried from report_broker_list (not fixed); fetch them live via GET /v1/datasets/refs/report_broker_accounts.

filters.da_flagstring

Account Mark. Options: 1 = Discretionary; 2 = Virtual Account

12

filters.ledger_datestring

Create Date(Ledger Date))

filters.disable_batch_sendstring

Batch Send. Multi-select; submit as a comma-joined string. Allowed values are listed under enum.. Options: 0 = Enable Batch Send; 1 = Only Single Send

01

orderByarray<object>

Order By

modeinteger

Mode. Defaults to 0 (sync) when omitted.. Options: 0 = Sync; 1 = Async

01

extstring

Ext. Supports csv/xlsx; defaults to csv.

csvxlsx

file_namestring

File Name

remarkstring

Remark

down_fieldsarray<string>

Down Fields. When omitted, all fields are exported; allowed values are listed under items.enum (the same field list as the query endpoint's data.list.items).

ticket_contentstring

Ticket Content. Shown to the approver when the template has a download-approval ticket configured.

ticket_preview_urlstring

Ticket Preview URL

hideinteger

Hide. Options: 0 = Not Hidden; 1 = Hidden

01

Responses

HTTP 200Export result. In sync mode the download URL is returned directly; in async mode a file_download_id is returned for subsequent polling.
Standard response envelopecodemessagedata
dataobjectdata structure
urlstring

Download URL. Returned in sync mode (mode:0); empty in async mode.

file_download_idstring

File Download ID. Returned in async mode (mode:1); used to poll GET/DELETE /v1/datasets/download/{id}.

ticket_idstring

Ticket ID

Whale Docs