Can you crack the code in 10 tries ?

Enter a 4 digit number with unique digits.

X = A digit is in the code ond in the correct position
Y = A digit is in the code but in the wrong position