Hi,
No, there is no API to get client's IP address or hostname. Actually, it is maybe not the best way to handle authentication or whatever if based on IP address, as it can change over time or be hidden if going through a proxy. But if your client set a specific HTTP header, it will be transmitted and identify the user. And if everything is done overs HTTPS, it is also completely secured.
Why do you exactly need the IP address for ?
Frank