It's straightforward but confusing, since there are two question you are really asking:
1. What ECFMG certification do you need to participate in the match?
2. What ECFMG certification do you need to actually have a realistic chance of matching?
#1 is easy. In order to match to a residency position, you must be ECFMG eligible. This means that by the ROL submission date (which is late February) you must have passed USMLE I, IICK and IICS, and you must be on schedule to graduate by June 30. If not, then you are withdrawn from the match.
#2 is harder, since it depends upon the field and the program. In general, although you technically only need Step 2 CK and CS by ROL deadline, in reality for most programs and fields you need CK and CS in order to be invited to an interview. Since many programs fill their interview slots quickly, if you don't have these done by the time you're submitting your application you may find your options limited.
Some programs require that you have full ECFMG certification to be considered for an interview. This would mean that you'd need to be completely graduated from medical school. Many programs don't require this, but I can't tell you whether this will be a problem in the field/programs you might consider.