• Home
  • Products
    • Login
    • Product Info
    • User Guide
    • Pricing
  • Services
    • Stock Brokers
    • Freelancers
  • Help
    • Documentation
    • Knowledge Base
    • FAQ
  • Company
    • About Us
    • Contact Us
    • Terms & Conditions
  • Home
  • Products
    • Login
    • Product Info
    • User Guide
    • Pricing
  • Services
    • Stock Brokers
    • Freelancers
  • Help
    • Documentation
    • Knowledge Base
    • FAQ
  • Company
    • About Us
    • Contact Us
    • Terms & Conditions

AutoTrader Web

home/Documentation/AutoTrader Web
Expand All Collapse All
  • Index
  • Getting Started
  • Portfolio Management System (PMS)
  •  Copy Trading (Master-Child Auto-Copy)
    • Master-Child Copy - Performance
  • PMS vs Master-Child
  • Trading View
  •  Supported Brokers
    • Symphony XTS
    • Zerodha
    • Angel Broking
    • Dhan
    • Aliceblue
    • Fyers
    • Nuvama
    • IIFL
    • Zebu
    • Finvasia
    • Motilal Oswal
    • Kotak
    • Mastertrust
    • Five Paisa
    • Choice Broking
    • FlatTrade
    • Tradejini
    • Upstox
    • SAS Online
    • Profitmart
  •  Client Setup
    • Desktop Client
    • AmiBroker Library
    • Excel Library or Tools
    • Java Library
    • MetaTrader Library
    • C# Library
    • Python Library
    • HTTP REST
  •  User Interface
    • User Registration
    •   Settings
      • General
      • Trading Accounts
      • Pseudo Accounts
      • Group Accounts
      • API Key
    •   AutoTrader
      • Activity
      • Instruments
    •   Trading
      • Summary
      • Positions
      • Orders
      • Margins
      • Holdings
      • Trade
    •   User
      • Account
      • Profile
  •  API (Application Programming Interface)
    • Place Regular Order
    • Place Cover Order
    • Place Bracket Order
    • Place Advanced Order
    • Cancel Order
    • Cancel Child Orders
    • Cancel All Orders
    • Modify Order
    • Modify Order Price
    • Modify Order Quantity
    • Square-off Position
    • Square-off Portfolio
    • Read Orders
    • Read Positions
    • Read Margins
    • Read Holdings
    • Read Portfolio Summary
    • Fetch All Trading Accounts
    • Create or Update Trading Account
    • Validate Trading Account Credentials
    • API Parameters
    • API Rate Limits
    • Email Limits
    • Postman
  • Pricing
  • Precautions
  •  Broker Independence
    • API Functions
    • Pseudo Account
    • Instruments (Trading Symbols)
  • Quantity Multiplier
  • Architecture

Modify Order Quantity

858 views July 29, 2024 Pritesh 2

This function modifies order quantity.

  • AmiBroker
  • Excel
  • MetaTrader

Signature

function modifyOrderQuantity(account, orderId, quantity)

Example

orderId = placeOrder(AT_ACCOUNT, 
    AT_EXCHANGE, AT_SYMBOL, "BUY", 
    "LIMIT", AT_PRODUCT_TYPE, 10, 
    100.5, defaultTriggerPrice(), True);
  
// You can save this orderId in a static variable
saveStaticVariableText(AT_ACCOUNT, "ORDER_ID", orderId);
  
// Somewhere later in your code, 
// when you want to modify this order
  
// Read orderId from static variable
orderId = readStaticVariableText(AT_ACCOUNT, "ORDER_ID");
  
// Modify the order
modifyOrderQuantity(AT_ACCOUNT, orderId, 20);

Signature

Public Function ModifyOrderQuantity( _
    PseudoAccount As String, _
    OrderId As String, _
    Quantity As Integer) As Boolean

Example

orderId = PlaceOrder("ACC_NAME", 
    "NSE", "SBIN", "BUY", 
    "LIMIT", "INTRADAY", 10, 
    100.5, 0, True);
  
' Somewhere later in your code, 
' when you want to modify this order
  
' Modify the order
Call ModifyOrderQuantity("ACC_NAME", orderId, 20)

Signature

bool modifyOrderQuantity(string account, 
	string orderId, int quantity)

Example

orderId = placeOrder(AT_ACCOUNT, 
    AT_EXCHANGE, AT_SYMBOL, BUY, 
    LIMIT, INTRADAY, 10, 
    100.5, defaultTriggerPrice(), true);
   
// You can save this orderId in a static variable
   
// Somewhere later in your code, 
// when you want to modify this order
   
// Modify the order
modifyOrderQuantity(AT_ACCOUNT, orderId, 20);

In this example, we are changing quantity form 10 to 20.

Parameters

  • account – pseudo account
  • orderId – publisherId (orderId given by placeOrder*() function)
  • quantity – quantity
    • Note: For NSE/BSE derivatives, quantity should be multiple of lot size. Example, BANKNIFTY lot size is 15. So to buy/sell 1 lot, you need to enter 15 quantity.

Return value

This function sends request to modify order quantity to AutoTrader Desktop Client. On successful submission, it will return True, otherwise False

The type of the return value is Boolean.

Modify Order Price
Square-off Position

Was this helpful?

2 Yes  No
Related Articles
  • Master-Child Copy – Performance
  • Tradejini
  • Dhan
  • FlatTrade
  • Supported Brokers
  • Symphony XTS

© 2025 Stocks Developer. All Rights Reserved.