Hi forum, 

I'm trying to pull string aliases assigned with Symbol.CreateOption()

I'm assigning randomized strings as aliases to options added to my universe, then using those aliases as indexes in a Dataframe to retrieve data. However, when I try to use the option (which looks like the alias when debugged as a string) to look through the Dataframe, I end up with the contract format: 'AAPL XUERCWCTYX6U|AAPL R735QTJ8XC9X' instead. 

The GetAlias() method looks helpful for this, but I'm new and haven't been able to find an example of it's use. I've tried Symbol.GetAlias(option).

for kvp in self.Securities:
            symbol = kvp.Key
            security = kvp.Value 
            if security.Symbol.SecurityType == SecurityType.Option:
               index = symbol
            for option in self.ActiveSecurities:
                self.Debug("ind: " + index)
                row = self.alertDF.loc[str(index)]

This debug gives me the string I'm looking for, but I get an error that tells me I'm using the contract format to  search through my Dataframe instead.

for kvp in self.Securities:
            symbol = kvp.Key
            security = kvp.Value 
            if security.Symbol.SecurityType == SecurityType.Option:
                self.option = symbol
            for option in self.ActiveSecurities:
                index = Symbol.GetAlias(self.option)
                self.Debug("ind: " + index)
                row = self.alertDF.loc[str(index)]

Using GetAlias() like I did to add the option contract to my universe gives me a TypeError exception. The same error happens if I try to use it like self.option.GetAlias()

I'm hoping someone can help me out. Thanks in advance for your time on this.