Algorithmic
Trading
What is Algo Trading?
• Algorithmic trading combines computer programming and financial
markets to execute trades at precise moments.
• Algorithmic trading attempts to strip emotions out of trades, ensures
the most efficient execution of a trade, places orders instantaneously
and may lower trading fees.
2
• Common trading strategies include trend-following
strategies, arbitrage opportunities, and index fund rebalancing.
• Algorithmic trading is also executed based on trading
volume (volume-weighted average price) or the passage of time
(time-weighted average price).
• To get started with algorithmic trading, you must have
computer access, network access, financial market knowledge, and
coding capabilities( Python preferred ).
3
Why Algo Trading?
• Trades are executed at the best possible prices.
• Trade order placement is instant and accurate (there is a high chance of execution at the desired
levels).
• Trades are timed correctly and instantly to avoid significant price changes.
• Reduced transaction costs.
• Reduced the possibility of mistakes by human traders based on emotional and psychological
factors.
• Reduced risk of manual errors when placing trades.
• Strategies can be backtested using available historical and real-time data to see if it is a
profitable trading strategy.
4
Algo Trading
using ZEBU API
Logging in
import requests
import json
import hashlib
from zebullconnect.zebullapi import Zebullapi
sas_api = Zebullapi(user_id='Your_user_id',
api_key='Your_api_key')
response = sas_api.getEncryptionKey()
PRESENTATION TITLE 6
Installation of the Python API
pip install --upgrade zebull
Fetching Scrips using Symbol
and Exchange
scrip_response = sas_api.get_scrips(symbol='search_symbol_name', exchange=
['exchange_name'])
#Sample call of the function
scrip_response = sas_api.get_scrips(symbol='TCS', exchange=
[sas_api.EXCHANGE_NSE])
# SAMPLE RESPONSE
# {.....'exch': 'NSE', 'exchange': None, 'exchange_segment': 'nse_cm',
'symbol': 'TCS-EQ', 'token': '11536', 'instrument_name': 'TATA CONSULTANCY
SERV LT'....}
7
Available exchanges are as below
# sas_api.EXCHANGE_NSE --- For NSE Cash
# sas_api.EXCHANGE_NFO --- For NSE DERIVATIVES
# sas_api.EXCHANGE_CDS --- For NSE Currency Derivatives
# sas_api.EXCHANGE_BSE --- For BSE Cash
# sas_api.EXCHANGE_BSE --- For BSE Derivatives
# sas_api.EXCHANGE_BSE --- For BSE Currency Derivatives
# sas_api.EXCHANGE_MCX --- For MCX Contracts
8
Placing and Squaring off Orders
9
# # Place Order placeorderresp = sas_api.place_order(complexty=sas_api.REGULAR_ORDER,
discqty='0', exch=sas_api.EXCHANGE_NSE, pCode='MIS', price='140.0', qty='1',
prctyp=sas_api.LIMIT_ORDER, ret='Enter_your_retention_type', trading_symbol='49234',
transtype=sas_api.BUY_ORDER, trigPrice='139.0')
# SAMPLE RESPONSE # {['stat': 'Ok', 'nestOrderNumber': '191015000018737']}
# # Square of position
squareoffresp = sas_api.squareoff_positions(exchange=sas_api.EXCHANGE_NSE,
symbol='49234', qty='0', pCode='MIS')
# SAMPLE RESPONSE
# {"stat": "Ok","nestOrderNumber:"200626000052824"}
Getting Positions and Orders
10
# Fetch Order Book orderresp = sas_api.order_data()
# ===>No Parameters are passed to get response
# SAMPLE RESPONSE # [{....... "Prc": "1454.90", "RequestID": "1", "Cancelqty": 0,
"discQtyPerc": "10", "Qty": 8, "Prctype": "SL", "Status": "rejected","Exchange":
"NSE" ,"Avgprc": "00.00", "Trgprc": "1450.90",.....}]
# This one get method and no input parameters and output will be bunch of data's are
shown on response
# Fetch Trade Book tradebookresp = sas_api.tradebook()
# ===>No Parameters are passed to get response # SAMPLE RESPONSE # This one also get
method and no input parameters and data's will be shown
Thank You
Puneet Tewani
CEO
Fox Trading Solutions
Cell : +919799871428
Email : info@foxtradingsolutions.com
Twitter : @puneet_tewani
PRESENTATION TITLE 11

More Related Content

PDF
Algo trading(Minor Project) strategy EMA with Ipython
PPTX
Algorithmic trading
PPTX
Algo Trading
PPTX
ALGO trading and strategy details provided
PDF
Introduction to pair trading station
PPTX
How to design quant trading strategies using “R”?
PPTX
Algorithmic trading
PDF
How to Build Solana Trading Bots - SoluaLab
Algo trading(Minor Project) strategy EMA with Ipython
Algorithmic trading
Algo Trading
ALGO trading and strategy details provided
Introduction to pair trading station
How to design quant trading strategies using “R”?
Algorithmic trading
How to Build Solana Trading Bots - SoluaLab

Similar to Presentation (2).pptx (20)

PDF
How to Build Solana Trading Bots.pdf | Workybooks
PPTX
Monte Carlo Simulation for Trading System in AmiBroker
PDF
How To Forex trade with sucess - Caliber FX Pro - System Manual
PPT
Sap treasury and risk management online training
PPTX
Traders Cockpit Product Details
DOCX
Predictive automated marginal trading technology pamtt part 1
PPT
Sap treasury and risk management
PDF
Autonomous transaction
PPT
Sap treasury and risk management training
PPT
Sap treasury and risk management
PPT
Sap treasury and risk management:strive erp
PPT
Sap trm on line training
PPTX
Mcx Sure Gain
PDF
How to Build Solana Trading Bots.pdf. overview
PDF
Introduction to trader bots with Python
PDF
Algorithmic Trading Basics: Strategies & Systems
PPT
Ncfm training cm
PDF
solulab.com-How to Build Solana Trading Bots.pdf
ODP
Using Java & Genetic Algorithms to Beat the Market
PDF
2022CIFEr
How to Build Solana Trading Bots.pdf | Workybooks
Monte Carlo Simulation for Trading System in AmiBroker
How To Forex trade with sucess - Caliber FX Pro - System Manual
Sap treasury and risk management online training
Traders Cockpit Product Details
Predictive automated marginal trading technology pamtt part 1
Sap treasury and risk management
Autonomous transaction
Sap treasury and risk management training
Sap treasury and risk management
Sap treasury and risk management:strive erp
Sap trm on line training
Mcx Sure Gain
How to Build Solana Trading Bots.pdf. overview
Introduction to trader bots with Python
Algorithmic Trading Basics: Strategies & Systems
Ncfm training cm
solulab.com-How to Build Solana Trading Bots.pdf
Using Java & Genetic Algorithms to Beat the Market
2022CIFEr
Ad

Recently uploaded (20)

DOCX
FINALS-BSHhchcuvivicucucucucM-Centro.docx
PPTX
svnfcksanfskjcsnvvjknsnvsdscnsncxasxa saccacxsax
DOCX
Center Enamel Powering Innovation and Resilience in the Italian Chemical Indu...
PDF
ANALYZING THE OPPORTUNITIES OF DIGITAL MARKETING IN BANGLADESH TO PROVIDE AN ...
PDF
Ron Thomas - Top Influential Business Leaders Shaping the Modern Industry – 2025
PPTX
Project Management_ SMART Projects Class.pptx
PDF
Solaris Resources Presentation - Corporate August 2025.pdf
PDF
533158074-Saudi-Arabia-Companies-List-Contact.pdf
PPTX
TRAINNING, DEVELOPMENT AND APPRAISAL.pptx
PDF
ICv2 White Paper - Gen Con Trade Day 2025
PPT
Lecture 3344;;,,(,(((((((((((((((((((((((
PPTX
2 - Self & Personality 587689213yiuedhwejbmansbeakjrk
DOCX
Handbook of Entrepreneurship- Chapter 5: Identifying business opportunity.docx
DOCX
Hand book of Entrepreneurship 4 Chapters.docx
DOCX
80 DE ÔN VÀO 10 NĂM 2023vhkkkjjhhhhjjjj
PDF
NISM Series V-A MFD Workbook v December 2024.khhhjtgvwevoypdnew one must use ...
PPTX
CTG - Business Update 2Q2025 & 6M2025.pptx
PDF
Booking.com The Global AI Sentiment Report 2025
PDF
Family Law: The Role of Communication in Mediation (www.kiu.ac.ug)
PDF
Robin Fischer: A Visionary Leader Making a Difference in Healthcare, One Day ...
FINALS-BSHhchcuvivicucucucucM-Centro.docx
svnfcksanfskjcsnvvjknsnvsdscnsncxasxa saccacxsax
Center Enamel Powering Innovation and Resilience in the Italian Chemical Indu...
ANALYZING THE OPPORTUNITIES OF DIGITAL MARKETING IN BANGLADESH TO PROVIDE AN ...
Ron Thomas - Top Influential Business Leaders Shaping the Modern Industry – 2025
Project Management_ SMART Projects Class.pptx
Solaris Resources Presentation - Corporate August 2025.pdf
533158074-Saudi-Arabia-Companies-List-Contact.pdf
TRAINNING, DEVELOPMENT AND APPRAISAL.pptx
ICv2 White Paper - Gen Con Trade Day 2025
Lecture 3344;;,,(,(((((((((((((((((((((((
2 - Self & Personality 587689213yiuedhwejbmansbeakjrk
Handbook of Entrepreneurship- Chapter 5: Identifying business opportunity.docx
Hand book of Entrepreneurship 4 Chapters.docx
80 DE ÔN VÀO 10 NĂM 2023vhkkkjjhhhhjjjj
NISM Series V-A MFD Workbook v December 2024.khhhjtgvwevoypdnew one must use ...
CTG - Business Update 2Q2025 & 6M2025.pptx
Booking.com The Global AI Sentiment Report 2025
Family Law: The Role of Communication in Mediation (www.kiu.ac.ug)
Robin Fischer: A Visionary Leader Making a Difference in Healthcare, One Day ...
Ad

Presentation (2).pptx

  • 2. What is Algo Trading? • Algorithmic trading combines computer programming and financial markets to execute trades at precise moments. • Algorithmic trading attempts to strip emotions out of trades, ensures the most efficient execution of a trade, places orders instantaneously and may lower trading fees. 2
  • 3. • Common trading strategies include trend-following strategies, arbitrage opportunities, and index fund rebalancing. • Algorithmic trading is also executed based on trading volume (volume-weighted average price) or the passage of time (time-weighted average price). • To get started with algorithmic trading, you must have computer access, network access, financial market knowledge, and coding capabilities( Python preferred ). 3
  • 4. Why Algo Trading? • Trades are executed at the best possible prices. • Trade order placement is instant and accurate (there is a high chance of execution at the desired levels). • Trades are timed correctly and instantly to avoid significant price changes. • Reduced transaction costs. • Reduced the possibility of mistakes by human traders based on emotional and psychological factors. • Reduced risk of manual errors when placing trades. • Strategies can be backtested using available historical and real-time data to see if it is a profitable trading strategy. 4
  • 6. Logging in import requests import json import hashlib from zebullconnect.zebullapi import Zebullapi sas_api = Zebullapi(user_id='Your_user_id', api_key='Your_api_key') response = sas_api.getEncryptionKey() PRESENTATION TITLE 6 Installation of the Python API pip install --upgrade zebull
  • 7. Fetching Scrips using Symbol and Exchange scrip_response = sas_api.get_scrips(symbol='search_symbol_name', exchange= ['exchange_name']) #Sample call of the function scrip_response = sas_api.get_scrips(symbol='TCS', exchange= [sas_api.EXCHANGE_NSE]) # SAMPLE RESPONSE # {.....'exch': 'NSE', 'exchange': None, 'exchange_segment': 'nse_cm', 'symbol': 'TCS-EQ', 'token': '11536', 'instrument_name': 'TATA CONSULTANCY SERV LT'....} 7
  • 8. Available exchanges are as below # sas_api.EXCHANGE_NSE --- For NSE Cash # sas_api.EXCHANGE_NFO --- For NSE DERIVATIVES # sas_api.EXCHANGE_CDS --- For NSE Currency Derivatives # sas_api.EXCHANGE_BSE --- For BSE Cash # sas_api.EXCHANGE_BSE --- For BSE Derivatives # sas_api.EXCHANGE_BSE --- For BSE Currency Derivatives # sas_api.EXCHANGE_MCX --- For MCX Contracts 8
  • 9. Placing and Squaring off Orders 9 # # Place Order placeorderresp = sas_api.place_order(complexty=sas_api.REGULAR_ORDER, discqty='0', exch=sas_api.EXCHANGE_NSE, pCode='MIS', price='140.0', qty='1', prctyp=sas_api.LIMIT_ORDER, ret='Enter_your_retention_type', trading_symbol='49234', transtype=sas_api.BUY_ORDER, trigPrice='139.0') # SAMPLE RESPONSE # {['stat': 'Ok', 'nestOrderNumber': '191015000018737']} # # Square of position squareoffresp = sas_api.squareoff_positions(exchange=sas_api.EXCHANGE_NSE, symbol='49234', qty='0', pCode='MIS') # SAMPLE RESPONSE # {"stat": "Ok","nestOrderNumber:"200626000052824"}
  • 10. Getting Positions and Orders 10 # Fetch Order Book orderresp = sas_api.order_data() # ===>No Parameters are passed to get response # SAMPLE RESPONSE # [{....... "Prc": "1454.90", "RequestID": "1", "Cancelqty": 0, "discQtyPerc": "10", "Qty": 8, "Prctype": "SL", "Status": "rejected","Exchange": "NSE" ,"Avgprc": "00.00", "Trgprc": "1450.90",.....}] # This one get method and no input parameters and output will be bunch of data's are shown on response # Fetch Trade Book tradebookresp = sas_api.tradebook() # ===>No Parameters are passed to get response # SAMPLE RESPONSE # This one also get method and no input parameters and data's will be shown
  • 11. Thank You Puneet Tewani CEO Fox Trading Solutions Cell : +919799871428 Email : info@foxtradingsolutions.com Twitter : @puneet_tewani PRESENTATION TITLE 11