How to Setup Static IP- Need sample Code in Python

Currently I am using tradehull librabry and client id and api tocken to login

can you give me sample code to setup static ip

Our records indicate that a Static IP address has not yet been configured for your DhanHQ Trading API access.

In line with the latest SEBI guidelines onAPI-based order placement must originate from a whitelisted Static IP address. This requirement is mandatory to remain compliant with regulatory norms.

Deadline: 15 March, 2026

If the Static IP is not configured by the above date, your API order placement capabilities may be restricted due to non-compliance.

|24pxx24pxHow to configure your Static IP:

You need to get static ip from your ISP if you are using your own system to run the code or host your code some place which provides static ip (AWS, GCloud, etc).

do I have to change any code if I use code as below

from Dhan_Tradehull import Tradehull
from dhanhq import dhanhq

Dhan credentials (keep secure)

client_id = "1000…
access_token = "eyJ0e…

Initialize Dhan clients

dhan = dhanhq(client_id, access_token)
tsl = Tradehull(client_id, access_token)

@lucky_prasit2002 No.