Best way to ping for the API changes in the wordpress?

Yes you can use wp_schedule_event to trigger a hook used in your plugin to request the API URL after a certain amount of time.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)