Skip to main content

get_cash_log

Function get_cash_log 

Source
pub async fn get_cash_log(
    __arg0: State<RestState>,
    rec: Option<Extension<Arc<KeyRecord>>>,
    __arg2: Json<Value>,
) -> Result<Json<Value>, (StatusCode, Json<Value>)>
Expand description

POST /api/cash-log — 资金明细查询 (mobile-driven, 比 /api/flow-summary 更全字段)

参数 (body 顶层平铺, REST adapter 自动 wrap 到 c2s):

  • acc_id (u64, 必填): 账户 ID
  • trd_env (i32, 0=sim 1=real): 必填
  • inner.market / inner.account_id: daemon 从已鉴权 acc_id 派生,client-provided 值会被忽略
  • inner.begin_time / inner.end_time (epoch 秒, 时间范围)
  • inner.biz_group_id / inner.biz_sub_group_id: 业务分组过滤
  • inner.in_out: 1=入账, 2=出账, 0=全部
  • inner.keyword / inner.symbol / inner.stock_id: 搜索
  • inner.currency: 货币过滤
  • inner.log_id: cursor 分页 (上次响应的 next_log_id)
  • inner.max_cnt: 每页上限

响应: ret_type / ret_msg / s2c.inner (含 monthly_log_list / has_more / next_log_id)

Pitfall #42 backend-semantic risk: 真 backend 接受我们的 proto 序列化 是 未真机 verify 假设. 真机 fail 时 ret_type=-1 + clear hint.