marcos-gonalons / tradingview-scraper

Get any market data in real time from the TradingView socket :) Ready to use in your Golang projects!
Apache License 2.0
79 stars 29 forks source link

Panic : invalid_parameters "quote_add_symbols" #7

Closed kitesoft closed 7 months ago

kitesoft commented 9 months ago

hi,recntly I got this error :

"error -> Error -> {\"m\":\"critical_error\",\"p\":[\"qs_wfAfBhBePuuw\",\"invalid_parameters\",\"quote_add_symbols\"]}""context -> JSON message has an error message""error -> read tcp 192.168.0.112:58532->209.58.146.115:443: use of closed network connection""context -> Error while reading new messages through the socket connection"

code : `import ( "fmt" "sync"

socket "github.com/marcos-gonalons/tradingview-scraper/v2"

)

func main() { var wg sync.WaitGroup wg.Add(1) tradingviewsocket, err := socket.Connect( func(symbol string, data *socket.QuoteData) { fmt.Printf("%#v", symbol) fmt.Printf("%#v", data) }, func(err error, context string) { fmt.Printf("%#v", "error -> "+err.Error()) fmt.Printf("%#v", "context -> "+context) }, ) if err != nil { panic("Error while initializing the trading view socket -> " + err.Error()) } tradingviewsocket.AddSymbol("BITSTAMP:BTCUSD") wg.Wait() }`

could you please help to fix it best regard

kitesoft commented 9 months ago

solved in https://github.com/verzth/tradingview-scraper folk thanks