security_analytics.get_returns
******************************

spice.security_analytics.get_returns(isins: list[str], start_date: str, end_date: str) -> dict[str, list[dict]]

   Gets the returns of securities between given start and end date.

   Parameters:
      * **isins** (*list**[**str**]*) -- List of ISINs of the
        securities.

      * **start_date** (*str*) -- Start date in YYYY-MM-DD format.

      * **end_date** (*str*) -- End date in YYYY-MM-DD format.

   Returns:
      Dictionary mapping ISIN to its returns.
         Each return list contains dictionaries with the following
         fields:

            {
                "date": "date of the return",
                "returns": "daily return of the security",
            }

         Example return value:

            {
                "INE040A08AK2": [
                    {
                        "date": "2024-01-15",
                        "returns": 0.00765,
                    },
                    {
                        "date": "2024-01-16",
                        "returns": 0.00821,
                    },
                ],
                "INE001A08AA1": [
                    {
                        "date": "2024-01-15",
                        "returns": 0.005,
                    }
                ]
            }

         If an ISIN fails, it will have an "error" key instead:

            {
                "INE040A08AK2": [{"date": "2024-01-15", "returns": 0.00765}, ...],
                "INE999A99XX9": {"error": "Error message"}
            }

   Return type:
      dict[str, list[dict]]

   -[ Example ]-

   >>> import spice.security_analytics as sa
   >>> returns = sa.get_returns(["INE001A08AA1", "INE040A08AK2"], start_date="2024-01-01", end_date="2024-01-31")
   >>> print(returns["INE001A08AA1"][0])
   {'date': '2024-01-15', 'return': 0.005}
