File tree Expand file tree Collapse file tree
src/ExchangeSharp/API/Exchanges/FTX Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -404,7 +404,11 @@ protected override async Task<IWebSocket> OnGetTradesWebSocketAsync(Func<KeyValu
404404 {
405405 JToken parsedMsg = JToken . Parse ( msg . ToStringFromUTF8 ( ) ) ;
406406
407- if ( parsedMsg [ "channel" ] . ToStringInvariant ( ) . Equals ( "trades" )
407+ if ( parsedMsg [ "type" ] . ToStringInvariant ( ) == "error" )
408+ {
409+ throw new APIException ( parsedMsg [ "msg" ] . ToStringInvariant ( ) ) ;
410+ }
411+ else if ( parsedMsg [ "channel" ] . ToStringInvariant ( ) . Equals ( "trades" )
408412 && ! parsedMsg [ "type" ] . ToStringInvariant ( ) . Equals ( "subscribed" ) )
409413 {
410414 foreach ( var data in parsedMsg [ "data" ] )
@@ -424,7 +428,7 @@ await _socket.SendMessageAsync(new
424428 {
425429 op = "subscribe" ,
426430 market = marketSymbols [ i ] ,
427- channel = "trades"
431+ channel = "trades" ,
428432 } ) ;
429433 }
430434 } ) ;
You can’t perform that action at this time.
0 commit comments