404 response on Rest API

What is the correct REST api endpoint to use. When I tried the documented api’s they fail with a 404. For example, All Orders: GET /api/v3/allOrders?

However, I can get it to work, if I change the endpoint to GET /fapi/v1/allOrders?

it seems that you are working under wrong base url.

/api/* should works with https://api.binance.com
/fapi/* works with https://fapi.binance.com

Please find more details from the API document.

Thanks. Yes, you are correct. It was the incorrect base url.