# 查询账户余额

查询账户余额。

# 一、公共参数

# 二、请求参数

无业务参数

请求示例:

http或https://api.spiderid.cn/api/router/rest?<[公共请求参数]>

# 三、响应参数

data结果信息 类型 描述
accountId String 账户id
accountName String 账户名称
balance BigDecimal 余额

# 四、成功示例

JSON示例

{
  "code": 0,
  "requestId": "f30385...",
  "data": {
    "accountId":"99....",
    "accountName": "...",
    "balance": 1000.00
  },
  "message": "success"
}

# 五、失败示例

JSON示例

{
  "code": 10008,
  "requestId": "b0c26c...",
  "message":"App不存在或状态异常"
}

# SDK 请求示例

//提供的url

String url = "http://api.spiderid.cn/api/router/rest";

//您的appKey

String appkey ="XXX";

//您的appSecret

String secretKey ="XXX";

//1.默认客户端
ApiClient apiClient = new DefaultApiClient(url, appkey, secretKey);

//2.调用出错自动重试客户端
//AutoRetryApiClient apiClient = new AutoRetryApiClient(url, appkey, secretKey);

AccountBalanceRequest req = new AccountBalanceRequest();

try {

  AccountBalanceResponse response = apiClient.execute(req);

  //后续业务处理

} catch (ApiException e) {

  e.printStackTrace();

}
最后更新于: 4/16/2020, 1:14:02 PM