dukascopy-node-plus 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +16 -11
- package/dist/esm/{chunk-5PZO2PCC.js → chunk-BGHB2UHH.js} +1 -1
- package/dist/esm/{chunk-E245CVDJ.js → chunk-JKCO22QM.js} +1 -1
- package/dist/esm/{chunk-X3XEJCND.js → chunk-LXG3Z6BO.js} +2 -2
- package/dist/esm/{chunk-NHIUTTTM.js → chunk-TZSWXPP4.js} +1461 -7
- package/dist/esm/cli/index.js +2 -2
- package/dist/esm/index.example.nostream.js +3 -3
- package/dist/esm/index.example.stream.js +2 -2
- package/dist/esm/index.js +6 -4
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.example.nostream.js +13 -8
- package/dist/index.example.stream.js +12 -7
- package/dist/index.js +1463 -8
- package/package.json +1 -1
package/dist/esm/cli/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
version
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-BGHB2UHH.js";
|
|
5
5
|
import {
|
|
6
6
|
BufferFetcher,
|
|
7
7
|
CacheManager,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
processData,
|
|
17
17
|
schema,
|
|
18
18
|
validateConfig
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-TZSWXPP4.js";
|
|
20
20
|
|
|
21
21
|
// src/cli/cli.ts
|
|
22
22
|
import { resolve, join } from "path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getHistoricalRates
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LXG3Z6BO.js";
|
|
4
|
+
import "./chunk-BGHB2UHH.js";
|
|
5
5
|
import "./chunk-476J4KQE.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-TZSWXPP4.js";
|
|
7
7
|
|
|
8
8
|
// src/index.example.nostream.ts
|
|
9
9
|
var printMemory = () => {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getHistoricalRatesToStream
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JKCO22QM.js";
|
|
4
4
|
import {
|
|
5
5
|
getHistoricRates,
|
|
6
6
|
getHistoricalRates
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-LXG3Z6BO.js";
|
|
8
|
+
import "./chunk-BGHB2UHH.js";
|
|
9
9
|
import {
|
|
10
10
|
formatOutput
|
|
11
11
|
} from "./chunk-476J4KQE.js";
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
CacheManager,
|
|
15
15
|
Format,
|
|
16
16
|
Instrument,
|
|
17
|
+
InstrumentGroup,
|
|
17
18
|
Price,
|
|
18
19
|
Timeframe,
|
|
19
20
|
URL_ROOT,
|
|
@@ -25,7 +26,7 @@ import {
|
|
|
25
26
|
schema,
|
|
26
27
|
validateConfig,
|
|
27
28
|
validateConfigNode
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-TZSWXPP4.js";
|
|
29
30
|
|
|
30
31
|
// src/index.ts
|
|
31
32
|
import { RuleDate, RuleBoolean, RuleNumber, RuleString, RuleObject } from "fastest-validator";
|
|
@@ -157,6 +158,7 @@ export {
|
|
|
157
158
|
CacheManager,
|
|
158
159
|
Format,
|
|
159
160
|
Instrument,
|
|
161
|
+
InstrumentGroup,
|
|
160
162
|
instrumentMetaData as InstrumentMetaData,
|
|
161
163
|
Price,
|
|
162
164
|
RuleBoolean,
|
package/dist/index.d.mts
CHANGED
|
@@ -6472,6 +6472,13 @@ declare enum Instrument {
|
|
|
6472
6472
|
}
|
|
6473
6473
|
type InstrumentType = keyof typeof Instrument;
|
|
6474
6474
|
|
|
6475
|
+
interface GroupData {
|
|
6476
|
+
id: string;
|
|
6477
|
+
instruments: string[];
|
|
6478
|
+
}
|
|
6479
|
+
|
|
6480
|
+
declare const InstrumentGroup: GroupData[];
|
|
6481
|
+
|
|
6475
6482
|
declare const VolumeUnit: {
|
|
6476
6483
|
/**
|
|
6477
6484
|
* A single unit of a currency, commodity, or security.
|
|
@@ -6815,4 +6822,4 @@ declare function getCurrentRates(config: CurrentRatesConfigCsv): Promise<string>
|
|
|
6815
6822
|
|
|
6816
6823
|
declare function getHistoricalRatesToStream(config: Config): Readable;
|
|
6817
6824
|
|
|
6818
|
-
export { type ArrayItem, type ArrayTickItem, BufferFetcher, CacheManager, type Config, type ConfigValidationError, type CurrentRatesConfig, type CurrentRatesConfigArrayItem, type CurrentRatesConfigArrayTickItem, type CurrentRatesConfigCsv, type CurrentRatesConfigJsonItem, type CurrentRatesConfigJsonTickItem, type DefaultConfig, Format, type FormatType, type InputSchema, Instrument, instrumentMetaData as InstrumentMetaData, type InstrumentType, type JsonItem, type JsonItemTick, type Output, Price, type PriceType, type SanitizedConfig, Timeframe, type TimeframeType, URL_ROOT, type ValidateConfigOutput, defaultConfig, formatOutput, generateUrls, getCurrentRates, getHistoricRates, getHistoricalRates, getHistoricalRatesToStream, normaliseDates, processData, schema, validateConfig, validateConfigNode };
|
|
6825
|
+
export { type ArrayItem, type ArrayTickItem, BufferFetcher, CacheManager, type Config, type ConfigValidationError, type CurrentRatesConfig, type CurrentRatesConfigArrayItem, type CurrentRatesConfigArrayTickItem, type CurrentRatesConfigCsv, type CurrentRatesConfigJsonItem, type CurrentRatesConfigJsonTickItem, type DefaultConfig, Format, type FormatType, type GroupData, type InputSchema, Instrument, InstrumentGroup, instrumentMetaData as InstrumentMetaData, type InstrumentType, type JsonItem, type JsonItemTick, type Output, Price, type PriceType, type SanitizedConfig, Timeframe, type TimeframeType, URL_ROOT, type ValidateConfigOutput, defaultConfig, formatOutput, generateUrls, getCurrentRates, getHistoricRates, getHistoricalRates, getHistoricalRatesToStream, normaliseDates, processData, schema, validateConfig, validateConfigNode };
|
package/dist/index.d.ts
CHANGED
|
@@ -6472,6 +6472,13 @@ declare enum Instrument {
|
|
|
6472
6472
|
}
|
|
6473
6473
|
type InstrumentType = keyof typeof Instrument;
|
|
6474
6474
|
|
|
6475
|
+
interface GroupData {
|
|
6476
|
+
id: string;
|
|
6477
|
+
instruments: string[];
|
|
6478
|
+
}
|
|
6479
|
+
|
|
6480
|
+
declare const InstrumentGroup: GroupData[];
|
|
6481
|
+
|
|
6475
6482
|
declare const VolumeUnit: {
|
|
6476
6483
|
/**
|
|
6477
6484
|
* A single unit of a currency, commodity, or security.
|
|
@@ -6815,4 +6822,4 @@ declare function getCurrentRates(config: CurrentRatesConfigCsv): Promise<string>
|
|
|
6815
6822
|
|
|
6816
6823
|
declare function getHistoricalRatesToStream(config: Config): Readable;
|
|
6817
6824
|
|
|
6818
|
-
export { type ArrayItem, type ArrayTickItem, BufferFetcher, CacheManager, type Config, type ConfigValidationError, type CurrentRatesConfig, type CurrentRatesConfigArrayItem, type CurrentRatesConfigArrayTickItem, type CurrentRatesConfigCsv, type CurrentRatesConfigJsonItem, type CurrentRatesConfigJsonTickItem, type DefaultConfig, Format, type FormatType, type InputSchema, Instrument, instrumentMetaData as InstrumentMetaData, type InstrumentType, type JsonItem, type JsonItemTick, type Output, Price, type PriceType, type SanitizedConfig, Timeframe, type TimeframeType, URL_ROOT, type ValidateConfigOutput, defaultConfig, formatOutput, generateUrls, getCurrentRates, getHistoricRates, getHistoricalRates, getHistoricalRatesToStream, normaliseDates, processData, schema, validateConfig, validateConfigNode };
|
|
6825
|
+
export { type ArrayItem, type ArrayTickItem, BufferFetcher, CacheManager, type Config, type ConfigValidationError, type CurrentRatesConfig, type CurrentRatesConfigArrayItem, type CurrentRatesConfigArrayTickItem, type CurrentRatesConfigCsv, type CurrentRatesConfigJsonItem, type CurrentRatesConfigJsonTickItem, type DefaultConfig, Format, type FormatType, type GroupData, type InputSchema, Instrument, InstrumentGroup, instrumentMetaData as InstrumentMetaData, type InstrumentType, type JsonItem, type JsonItemTick, type Output, Price, type PriceType, type SanitizedConfig, Timeframe, type TimeframeType, URL_ROOT, type ValidateConfigOutput, defaultConfig, formatOutput, generateUrls, getCurrentRates, getHistoricRates, getHistoricalRates, getHistoricalRatesToStream, normaliseDates, processData, schema, validateConfig, validateConfigNode };
|
|
@@ -1297,6 +1297,11 @@ var Instrument = /* @__PURE__ */ ((Instrument2) => {
|
|
|
1297
1297
|
return Instrument2;
|
|
1298
1298
|
})(Instrument || {});
|
|
1299
1299
|
|
|
1300
|
+
// src/utils/instrument-meta-data/generate-group-data.ts
|
|
1301
|
+
var import_fs = __toESM(require("fs"));
|
|
1302
|
+
var import_util = require("util");
|
|
1303
|
+
var saveFile = (0, import_util.promisify)(import_fs.default.writeFile);
|
|
1304
|
+
|
|
1300
1305
|
// src/config/timeframes.ts
|
|
1301
1306
|
var Timeframe = /* @__PURE__ */ ((Timeframe2) => {
|
|
1302
1307
|
Timeframe2["tick"] = "tick";
|
|
@@ -3389,7 +3394,7 @@ var instrument_meta_data_default = {
|
|
|
3389
3394
|
batusd: {
|
|
3390
3395
|
name: "BAT/USD",
|
|
3391
3396
|
description: "Basic Attention Token vs US Dollar",
|
|
3392
|
-
decimalFactor:
|
|
3397
|
+
decimalFactor: 1e5,
|
|
3393
3398
|
startHourForTicks: "2019-08-05T00:00:02.214Z",
|
|
3394
3399
|
startDayForMinuteCandles: "2019-08-05T00:00:00.000Z",
|
|
3395
3400
|
startMonthForHourlyCandles: "2019-08-05T00:00:00.000Z",
|
|
@@ -7341,10 +7346,10 @@ var instrument_meta_data_default = {
|
|
|
7341
7346
|
name: "ITA.IDX/EUR",
|
|
7342
7347
|
description: "Italy 40 Index",
|
|
7343
7348
|
decimalFactor: 1e3,
|
|
7344
|
-
startHourForTicks: "
|
|
7345
|
-
startDayForMinuteCandles: "
|
|
7346
|
-
startMonthForHourlyCandles: "
|
|
7347
|
-
startYearForDailyCandles: "
|
|
7349
|
+
startHourForTicks: "2016-07-29T07:00:27.002Z",
|
|
7350
|
+
startDayForMinuteCandles: "2016-07-29T07:00:00.000Z",
|
|
7351
|
+
startMonthForHourlyCandles: "2016-07-29T07:00:00.000Z",
|
|
7352
|
+
startYearForDailyCandles: "2016-07-29T00:00:00.000Z"
|
|
7348
7353
|
},
|
|
7349
7354
|
itrkgbgbx: {
|
|
7350
7355
|
name: "ITRK.GB/GBX",
|
|
@@ -7943,7 +7948,7 @@ var instrument_meta_data_default = {
|
|
|
7943
7948
|
lnkusd: {
|
|
7944
7949
|
name: "LNK/USD",
|
|
7945
7950
|
description: "Chainlink vs US Dollar",
|
|
7946
|
-
decimalFactor:
|
|
7951
|
+
decimalFactor: 1e3,
|
|
7947
7952
|
startHourForTicks: "2000-01-01T00:00:00.000Z",
|
|
7948
7953
|
startDayForMinuteCandles: "2021-09-25T17:49:00.000Z",
|
|
7949
7954
|
startMonthForHourlyCandles: "2021-09-25T17:00:00.000Z",
|
|
@@ -11696,7 +11701,7 @@ var instrument_meta_data_default = {
|
|
|
11696
11701
|
uniusd: {
|
|
11697
11702
|
name: "UNI/USD",
|
|
11698
11703
|
description: "Uniswap vs US Dollar",
|
|
11699
|
-
decimalFactor:
|
|
11704
|
+
decimalFactor: 1e3,
|
|
11700
11705
|
startHourForTicks: "2000-01-01T00:00:00.000Z",
|
|
11701
11706
|
startDayForMinuteCandles: "2021-10-01T00:00:00.000Z",
|
|
11702
11707
|
startMonthForHourlyCandles: "2021-10-01T00:00:00.000Z",
|
|
@@ -13758,7 +13763,7 @@ function formatBytes(bytes, decimals = 2) {
|
|
|
13758
13763
|
}
|
|
13759
13764
|
|
|
13760
13765
|
// package.json
|
|
13761
|
-
var version = "1.1.
|
|
13766
|
+
var version = "1.1.5";
|
|
13762
13767
|
|
|
13763
13768
|
// src/getHistoricalRates.ts
|
|
13764
13769
|
var import_debug = __toESM(require("debug"));
|
|
@@ -1297,6 +1297,11 @@ var Instrument = /* @__PURE__ */ ((Instrument2) => {
|
|
|
1297
1297
|
return Instrument2;
|
|
1298
1298
|
})(Instrument || {});
|
|
1299
1299
|
|
|
1300
|
+
// src/utils/instrument-meta-data/generate-group-data.ts
|
|
1301
|
+
var import_fs = __toESM(require("fs"));
|
|
1302
|
+
var import_util = require("util");
|
|
1303
|
+
var saveFile = (0, import_util.promisify)(import_fs.default.writeFile);
|
|
1304
|
+
|
|
1300
1305
|
// src/config/timeframes.ts
|
|
1301
1306
|
var Timeframe = /* @__PURE__ */ ((Timeframe2) => {
|
|
1302
1307
|
Timeframe2["tick"] = "tick";
|
|
@@ -3389,7 +3394,7 @@ var instrument_meta_data_default = {
|
|
|
3389
3394
|
batusd: {
|
|
3390
3395
|
name: "BAT/USD",
|
|
3391
3396
|
description: "Basic Attention Token vs US Dollar",
|
|
3392
|
-
decimalFactor:
|
|
3397
|
+
decimalFactor: 1e5,
|
|
3393
3398
|
startHourForTicks: "2019-08-05T00:00:02.214Z",
|
|
3394
3399
|
startDayForMinuteCandles: "2019-08-05T00:00:00.000Z",
|
|
3395
3400
|
startMonthForHourlyCandles: "2019-08-05T00:00:00.000Z",
|
|
@@ -7341,10 +7346,10 @@ var instrument_meta_data_default = {
|
|
|
7341
7346
|
name: "ITA.IDX/EUR",
|
|
7342
7347
|
description: "Italy 40 Index",
|
|
7343
7348
|
decimalFactor: 1e3,
|
|
7344
|
-
startHourForTicks: "
|
|
7345
|
-
startDayForMinuteCandles: "
|
|
7346
|
-
startMonthForHourlyCandles: "
|
|
7347
|
-
startYearForDailyCandles: "
|
|
7349
|
+
startHourForTicks: "2016-07-29T07:00:27.002Z",
|
|
7350
|
+
startDayForMinuteCandles: "2016-07-29T07:00:00.000Z",
|
|
7351
|
+
startMonthForHourlyCandles: "2016-07-29T07:00:00.000Z",
|
|
7352
|
+
startYearForDailyCandles: "2016-07-29T00:00:00.000Z"
|
|
7348
7353
|
},
|
|
7349
7354
|
itrkgbgbx: {
|
|
7350
7355
|
name: "ITRK.GB/GBX",
|
|
@@ -7943,7 +7948,7 @@ var instrument_meta_data_default = {
|
|
|
7943
7948
|
lnkusd: {
|
|
7944
7949
|
name: "LNK/USD",
|
|
7945
7950
|
description: "Chainlink vs US Dollar",
|
|
7946
|
-
decimalFactor:
|
|
7951
|
+
decimalFactor: 1e3,
|
|
7947
7952
|
startHourForTicks: "2000-01-01T00:00:00.000Z",
|
|
7948
7953
|
startDayForMinuteCandles: "2021-09-25T17:49:00.000Z",
|
|
7949
7954
|
startMonthForHourlyCandles: "2021-09-25T17:00:00.000Z",
|
|
@@ -11696,7 +11701,7 @@ var instrument_meta_data_default = {
|
|
|
11696
11701
|
uniusd: {
|
|
11697
11702
|
name: "UNI/USD",
|
|
11698
11703
|
description: "Uniswap vs US Dollar",
|
|
11699
|
-
decimalFactor:
|
|
11704
|
+
decimalFactor: 1e3,
|
|
11700
11705
|
startHourForTicks: "2000-01-01T00:00:00.000Z",
|
|
11701
11706
|
startDayForMinuteCandles: "2021-10-01T00:00:00.000Z",
|
|
11702
11707
|
startMonthForHourlyCandles: "2021-10-01T00:00:00.000Z",
|