Hello and welcome, gsome!
There is some information available to you on the SIM Unlock Policy | Unlock Your Mobile Wireless Device | T-Mobile page. I have copied the relevant information below.
We provide mobile device unlock codes free of charge within two business days (or provides further information about timing) for eligible devices.
Device eligibility is determined as follows:
The device must be a T-Mobile device.
The device must not be reported as lost, stolen or blocked to T-Mobile.
The account associated with the device must be in good standing.
You have requested no more than 2 mobile device unlock codes per line of service in the last 12 months.
The device must satisfy all the Postpaid or Prepaid Unlocking terms outlined below.
Unlock Eligibility for Monthly Phones and tablets
The device must have been active on the T-Mobile network for at least 40 days on the requesting line.
If the device was financed using T-Mobile’s Equipment Installment Plan (EIP), then all payments must be satisfied and the device must be paid in full.
If the device is on an account that has a service contract term, then at least 18 consecutive monthly payments must have been made or the account was migrated to a no contract rate plan.
If the device is associated with a canceled account, then the account balance must be zero.
T-Mobile may request proof of purchase or additional information in its discretion and certain other exceptions may apply.
You will need to put in an unlock request with T-Mobile Customer Service so please have your information ready when you call.