It depends on how much you used and the baby's metabolism (which can be caried among newborns).
Please make sure to tell your nurse or doctor that you were using cocaine. They aren't there to judge you and your situation is not that uncommon. There are things they can do to prevent your baby from going through potentially fatal withdrawal but they need to know exactly what they are up against so just tell them.