Tucsky / aggr

Cryptocurrency trades aggregator
https://charts.aggr.trade/
GNU General Public License v3.0
811 stars 232 forks source link

[FEATURE] Allow `Alert notifications` to trigger on a different value than price (volume, liquidation) #315

Open oksuzali999 opened 1 year ago

oksuzali999 commented 1 year ago

First of all, thank you for this beautiful work. Can an alarm be added to liquidation rates as well as prices? For example, in BTC, can I create a warning with an alarm when there is a liquidation of 250 k up or down? How should I go about doing this.

adeacetis commented 1 year ago

Hello,

It's impossible to set an Alert to something different than the price now. However, I reckon that it would be indeed useful. I am adding this to the feature backlog.

FYI @Tucsky

lmvdz commented 1 year ago

https://github.com/lmvdz/aggr/commit/bcf9e15e63b4dd98272f36ba8c52bb8479f05b81

converted alertService.ts to allow for indicator-based management/storage of alerts. Need help from @Tucsky to get the value of the indicator instead of prices from aggregator service in the getValue function.

https://github.com/lmvdz/aggr/commit/389b603699830ce6e066df4f1464fc428dbb9922#diff-aed1a9b5af387801328e5252658e7eb3b99ec2b2f75f1a237fedc4a73ce58935R302

lmvdz commented 1 year ago

Looking into this more, and will need more work than just the alertService.ts.

oksuzali999 commented 1 year ago

yes, I realized that I need to concentrate on "alertService.ts". Including "lsell" and "lbuy"... I've been trying to achieve this for a long time. This situation requires experience beyond my coding knowledge and I failed to do so.

raid5 commented 1 year ago

I'm glad to see this being added to the feature backlog, I came here to request the same thing! I would LOVE volume alerts.

Also, maybe close https://github.com/Tucsky/aggr/issues/238 as a dupe since this issue has more context now?

mhakby commented 12 months ago

Any progress on this? If not, can you tell me when it might happen?

Tucsky commented 12 months ago

@mhakby I wouldn't get my hopes up unless someone explicitly said that hes working on it @mhakby

alertService mentioned above is exclusively for server side price alerts, alerts are then grouped by indexes (avg price of the coin accross the different contracts) and range of prices for saving performance which is incompatible with any other type of value.

A way I can think of, is for you to fork this Github project and edit the Prices.vue pane (as it is the closest thing to a screener) while making use of this.$store.dispatch('app/showNotice', ...) and audioService.playOnce(your alert sound name) to get the info while the app is open

Another way would be to expose some notification helper (display a message, play audio notification) function in the indicator script to let you get notified of any event that your indicator would be aware of, this would only work for the active markets on the chart. This is probably the easiest way and less usefull way

Staying available here or on discord if someone wants to give it a go and try to implement it. Also PR is very much appreciated, as always :)