is there a reason she is not with you? The courts will place a child with the natural parents, when ever possible or relative. That's is the 1st choice. Your ex can threaten fostering all he wants, but if your home is a safe loving enviroment, She will be placed with you. We are former foster parents,and our kids were not with relatives because it was not considered safe. Only you know the answer to this.
But if you are a safe home then petition the court to provide you with temporary custody of your daughter, until you can get a permanent custody hearing.