# Store the notation of the website
def notation(): 
	return ['Addoha',
 'AFMA',
 'Afric Indus',
 'Afriquia Gaz',
 'Agma',
 'Akdital',
 'Alliances',
 'Aluminium Maroc',
 'Aradei Capital',
 'ATLANTASANAD',
 'Attijariwafa',
 'Auto Hall',
 'Auto Nejma',
 'BALIMA',
 'BOA',
 'BCP',
 'BMCI',
 'Cartier Saada',
 'CDM',
 'CIH',
 'Ciments Maroc',
 'CMT',
 'Colorado',
 'COSUMAR',
 'CTM',
 'Dari Couspate', 
 'Delta Holding',
 'Disty Technolog',
 'DISWAY',
 'Ennakl',
 'EQDOM',
 'FENIE BROSSETTE',
 'HPS',
 'IBMaroc',
 'Immr Invest',
 'INVOLYS',
 'Jet Contractors',
 'LABEL VIE',
 'LafargeHolcim',
 'Lesieur Cristal',
 'M2M Group',
 'Maghreb Oxygene',
 'Maghrebail',
 'Managem',
 'Maroc Leasing',
 'Maroc Telecom',
 'Microdata',
 'Mutandis',
 'Oulmes',
 'PROMOPHARM',
 'Rebab Company',
 'Res.Dar Saada',
 'Risma',
 'S2M',
 'Sanlam Maroc',
 'SALAFIN',
 'SMI',
 'Stokvis Nord Afr',
 'SNEP',
 'SODEP',
 'Sonasid',
 'SOTHEMA',
 'SRM',
 'Ste Boissons',
 'STROC Indus',
 'TAQA Morocco',
 'TGCC',
 'Timar',
 'Total Maroc',
 'Unimer',
 'Wafa Assur',
 'Zellidja','MASI',"MSI20"]
	
def notation_code():
      return [{'name': 'Addoha', 'ISIN': 'MA0000011512'},
 {'name': 'AFMA', 'ISIN': 'MA0000012296'},
 {'name': 'Afric Indus', 'ISIN': 'MA0000012114'},
 {'name': 'Afriquia Gaz', 'ISIN': 'MA0000010951'},
 {'name': 'Agma', 'ISIN': 'MA0000010944'},
 {'name': 'Akdital', 'ISIN': 'MA0000012585'},
 {'name': 'Alliances', 'ISIN': 'MA0000011819'},
 {'name': 'Aluminium Maroc', 'ISIN': 'MA0000010936'},
 {'name': 'Aradei Capital', 'ISIN': 'MA0000012460'},
 {'name': 'ATLANTASANAD', 'ISIN': 'MA0000011710'},
 {'name': 'Attijariwafa', 'ISIN': 'MA0000012445'},
 {'name': 'Auto Hall', 'ISIN': 'MA0000010969'},
 {'name': 'Auto Nejma', 'ISIN': 'MA0000011009'},
 {'name': 'BALIMA', 'ISIN': 'MA0000011991'},
 {'name': 'BOA', 'ISIN': 'MA0000012437'},
 {'name': 'BCP', 'ISIN': 'MA0000011884'},
 {'name': 'BMCI', 'ISIN': 'MA0000010811'},
 {'name': 'Cartier Saada', 'ISIN': 'MA0000011868'},
 {'name': 'CDM', 'ISIN': 'MA0000010381'},
 {'name': 'CIH', 'ISIN': 'MA0000011454'},
 {'name': 'Ciments Maroc', 'ISIN': 'MA0000010506'},
 {'name': 'CMT', 'ISIN': 'MA0000011793'},
 {'name': 'Colorado', 'ISIN': 'MA0000011934'},
 {'name': 'COSUMAR', 'ISIN': 'MA0000012247'},
 {'name': 'CTM', 'ISIN': 'MA0000010340'},
 {'name': 'Dari Couspate', 'ISIN': 'MA0000011421'},
 {'name': 'Delta Holding', 'ISIN': 'MA0000011850'},
 {'name': 'Disty Technolog', 'ISIN': 'MA0000012536'},
 {'name': 'DISWAY', 'ISIN': 'MA0000011637'},
 {'name': 'Ennakl', 'ISIN': 'MA0000011942'},
 {'name': 'EQDOM', 'ISIN': 'MA0000010357'},
 {'name': 'FENIE BROSSETTE', 'ISIN': 'MA0000011587'},
 {'name': 'HPS', 'ISIN': 'MA0000011611'},
 {'name': 'IBMaroc', 'ISIN': 'MA0000011132'},
 {'name': 'Immr Invest', 'ISIN': 'MA0000012387'},
 {'name': 'INVOLYS', 'ISIN': 'MA0000011579'},
 {'name': 'Jet Contractors', 'ISIN': 'MA0000012080'},
 {'name': 'LABEL VIE', 'ISIN': 'MA0000011801'},
 {'name': 'LafargeHolcim', 'ISIN': 'MA0000012320'},
 {'name': 'Lesieur Cristal', 'ISIN': 'MA0000012031'},
 {'name': 'M2M Group', 'ISIN': 'MA0000011678'},
 {'name': 'Maghreb Oxygene', 'ISIN': 'MA0000010985'},
 {'name': 'Maghrebail', 'ISIN': 'MA0000011215'},
 {'name': 'Managem', 'ISIN': 'MA0000011058'},
 {'name': 'Maroc Leasing', 'ISIN': 'MA0000010035'},
 {'name': 'Maroc Telecom', 'ISIN': 'MA0000011488'},
 {'name': 'Microdata', 'ISIN': 'MA0000012163'},
 {'name': 'Mutandis', 'ISIN': 'MA0000012395'},
 {'name': 'Oulmes', 'ISIN': 'MA0000010415'},
 {'name': 'PROMOPHARM', 'ISIN': 'MA0000011660'},
 {'name': 'Rebab Company', 'ISIN': 'MA0000010993'},
 {'name': 'Res.Dar Saada', 'ISIN': 'MA0000012239'},
 {'name': 'Risma', 'ISIN': 'MA0000011462'},
 {'name': 'S2M', 'ISIN': 'MA0000012106'},
 {'name': 'Sanlam Maroc', 'ISIN': 'MA0000012007'},
 {'name': 'SALAFIN', 'ISIN': 'MA0000011744'},
 {'name': 'SMI', 'ISIN': 'MA0000010068'},
 {'name': 'Stokvis Nord Afr', 'ISIN': 'MA0000011843'},
 {'name': 'SNEP', 'ISIN': 'MA0000011728'},
 {'name': 'SODEP', 'ISIN': 'MA0000012312'},
 {'name': 'Sonasid', 'ISIN': 'MA0000010019'},
 {'name': 'SOTHEMA', 'ISIN': 'MA0000012502'},
 {'name': 'SRM', 'ISIN': 'MA0000011595'},
 {'name': 'Ste Boissons', 'ISIN': 'MA0000010365'},
 {'name': 'STROC Indus', 'ISIN': 'MA0000012056'},
 {'name': 'TAQA Morocco', 'ISIN': 'MA0000012205'},
 {'name': 'TGCC', 'ISIN': 'MA0000012528'},
 {'name': 'Timar', 'ISIN': 'MA0000011686'},
 {'name': 'Total Maroc', 'ISIN': 'MA0000012262'},
 {'name': 'Unimer', 'ISIN': 'MA0000012023'},
 {'name': 'Wafa Assur', 'ISIN': 'MA0000010928'},
 {'name': 'Zellidja', 'ISIN': 'MA0000010571'},{'name': 'MASI', 'ISIN': ''},{'name': 'MSI20', 'ISIN': ''}]
    
def notation_value():
  return {'Addoha' : '9000' , 'AFMA' : '12200' , 'Afric Indus' : '11700' , 'Afriquia Gaz' : '7100' , 'Agma' : '6700' , 'Alliances' : '11200' , 'Aluminium Maroc' : '6600' , 'Aradei Capital' : '27' , 'ATLANTASANAD' : '10300' , 'Attijariwafa' : '8200' , 'Auto Hall' : '3200' , 'Auto Nejma' : '7000' , 'BALIMA' : '3300' , 'BOA' : '1100' , 'BCP' : '8000' , 'BMCI' : '5100' , 'Cartier Saada' : '8900' , 'CDM' : '3600'  , 'CIH' : '3100' , 'Ciments Maroc' : '4000' , 'CMT' : '11000' , 'Colorado' : '9200' , 'COSUMAR' : '4100' , 'CTM' : '2200' , 'Dari Couspate' : '8500' , 'Delattre Lev' : '10800' , 'Delta Holding' : '10900' , 'DISWAY' : '9700' , 'Ennakl' : '11300' , 'EQDOM' : '2300' , 'FENIE BROSSETTE' : '9300' , 'HPS' : '9600' , 'IBMaroc' : '7600' , 'Immr Invest' : '12' , 'INVOLYS' : '9500' , 'Jet Contractors' : '11600' , 'LABEL VIE' : '11100' , 'LafargeHolcim' : '3800' , 'Lesieur Cristal' : '4800' , 'M2M Group' : '10000' , 'Maghreb Oxygene' : '7200' , 'Maghrebail' : '1600' , 'Managem' : '7300' , 'Maroc Leasing' : '2500' , 'Maroc Telecom' : '8001' , 'Med Paper' : '6500' , 'Microdata' : '10600' , 'Mutandis' : '21' , 'Nexans Maroc' : '7400' , 'Oulmes' : '5200' , 'PROMOPHARM' : '9900' , 'Rebab Company' : '5300' , 'Res.Dar Saada' : '12000' , 'Risma' : '8700' , 'S2M' : '11800' , 'Sanlam Assurance' : '11400' , 'SALAFIN' : '10700' ,  'SMI' : '1500' , 'Stokvis Nord Afr' : '10500' , 'SNEP' : '9400' , 'SODEP' : '12300' , 'Sonasid' : '1300' , 'SOTHEMA' : '9800' , 'SRM' : '2000' , 'Ste Boissons' : '10400' , 'STROC Indus' : '11500' , 'TAQA Morocco' : '11900' , 'Timar' : '10100' , 'Total Maroc' : '12100' , 'Unimer' : '7500' , 'Wafa Assur' : '6400' , 'Zellidja' : '5800','Akdital':"35","Disty Technologis":"32","TGCC":"29"}


def list_assets():
    """Return a sorted list of available asset names."""
    return sorted(notation())


def get_isin_by_name(name: str) -> str:
    """Return the ISIN code for a given asset name (case-insensitive). Raises KeyError if not found."""
    for rec in notation_code():
        if rec['name'].lower() == name.lower():
            return rec['ISIN']
    raise KeyError(f"Asset not found: {name}")
