NVAPI get fan speed and set fan speed

Hello currently i working with getting gpu (currently only 1), but after retrieving gpu fan rpms i get 2
code below:

typedef int(*NvAPI_GPU_GetTachReading)(int *handle, int *spd);
NvAPI_GPU_GetTachReading NvGetCoolerSpd = 0;
int spd = 0;
NvGetCoolerSpd = NvQueryInterface(0x0BD71F0C9);
NvGetCoolerSpd(hdlGPU[0], &spd);
printf("Speed: %i RPM\n", spd);// shows 2

used this doc: https://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/group__gpucooler.html

Other info like gpu name, clock speed, bios name retrieves everything fine, but with speed it retrieves 2

Also looking for how to set fan speed, since I couldn’t find such method in nvidia docs.

P.S. fixed, problem was wrong address of fan

Looking for way to set fan speed.