The Edificio Metropoli building at the intersection of Gran Vía in Madrid, Spain

Photo by Jorge Fernández Salas on Unsplash

Código LEI in Spain: When an SL or SA Needs One and Where to Get It

A Spanish SL or SA needs a código LEI before its bank trades securities or signs a hedge for it. Learn where to apply and whether an autónomo can get one too.

Quick answer

A Spanish company needs an LEI before its bank or broker can buy or sell shares, bonds, ETFs or Letras del Tesoro (Treasury bills) for it, and before the company signs a seguro de cambio (a currency forward), an interest-rate swap or another derivative. Companies issuing pagarés or bonds on MARF need one too. The Registro Mercantil is Spain’s own LEI issuer, but a Spanish company may get its code from any GLEIF-accredited issuer that covers Spain. Private individuals do not need an LEI.

Need an LEI? Apply Online

A bank or broker asks an SL or SA for its código LEI, the Legal Entity Identifier, before it carries out a securities trade for the company or signs a derivative with it. This 20-character code belongs to a global system overseen by the GLEIF foundation, as our article on what an LEI is explains. If your company does not have one yet, you can apply for an LEI online through us, and it is usually issued within one or two working days.

Spain’s LEIs in Numbers

On 6 November 2026, Spanish entities held 195,601 LEIs in the global database, the fifth-highest total among the 32 European countries in our LEI statistics. Of these, 104,770 were up to date and 77,974 had lapsed because their yearly renewal was missed. Counting only these two groups, Spain’s lapsed share was 42.7%, a level exceeded only by France and the United Kingdom in our analysis of renewal rates.

About four in five Spanish LEIs are managed by the Registro Mercantil, the Spanish commercial register, which Royal Decree-Law 14/2013 made the country’s official LEI issuer. Its codes are not renewed automatically, so the company has to apply every year before the due date. Our guide to renewing a lapsed LEI explains what to do if a renewal was missed.

When a Spanish Company Needs an LEI

In each case below, the code must be in place before the deal, and our overview of LEI requirements in the EU explains the EU rules involved.

When the code is needed Where the requirement comes from Who asks for it
Buying or selling shares, bonds, ETFs, Letras del Tesoro or other government debt MiFID II and MiFIR Your bank or broker
Seguros de cambio (currency forwards), interest-rate swaps and other derivatives EMIR The bank on the other side of the contract
Repos on government debt SFTR The bank on the other side of the repo
Issuing pagarés or bonds on MARF, or shares on BME Growth MiFIR (instrument reference data) The market and the registered adviser
Buying crypto-assets in the company’s name The platform’s own client checks The crypto platform

Crypto accounts are covered in our guide to LEIs for crypto, and IT suppliers to banks in our guide to DORA.

Investing Through a Sociedad Patrimonial

Many Spanish families keep their savings in a sociedad patrimonial, a holding company that manages investments instead of running a business. MiFIR’s transaction reporting rules require the bank to report every purchase or sale of listed securities with the company’s LEI and forbid it to carry out the order without one. Buying units of an ordinary fondo de inversión directly from the fund manager is usually outside this reporting, although brokers often ask for the code when the account is opened, as our article on company brokerage accounts explains.

Seguros de Cambio, Swaps and Repos

Spanish exporters and importers often lock in an exchange rate with a seguro de cambio, and a company with a Euribor-linked loan may fix its interest cost with a swap. Both usually count as derivatives under EMIR, the EU derivatives regulation, whose reporting rules identify each party to a contract by its LEI. The bank files the reports, but the company must give it an up-to-date code and keep it renewed while any contract is open. A company that parks spare cash in a repo on government debt falls under SFTR, the EU rules on securities financing, which work the same way.

Pagarés on MARF and Shares on BME Growth

MARF, the alternative fixed-income market run by BME, the Spanish stock exchange group, lets medium-sized companies raise money by issuing pagarés (short-term commercial paper) and bonds. BME Growth offers the same route for shares. Under the MiFIR reference data rules, every instrument traded on such a market is linked to its issuer’s LEI, so a company planning an issue needs its código LEI before it applies for admission.

Who in Spain Can Get an LEI

Any legal entity registered in Spain is eligible for an LEI, and so are some businesses without legal personality.

Type of business Eligible? Typical reason
SL and SA (private and public limited companies), including SOCIMIs (real-estate investment companies) Yes Securities trades, derivatives, repos, bond or share issues
Cooperatives Yes Hedging, investing or issuing securities
SICAVs and investment funds Yes Buying and selling securities
Foundations and associations Yes Investing reserves in listed securities
Spanish branch (sucursal) of a foreign company Yes, if the foreign company already has its own LEI Trades or hedges booked through the branch, if the bank does not accept the parent’s code
Autónomo (sole trader) Possible in a business capacity A derivative tied to the business, if the bank asks for it
Private individual No Not needed: banks use the NIF, the Spanish tax identification number, or another national identifier

Does an Autónomo Need an LEI?

An autónomo is a self-employed person, not a separate legal entity. When an autónomo buys shares or bonds, EU reporting rules identify a Spanish national by their NIF, not by an LEI. Guidance from ESMA, the EU securities regulator, does allow individuals acting in a business capacity to get a code, and the question comes up mainly when an autónomo hedges a business loan with a swap or export income with a seguro de cambio.

Before applying, ask your bank whether it wants an LEI or simply your NIF. Our article on LEIs for individuals and sole traders covers the EU-wide picture.

Getting Your Código LEI: Registro Mercantil or Another Issuer

Any GLEIF-accredited issuer that covers Spain can provide a Spanish company’s código LEI, and an existing code can be transferred to another issuer without changing its number. Every issuer checks the company’s details against the register. In a 2017 decision, Spain’s registry authority ruled that a company barred from new register filings for unfiled annual accounts could still receive an LEI, whereas an address that differed from the registered one had to be corrected first.

We accept applications from Spanish companies and from companies in 50 other countries. The company’s details load from the register into our online form, and you pay at checkout. We prepare the application, and our partner, a GLEIF-accredited LEI issuer, verifies it against the Registro Mercantil and issues the code. Spanish companies whose VAT number shows in VIES, the EU’s VAT database, pay no Estonian VAT on our fee. Our LEI price comparison shows our fee next to other providers’ prices. If you are not sure what your bank’s request means, we will look at it free of charge.

Frequently Asked Questions

Eesti Firma OÜ (LEI 2549006RA6TCO1KHOJ54) is a Registration Agent of WM Datenservice (LEI 5299000J2N45DDNE4Y28), a GLEIF-accredited LEI issuer. We accept and prepare applications for three services: issuing a new LEI, renewing an LEI and transferring an LEI. WM Datenservice checks the data and issues, renews and transfers the codes. If your LEI is managed by another issuer, it is first transferred to WM Datenservice and then renewed.

This guide was prepared by the Eesti Firma team, including Co-founder and Chief Legal Officer Ilja Nikiforov, and is intended solely for informational purposes. None of the provided content constitutes legal, tax, or investment advice. While every effort has been made to ensure accuracy at the time of publication, laws and regulations may change. For personalized legal assistance, please contact Eesti Firma directly.