Whenever I try to make such a request I have a blank screen and 500 (sometimes 502) error code as a result. But ascending order is working fine though.
Website search is working well with such options, but API is unfortunately not.
https://wallhaven.cc/api/v1/search?order=desc&sorting=favorites&apikey=<your-key>
upd: Also, it doesn't work only if api key is provided, but without it everything is ok.