Skip to content

New Feature: Add price alert for a stock#68

Open
asifma wants to merge 4 commits into
fhqvst:masterfrom
asifma:master
Open

New Feature: Add price alert for a stock#68
asifma wants to merge 4 commits into
fhqvst:masterfrom
asifma:master

Conversation

@asifma

@asifma asifma commented Aug 29, 2021

Copy link
Copy Markdown

addPriceAlert

Add an price alert.

Parameters

  • instrumentId [String][52] The ID of the instrument to add.
  • options [Object][51] Alert options.
    • options.price [Number][54] The target price to receive an alert on.
    • options.validUntil [String][52] A date on the form YYYY-MM-DD. Cancels alert if this date is

@asifma asifma mentioned this pull request Aug 29, 2021

@fhqvst fhqvst left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks! Should we add a removePriceAlert too?

@asifma

asifma commented Sep 1, 2021

Copy link
Copy Markdown
Author

I just haven't had time to look at it yet.

But in order to remove alerts, you need to (per my understanding).

  1. Get alerts for an underlying stock.
  2. If alert(s) exist
  3. Delete alert by alertID that you received in step 2.

So yes, we should probably introduce getPriceAlert & removePriceAlert

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

Successfully merging this pull request may close these issues.

2 participants