Integrate your app with Upstox using TradeButton

Integrate Upstox with your app using TradeButton


I'm excited to announce the launch of our new product, TradeButton. TradeButton enables developers and software companies to integrate Upstox into their app. With the use of a few lines of JavaScript, you can bake in trading functionality in your existing app. The best part? The Upstox Team takes care of all the security and privacy needs of the user so you don't have to.

After integrating TradeButton on your app or website, any user can click on it to buy or sell stocks. Upstox will authenticate the user and then show them an Order Entry window. The order entry window will contain the stocks you have linked to.


Getting Started

You can integrate with native applications and websites. We use JavaScript to create and construct a button. For native apps, you can use a WebView to build the button. Start by adding the following script to your webpage.

<script type="text/javascript" >

    var upstoxTradesConfig = {

        "apiKey": <your_api_key>,

        "button-name": {}



<script type="text/javascript" src=""></script>

This initializes the script and you can now construct your own TradeButtons.

Create your first TradeButton

TradeButtons can be either Upstox branded buttons or your own custom buttons. I'd like to show you an example of how to create a branded button. Take a look at the following code sample to see a live example.

You can create a TradeButton with just a single order or multiple orders.

Using TradeButton

Once you create your TradeButton and launch it, the user will see a login page when s/he clicks on it.

Login to TradeButton
Login with your UCC, trading password, and year of birth

After clicking on Login, they will see the stocks/derivatives pre-filled for their review.

Review the order before placing

They can edit the order on the review screen and then place it. Once it's placed, the user can track the order on any Upstox platform.


The API documentation has been updated to show you all the options of the TradeButton. You can pick between intraday and delivery, stop loss and regular orders, limit vs. market. The Upstox team is working on adding cover order and bracket order abilities as well.


If you have any questions or feedback, find Upstox' team of developers on the Upstox Forum. Post your questions and comments there and they'll get back to you as soon as they take a break from their daily routine of coding.

Download IconDownload the Upstox App Today