/app/ledger

查询用户余额变动记录

本接口用于获取指定用户的全部余额变动记录。该记录是财务团队进行资金对账的重要工具。

业务背景

多种操作均可能引起用户余额变动,包括但不限于:

  • 法币/加密货币充值
  • 交易执行
  • 加密货币提现
  • 法币提现等

Legend Gateway 系统会记录每一位用户在所有资产上的每一项操作及其对应的余额变化。

使用说明

分类查询
category 参数支持对 group=settlement 进行多分类值查询。多个分类值之间请使用英文逗号 , 分隔。


注意:此接口提供完整的资金流水记录,适用于深度对账与审计场景。

返回值说明

Pagination 返回记录统计数据字段:

namedescexample_value
totalall records 总记录条数60
per_pageper page records 每页记录数10
current_pagecurrent page 当前页码:从1开始。(查询参数是从0开始)5

Details 返回data数据字段详情:

namedescexample_valuevalue_type
created_at记账时间2023-02-02T04:42:55.765553Zstring
currency记账资产(包含法币,crypto)USDstring
group记账分组(trade和settlement)tradestring
amount_change用户余额变动值(+表示增加,-表示减少)-30string
before_balance用户变动前余额 the balance before the change happened5860470.00000000number
after_balance用户变动后余额 the balance after the change happened5860440.00000000number
category用户余额变动类型, group=trade 为buy/sell/auto-buy, group=settlement 为 settlement-category表中的值。buy,sell,auto-buy,WIRE_SENT...string

Settlement Category List:

CatetoryDescription_zhDescription_en
WIRE_SENT法币转出(出金)Wire sent
WIRE_RESENT法币再次转出Wire resent
WIRE_RECEIVED法币充值(入金)Wire received
WIRE_RETURNED出金退回Wire returned
CRYPTO_SENT数字币转出Crypto sent
CRYPTO_SENT_FROM_AUTOTRADE由自动交易产生的数字币转出Crypto sent from auto-trade
CRYPTO_RECEIVED数字币充值Crypto received
CREDIT_CARD_RECEIVED信用卡入金Credit Card Received
ACH_RECEIVEDACH入金ACH received
USER_PROMOTION会员优惠User promotion
Query Params
string

uid可选,如果没填uid,则查询该交易所的所有ledgers.

string
Defaults to trade

取值:trade(交易), settlement(结算)

string
Defaults to buy

用来筛选类别:trade 取值:buy,sell,auto-buy. settlement取值Settlement Category List。

string

取值:fiat,crypto;用来筛选法币还是加密货币。

string
Defaults to USD

资产类型

string
Defaults to 10
string
Defaults to 0
string
Defaults to desc

排序:asc, desc

string

对记录的创建时间过滤 区间开始值。

string

对记录的创建时间过滤 区间结束值。

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json