Is there a difference between a 'mini-DisplayPort to HDMI cable' and a 'mini-DisplayPort to DisplayPort' cable for a MacBook Pro? I just bought a 4k monitor (AOC u2777pqu) for my MacBook Pro (Retina, 13 inch, Early 2015). The shop advised a mini-DisplayPort to HDMI cable, which gives me 4k resolution but when I tried it only provided a refresh rate of 30Hz.

The Apple support guide ( https://support.apple.com/en-sg/HT206587 ) suggests that the Thunderbolt cable will allow this model to run 4k at 60Hz.

My question whether getting a 'pure DisplayPort' ( mini-DisplayPort to DisplayPort cable - 4k certified) provide the 60Hz at 4k?
Officially, your model MacBook Pro will support up to 3840 by 2160 pixels at 30Hz or 4096 by 2160 pixels at 24Hz if using a HDMI connection, which explains your experience of 30Hz with your mini-DisplayPort to HDMI cable.

Your model MacBook Pro also supports up to 3840 by 2160 pixels at 60Hz using a Thunderbolt connection. Since your display supports both a 60Hz refresh rate and a DisplayPort connection, then using a mini-DisplayPort to DisplayPort cable of sufficient quality should achieve what you want.