|
|
|
@ -28,8 +28,8 @@ function makeOptionContractDatabase(): OptionContractDatabase {
|
|
|
|
|
start: [symbol, expirationDate, strike, type, startOfDayUnix],
|
|
|
|
|
end: [symbol, expirationDate, strike, type, endOfDayUnix],
|
|
|
|
|
})
|
|
|
|
|
.map(({ value }) => ({
|
|
|
|
|
tsStart: value.tsStart,
|
|
|
|
|
.map(({ key, value }) => ({
|
|
|
|
|
tsStart: key[4],
|
|
|
|
|
open: value.open,
|
|
|
|
|
close: value.close,
|
|
|
|
|
high: value.high,
|
|
|
|
@ -73,7 +73,7 @@ function makeOptionContractDatabase(): OptionContractDatabase {
|
|
|
|
|
aggregate.key.strike,
|
|
|
|
|
aggregate.key.type,
|
|
|
|
|
],
|
|
|
|
|
null,
|
|
|
|
|
null
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -92,7 +92,7 @@ function makeOptionContractDatabase(): OptionContractDatabase {
|
|
|
|
|
close: aggregate.close,
|
|
|
|
|
high: aggregate.high,
|
|
|
|
|
low: aggregate.low,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -101,7 +101,7 @@ function makeOptionContractDatabase(): OptionContractDatabase {
|
|
|
|
|
key: { symbol, strike, type, expirationDate },
|
|
|
|
|
}) => {
|
|
|
|
|
const startOfLastHourUnix = new Date(
|
|
|
|
|
`${expirationDate}T00:00:00Z`,
|
|
|
|
|
`${expirationDate}T00:00:00Z`
|
|
|
|
|
).valueOf();
|
|
|
|
|
const endOfLastHourUnix = startOfLastHourUnix + 3600 * 1000;
|
|
|
|
|
let minPrice = 0;
|
|
|
|
|