Assuming that you are anywhere in the US with the possible exception of Montana (quite possibly even including Montana) and based SOLELY on the information contained in your post, yes, it is legal.
It is posssible that additional detail might change the answer.