It IS legal to have chickens in NYC and there is even an organization that helps people get set up and understand what they are getting into called the City Chicken Project.
This interview with Elizabeth Bee Ayer, who runs City Chicken Institute in Metro NY also stated that it is legal to have chickens but NOT roosters.
She also explains the level of commitment that it takes to raise chickens in NYC. Most importantly is this part of the article by MEREDITH ENGEL Published: June 19, 2012
How expensive is it to raise chickens here?
“It is a fairly costly venture. You have to buy the birds, you have to
build the coop, you have to buy a feeder and water. It’s so expensive
to raise chickens that most people lose money. You would have to sell
your eggs at, like, $15 a dozen if you’re gonna pay your labor costs.”