Skip to content
Merged
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 @@ -62,14 +62,15 @@ export class ExchangeAdapter implements LiquidityBalanceIntegration {
async getForExchange(exchange: string, assets: LiquidityManagementAsset[]): Promise<LiquidityBalance[]> {
const exchangeService = this.exchangeRegistry.getExchange(exchange);

// not configured (no API credentials) -> skip gracefully, warn once
// not configured (no API credentials) -> skip, warn once. No balances are reported on purpose:
// a zero balance would be persisted and could trigger liquidity rules, masking a config error
if (!exchangeService.isConfigured) {
if (!this.unconfiguredWarned.has(exchange)) {
this.unconfiguredWarned.add(exchange);
this.logger.warn(`Exchange ${exchange} has no credentials configured — skipping liquidity balance`);
}

return assets.map((a) => LiquidityBalance.create(a, 0, 0));
return [];
}

try {
Expand Down