import { SYMBOL } from 'redux/api/bitmex/types' ; enum Exchange { BITMEX = 'bitmex' } export function websocketBaseUrl ( exchange = Exchange . BITMEX ) { const baseUrls = { bitmex : `wss://${ process . env . REACT_APP___TESTNET === 'true' ? 'testnet' : 'www' }.bitmex.com/realtime?subscribe=` , } ; return baseUrls [ exchange ] ; } export const instrumentTopics = ( ... symbols ) => symbols . map ( ( symbol ) => `instrument:${ symbol }` ) . join ( ',' ) ;