candle abstract method

Future<Candles> candle(
  1. SecurityIdentifier id,
  2. String from,
  3. String to,
  4. CandleResolution resolution, {
  5. String? currency,
})

The candle method is used to get the candle data for a given stock symbol. By default, the candle data is returned in EUR. You can specify a different currency by passing the currency argument.

The from and to arguments are used to specify the time range for the candle data in unix timestamp. The resolution argument is used to specify the resolution of the candle data.

Valid resolutions are 1, 5, 60, D, W, M.

// Get candle data for Apple in EUR
final client = BavestRestClient(api_key);
final candle = client.candle(SecurityIdentifier(symbol: "AAPL"), '1630352898', '1655848800',  CandleType.day, currency: 'EUR);

Implementation

Future<Candles> candle(SecurityIdentifier id, String from, String to,
    CandleResolution resolution,
    {String? currency});