Algo Trading
How to Extract Real-Time Chartink Screener Results from a Premium Account

FabTrader
Article overview
Many traders use scripts available online to extract screener results from Chartink and integrate them into their trading workflows. While these methods work well with free accounts, they rely on data that is typically 30–45 minutes delayed. For strategies that depend on timely signals — such as momentum breakouts or intraday setups — this delay can lead to inaccurate or outdated scan results. This article explores how traders using a premium Chartink account can bypass that limitation by authenticating their session and programmatically retrieving near real-time screener results, making it possible to incorporate Chartink scans into automated or algorithmic trading systems more reliably.
If you spend enough time in the Indian trading ecosystem, chances are you’ve come across Chartink. It has become one of the most widely used platforms for building technical screeners, testing trading ideas, and discovering stocks that meet specific conditions.
Over the years, many traders have also discovered ways to programmatically extract screener results from Chartink and use them inside their own trading workflows. A quick search online will reveal several scripts and tutorials showing how to pull screener results into Python, spreadsheets, or automated trading systems.
At first glance, this seems like the perfect solution. You can design a screener, run it automatically, and feed the results directly into your trading process. But there is a small — and often overlooked — catch.
The Hidden Problem with Most Chartink Scrapers
Most publicly available scripts that scrape Chartink work perfectly fine with a free Chartink account. They simulate a request to the screener endpoint and return the list of stocks matching the scan conditions. However, there is an important limitation:
Free Chartink accounts operate on delayed market data.
Typically, this delay can range anywhere between 30 and 45 minutes. But when it comes to time-sensitive trading strategies, delayed data can lead to completely different outcomes.
Why Premium Users Face Another Challenge
Naturally, the obvious solution is to use a premium Chartink account, which provides access to near real-time data.
However, once you move to the premium version, the simple scraping methods that work for free users often stop working. Chartink places a login layer in front of premium data access, which means that scripts attempting to fetch screener results anonymously will no longer succeed.
This login layer acts as a paywall, ensuring that only authenticated users can access the real-time screener results. So while the platform still allows automated requests behind the scenes, the script must first authenticate the session before requesting screener data.
Bridging the Gap Between Premium Access and Automation
The approach described in this article addresses exactly that gap. Instead of relying on unauthenticated requests that work only with delayed free data, the method establishes a proper authenticated session using your premium account.
Once authenticated, the script can request screener results exactly the same way the browser does when you click the scan button on the website.
A Word on Responsible Usage
Before implementing any automated workflow, it is important to remember that platforms like Chartink are designed primarily for interactive use.
Automation should always be implemented responsibly and respectfully. Avoid sending excessive requests, and ensure that your scripts operate within reasonable limits so that the platform remains stable for everyone.
In practice, most trading workflows only require running scans periodically — for example every few minutes — which keeps the load minimal while still delivering timely insights.
Python Script
I have already done a detailed video on how this scraping works. Refer to this article.
"""
Fetch Chartink Scanner results from a Premium Chartink.com account using python
Input:
1. Chartink premium login details
2. Chartink scan URL
3. Scan Clause (Inspect webpage and find this under 'Network' / 'process' / 'Payload' section)
Disclaimer:
The information provided is for educational and informational purposes only and
should not be construed as financial, investment, or legal advice. The content is based on publicly available
information and personal opinions and may not be suitable for all investors. Investing involves risks,
including the loss of principal.
"""
import time
import pandas as pd
import requests
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
EMAIL = "Your Email id"
PASSWORD = "Your Password"
def chartink_login():
driver = webdriver.Chrome()
driver.get("https://chartink.com/login")
wait = WebDriverWait(driver, 20)
email_box = wait.until(
EC.presence_of_element_located((By.ID, "login-email"))
)
password_box = driver.find_element(By.ID, "login-password")
email_box.send_keys(EMAIL)
password_box.send_keys(PASSWORD)
password_box.submit()
print("Solve captcha if prompted...")
cookies = driver.get_cookies()
driver.quit()
session = requests.Session()
for cookie in cookies:
session.cookies.set(cookie['name'], cookie['value'])
return session
def chartink_scan(session, scan_clause):
url = "https://chartink.com/screener/dma20new"
r = session.get(url)
from bs4 import BeautifulSoup
soup = BeautifulSoup(r.text, "html.parser")
csrf = soup.select_one("[name='csrf-token']")['content']
headers = {
"x-csrf-token": csrf,
"x-requested-with": "XMLHttpRequest",
"Content-Type": "application/x-www-form-urlencoded",
"User-Agent": "Mozilla/5.0"
}
r = session.post(
"https://chartink.com/screener/process",
headers=headers,
data=scan_clause
)
data = r.json()["data"]
df = pd.DataFrame(data)
return df
if __name__ == "__main__":
session = chartink_login()
scan_clause = {
'scan_clause': '( {33619} ( 1 day ago close < 1 day ago sma( daily close , 20 ) and daily close > daily sma( daily close , 20 ) ) )'
}
df = chartink_scan(session, scan_clause)
pd.set_option("display.max_rows", None)
pd.set_option("display.max_columns", None)
print(df)
stocks = df["nsecode"].tolist()
print("\nStocks found:")
print(stocks)Python Code In case you want to run from AWS Instance
The following code is for people who are looking to run this script from AWS/Cloud instances on headless mode. Ensure that you have installed Webdriver, Chromium and Selenium on your instance.
"""
Fetch Chartink Scanner results from a Premium Chartink.com account using python
Input:
1. Chartink premium login details
2. Chartink scan URL
3. Scan Clause (Inspect webpage and find this under 'Network' / 'process' / 'Payload' section)
Disclaimer:
The information provided is for educational and informational purposes only and
should not be construed as financial, investment, or legal advice. The content is based on publicly available
information and personal opinions and may not be suitable for all investors. Investing involves risks,
including the loss of principal.
"""
import time
import pandas as pd
import requests
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.service import Service
EMAIL = "Your Email id"
PASSWORD = "Your Password"
def chartink_login():
options = Options()
options.add_argument("--headless=new")
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
driver = webdriver.Chrome(
service=Service(ChromeDriverManager().install()),
options=options
)
driver.get("https://chartink.com/login")
wait = WebDriverWait(driver, 20)
email_box = wait.until(
EC.presence_of_element_located((By.ID, "login-email"))
)
password_box = driver.find_element(By.ID, "login-password")
email_box.send_keys(EMAIL)
password_box.send_keys(PASSWORD)
password_box.submit()
cookies = driver.get_cookies()
driver.quit()
session = requests.Session()
for cookie in cookies:
session.cookies.set(cookie['name'], cookie['value'])
return session
def chartink_scan(session, scan_clause):
url = "https://chartink.com/screener/dma20new"
r = session.get(url)
from bs4 import BeautifulSoup
soup = BeautifulSoup(r.text, "html.parser")
csrf = soup.select_one("[name='csrf-token']")['content']
headers = {
"x-csrf-token": csrf,
"x-requested-with": "XMLHttpRequest",
"Content-Type": "application/x-www-form-urlencoded",
"User-Agent": "Mozilla/5.0"
}
r = session.post(
"https://chartink.com/screener/process",
headers=headers,
data=scan_clause
)
data = r.json()["data"]
df = pd.DataFrame(data)
return df
if __name__ == "__main__":
session = chartink_login()
scan_clause = {
'scan_clause': '( {33619} ( 1 day ago close < 1 day ago sma( daily close , 20 ) and daily close > daily sma( daily close , 20 ) ) )'
}
df = chartink_scan(session, scan_clause)
pd.set_option("display.max_rows", None)
pd.set_option("display.max_columns", None)
print(df)
stocks = df["nsecode"].tolist()
print("\nStocks found:")
print(stocks)Final Thoughts
Chartink remains one of the most powerful tools available to retail traders for building custom market scans. With a little engineering, it can also become a key component inside a broader algorithmic trading workflow.
While many scripts online demonstrate how to extract screener results using free accounts, those methods rely on delayed data, which can limit their usefulness for active strategies.
By authenticating a premium session before requesting scan results, traders can bridge that gap and access screener outputs that reflect the market much more closely in real time.
For traders building systematic strategies, this small shift can make a meaningful difference — turning Chartink from a manual screening tool into a fully integrated part of an automated trading pipeline.
More from Algo Trading
Algo Trading Cost in India: How I Built a Reliable Setup for ₹150/Month
Wondering how much algo trading costs in India? In this article, I break down the real expenses involved in running an algorithmic...
When Your Job Feels Shaky: Can Trading Become an Alternate Income Stream?
Can trading become a stable source of income in India? While many consider it during times of job uncertainty, the reality is...
How Much Capital Do You Really Need for Sustainable Trading Income in India?
How much capital is needed for sustainable trading income in India? This in-depth guide explores the realistic returns traders can expect, the...
