Coder Social home page Coder Social logo

lick-hunter-server's People

Contributors

ebaloaloa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lick-hunter-server's Issues

Feature Request: autoInclude

@ebaloaloa was able to implement a very much needed feature: AutoExclude during the 0.4.0 release

"autoExclude" : true,
"autoExcludePercentage" : 70

This autoInclude feature functions in a similar way but instead of appending it to the exclusion list in the query.json file, it removes it.

Is your feature request related to a problem? Please describe.
I am currently using the autoExclude feature which was introduced back in the 0.4.0 release to automatically exclude coins that have exceeded a certain value within the past 24 hours. This value is around 20% to avoid fluctuations and for safety reasons. However, % changes in these coins can somehow be very volatile. One minute it's up 20%, next few hours it's already down 10% and so on. While having a low value for autoExclude works well for me, I keep finding myself deleting the coins every day to refresh the list of coins so it doesn't exclude the ones that are no longer above 20%. Sometimes I end up with over 60 excluded coins due to my low threshold.

Describe the solution you'd like
Similarly to the autoExclude feature, it would be great to have an autoInclude feature that would check the coins, determine if it has stabilized already and remove it from the exclusion list.

Ways to implement:
Correct me if I'm wrong or missing something here but I believe a similar approach to the 0.4.0 update would do the trick.

"autoInclude : true/false,
"autoIncludePercentage" : X
"autoIncludeInterval" : X

autoInclude: A toggle to enable/disable the feature.
autoIncludePercentage: The value to check before removing it from the exclusion list
autoIncludeInterval: The only new one among the 3. The purpose of this is to give it enough time before checking again and determining if the coin should be removed from the list. This is to avoid fluctuations and so that the coins wouldn't be excluded and then included every few seconds.

v0.10.2 Persisting Error On Start - Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler

Describe the bug
Running the lick-hunter-server v.0.10.2 along with Lick.Hunter.PRO.1.85
It was running fine earlier today. Then all of the sudden I'm getting the error below, and it just keeps repeating.
I already tried copy/pasting new files from the server-0.0.1-SNAPSHOT-distribution.zip (0.10.2)
But the error still persists

To Reproduce
Steps to reproduce the behavior:

  1. Go to cmd in Admin for location of Lick.Hunter.Pro.1.85
  2. execute Java Command java -XX:+UseParallelGC -Xms512m -Xmx2000m -jar server-0.0.1-SNAPSHOT.jar
  3. See error on server startup and keeps Repeating

Desktop (please complete the following information):

  • OS: Win 10
  • Local Machine (Checked with other members; error also happened on VPS)

Lick Hunter Server Logs
←[30m2021-08-11 21:17:11,351←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33mcom.lickhunter.web.services.impl.MarketServiceImpl←[0;39m: Retrieving Exchange Information
←[30m2021-08-11 21:17:11,463←[0;39m ←[34mINFO ←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][1] Connected to server
←[30m2021-08-11 21:17:12,429←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33mcom.lickhunter.web.services.impl.MarketServiceImpl←[0;39m: Retrieving 24h Ticker Price Change
←[30m2021-08-11 21:17:13,211←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33mcom.lickhunter.web.services.impl.MarketServiceImpl←[0;39m: Retrieving liquidation data.
←[30m2021-08-11 21:17:14,842←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33mcom.lickhunter.web.services.impl.MarketServiceImpl←[0;39m: Successfully retrieved liquidation data.
←[30m2021-08-11 21:17:21,410←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33mcom.lickhunter.web.services.impl.MarketServiceImpl←[0;39m: Retrieving candlesticks data
←[30m2021-08-11 21:17:57,441←[0;39m ←[31mWARN ←[0;39m [←[34mmain←[0;39m] ←[33morg.springframework.context.support.AbstractApplicationContext←[0;39m: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webApplication': Invocation of init method failed; nested exception is com.binance.client.exception.BinanceApiException: [Executing] -1121: Invalid symbol.
←[30m2021-08-11 21:17:57,444←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33morg.springframework.scheduling.concurrent.ExecutorConfigurationSupport←[0;39m: Shutting down ExecutorService 'applicationTaskExecutor'
←[30m2021-08-11 21:17:57,451←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33morg.springframework.orm.jpa.AbstractEntityManagerFactoryBean←[0;39m: Closing JPA EntityManagerFactory for persistence unit 'default'
←[30m2021-08-11 21:17:57,458←[0;39m ←[34mINFO ←[0;39m [←[34mtask-1←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub] Connection [id: 2] created for Candlestick for [btcusdt, ethusdt, bchusdt, xrpusdt, eosusdt, ltcusdt, trxusdt, etcusdt, linkusdt, xlmusdt, adausdt, xmrusdt, dashusdt, zecusdt, xtzusdt, bnbusdt, atomusdt, ontusdt, iotausdt, batusdt, vetusdt, neousdt, qtumusdt, iostusdt, thetausdt, algousdt, zilusdt, kncusdt, zrxusdt, compusdt, omgusdt, dogeusdt, sxpusdt, kavausdt, bandusdt, rlcusdt, wavesusdt, mkrusdt, snxusdt, dotusdt, defiusdt, yfiusdt, balusdt, crvusdt, trbusdt, yfiiusdt, runeusdt, sushiusdt, srmusdt, bzrxusdt, egldusdt, solusdt, icxusdt, storjusdt, blzusdt, uniusdt, avaxusdt, ftmusdt, hntusdt, enjusdt, flmusdt, tomousdt, renusdt, ksmusdt, nearusdt, aaveusdt, filusdt, rsrusdt, lrcusdt, maticusdt, oceanusdt, cvcusdt, belusdt, ctkusdt, axsusdt, alphausdt, zenusdt, sklusdt, grtusdt, 1inchusdt, akrousdt, chzusdt, sandusdt, ankrusdt, lunausdt, btsusdt, litusdt, unfiusdt, dodousdt, reefusdt, rvnusdt, sfpusdt, xemusdt, btcstusdt, cotiusdt, chrusdt, manausdt, aliceusdt, hbarusdt, oneusdt, linausdt, stmxusdt, dentusdt, celrusdt, hotusdt, mtlusdt, ognusdt, bttusdt, nknusdt, scusdt, dgbusdt, 1000shibusdt, icpusdt, bakeusdt, gtcusdt, btcdomusdt, keepusdt, tlmusdt, iotxusdt]
←[30m2021-08-11 21:17:57,461←[0;39m ←[34mINFO ←[0;39m [←[34mtask-1←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Connecting...
←[30m2021-08-11 21:17:57,464←[0;39m ←[34mINFO ←[0;39m [←[34mtask-1←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Subscribed to Binance Candlestick data
←[30m2021-08-11 21:17:57,470←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33mcom.zaxxer.hikari.HikariDataSource←[0;39m: springHikariCP - Shutdown initiated...
←[30m2021-08-11 21:17:57,499←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33mcom.zaxxer.hikari.HikariDataSource←[0;39m: springHikariCP - Shutdown completed.
←[30m2021-08-11 21:17:57,502←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33morg.apache.juli.logging.DirectJDKLog←[0;39m: Stopping service [Tomcat]
←[30m2021-08-11 21:17:57,505←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Error during mark price subscription event: %s
←[30m2021-08-11 21:17:57,505←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][0] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:57,520←[0;39m ←[34mINFO ←[0;39m [←[34mmain←[0;39m] ←[33morg.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener←[0;39m:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
←[30m2021-08-11 21:17:57,627←[0;39m ←[1;31mERROR←[0;39m [←[34mmain←[0;39m] ←[33morg.springframework.boot.SpringApplication←[0;39m: Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webApplication': Invocation of init method failed; nested exception is com.binance.client.exception.BinanceApiException: [Executing] -1121: Invalid symbol.
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:917)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:582)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
at com.lickhunter.web.WebApplication.main(WebApplication.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: com.binance.client.exception.BinanceApiException: [Executing] -1121: Invalid symbol.
at com.binance.client.impl.RestApiInvoker.checkResponse(RestApiInvoker.java:38)
at com.binance.client.impl.RestApiInvoker.callSync(RestApiInvoker.java:64)
at com.binance.client.impl.SyncRequestImpl.getCandlestick(SyncRequestImpl.java:50)
at com.lickhunter.web.services.impl.MarketServiceImpl.lambda$getCandleStickData$19(MarketServiceImpl.java:159)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.util.ArrayList$Itr.forEachRemaining(Unknown Source)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.forEach(Unknown Source)
at com.lickhunter.web.services.impl.MarketServiceImpl.getCandleStickData(MarketServiceImpl.java:157)
at com.lickhunter.web.WebApplication.initProcess(WebApplication.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157)
... 27 common frames omitted
←[30m2021-08-11 21:17:58,070←[0;39m ←[34mINFO ←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Connected to server
←[30m2021-08-11 21:17:58,204←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,205←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,207←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,213←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,214←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,214←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,215←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,215←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,216←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,216←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,234←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,234←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,235←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,236←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,236←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,237←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,237←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.lickhunter.web.websockets.BinanceSubscription←[0;39m: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
←[30m2021-08-11 21:17:58,237←[0;39m ←[1;31mERROR←[0;39m [←[34mOkHttp https://fstream.binance.com/...←[0;39m] ←[33mcom.binance.client.impl.WebSocketConnection←[0;39m: [Sub][2] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler

Feature Request: Soft Stop

Is your feature request related to a problem? Please describe.
Currently we can use scheduler.lickhunter to schedule hourly restarts. We are running the bot on a specific schedule to hopefully avoid the volume during other hours. The problem is that sometimes when we're on our last hour of running, the bot would be stuck in a position or two. What happens is that the Stop Profit and Stop Websocket scripts would be triggered at the end of the day but this would also mean that the bot would no longer be able to buy positions (not open new ones) as it's already stopped.

Describe the solution you'd like
What would be ideal is to implement a way to stop the bot or trigger a "soft stop" where the bot would stop getting new open positions, work on the current opened ones and wait until it closes until the bot comes to a stop.

Ways to implement:

  • Perhaps we can add a "soft-stop" feature where instead of pausing the bot right away, it'll do the above. This could function the same way as the Stop Profit and Stop Websocket where we could call the script on our last hour of run time but would wait until the last position is closed before shutting down. This is for added protection.
  • Another way is to be able to switch over to a different set of settings on a scheduled time. This way we could use 0 for maxOpen so that the bot would stop taking new trades at a certain schedule. However, even if the bot stops taking new positions, if it is already stuck on an opened position that will continue to get stuck, that would still be problematic - it should wait for that position to get closed first before shutting down. Perhaps, we could add a toggle for "soft-stop" in the settings so the bot would stop taking new positions, work on the current ones and stop after they're closed.

Null pointer during mark price subscription event

Describe the bug
The bot is returning a null pointer during mark price subscription event

To Reproduce
Steps to reproduce the behavior:

  1. After some minutes of the bot running it start to throw this error from time to time
ERROR com.lickhunter.web.websockets.BinanceSubscription [OkHttp https://fstream.binance.com/...] Error during mark price subscription event: Unexpected error: null.

It appears to be happening on this method "public void subscribeMarkPrice()"

After some time getting this error the bot lose the connection with binance server and stop been able to connect again

Expected behavior
The bot could expect this situation and maybe have some kind of treatment to this issue. I see that in the same class there is another method using Optional.ofNullable to test null reponses, maybe this is the way to avoid this issue here.

Stacktrace

2022-01-11 12:36:01,955 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Successfully retrieved Candlestick data
2022-01-11 12:36:01,955 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Retrieving candlesticks data
2022-01-11 12:36:10,832 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-86] Retrieving Exchange Information
2022-01-11 12:36:10,841 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-61] Retrieving 24h Ticker Price Change
2022-01-11 12:36:45,884 ERROR com.lickhunter.web.websockets.BinanceSubscription [OkHttp https://fstream.binance.com/...] Error during mark price subscription event: Unexpected error: null.
2022-01-11 12:36:45,884 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Unexpected error: null
2022-01-11 12:36:45,885 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Connection is closing due to error
2022-01-11 12:36:46,066 WARN com.binance.client.impl.WebSocketConnection [pool-3-thread-1] [Sub][0] Reconnecting after 15 seconds later
2022-01-11 12:36:46,615 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: BICOUSDT
2022-01-11 12:36:46,791 ERROR com.lickhunter.web.websockets.BinanceSubscription [OkHttp https://fstream.binance.com/...] Error during mark price subscription event: Unexpected error: Socket closed.
2022-01-11 12:36:46,791 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Unexpected error: Socket closed
2022-01-11 12:36:46,906 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: BITUSDT
2022-01-11 12:36:47,202 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: BSVUSDT
2022-01-11 12:36:47,509 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: CROUSDT
2022-01-11 12:36:47,825 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: FLOWUSDT
2022-01-11 12:36:48,112 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: FTTUSDT
2022-01-11 12:36:48,404 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: ILVUSDT
2022-01-11 12:36:48,699 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: IMXUSDT
2022-01-11 12:36:48,983 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: REQUSDT
2022-01-11 12:36:49,298 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: RNDRUSDT
2022-01-11 12:36:49,600 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: SLPUSDT
2022-01-11 12:36:49,897 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: SPELLUSDT
2022-01-11 12:36:50,242 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: STXUSDT
2022-01-11 12:36:51,303 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: WOOUSDT
2022-01-11 12:36:52,354 WARN com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Failed to retrieve candlestick data for symbol: YGGUSDT
2022-01-11 12:36:52,354 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Successfully retrieved Candlestick data
2022-01-11 12:37:02,066 INFO com.binance.client.impl.WebSocketConnection [pool-3-thread-1] [Sub][0] Connecting...
2022-01-11 12:37:03,066 INFO com.binance.client.impl.WebSocketConnection [pool-3-thread-1] [Sub][0] Connecting...
2022-01-11 12:37:03,601 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Connected to server
2022-01-11 12:37:04,577 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Connected to server
2022-01-11 12:37:10,832 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-33] Retrieving Exchange Information
2022-01-11 12:37:10,841 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-91] Retrieving 24h Ticker Price Change
2022-01-11 12:37:42,156 ERROR com.lickhunter.web.websockets.BinanceSubscription [OkHttp https://fstream.binance.com/...] Error during mark price subscription event: Unexpected error: null.
2022-01-11 12:37:42,156 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Unexpected error: null
2022-01-11 12:37:42,156 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Connection is closing due to error
2022-01-11 12:37:43,066 WARN com.binance.client.impl.WebSocketConnection [pool-3-thread-1] [Sub][0] Reconnecting after 15 seconds later
2022-01-11 12:37:43,488 ERROR com.lickhunter.web.websockets.BinanceSubscription [OkHttp https://fstream.binance.com/...] Error during mark price subscription event: Unexpected error: Socket closed.
2022-01-11 12:37:43,488 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Unexpected error: Socket closed
2022-01-11 12:37:59,066 INFO com.binance.client.impl.WebSocketConnection [pool-3-thread-1] [Sub][0] Connecting...
2022-01-11 12:38:00,066 INFO com.binance.client.impl.WebSocketConnection [pool-3-thread-1] [Sub][0] Connecting...
2022-01-11 12:38:01,008 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Connected to server
2022-01-11 12:38:01,560 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Connected to server
2022-01-11 12:38:10,832 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-88] Retrieving Exchange Information
2022-01-11 12:38:10,841 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-68] Retrieving 24h Ticker Price Change
2022-01-11 12:39:10,832 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-44] Retrieving Exchange Information
2022-01-11 12:39:10,843 INFO com.lickhunter.web.services.impl.MarketServiceImpl [pool-6-thread-31] Retrieving 24h Ticker Price Change
2022-01-11 12:39:25,305 INFO org.springframework.orm.jpa.AbstractEntityManagerFactoryBean [SpringContextShutdownHook] Closing JPA EntityManagerFactory for persistence unit 'default'

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

StopLoss not working

Is the StopLoss feature working?

I have in my settings.json:

"leverage": "5",
"stoploss": "4",

That means when a position has a -20% ROE has to close, is that right?

It did not work and I found a position with -50% and opened.

Thanks,

Bug Coins.Json file returning empty

Describe the bug
LHPro works just fine until I run LHServer Java file. It causes the coins.json file to return empty.
I tried to get the values back to default on the query file, yet no luck. Even after a fresh install, facing the same issue.

Bot Status

Is your feature request related to a problem? Please describe.
There is no way to check if the bot is active or pause state. Also, we cannot know which setting is activated.

Describe the solution you'd like
Add telegram command for checking bot status Ex. /status
Result looks like this:
Status: [Acitve/Pause]
Settings: [settings1]
Schedule: [Enable/Disable]
Profit: [Started/Stopped]
Websocket: Profit: [Started/Stopped]

Move Alerts to Telegram

Only sentiments and Margin Threshold Alerts are available for Discord
Having Alerts in Discord and Controlling bot via Telegram is Frustrating. having both in a same platform would be nice.

We need to Add Alerts for below Conditions

  • Liquidation Found
  • DCA Buys
  • TP Changed / Lowered
  • Trade Closed
  • Daily PnL

If we are considering the Telegram Option I would Suggest to Add Channel ID option in Config file to report alerts.

auto calculate long&short offset

Please write the code to calculate long&short offset based on BTC price move. if BTC price goes > %5 then shortoffset multiplier a specific number and vise-versa.

v0.12.6 snapshot jar execution stuck on Retrieving Information + Not Producing coins.json

Describe the bug
Recently extracted v0.12.6; when running snapshot jar; logs show it's stuck on Retrieving Information and not updating coins.json
Tried a fresh unzip of Lick Hunter Pro V1.85 and moving server files

To Reproduce
Steps to reproduce the behavior:

  1. Click 'server-0.0.1-SNAPSHOT.jar'
  2. Go To logs folder
  3. Check Current spring-boot-logger.txt file

Desktop (please complete the following information):

  • OS: Win10
  • Local Machine (Laptop)

Additional context
2021-10-02 19:10:21,008 INFO org.springframework.boot.StartupInfoLogger [main] Starting WebApplication v0.0.1-SNAPSHOT using Java 15.0.2 on <>with PID 2372 (C:...\lickhunter\Lick.Hunter.PRO.1.85_v0.12.6\Lick Hunter\server-0.0.1-SNAPSHOT.jar started by Bren in C:...\lickhunter\Lick.Hunter.PRO.1.85_v0.12.6\Lick Hunter)
2021-10-02 19:10:21,008 DEBUG org.springframework.boot.StartupInfoLogger [main] Running with Spring Boot v2.4.3, Spring v5.3.4
2021-10-02 19:10:21,008 INFO org.springframework.boot.SpringApplication [main] No active profile set, falling back to default profiles: default
2021-10-02 19:10:23,359 INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate [main] Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-10-02 19:10:23,444 INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate [main] Finished Spring Data repository scanning in 59 ms. Found 0 JPA repository interfaces.
2021-10-02 19:10:24,013 INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [main] Bean 'org.springframework.retry.annotation.RetryConfiguration' of type [org.springframework.retry.annotation.RetryConfiguration$$EnhancerBySpringCGLIB$$3eb44d2e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-10-02 19:10:24,931 INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer [main] Tomcat initialized with port(s): 8080 (http)
2021-10-02 19:10:24,947 INFO org.apache.juli.logging.DirectJDKLog [main] Initializing ProtocolHandler ["http-nio-8080"]
2021-10-02 19:10:24,947 INFO org.apache.juli.logging.DirectJDKLog [main] Starting service [Tomcat]
2021-10-02 19:10:24,947 INFO org.apache.juli.logging.DirectJDKLog [main] Starting Servlet engine: [Apache Tomcat/9.0.43]
2021-10-02 19:10:25,132 INFO org.apache.juli.logging.DirectJDKLog [main] Initializing Spring embedded WebApplicationContext
2021-10-02 19:10:25,132 INFO org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext [main] Root WebApplicationContext: initialization completed in 4034 ms
2021-10-02 19:10:25,389 INFO com.zaxxer.hikari.HikariDataSource [main] springHikariCP - Starting...
2021-10-02 19:10:25,578 INFO com.zaxxer.hikari.HikariDataSource [main] springHikariCP - Start completed.
2021-10-02 19:10:26,122 INFO org.hibernate.jpa.internal.util.LogHelper [main] HHH000204: Processing PersistenceUnitInfo [name: default]
2021-10-02 19:10:26,316 INFO org.hibernate.Version [main] HHH000412: Hibernate ORM core version 5.4.28.Final
2021-10-02 19:10:26,617 INFO org.hibernate.annotations.common.reflection.java.JavaReflectionManager [main] HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-10-02 19:10:26,884 INFO org.hibernate.dialect.Dialect [main] HHH000400: Using dialect: com.lickhunter.web.configs.SQLDialect
2021-10-02 19:10:27,221 INFO org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator [main] HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-10-02 19:10:27,237 INFO org.springframework.orm.jpa.AbstractEntityManagerFactoryBean [main] Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-10-02 19:10:28,185 INFO org.springframework.scheduling.concurrent.ExecutorConfigurationSupport [main] Initializing ExecutorService 'applicationTaskExecutor'
2021-10-02 19:10:28,207 INFO com.lickhunter.web.websockets.BinanceSubscription [task-1] Subscribing to Binance candlesticks data
2021-10-02 19:10:28,207 INFO com.lickhunter.web.websockets.BinanceSubscription [task-2] Subscribing to Binance Mark Price data.
2021-10-02 19:10:28,207 INFO com.lickhunter.web.websockets.BinanceSubscription [task-3] Subscribing to User Data
2021-10-02 19:10:28,320 INFO com.binance.client.impl.WebSocketConnection [task-2] [Sub] Connection [id: 0] created for Mark Price for all market
2021-10-02 19:10:28,324 INFO com.binance.client.impl.WebSocketConnection [task-2] [Sub][0] Connecting...
2021-10-02 19:10:29,195 INFO com.binance.client.impl.WebSocketConnection [task-3] [Sub] Connection [id: 1] created for User Data
2021-10-02 19:10:29,195 INFO com.binance.client.impl.WebSocketConnection [task-3] [Sub][1] Connecting...
2021-10-02 19:10:29,195 INFO com.lickhunter.web.websockets.BinanceSubscription [task-3] Successfully subscribed to User Data.
2021-10-02 19:10:29,353 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Connected to server
2021-10-02 19:10:29,621 INFO org.jooq.tools.JooqLogger [main]

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@
@@@@@@@@@@@@@@@@ @@ @@ @@@@@@@@@@
@@@@@@@@@@ @@@@ @@ @@ @@@@@@@@@@
@@@@@@@@@@ @@ @@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@ @@ @@@@@@@@@@
@@@@@@@@@@ @@ @@ @@@@ @@@@@@@@@@
@@@@@@@@@@ @@ @@ @@@@ @@@@@@@@@@
@@@@@@@@@@ @@ @ @ @@@@@@@@@@
@@@@@@@@@@ @@ @@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Thank you for using jOOQ 3.14.11

2021-10-02 19:10:29,773 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][1] Connected to server
2021-10-02 19:10:29,857 INFO com.lickhunter.web.services.impl.MarketServiceImpl [main] Retrieving Exchange Information
2021-10-02 19:10:31,287 INFO com.lickhunter.web.services.impl.MarketServiceImpl [main] Retrieving 24h Ticker Price Change
2021-10-02 19:10:32,071 INFO com.lickhunter.web.services.impl.MarketServiceImpl [main] Retrieving liquidation data.
2021-10-02 19:10:35,967 INFO com.lickhunter.web.services.impl.MarketServiceImpl [main] Successfully retrieved liquidation data.
2021-10-02 19:10:39,842 INFO com.lickhunter.web.services.impl.MarketServiceImpl [main] Retrieving candlesticks data
2021-10-02 19:11:13,329 INFO com.lickhunter.web.services.impl.MarketServiceImpl [main] Successfully retrieved Candlestick data
2021-10-02 19:11:13,329 INFO com.lickhunter.web.services.impl.MarketServiceImpl [main] Retrieving candlesticks data
2021-10-02 19:11:36,371 INFO com.lickhunter.web.services.impl.MarketServiceImpl [main] Successfully retrieved Candlestick data
2021-10-02 19:11:36,371 INFO com.lickhunter.web.services.impl.MarketServiceImpl [main] Retrieving candlesticks data
2021-10-02 19:12:02,423 INFO com.lickhunter.web.services.impl.MarketServiceImpl [main] Successfully retrieved Candlestick data
2021-10-02 19:12:02,930 INFO com.binance.client.impl.WebSocketConnection [main] [Sub] Connection [id: 2] created for All Liquidation Orders
2021-10-02 19:12:02,930 INFO com.binance.client.impl.WebSocketConnection [main] [Sub][2] Connecting...
2021-10-02 19:12:02,938 INFO com.binance.client.impl.WebSocketConnection [task-1] [Sub] Connection [id: 3] created for Candlestick for [btcusdt, ethusdt, bchusdt, xrpusdt, eosusdt, ltcusdt, trxusdt, etcusdt, linkusdt, xlmusdt, adausdt, xmrusdt, dashusdt, zecusdt, xtzusdt, bnbusdt, atomusdt, ontusdt, iotausdt, batusdt, vetusdt, neousdt, qtumusdt, iostusdt, thetausdt, algousdt, zilusdt, kncusdt, zrxusdt, compusdt, omgusdt, dogeusdt, sxpusdt, kavausdt, bandusdt, rlcusdt, wavesusdt, mkrusdt, snxusdt, dotusdt, defiusdt, yfiusdt, balusdt, crvusdt, trbusdt, yfiiusdt, runeusdt, sushiusdt, srmusdt, bzrxusdt, egldusdt, solusdt, icxusdt, storjusdt, blzusdt, uniusdt, avaxusdt, ftmusdt, hntusdt, enjusdt, flmusdt, tomousdt, renusdt, ksmusdt, nearusdt, aaveusdt, filusdt, rsrusdt, lrcusdt, maticusdt, oceanusdt, cvcusdt, belusdt, ctkusdt, axsusdt, alphausdt, zenusdt, sklusdt, grtusdt, 1inchusdt, akrousdt, chzusdt, sandusdt, ankrusdt, lunausdt, btsusdt, litusdt, unfiusdt, dodousdt, reefusdt, rvnusdt, sfpusdt, xemusdt, btcstusdt, cotiusdt, chrusdt, manausdt, aliceusdt, hbarusdt, oneusdt, linausdt, stmxusdt, dentusdt, celrusdt, hotusdt, mtlusdt, ognusdt, bttusdt, nknusdt, scusdt, dgbusdt, 1000shibusdt, icpusdt, bakeusdt, gtcusdt, btcdomusdt, keepusdt, tlmusdt, iotxusdt, audiousdt, rayusdt, c98usdt, maskusdt, atausdt, dydxusdt, 1000xecusdt, galausdt, celousdt, arusdt]
2021-10-02 19:12:02,938 INFO com.binance.client.impl.WebSocketConnection [task-1] [Sub][3] Connecting...
2021-10-02 19:12:02,940 INFO com.binance.client.impl.WebSocketConnection [task-1] [Sub] Connection [id: 4] created for Candlestick for [btcusdt, ethusdt, bchusdt, xrpusdt, eosusdt, ltcusdt, trxusdt, etcusdt, linkusdt, xlmusdt, adausdt, xmrusdt, dashusdt, zecusdt, xtzusdt, bnbusdt, atomusdt, ontusdt, iotausdt, batusdt, vetusdt, neousdt, qtumusdt, iostusdt, thetausdt, algousdt, zilusdt, kncusdt, zrxusdt, compusdt, omgusdt, dogeusdt, sxpusdt, kavausdt, bandusdt, rlcusdt, wavesusdt, mkrusdt, snxusdt, dotusdt, defiusdt, yfiusdt, balusdt, crvusdt, trbusdt, yfiiusdt, runeusdt, sushiusdt, srmusdt, bzrxusdt, egldusdt, solusdt, icxusdt, storjusdt, blzusdt, uniusdt, avaxusdt, ftmusdt, hntusdt, enjusdt, flmusdt, tomousdt, renusdt, ksmusdt, nearusdt, aaveusdt, filusdt, rsrusdt, lrcusdt, maticusdt, oceanusdt, cvcusdt, belusdt, ctkusdt, axsusdt, alphausdt, zenusdt, sklusdt, grtusdt, 1inchusdt, akrousdt, chzusdt, sandusdt, ankrusdt, lunausdt, btsusdt, litusdt, unfiusdt, dodousdt, reefusdt, rvnusdt, sfpusdt, xemusdt, btcstusdt, cotiusdt, chrusdt, manausdt, aliceusdt, hbarusdt, oneusdt, linausdt, stmxusdt, dentusdt, celrusdt, hotusdt, mtlusdt, ognusdt, bttusdt, nknusdt, scusdt, dgbusdt, 1000shibusdt, icpusdt, bakeusdt, gtcusdt, btcdomusdt, keepusdt, tlmusdt, iotxusdt, audiousdt, rayusdt, c98usdt, maskusdt, atausdt, dydxusdt, 1000xecusdt, galausdt, celousdt, arusdt]
2021-10-02 19:12:02,941 INFO com.binance.client.impl.WebSocketConnection [task-1] [Sub][4] Connecting...
2021-10-02 19:12:02,941 INFO com.lickhunter.web.websockets.BinanceSubscription [task-1] Subscribed to Binance Candlestick data
2021-10-02 19:12:03,051 WARN org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration$JpaWebConfiguration [main] spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-10-02 19:12:03,602 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][2] Connected to server
2021-10-02 19:12:03,602 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][4] Connected to server
2021-10-02 19:12:03,602 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][3] Connected to server
2021-10-02 19:12:03,664 INFO org.springframework.scheduling.concurrent.ExecutorConfigurationSupport [main] Initializing ExecutorService 'taskScheduler'
2021-10-02 19:12:03,775 INFO org.apache.juli.logging.DirectJDKLog [main] Starting ProtocolHandler ["http-nio-8080"]
2021-10-02 19:12:03,814 INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer [main] Tomcat started on port(s): 8080 (http) with context path ''
2021-10-02 19:12:03,836 INFO org.springframework.boot.StartupInfoLogger [main] Started WebApplication in 103.703 seconds (JVM running for 104.819)
2021-10-02 19:12:06,527 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:12:07,632 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:12:08,614 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving liquidation data.
2021-10-02 19:12:13,096 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Successfully retrieved liquidation data.
2021-10-02 19:13:07,702 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:13:08,911 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:14:35,344 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:14:36,554 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:15:58,518 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:15:59,707 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:17:22,018 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:17:23,031 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:18:41,282 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:18:42,902 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:20:01,005 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:20:03,639 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:21:35,686 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:21:37,896 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:23:02,383 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:23:04,666 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:24:25,453 ERROR com.lickhunter.web.websockets.BinanceSubscription [OkHttp https://fstream.binance.com/...] Error during mark price subscription event: %s
2021-10-02 19:24:25,453 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Unexpected error: null
2021-10-02 19:24:25,453 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Connection is closing due to error
2021-10-02 19:24:26,242 WARN com.binance.client.impl.WebSocketConnection [pool-3-thread-1] [Sub][0] Reconnecting after 3 seconds later
2021-10-02 19:24:29,522 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:24:30,255 INFO com.binance.client.impl.WebSocketConnection [pool-3-thread-1] [Sub][0] Connecting...
2021-10-02 19:24:30,630 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:24:30,869 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][0] Connected to server
2021-10-02 19:24:59,396 ERROR com.lickhunter.web.websockets.BinanceSubscription [OkHttp https://fstream.binance.com/...] Error during candlestick subscription event: Unexpected error: null
2021-10-02 19:24:59,400 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][3] Unexpected error: null
2021-10-02 19:24:59,400 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][3] Connection is closing due to error
2021-10-02 19:24:59,948 WARN com.binance.client.impl.WebSocketConnection [pool-6-thread-1] [Sub][3] Reconnecting after 3 seconds later
2021-10-02 19:25:03,943 INFO com.binance.client.impl.WebSocketConnection [pool-6-thread-1] [Sub][3] Connecting...
2021-10-02 19:25:04,562 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][3] Connected to server
2021-10-02 19:25:41,133 ERROR com.lickhunter.web.websockets.BinanceSubscription [OkHttp https://fstream.binance.com/...] Error during candlestick subscription event: Unexpected error: null
2021-10-02 19:25:41,133 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][4] Unexpected error: null
2021-10-02 19:25:41,137 ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][4] Connection is closing due to error
2021-10-02 19:25:41,948 WARN com.binance.client.impl.WebSocketConnection [pool-6-thread-1] [Sub][4] Reconnecting after 3 seconds later
2021-10-02 19:25:45,944 INFO com.binance.client.impl.WebSocketConnection [pool-6-thread-1] [Sub][4] Connecting...
2021-10-02 19:25:46,571 INFO com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [Sub][4] Connected to server
2021-10-02 19:25:49,691 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:25:51,404 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:27:09,528 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:27:11,098 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information
2021-10-02 19:28:33,786 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving 24h Ticker Price Change
2021-10-02 19:28:36,273 INFO com.lickhunter.web.services.impl.MarketServiceImpl [scheduling-1] Retrieving Exchange Information

Error during mark price subscription event: -> SQLState: null

Describe the bug
In recent weeks, once a day the LHS stopped working and threw the error below. Since yesterday it has entered the error right after the bot starts, throws the exception, and in the sequence, it enters in an infinite loop repeating the last 2 lines of the stack trace below:

anyone else getting the same error?

2021-10-02 00:38:43,688 INFO  [main] com.lickhunter.web.services.impl.MarketServiceImpl: Retrieving Exchange Information
2021-10-02 00:38:44,102 INFO  [main] com.lickhunter.web.services.impl.MarketServiceImpl: Retrieving 24h Ticker Price Change
2021-10-02 00:38:44,386 INFO  [OkHttp https://fstream.binance.com/...] com.binance.client.impl.WebSocketConnection: [Sub][0] Connected to server
2021-10-02 00:38:44,914 INFO  [OkHttp https://fstream.binance.com/...] com.binance.client.impl.WebSocketConnection: [Sub][1] Connected to server
2021-10-02 00:38:45,092 INFO  [main] com.lickhunter.web.services.impl.MarketServiceImpl: Retrieving liquidation data.
2021-10-02 00:39:17,187 WARN  [main] org.springframework.context.support.AbstractApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webApplication': Invocation of init method failed; nested exception is org.springframework.web.client.UnknownHttpStatusCodeException: 522 : [no body]
2021-10-02 00:39:17,188 INFO  [main] org.springframework.scheduling.concurrent.ExecutorConfigurationSupport: Shutting down ExecutorService 'applicationTaskExecutor'
2021-10-02 00:39:17,188 INFO  [main] org.springframework.orm.jpa.AbstractEntityManagerFactoryBean: Closing JPA EntityManagerFactory for persistence unit 'default'
2021-10-02 00:39:17,191 INFO  [main] com.zaxxer.hikari.HikariDataSource: springHikariCP - Shutdown initiated...
2021-10-02 00:39:17,192 INFO  [task-1] com.binance.client.impl.WebSocketConnection: [Sub] Connection [id: 2] created for ***Candlestick for [btcusdt, ethusdt, bchusdt, xrpusdt, eosusdt, ltcusdt, trxusdt, etcusdt, linkusdt, xlmusdt, adausdt, xmrusdt, dashusdt, zecusdt, xtzusdt, bnbusdt, atomusdt, ontusdt, iotausdt, batusdt, vetusdt, neousdt, qtumusdt, iostusdt, thetausdt, algousdt, zilusdt, kncusdt, zrxusdt, compusdt, omgusdt, dogeusdt, sxpusdt, kavausdt, bandusdt, rlcusdt, wavesusdt, mkrusdt, snxusdt, dotusdt, defiusdt, yfiusdt, balusdt, crvusdt, trbusdt, yfiiusdt, runeusdt, sushiusdt, srmusdt, bzrxusdt, egldusdt, solusdt, icxusdt, storjusdt, blzusdt, uniusdt, avaxusdt, ftmusdt, hntusdt, enjusdt, flmusdt, tomousdt, renusdt, ksmusdt, nearusdt, aaveusdt, filusdt, rsrusdt, lrcusdt, maticusdt, oceanusdt, cvcusdt, belusdt, ctkusdt, axsusdt, alphausdt, zenusdt, sklusdt, grtusdt, 1inchusdt, akrousdt, chzusdt, sandusdt, ankrusdt, lunausdt, btsusdt, litusdt, unfiusdt, dodousdt, reefusdt, rvnusdt, sfpusdt, xemusdt, btcstusdt, cotiusdt, chrusdt, manausdt, aliceusdt, hbarusdt, oneusdt, linausdt, stmxusdt, dentusdt, celrusdt, hotusdt, mtlusdt, ognusdt, bttusdt, nknusdt, scusdt, dgbusdt, 1000shibusdt, icpusdt, bakeusdt, gtcusdt, btcdomusdt, keepusdt, tlmusdt, iotxusdt, audiousdt, rayusdt, c98usdt, maskusdt, atausdt, dydxusdt, 1000xecusdt, galausdt, celousdt, arusdt]***
2021-10-02 00:39:17,193 INFO  [task-1] com.binance.client.impl.WebSocketConnection: [Sub][2] Connecting...
2021-10-02 00:39:17,193 INFO  [main] com.zaxxer.hikari.HikariDataSource: springHikariCP - Shutdown completed.
2021-10-02 00:39:17,193 INFO  [task-1] com.binance.client.impl.WebSocketConnection: [Sub] Connection [id: 3] created for ***Candlestick for [btcusdt, ethusdt, bchusdt, xrpusdt, eosusdt, ltcusdt, trxusdt, etcusdt, linkusdt, xlmusdt, adausdt, xmrusdt, dashusdt, zecusdt, xtzusdt, bnbusdt, atomusdt, ontusdt, iotausdt, batusdt, vetusdt, neousdt, qtumusdt, iostusdt, thetausdt, algousdt, zilusdt, kncusdt, zrxusdt, compusdt, omgusdt, dogeusdt, sxpusdt, kavausdt, bandusdt, rlcusdt, wavesusdt, mkrusdt, snxusdt, dotusdt, defiusdt, yfiusdt, balusdt, crvusdt, trbusdt, yfiiusdt, runeusdt, sushiusdt, srmusdt, bzrxusdt, egldusdt, solusdt, icxusdt, storjusdt, blzusdt, uniusdt, avaxusdt, ftmusdt, hntusdt, enjusdt, flmusdt, tomousdt, renusdt, ksmusdt, nearusdt, aaveusdt, filusdt, rsrusdt, lrcusdt, maticusdt, oceanusdt, cvcusdt, belusdt, ctkusdt, axsusdt, alphausdt, zenusdt, sklusdt, grtusdt, 1inchusdt, akrousdt, chzusdt, sandusdt, ankrusdt, lunausdt, btsusdt, litusdt, unfiusdt, dodousdt, reefusdt, rvnusdt, sfpusdt, xemusdt, btcstusdt, cotiusdt, chrusdt, manausdt, aliceusdt, hbarusdt, oneusdt, linausdt, stmxusdt, dentusdt, celrusdt, hotusdt, mtlusdt, ognusdt, bttusdt, nknusdt, scusdt, dgbusdt, 1000shibusdt, icpusdt, bakeusdt, gtcusdt, btcdomusdt, keepusdt, tlmusdt, iotxusdt, audiousdt, rayusdt, c98usdt, maskusdt, atausdt, dydxusdt, 1000xecusdt, galausdt, celousdt, arusdt]***
2021-10-02 00:39:17,193 INFO  [task-1] com.binance.client.impl.WebSocketConnection: [Sub][3] Connecting...
2021-10-02 00:39:17,193 INFO  [task-1] com.lickhunter.web.websockets.BinanceSubscription: Subscribed to Binance Candlestick data
2021-10-02 00:39:17,194 INFO  [main] org.apache.juli.logging.DirectJDKLog: Stopping service [Tomcat]
2021-10-02 00:39:17,203 INFO  [main] org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener: 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-10-02 00:39:17,223 ERROR [main] org.springframework.boot.SpringApplication: Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webApplication': Invocation of init method failed; nested exception is org.springframework.web.client.UnknownHttpStatusCodeException: 522 : [no body]
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:917)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:582)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
	at com.lickhunter.web.WebApplication.main(WebApplication.java:49)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: org.springframework.web.client.UnknownHttpStatusCodeException: 522 : [no body]
	at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:123)
	at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
	at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:819)
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:777)
	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)
	at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:602)
	at com.lickhunter.web.services.impl.MarketServiceImpl.getLiquidations(MarketServiceImpl.java:201)
	at com.lickhunter.web.WebApplication.initProcess(WebApplication.java:64)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389)
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333)
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157)
	... 27 common frames omitted
2021-10-02 00:39:17,268 ERROR [OkHttp https://fstream.binance.com/...] com.lickhunter.web.websockets.BinanceSubscription: Error during mark price subscription event: %s
2021-10-02 00:39:17,269 ERROR [OkHttp https://fstream.binance.com/...] com.binance.client.impl.WebSocketConnection: [Sub][0] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
2021-10-02 00:39:18,245 ERROR [OkHttp https://fstream.binance.com/...] com.lickhunter.web.websockets.BinanceSubscription: Error during mark price subscription event: %s
2021-10-02 00:39:18,246 ERROR [OkHttp https://fstream.binance.com/...] com.binance.client.impl.WebSocketConnection: [Sub][0] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
2021-10-02 00:39:19,149 INFO  [OkHttp https://fstream.binance.com/...] com.binance.client.impl.WebSocketConnection: [Sub][3] Connected to server
2021-10-02 00:39:19,259 ERROR [OkHttp https://fstream.binance.com/...] com.lickhunter.web.websockets.BinanceSubscription: Error during mark price subscription event: %s
2021-10-02 00:39:19,260 ERROR [OkHttp https://fstream.binance.com/...] com.binance.client.impl.WebSocketConnection: [Sub][0] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
2021-10-02 00:39:19,492 ERROR [OkHttp https://fstream.binance.com/...] com.lickhunter.web.websockets.BinanceSubscription: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
2021-10-02 00:39:19,493 ERROR [OkHttp https://fstream.binance.com/...] com.binance.client.impl.WebSocketConnection: [Sub][3] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
2021-10-02 00:39:19,498 ERROR [OkHttp https://fstream.binance.com/...] com.lickhunter.web.websockets.BinanceSubscription: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
2021-10-02 00:39:19,498 ERROR [OkHttp https://fstream.binance.com/...] com.binance.client.impl.WebSocketConnection: [Sub][3] Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler
2021-10-02 00:39:19,507 ERROR [OkHttp https://fstream.binance.com/...] com.lickhunter.web.websockets.BinanceSubscription: Error during candlestick subscription event: Process error: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed You should capture the exception in your error handler

To Reproduce
Steps to reproduce the behavior:

  1. On the last 3 days it's just about starting the bot and the system throws the error

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Version: Latest Release

Additional context
Using this settings.json:

{
  "exchange": "binance",
  "key": "mykey",
  "secret": "mysecret",
  "auto_qty": "True",
  "longQty": "0.1",
  "shortQty": "0.1",
  "percentBal": "0.1",
  "maxPosition": "50",
  "dcaOne": "3",
  "factorOne": "2",
  "dcaTwo": "6",
  "factorTwo": "4",
  "leverage": "5",
  "takeprofit": "0.5",
  "stoploss": "1",
  "auth": "ALPHA",
  "delay": "0.5",
  "discordwebhook": "webhookhere",
  "sleeponstop": "1"
}

Dynamic VWAP

Is your feature request related to a problem? Please describe.
Coins have vary volatility sometime fixed vwap or sentiment feed from lunacrush website do not cover all the coins.

Describe the solution you'd like
Refer to : https://liquidation.atsutane.net/research

You can see there are long offset and short offset for each coins.
Is it possible to use these data instead of fixed vwap?

Empty entities packages

Describe the bug
com.lickhunter.web.entities package doesn't have the table defs, eg: com.lickhunter.web.entities.tables.records.SymbolRecord

To Reproduce
Steps to reproduce the behaviour:

  1. Clone the repository and try to build

Expected behaviour
The package should contain database table definitions

Screenshots
image

IDE : IntelliJ IDEA

Sentiments API Error not getting any liquidation events (v.0.16.0)

2021-11-24 19:05:00,572 WARN com.lickhunter.web.services.impl.SentimentsServiceImpl [pool-7-thread-36] Failed to receive BTC sentiments: Could not extract response: no suitable HttpMessageConverter found for response type [class com.lickhunter.web.models.sentiments.SentimentsAsset] and content type [text/plain;charset=utf-8]

2021-11-24 19:05:00,572 ERROR org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler [pool-7-thread-36] Unexpected exception occurred invoking async method: public void com.lickhunter.web.scheduler.LickHunterScheduledTasks.checkSentiments() throws java.lang.Exception
java.lang.NullPointerException: null
at com.lickhunter.web.scheduler.LickHunterScheduledTasks.checkSentiments(LickHunterScheduledTasks.java:140)
at com.lickhunter.web.scheduler.LickHunterScheduledTasks$$FastClassBySpringCGLIB$$7f2fa40f.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.retry.annotation.AnnotationAwareRetryOperationsInterceptor.invoke(AnnotationAwareRetryOperationsInterceptor.java:156)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Error started today

ERROR com.binance.client.impl.WebSocketConnection [OkHttp https://fstream.binance.com/...] [On Message][2]: catch exception:
org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:467)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.startTransaction(AbstractPlatformTransactionManager.java:400)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:595)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:382)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692)
at com.lickhunter.web.repositories.TelegramRepository$$EnhancerBySpringCGLIB$$66c0cd2c.findByUsername()
at com.lickhunter.web.telegram.TelegramBot.lambda$sendNotification$4(TelegramBot.java:183)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
at com.lickhunter.web.telegram.TelegramBot.sendNotification(TelegramBot.java:182)
at com.lickhunter.web.services.impl.TelegramServiceImpl.send(TelegramServiceImpl.java:18)
at com.lickhunter.web.services.impl.TelegramServiceImpl.send(TelegramServiceImpl.java:9)
at com.lickhunter.web.websockets.BinanceSubscription.lambda$subscribeMarkPrice$9(BinanceSubscription.java:196)
at com.binance.client.impl.WebSocketConnection.onError(WebSocketConnection.java:126)
at com.binance.client.impl.WebSocketConnection.onReceive(WebSocketConnection.java:149)
at com.binance.client.impl.WebSocketConnection.onReceiveAndClose(WebSocketConnection.java:132)
at com.binance.client.impl.WebSocketConnection.onMessage(WebSocketConnection.java:114)
at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:322)
at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105)
at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:273)
at okhttp3.internal.ws.RealWebSocket$1.onResponse(RealWebSocket.java:209)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: EntityManagerFactory is closed
at org.hibernate.internal.SessionFactoryImpl.validateNotClosed(SessionFactoryImpl.java:530)
at org.hibernate.internal.SessionFactoryImpl.createEntityManager(SessionFactoryImpl.java:609)
at org.hibernate.internal.SessionFactoryImpl.createEntityManager(SessionFactoryImpl.java:156)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.createNativeEntityManager(AbstractEntityManagerFactoryBean.java:585)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.invokeProxyMethod(AbstractEntityManagerFactoryBean.java:487)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:734)
at com.sun.proxy.$Proxy83.createNativeEntityManager(Unknown Source)
at org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:485)
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:410)
... 30 common frames omitted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.