Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Exchange Name Error

Hi all,

I'm a beginner, hope someone can advise. When i tried to run the following code,

order_target_percent(context.gs, 0.50, style=MarketOrder(NYS))
order_target_percent(context.amzn, 0.50, style=MarketOrder(NAS))

i get the following error
11 Warning Undefined name 'nys'
12 Warning Undefined name 'nas'

How do i overcome this "undefined" exchange name error? Is it because the exchange codes "NYS" and "NAS" i've used are not correct?
I got the exchange codes from this link "https://www.quantopian.com/docs/data-reference/equity_metadata.html"

Thanks!