public static BitfinexCandlestickSymbol fromBitfinexString ( final String symbol ) { if ( ! symbol . startsWith ( "trade:" ) ) { throw new IllegalArgumentException ( "Unable to parse: " + symbol ) ; } final String [ ] splitString = symbol . split ( ":" ) ; if ( splitString . length != 3 ) { throw new IllegalArgumentException ( "Unable to parse: " + symbol ) ; } final String timeframeString = splitString [ 1 ] ; final String symbolString = splitString [ 2 ] ; return BitfinexSymbols . candlesticks ( BitfinexCurrencyPair . fromSymbolString ( symbolString ) , BitfinexCandleTimeFrame . fromSymbolString ( timeframeString ) ) ; }
Construct from Bitfinex string