API for real time networking speed?

I am new to iOS ,so wanted to know is there any way to get the real time WiFi or cellular upload and download speeds like the one’s we see in some widgets
AFAIK, there is no API to speed test. As well, given the variables, it can be more work than it's worth.

Best to stick with the traditional speed test method and ping A to B.

As for those widgets, they're just pinging and making best guess - nothing magic about them, they just simplify the job for users who don't even know what a ping is ;)
API for real time networking speed?
 
 
Q