From d6e351e30c6e64fc2836b1a04095dbfb6cb8990b Mon Sep 17 00:00:00 2001 From: dsawyer Date: Sat, 21 Jan 2017 10:13:50 -0500 Subject: [PATCH] Interactive Brokers uses "1 secs" not "1 sec" --- .../sumzerotrading/ib/historical/HistoricalDataUtils.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/implementations/historical-data-api/ib-historical-data-api-impl/src/main/java/com/sumzerotrading/ib/historical/HistoricalDataUtils.java b/implementations/historical-data-api/ib-historical-data-api-impl/src/main/java/com/sumzerotrading/ib/historical/HistoricalDataUtils.java index f4a20c2..5aa35c6 100644 --- a/implementations/historical-data-api/ib-historical-data-api-impl/src/main/java/com/sumzerotrading/ib/historical/HistoricalDataUtils.java +++ b/implementations/historical-data-api/ib-historical-data-api-impl/src/main/java/com/sumzerotrading/ib/historical/HistoricalDataUtils.java @@ -61,11 +61,7 @@ public static String buildBarDataSizeString( int size, BarData.LengthUnit sizeUn if( size != 1 && size != 5 && size != 15 && size != 30 ) { throw new InvalidBarSizeException( "Valid values for seconds are 1, 5, 15 or 30" ); } else { - if( size == 1 ) { - return "1 sec"; - } else { - return size + " secs"; - } + return size + " secs"; } } else if( sizeUnit == BarData.LengthUnit.MINUTE ) { if( size != 1 && size != 2 && size != 5 && size != 15 && size != 30 ) {