Browse Source

Fix historical market data gathering for asset profiles with MANUAL data source

pull/3336/head
Thomas Kaul 1 year ago
parent
commit
5a007d7f11
  1. 5
      apps/api/src/app/import/import.service.ts
  2. 3
      apps/api/src/app/order/order.service.ts
  3. 2
      apps/api/src/services/data-provider/manual/manual.service.ts

5
apps/api/src/app/import/import.service.ts

@ -416,6 +416,11 @@ export class ImportService {
User: { connect: { id: user.id } },
userId: user.id
});
if (order.SymbolProfile?.symbol) {
// Update symbol that may have been assigned in createOrder()
assetProfile.symbol = order.SymbolProfile.symbol;
}
}
const value = new Big(quantity).mul(unitPrice).toNumber();

3
apps/api/src/app/order/order.service.ts

@ -140,7 +140,8 @@ export class OrderService {
return { id };
})
}
}
},
include: { SymbolProfile: true }
});
if (updateAccountBalance === true) {

2
apps/api/src/services/data-provider/manual/manual.service.ts

@ -91,7 +91,7 @@ export class ManualService implements DataProviderInterface {
headers = {},
selector,
url
} = symbolProfile.scraperConfiguration ?? {};
} = symbolProfile?.scraperConfiguration ?? {};
if (defaultMarketPrice) {
const historical: {

Loading…
Cancel
Save