@faha_berdiev I may be wrong about this, so don’t take my answer as final if you here something else from somebody else, but I’m pretty sure it is impossible to figure out what the account index is from the public key.
This is actually for privacy reasons. The idea behind having multiple different accounts tied to one wallet is that you can have one seed phrase that allows you to access all of the different accounts, but that nobody from the outside can tell that you control all of those accounts or that they are related to each-other in any way. This makes it impossible to tell that the different public keys in that wallet are even related to each-other, not to mention what the index in the wallet is.
Thanks, Sir, So can you answer please?)
Where I can get account index to use it in my code ?)
You can’t. It’s intentionally impossible to do for privacy reasons.