{"action":"created","issue":{"url":"https://api.github.com/repos/binance-exchange/binance-java-api/issues/102","repository_url":"https://api.github.com/repos/binance-exchange/binance-java-api","labels_url":"https://api.github.com/repos/binance-exchange/binance-java-api/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/binance-exchange/binance-java-api/issues/102/comments","events_url":"https://api.github.com/repos/binance-exchange/binance-java-api/issues/102/events","html_url":"https://github.com/binance-exchange/binance-java-api/issues/102","id":307944989,"number":102,"title":"Got exception from getCandlestickBars()","user":{"login":"blaizechuang","id":5380663,"avatar_url":"https://avatars1.githubusercontent.com/u/5380663?v=4","gravatar_id":"","url":"https://api.github.com/users/blaizechuang","html_url":"https://github.com/blaizechuang","followers_url":"https://api.github.com/users/blaizechuang/followers","following_url":"https://api.github.com/users/blaizechuang/following{/other_user}","gists_url":"https://api.github.com/users/blaizechuang/gists{/gist_id}","starred_url":"https://api.github.com/users/blaizechuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blaizechuang/subscriptions","organizations_url":"https://api.github.com/users/blaizechuang/orgs","repos_url":"https://api.github.com/users/blaizechuang/repos","events_url":"https://api.github.com/users/blaizechuang/events{/privacy}","received_events_url":"https://api.github.com/users/blaizechuang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-23T08:49:43Z","updated_at":"2018-05-10T22:12:07Z","closed_at":null,"author_association":"NONE","body":"Hi, I got an exception after calling following code\r\nclient.getCandlestickBars(TradingPairSymbols.BTCPairs.ETH_BTC, CandlestickInterval.DAILY);\r\n\r\nIt seems that the type mapping in [**BinanceApiServiceGenerator.java:60**] is incorrect.\r\n\r\nStacktrace:\r\ncom.binance.api.client.exception.BinanceApiException: com.fasterxml.jackson.databind.exc.InvalidFormatException: **Can not construct instance of java.lang.Long from String value (\"0.08000000\"): not a valid Long value** at \r\n[Source: okhttp3.ResponseBody$BomAwareReader@5c25378; line: 1, column: 17] (through reference chain: java.util.ArrayList[0]->com.binance.api.client.domain.market.Candlestick[\"closeTime\"]) at com.binance.api.client.impl.BinanceApiServiceGenerator.executeSync(BinanceApiServiceGenerator.java:60) at com.binance.api.client.impl.BinanceApiRestClientImpl.getCandlestickBars(BinanceApiRestClientImpl.java:89)\r\nat com.binance.api.client.impl.BinanceApiRestClientImpl.getCandlestickBars(BinanceApiRestClientImpl.java:94)\r\nat \r\ncom.dpt.ileopard.binanceapitest.MainActivity$4.run(MainActivity.java:117) at java.lang.Thread.run(Thread.java:764)"},"comment":{"url":"https://api.github.com/repos/binance-exchange/binance-java-api/issues/comments/388201671","html_url":"https://github.com/binance-exchange/binance-java-api/issues/102#issuecomment-388201671","issue_url":"https://api.github.com/repos/binance-exchange/binance-java-api/issues/102","id":388201671,"user":{"login":"freezerdragon","id":5116292,"avatar_url":"https://avatars2.githubusercontent.com/u/5116292?v=4","gravatar_id":"","url":"https://api.github.com/users/freezerdragon","html_url":"https://github.com/freezerdragon","followers_url":"https://api.github.com/users/freezerdragon/followers","following_url":"https://api.github.com/users/freezerdragon/following{/other_user}","gists_url":"https://api.github.com/users/freezerdragon/gists{/gist_id}","starred_url":"https://api.github.com/users/freezerdragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freezerdragon/subscriptions","organizations_url":"https://api.github.com/users/freezerdragon/orgs","repos_url":"https://api.github.com/users/freezerdragon/repos","events_url":"https://api.github.com/users/freezerdragon/events{/privacy}","received_events_url":"https://api.github.com/users/freezerdragon/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T22:12:07Z","updated_at":"2018-05-10T22:12:07Z","author_association":"NONE","body":"Helo Joao, thanks for quick response. I am trying to use this library for an android project. And importing it from both https://jitpack.io/#binance-exchange/binance-java-api or compiled JAR library. Neither worked so far. \r\n\r\nMy code is straightforward as ;\r\n\r\nLog.d(\"BINANCE\", \"Clicked\");\r\n        BinanceApiClientFactory clientFactory = BinanceApiClientFactory.newInstance();\r\n        //sync\r\n        BinanceApiRestClient client = clientFactory.newRestClient();\r\n        List<Candlestick> candlesticks = client.getCandlestickBars(\"NEOETH\", CandlestickInterval.WEEKLY);\r\n\r\nWhen I run this, I get ->\r\n\r\n05-11 01:06:00.296 24783-24783/com.cryptodragon.android E/AndroidRuntime: FATAL EXCEPTION: main\r\n    Process: com.cryptodragon.android, PID: 24783\r\n    com.binance.api.client.exception.BinanceApiException: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.lang.Long` from String \"0.09700000\": not a valid Long value\r\n        at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 17] (through reference chain: java.util.ArrayList[0]->com.binance.api.client.domain.market.Candlestick[\"closeTime\"])\r\n        at com.binance.api.client.impl.BinanceApiServiceGenerator.executeSync(BinanceApiServiceGenerator.java:60)\r\n        at com.binance.api.client.impl.BinanceApiRestClientImpl.getCandlestickBars(BinanceApiRestClientImpl.java:96)\r\n        at com.binance.api.client.impl.BinanceApiRestClientImpl.getCandlestickBars(BinanceApiRestClientImpl.java:101)\r\n        at com.cryptodragon.android.Activities.Home.getKlines(Home.java:333)\r\n        at com.cryptodragon.android.Activities.Home$4.onClick(Home.java:145)\r\n        at android.view.View.performClick(View.java:5637)\r\n        at android.view.View$PerformClick.run(View.java:22433)\r\n        at android.os.Handler.handleCallback(Handler.java:751)\r\n        at android.os.Handler.dispatchMessage(Handler.java:95)\r\n        at android.os.Looper.loop(Looper.java:154)\r\n        at android.app.ActivityThread.main(ActivityThread.java:6186)\r\n        at java.lang.reflect.Method.invoke(Native Method)\r\n        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)\r\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)\r\n     Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.lang.Long` from String \"0.09700000\": not a valid Long value\r\n        at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 17] (through reference chain: java.util.ArrayList[0]->com.binance.api.client.domain.market.Candlestick[\"closeTime\"])\r\n        at com.fasterxml.jackson.databind.DeserializationContext.weirdStringException(DeserializationContext.java:1548)\r\n        at com.fasterxml.jackson.databind.DeserializationContext.handleWeirdStringValue(DeserializationContext.java:910)\r\n        at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$LongDeserializer._parseLong(NumberDeserializers.java:584)\r\n        at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$LongDeserializer.deserialize(NumberDeserializers.java:557)\r\n        at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$LongDeserializer.deserialize(NumberDeserializers.java:535)\r\n        at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127)\r\n        at com.fasterxml.jackson.databind.deser.impl.BeanAsArrayDeserializer.deserialize(BeanAsArrayDeserializer.java:119)\r\n        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286)\r\n        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)\r\n        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)\r\n        at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1611)\r\n        at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1203)\r\n        at retrofit2.converter.jackson.JacksonResponseBodyConverter.convert(JacksonResponseBodyConverter.java:32)\r\n        at retrofit2.converter.jackson.JacksonResponseBodyConverter.convert(JacksonResponseBodyConverter.java:23)\r\n        at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:122)\r\n        at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:217)\r\n        at retrofit2.OkHttpCall.execute(OkHttpCall.java:180)\r\n        at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ExecutorCallAdapterFactory.java:91)\r\n        at com.binance.api.client.impl.BinanceApiServiceGenerator.executeSync(BinanceApiServiceGenerator.java:52)\r\n        at com.binance.api.client.impl.BinanceApiRestClientImpl.getCandlestickBars(BinanceApiRestClientImpl.java:96) \r\n        at com.binance.api.client.impl.BinanceApiRestClientImpl.getCandlestickBars(BinanceApiRestClientImpl.java:101) \r\n        at com.cryptodragon.android.Activities.Home.getKlines(Home.java:333) \r\n        at com.cryptodragon.android.Activities.Home$4.onClick(Home.java:145) \r\n        at android.view.View.performClick(View.java:5637) \r\n        at android.view.View$PerformClick.run(View.java:22433) \r\n        at android.os.Handler.handleCallback(Handler.java:751) \r\n        at android.os.Handler.dispatchMessage(Handler.java:95) \r\n        at android.os.Looper.loop(Looper.java:154) \r\n        at android.app.ActivityThread.main(ActivityThread.java:6186) \r\n        at java.lang.reflect.Method.invoke(Native Method) \r\n        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) \r\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) \r\n\r\nThis exact result."}}
{"actor":{"display_login":"freezerdragon"}}