• 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

Java Library

6352 views April 1, 2025 Pritesh 9

AutoTrader Web API Java library can be used for automated trading on Supports leading Indian Stock Brokers.

Following steps need to be taken in order to use the Java Library.

Download

Our java library can be installed in one of the following ways. Please choose based on your project’s build system.

  • Gradle (build system)
  • Maven (build system)
  • Plain java project

Gradle

1. Add our repository to your build.gradle file. See highlighed lines below.

repositories {
    // Use Maven Central for resolving dependencies.
    mavenCentral()
	
    maven {
        url "https://raw.githubusercontent.com/Pritesh-Mhatre/maven_repo/main"
    }
}

2. Add following dependency. See highlighed lines below.

dependencies {
	implementation 'com.dakshata:at-api:2.2.0'	
}

Maven

1. Add our repository to your pom.xml file. See highlighed lines below.

<repositories>
	<repository>
		<id>stocks-developer</id>
		<url>https://raw.githubusercontent.com/Pritesh-Mhatre/maven_repo/main</url>
	</repository>
</repositories>	

2. Add following dependency. See highlighed lines below.

<dependency>
	<groupId>com.dakshata</groupId>
	<artifactId>at-api</artifactId>
	<version>2.2.0</version>
</dependency>

Download Jar

If you are not using maven or gradle build system, then you can download the following jar. This is a fat jar (library as well as all it’s dependencies are combined into a single jar).

Add the downloaded jar to your project’s classpath.

Download Java Library

Initialize

You need to make an instance of com.dakshata.autotrader.api.AutoTrader class. See the sample code below:

IAutoTrader autotrader = AutoTrader.createInstance("<your-api-key>");

You can find your API Key on AutoTrader Web.

You must share this instance across all of your application. There is no need to create an instance again and again.

Usage

Using the client is pretty straightforward, you invoke appropriate functions on the autotrader instance. For example,

// Place a regular order
final IOperationResponse<String> response = autotrader
    .placeRegularOrder("ACC_NAME", "NSE", 
    "BANKNIFTY_25-JUN-2020_FUT", TradeType.BUY, 
    OrderType.MARKET, ProductType.INTRADAY, 20, 0f, 0f);

Shutdown

You can invoke a shutdown() method just before your application exits. This is not mandatory, but recommended.

autotrader.shutdown();

API Functions

A detailed explanation is provided for each function along with examples in the API documentation.

GitHub

If you are interested to look at the code of this library, it is available on GitHub.

Was this helpful?

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

© 2025 Stocks Developer. All Rights Reserved.