InstrumentsService instrumentsService = IntxServiceFactory.createInstrumentsService(client);
GetAggregatedCandlesRequest request = new GetAggregatedCandlesRequest.Builder()
    .instrumentId("BTC-PERP")
    .granularity("ONE_DAY")
    .start("2024-01-01T00:00:00Z")
    .build();
GetAggregatedCandlesResponse response = instrumentsService.getAggregatedCandles(request);

For more information, please visit the INTX Java SDK.