1. Get Logger
URL: /api/logger/
Method: GET
Description: Returns the current log level and logger name. Useful for debugging and monitoring the logging
configuration.**
Response Example:
{
"log_level": "INFO",
"logger_name": "my_logger"
}2. Get Tickers
**URL:** `/api/tickers/` **Method:** `GET` **Description:** **Retrieves a list of tickers.** **Query Parameters:** - `watcher` (optional): If `true`, returns watched tickers. Default is `true`.Response Example:
[
{
"ticker": "AAPL",
"name": "Apple Inc."
},
{
"ticker": "GOOGL",
"name": "Alphabet Inc."
}
]3. Get Watched List All
URL: /api/watched-list/
Method: GET
Description: Retrieves the entire watched list of tickers.
Response Example:
[
{
"ticker": "AAPL",
"name": "Apple Inc."
},
{
"ticker": "TSLA",
"name": "Tesla Inc."
}
]4. Update Watch List
URL: /api/watch-list/update/
Method: POST
Description: Updates the watch list with the provided tickers.
Request Body:
tickers(list): List of tickers to update.
Request Example:
{
"tickers": ["AAPL", "TSLA"]
}Response Example:
{
"status": "success"
}5. Add to Watch List
URL: /api/watch-list/add/
Method: POST
Description: Adds tickers to the watch list.
Request Body:
tickers(list): List of tickers to add.
Request Example:
{
"tickers": ["MSFT", "AMZN"]
}Response Example:
{
"status": "success"
}6. Remove from Watch List
URL: /api/watch-list/remove/
Method: POST
Description: Removes tickers from the watch list.
Request Body:
tickers(list): List of tickers to remove.
Request Example:
{
"tickers": ["AAPL"]
}Response Example:
{
"status": "success"
}7. Update Ticker List
URL: /api/ticker-list/update/
Method: POST
Description: Updates the ticker list.
Response Example:
{
"status": "Ticker list updated"
}8. Store Ticker List
URL: /api/ticker-list/store/
Method: POST
Description: Stores the provided ticker list.
Request Body:
tickers(list): List of tickers to store.
Request Example:
{
"tickers": ["AAPL", "GOOGL", "TSLA"]
}Response Example:
{
"status": "Ticker list stored"
}9. Get All Tickers File
URL: /api/tickers-file/
Method: GET
Description: Retrieves all tickers from the file.
Response Example:
[
{
"ticker": "AAPL", "name": "Apple Inc."},
{
"ticker": "GOOGL", "name": "Alphabet Inc."},
{
"ticker": "TSLA", "name": "Tesla Inc."}
]10. Load Data
URL: /api/data/load/
Method: POST
Description: Loads data for the provided tickers.
Request Body:
tickers(list): List of tickers to load data for.
Request Example:
{
"tickers": ["AAPL", "GOOGL"]
}Response Example:
[
{
"ticker": "AAPL", "data": {"...":"..."}},
{
"ticker": "GOOGL", "data": {"...":"..."}}
]11. Plot Graph
URL: /api/graph/plot/
Method: POST
Description: Plots a graph for the provided data.
Request Body:
all_data(list): Data to plot.chunk_size(optional): Size of data chunks. Default is10.
Request Example:
{
"all_data": [...],
"chunk_size": 10
}Response Example:
{
"fig": "<html>...</html>"
}12. Get Tickers from Variable
URL: /api/tickers/variable/
Method: GET
Description: Retrieves tickers from a variable.
Response Example:
[
{
"ticker": "AAPL", "name": "Apple Inc."},
{
"ticker": "GOOGL", "name": "Alphabet Inc."}
]13. Get Tickers from DB
URL: /api/tickers/db/
Method: GET
Description: Retrieves tickers from the database.
Response Example:
[
{
"ticker": "AAPL", "name": "Apple Inc."},
{
"ticker": "GOOGL", "name": "Alphabet Inc."}
]