How do I view the current price of a stock? #117
-
Sorry if this is a dumb question, I'm a bit of a novice programmer. Basically I'm trying to make a bracket order that automatically decides the stop-loss, stop-limit, and take profit based off percentage increases or decreases from the current price of the stock, but I haven't been able to find a way to see a stock's price in any of the documentation. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @AndrewC243,
Here is the Javadoc for the |
Beta Was this translation helpful? Give feedback.
-
Thanks a bunch! |
Beta Was this translation helpful? Give feedback.
Hey @AndrewC243,
You'll want to take a look at some of the examples provided in the README like the
StockMarketDataEndpoint
(which is used for historical and current stock data) and theStockMarketDataWebsocket
(which is used for real-time streamed stock data). Here is theStockMarketDataEndpoint
Javadoc and here is theStockMarketDataWebsocket
Javadoc. Take a look at those Javadocs and examine the various methods they offer to get a better understanding of what stock data you can use in your trading application.Additionally, I strongly encourage you to read through the entire Alpaca Trading API documentation and the Alpaca Stock Market Data API documentation to gain an understanding of …