Back to Community
How can I find the sid of a given stock?

How can I find the sid of a stock that I know the symbol for?

Many thanks,


8 responses

Use the "symbol" function. For example:


Thank you, Michael.

What I actually meant (but explained it badly) was how to display the sid (number) of a stock for which I know the symbol.

In the meantime I have realized that I can use the Zipline research platform and the command

print(symbols('SPY').sid) ,

for example.

I should have made more investigations before asking.



Tim in the IDE if you type in sid( and then your symbol the popup will suggest the symbol you want and the sid(number) will be populated on the left hand side.


The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Perfect. Many thanks, James.

Hi All,

I tried to enter SID and then even pressed tab for auto complete functionality.Nothing really happened.

Could any please help find a way to find the SID in the Jupyter IDE?

The SID feature is very buggy. I’m on an iPad using Chrome and when you type ‘sid(‘ it gives the pop-up to enter the stock code, but it never loads a list of options, and hitting return doesn’t submit/finish the entry.

stock = symbol('AAPL')  
print stock.sid  

Thanks Viridian!
(And for those struggling to get this to work in a Notebook, use this)

# Research environment functions  
from quantopian.research import prices, symbols  
import pandas as pd

stock = symbols('TSLA')  
print stock.sid