File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export function useCoinGeckoWebSocket({
5656
5757 setTrades ( ( prev ) => [ newTrade , ...prev ] . slice ( 0 , 7 ) ) ;
5858 }
59- // G3: OHLCV updates
59+ // G3: OHLCV updates
6060 if ( msg . ch === 'G3' ) {
6161 const timestamp = msg . t || 0 ; // already in seconds
6262 const newCandle : OHLCData = [
@@ -67,6 +67,16 @@ export function useCoinGeckoWebSocket({
6767 Number ( msg . c ?? 0 ) ,
6868 ] ;
6969
70+ console . log ( '==== G3 OHLCV Update:' , {
71+ timestamp,
72+ formattedTime : new Date ( timestamp * 1000 ) . toISOString ( ) ,
73+ open : msg . o ,
74+ high : msg . h ,
75+ low : msg . l ,
76+ close : msg . c ,
77+ candle : newCandle ,
78+ } ) ;
79+
7080 // Always update with the latest candle - chart will handle deduplication
7181 setOhlcv ( newCandle ) ;
7282 lastOhlcvTimestamp . current = timestamp ;
@@ -145,6 +155,8 @@ export function useCoinGeckoWebSocket({
145155 subscribe ( 'CGSimplePrice' , { coin_id : [ coinId ] , action : 'set_tokens' } ) ;
146156
147157 const wsPools = [ poolId . replace ( '_' , ':' ) ] ;
158+ console . log ( "===wsPools" , wsPools )
159+
148160 if ( wsPools . length ) {
149161 subscribe ( 'OnchainTrade' , {
150162 'network_id:pool_addresses' : wsPools ,
You can’t perform that action at this time.
0 commit comments