Determine a optimal order size without affecting the token price

Hello,
I’m trying to find a way to determine an “optimal” order size which is not too large to affect the token price. Do you have some practical ideas?

My idea is to get all EXECUTED trades over the past x minutes and take a look at their statistical distribution. What queries would you make?

I’m looking at the endpoint GET /api/v3/trades. Do you know if all trades cointained in the response have been executed? If no, how can I get past EXECUTED trades over some period of time(without knowing their ids)?

you need to receive curr orderbook. & check how mush you can execute out of there.