File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -141,13 +141,22 @@ export class ProfileService {
141141 }
142142
143143 /**
144- * Fetch ticker/market data for a pair
144+ * Fetch ticker/market data for a pair using authenticated exchange
145145 */
146146 async fetchTicker ( profileId : string , pair : string ) : Promise < MarketData > {
147147 const exchange = await this . getExchangeForProfile ( profileId ) ;
148148 return fetchMarketData ( exchange , pair ) ;
149149 }
150150
151+ /**
152+ * Fetch ticker/market data using public (unauthenticated) exchange.
153+ * Use this for watch mode bots that don't need authentication.
154+ */
155+ async fetchTickerPublic ( exchangeName : string , pair : string ) : Promise < MarketData > {
156+ const exchange = await this . exchangeInstanceService . getPublicExchange ( exchangeName ) ;
157+ return fetchMarketData ( exchange , pair ) ;
158+ }
159+
151160 /**
152161 * Fetch open orders for a profile/pair
153162 */
Original file line number Diff line number Diff line change @@ -96,10 +96,11 @@ export class BotRunner {
9696 }
9797
9898 private async runBot ( bot : Bot , profile : Profile ) : Promise < void > {
99- const marketData = await this . profileService . fetchTicker ( profile . id , bot . pair ) ;
100-
10199 const isWatchOnly = bot . mode === 'watch' ;
102100
101+ // Always use public exchange for ticker (no auth needed)
102+ const marketData = await this . profileService . fetchTickerPublic ( profile . exchange , bot . pair ) ;
103+
103104 // Execute strategy
104105 const signal = await this . strategyExecutor . executeStrategy (
105106 bot . strategy ,
You can’t perform that action at this time.
0 commit comments