Skip to content
This repository was archived by the owner on Jul 27, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ export class AccountConnectionService implements IAccountConnectionService {
],
},
select: {
assetClass: true,
currencyCode: true,
id: true,
symbol: true,
plaidType: true,
},
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import { SharedUtil } from '@maybe-finance/shared'
import _ from 'lodash'

export interface ISecurityPricingService {
sync(security: Pick<Security, 'id' | 'symbol' | 'plaidType'>, syncStart?: string): Promise<void>
sync(
security: Pick<Security, 'assetClass' | 'currencyCode' | 'id' | 'symbol'>,
syncStart?: string
): Promise<void>
syncAll(): Promise<void>
syncUSStockTickers(): Promise<void>
}
Expand All @@ -21,7 +24,7 @@ export class SecurityPricingService implements ISecurityPricingService {
) {}

async sync(
security: Pick<Security, 'id' | 'symbol' | 'plaidType' | 'currencyCode'>,
security: Pick<Security, 'assetClass' | 'currencyCode' | 'id' | 'symbol'>,
syncStart?: string
) {
const dailyPricing = await this.marketDataService.getDailyPricing(
Expand Down Expand Up @@ -77,10 +80,10 @@ export class SecurityPricingService implements ISecurityPricingService {
fetchData: (offset, count) =>
this.prisma.security.findMany({
select: {
assetClass: true,
currencyCode: true,
id: true,
symbol: true,
plaidType: true,
currencyCode: true,
},
skip: offset,
take: count,
Expand Down