Stake has cloudflare protection across all of their endpoints and you need find a way to bypass it. It used to be as (relatively) simple as getting a valid cf_clearance cookie and passing that along with your request, but they've gotten a lot more snazzy with their requirements. You can take a look at
Gambler.Bots usage of the stake api in the bots' source code on github, but it won't mean much unless you can bypass CF.