consolidate web socket into ApiClient