it has 40 comments total, but the problem is that when I request comments without specifying max_depth, and sort ordered by New, I receive only 10 comments, if I try to specify page, or limit, I get an error {"error":"couldnt_get_comments"}.
What values are you sending for limit and page? Are you sure they just aren't out of range?
without specifying max_depth
I think max_depth has a default, but I don't recall at the moment. Are the 10 comments you do get all trunk level comments, directly on the post?
My intention is doing something similar to an user pressing “Comments” on front of a community, like calling the community URL
From what I understand, depth only comes into play when you are viewing the comments of a specific post. If you are just listing comments across multiple posts in a community... they are presented flat. At least that is how lemmy-ui does it when I view comments for a community... which I assuming is using API /comment/list. Am I following what you are attempting?