Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Binance] Kline class cast exception #4877

Open
dbof10 opened this issue May 19, 2024 · 2 comments
Open

[Binance] Kline class cast exception #4877

dbof10 opened this issue May 19, 2024 · 2 comments

Comments

@dbof10
Copy link

dbof10 commented May 19, 2024

java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Boolean (java.lang.String and java.lang.Boolean are in module java.base of loader 'bootstrap')
        at org.knowm.xchange.binance.dto.marketdata.BinanceKline.<init>(BinanceKline.java:42) ~[xchange-binance-5.1.1.jar:na]
        at org.knowm.xchange.binance.service.BinanceMarketDataServiceRaw.lambda$klines$3(BinanceMarketDataServiceRaw.java:83) ~[xchange-binance-5.1.1.jar:na]
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[na:na]
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[na:na]
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[na:na]
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[na:na]
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[na:na]
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[na:na]
        at org.knowm.xchange.binance.service.BinanceMarketDataServiceRaw.klines(BinanceMarketDataServiceRaw.java:84) ~[xchange-binance-5.1.1.jar:na]

so this line this.closed = (Boolean)obj[11]; not works

@dbof10 dbof10 changed the title [Binance] Kline class [Binance] Kline class cast exception May 19, 2024
@rizer1980
Copy link
Contributor

There was already a message somewhere about the same problem, I can’t find it.
needs to make BinanceMarketData getKlines method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@dbof10 @rizer1980 and others