SDK list blockchain with pageSize parameter Issue - Error Code 400

HI,
I use
Fireblocks Sandbox env and
com.fireblocks.sdk:fireblocks-sdk:14.0.0

I try to call
com.fireblocks.sdk.api.BlockchainsAssetsApi.listAssets

it works by passing null to all parameters to this method:
listAssets(
null,
null,
null,
null,
null,
null,
null,
null,
null
);
and I can get my 73 listed Assets

But when I try with pagesize = 10 like

listAssets(
null,
null,
null,
null,
null,
null,
null,
BigDecimal.TEN,
null
);

I get
java.util.concurrent.CompletionException: graphql.CodedException: Execution error: com.fireblocks.sdk.ApiException: listAssets call failed with: 400 - {“message”:“Bad Request Exception”,“code”:0}

Can you explain ? Did someone already have this issue?

Thanks
Fabien

Hi Fabien,

The argument position looks correct. The issue appears to be the value itself.

For GET /assets, the OpenAPI specification defines pageSize with a minimum of 100, a maximum of 1000, and a default of 500. Therefore, BigDecimal.TEN sends pageSize=10, which is outside the accepted range and results in the 400 response.

Could you try:

BigDecimal pageSize = BigDecimal.valueOf(100);

listAssets(
null,
null,
null,
null,
null,
null,
null,
pageSize,
null
);

The generic “Bad Request Exception” could definitely be clearer, but pageSize=10 appears to be the cause.