Example: Stock Exchange Price
You can use the custom macro functionality to create a macro that allows users to display stock exchange prices on a Confluence page.
The example below assumes you already have a REST API authentication token for the StockData REST API stored in a Script Variable with the name STOCKDATA_API_KEY.
You can now use this macro on a Confluence page. For help with using the macro, check out the Use Macros section of the Macros documentation.
This is what the macro looks when rendered on a Confluence page:
You can use multiple instances of it in a table, which would look like this:
Tip: If the user enters an incorrect stock code symbol in the macro editor, they will receive an error message in the output. You can see this error message in the image above.