Thomas Kaul
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
8 additions and
7 deletions
-
apps/api/src/services/data-provider/data-provider.service.ts
|
|
@ -204,13 +204,14 @@ export class DataProviderService { |
|
|
|
}); |
|
|
|
|
|
|
|
try { |
|
|
|
const queryRaw = `SELECT *
|
|
|
|
FROM "MarketData" |
|
|
|
WHERE "dataSource" IN ('${dataSources.join(`','`)}') |
|
|
|
AND "symbol" IN ('${symbols.join( |
|
|
|
`','` |
|
|
|
)}') ${granularityQuery} ${rangeQuery} |
|
|
|
ORDER BY date;`;
|
|
|
|
const queryRaw = ` |
|
|
|
SELECT * |
|
|
|
FROM "MarketData" |
|
|
|
WHERE "dataSource" IN ('${dataSources.join(`','`)}') |
|
|
|
AND "symbol" IN ('${symbols.join( |
|
|
|
`','` |
|
|
|
)}') ${granularityQuery} ${rangeQuery} |
|
|
|
ORDER BY date;`;
|
|
|
|
|
|
|
|
const marketDataByGranularity: MarketData[] = |
|
|
|
await this.prismaService.$queryRawUnsafe(queryRaw); |
|
|
|