Nuvama API FAQs

Topic Name

What is Nuvama API connect?

Nuvama API connect is a platform that lets you trade using our RESTful APIs. It is a fast and secure way to trade and is capable of handling institutional level order loads. You can execute orders in real-time, manage your portfolio, stream live market data (WebSockets), and more, by integrating into our libraries. These libraries provide easy to use abstraction over the HTTP APIs. The HTTP calls have been converted to methods and their JSON responses are returned. Currently, these libraries are available in Python, Node JS and Java, other languages will be launched soon.

Do I need to pay to use this service?

Nuvama API connect is completely free for the first year for customers who sign up for the service during the promotional offer window. Please check out our home page for details of the offer. Please note that your normal brokerage charges will still apply for any trades that you do.

What are the different functionalities offered by Nuvama API connect?

1. Complete access to our free APIs
2. Robust APIs built to handle trading at scale
3. Access live market feeds through WebSocket stream
4. View trades, place orders and access your account securely in real-time
5. Analyze your trading behavior on APIs using our intuitive dashboard
6. Access to quality customer support
7. Analytics to monitor your trading behavior with our intuitive & simplified dashboard

Who should subscribe to Nuvama API connect?

1. Nuvama Clients who are willing to execute orders basis their own analysis in an automated way.
2. Start-ups building innovative solutions for stock trading.
3. Platforms and websites catering to investing and trading audiences.

Which programming languages are supported by Nuvama API connect?

We currently support Python, Node and Java  languages

How do I reach out to the customer support team for queries related to Nuvama API connect?

You can reach out through email at APIConnect@nuvama.com or by calling  1800 - 102 - 3335 (Weekdays 09 AM - 06 PM)

Are you facing any difficulties while executing any of the API functionalities?

In this case it is always advisable to provide us with the LOG FILE. The log file shall be present in your directory by name edlwsapi.log. Providing log file will help us diagnose the issue and address it at the earliest.

What are the different product types, order types and segments available for trading via Nuvama API connect?

Using Nuvama API connect, you can trade in Cash, Derivatives, Currency and Commodity segments. Order types supported are Limit, Market, SL, SL-M, Day, IOC, EOS, GTD, GTC and AMO. The supported product types are CNC, NRML, MIS, MTF, Cover Order, Bracket Order and Basket Order.

How to start trading journey with APIs?

In order to put the end user at ease we have now provided you with code snippet of python. It's time to login and start trading with APIs.

 

Here is the login code snippet:

 

pip install APIConnect


api = APIConnect("apikey","secret_password","requestID",True,r"D:\nuvama python\APIConnect-2.0.1.post1\conf\settings.ini")

 

Important points:

  • Api key and secret password gets generated when creating an app here
  • Please login here  to generate requestID 
  • "D:\nuvama python\APIConnect-2.0.1.post1\conf\settings.ini" is the settings.ini file path

 

How excited you are to put the trading APIs to use?

Please try this code only after you login

 

Here is the code snippet for placing an order:

 

# Place trade market

 

from constants.exchange import ExchangeEnum
from constants.order_type import OrderTypeEnum
from constants.product_code import ProductCodeENum
from constants.duration import DurationEnum
from constants.action import ActionEnum

 

Trading_Symbol = "UJJSMA"


Exchange = ExchangeEnum.NSE


Action = ActionEnum.BUY


Duration = DurationEnum.DAY


Order_Type = OrderTypeEnum.MARKET


Quantity = 1


Streaming_Symbol = "15228_NSE"


Disclosed_Quantity= "0"


TriggerPrice= "0"


ProductCodeENum = ProductCodeENum.CNC

 

p_trd_market = api.PlaceTrade(Trading_Symbol, Exchange, Action, Duration, Order_Type, Quantity, Streaming_Symbol, Limit_Price, Disclosed_Quantity, TriggerPrice, ProductCodeENum)

 

print(p_trd_market)

Aren't you so excited to see your holdings after your first trade?

Just use the following code to get your holdings:

 

api.Holdings()

 

print("my holdings are:", api.Holdings())

Want to see the price feed for a particular stock?

Just put the following code to use and you will see the price feed streaming:

 

 from feed.quotes_feed import QuotesFeed

 

quotes_streamer = api.initQuotesStreaming()

 

def callback(resp):

    print(resp)

 

quotes_streamer.subscribeQuotesFeed(symbols = ["2885_NSE"],  callBack = callback)

Just implement the following method to know the funds lying in the account

By implementing the following method, you will get to see the funds lying in your account:

 

api.Limits()

Want to see the open positions after placing your order?

Apply the following method to see the net positions:

 

api.NetPosition()

What you should do to know the market status?

Just write the code below to see whether the market is open or close

 

api.GetAMOStatus()

How long the session is valid once it is created?

Once the session is created, it will be valid for about 12 hrs. If there is inactivity until 12 hrs, then the session gets expired.

For queries

Contact us at

1800 - 102 - 3335

Weekdays 09AM - 06PM

Write to us on

APIconnect@nuvama.com
Chat support icon
Chat support icon