From de782d1cfaf69dd6d5620fb36d52a18ca1b60235 Mon Sep 17 00:00:00 2001 From: Eskil Gjerde Sviggum Date: Fri, 30 Aug 2024 18:31:55 +0200 Subject: [PATCH] =?UTF-8?q?Changed=20=E2=80=9Cvalue=E2=80=9D=20to=20?= =?UTF-8?q?=E2=80=9Cvolume=E2=80=9D=20in=20OHLCV=20(#27).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/connectors/morningstar/time-series/ohlcv.md | 2 +- src/TimeSeries/Converters/OHLCVSeriesConverter.ts | 4 ++-- src/TimeSeries/TimeSeriesJSON.ts | 2 +- test/unit-tests/TimeSeries/OHLCV.test.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/connectors/morningstar/time-series/ohlcv.md b/docs/connectors/morningstar/time-series/ohlcv.md index 30df335..815009a 100644 --- a/docs/connectors/morningstar/time-series/ohlcv.md +++ b/docs/connectors/morningstar/time-series/ohlcv.md @@ -2,7 +2,7 @@ This type yields OHLCV time series data for a single or multiple securities. - Returns Open, High, Low, Close, Value for the securities specified. + Returns Open, High, Low, Close, Volume for the securities specified. > **NOTE:** At the moment only a single security is supported. diff --git a/src/TimeSeries/Converters/OHLCVSeriesConverter.ts b/src/TimeSeries/Converters/OHLCVSeriesConverter.ts index 0b1b59a..5e7db84 100644 --- a/src/TimeSeries/Converters/OHLCVSeriesConverter.ts +++ b/src/TimeSeries/Converters/OHLCVSeriesConverter.ts @@ -38,7 +38,7 @@ import MorningstarURL from '../../Shared/MorningstarURL'; interface OHLCV { Id: string; Date: number; - Value: [open: number, high: number, low: number, close: number, value: number]; + Value: [open: number, high: number, low: number, close: number, volume: number]; } @@ -127,7 +127,7 @@ export class OHLCVSeriesConverter extends TimeSeriesConverter { table.deleteColumns(); - const valueColumns = ['Open', 'High', 'Low', 'Close', 'Value']; + const valueColumns = ['Open', 'High', 'Low', 'Close', 'Volume']; table.setColumn('Date'); diff --git a/src/TimeSeries/TimeSeriesJSON.ts b/src/TimeSeries/TimeSeriesJSON.ts index b8cc398..88514c5 100644 --- a/src/TimeSeries/TimeSeriesJSON.ts +++ b/src/TimeSeries/TimeSeriesJSON.ts @@ -89,7 +89,7 @@ namespace TimeSeriesJSON { high: number, low: number, close: number, - value: number + volume: number ]; diff --git a/test/unit-tests/TimeSeries/OHLCV.test.ts b/test/unit-tests/TimeSeries/OHLCV.test.ts index e3aa10d..1d416f4 100644 --- a/test/unit-tests/TimeSeries/OHLCV.test.ts +++ b/test/unit-tests/TimeSeries/OHLCV.test.ts @@ -45,7 +45,7 @@ export async function ohlcvLoad ( `${securityId}_High`, `${securityId}_Low`, `${securityId}_Close`, - `${securityId}_Value` + `${securityId}_Volume` ], 'Connector table should exist of expected columns.' );