stock_note_api_documentation
v1.0.2
Published
_StockNote_API_is_a_set_of_Rest_APIs_using_which_users_can_build_customized_applications_based_on_their_trading_requirements__It_facilitates_the_users_of_the_APIs_to_login_search_symbols_place_orders_and_execute_them_view_their_order_status_positions_and_
Downloads
7
Readme
stock_note_api_documentation
StockNoteApiDocumentation - JavaScript client for stock_note_api_documentation
StockNote API is a set of Rest APIs using which users can build customized applications based on their trading requirements. It facilitates the users of the APIs to login, search symbols, place orders and execute them, view their order status, positions and holdings etc. This documentation provides you with all the necessary details to understand the SAMCO StockNote API collection. APIs are compatible with both Javascript and Python. For any issues or support, please raise ticket to us using the <a href="https://www.samco.in/support/index/tradeapi">support link and we will be happy to assist you. For Reference you can download postman collection <a href="http://developers.stocknote.com/doc/StockNoteApi.postman_collection.json">Click here For downloading a list of all tradeable scrips across exchanges please <a href="https://developers.stocknote.com/doc/ScripMaster.csv">Click here This is a CSV file which you can import into your database. If you are using Python or Java as client platform to code your strategies and integrate with our APIs, you can use our StockNoteBridge which provides pre-written wrappers over StockNote APIs that ensure seamless and reliable connectivity to the APIs and help you fast-track your development process. <table style="width:100%">LanguagesDocumentationPython<a href="https://github.com/samco-sdk/Python-SDK/blob/master/README.md">Python SDK DocumentationJava<a href="https://github.com/samco-sdk/Java-SDK/blob/master/README.md">Java SDK Documentation Add 'session token' of login api response as 'x-session-token' in header param of all Apis. NOTE: To ensure stability and there by provide seamless services to our customers, Samco may set limits on your use of the StockNote APIs (for example, limit on the number of requests sent to a specific API) . If you have additional questions regarding the rate limits on APIs, please reach out to us using the <a href="https://www.samco.in/support/index/tradeapi">support link and we will be happy to assist you.
This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0
- Package version: 1.0
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install stock_note_api_documentation --save
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your stock_note_api_documentation from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('stock_note_api_documentation')
in javascript files from the directory you ran the last
command above from.
git
If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/stock_note_api_documentation then install it via:
npm install YOUR_USERNAME/stock_note_api_documentation --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually
use this library):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var StockNoteApiDocumentation = require('stock_note_api_documentation');
var api = new StockNoteApiDocumentation.HistoricalCandleDataApi()
var xSessionToken = "xSessionToken_example"; // {String} Session token that should be used with API request is given in the response. It is used as an authenticator. A session token is valid for 24 hours or until a new login request is given, where you a new session token will be generated and the previous one will get expired.
var symbolName = "symbolName_example"; // {String} Symbol name of the scrip.
var fromDate = "fromDate_example"; // {String} From date in yyyy-MM-dd
var opts = {
'exchange': "exchange_example", // {String} Name of the exchange.Valid exchanges values (BSE/ NSE/ NFO/ MCX/ CDS).If the user does not provide an exchange name, by default considered as NSE.For trading with BSE, NFO, CDS and MCX, exchange is mandatory.
'toDate': "toDate_example" // {String} To date in yyyy-MM-dd
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getHistoricalCandleData(xSessionToken, symbolName, fromDate, opts, callback);
Documentation for API Endpoints
All URIs are relative to https://api.stocknote.com/tradeapi
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- StockNoteApiDocumentation.HistoricalCandleDataApi | getHistoricalCandleData | GET /history/candleData | Historical candle data StockNoteApiDocumentation.HistoricalCandleDataApi | getIndexCandleData | GET /history/indexCandleData | Index Historical CandleData StockNoteApiDocumentation.HoldingsApi | getHolding | GET /holding/getHoldings | User Holdings StockNoteApiDocumentation.IntraDayCandleDataApi | getIndexIntradayCandleData | GET /intraday/indexCandleData | Index IntraDay candle data StockNoteApiDocumentation.IntraDayCandleDataApi | getIntradayCandleData | GET /intraday/candleData | Intraday candle data StockNoteApiDocumentation.OptionApi | getOptionContracts | GET /option/optionChain | Option Chain StockNoteApiDocumentation.OrdersApi | cancelOrder | DELETE /order/cancelOrder | Cancel Order StockNoteApiDocumentation.OrdersApi | cancelOrderBO | DELETE /order/exitBO | Cancel BO Order StockNoteApiDocumentation.OrdersApi | cancelOrderCO | DELETE /order/exitCO | Cancel CO Order StockNoteApiDocumentation.OrdersApi | getOrderBook | GET /order/orderBook | Order Book StockNoteApiDocumentation.OrdersApi | getOrderStatus | GET /order/getOrderStatus | Get Order Status StockNoteApiDocumentation.OrdersApi | getTriggerOrderNumbers | GET /order/getTriggerOrders | TriggerOrders StockNoteApiDocumentation.OrdersApi | modifyOrder | PUT /order/modifyOrder/{orderNumber} | Modify Order StockNoteApiDocumentation.OrdersApi | placeOrder | POST /order/placeOrder | Place Order StockNoteApiDocumentation.OrdersApi | placeOrderBO | POST /order/placeOrderBO | Place BO Order StockNoteApiDocumentation.OrdersApi | placeOrderCO | POST /order/placeOrderCO | Place CO Order StockNoteApiDocumentation.PositionsApi | convertPosition | POST /position/convertPosition | Position Conversion StockNoteApiDocumentation.PositionsApi | getPositions | GET /position/getPositions | User Positions StockNoteApiDocumentation.PositionsApi | squareOffPosition | POST /position/squareOff | Position Square Off StockNoteApiDocumentation.QuoteApi | getQuote | GET /quote/getQuote | Get Quote StockNoteApiDocumentation.QuoteApi | getindexQuote | GET /quote/indexQuote | Index Quote StockNoteApiDocumentation.SearchEquityDerivativeApi | searchEquityDerivative | GET /eqDervSearch/search | Search Equity scrips StockNoteApiDocumentation.StreamingDataApi | getStreamingForMarketData | GET /wss:/stream.stocknote.com/. | Streaming Market Data StockNoteApiDocumentation.StreamingDataApi | getStreamingForQuote | GET /wss:/stream.stocknote.com | Streaming Quote Data StockNoteApiDocumentation.TradeBookApi | getTradeBook | GET /trade/tradeBook | Trade Book StockNoteApiDocumentation.UserLimitsApi | getLimits | GET /limit/getLimits | User Limits StockNoteApiDocumentation.UserLoginApi | login | POST /login | User Login StockNoteApiDocumentation.UserLogoutApi | logout | DELETE /logout | User Logout
Documentation for Models
- StockNoteApiDocumentation.AskValues
- StockNoteApiDocumentation.BidAsk
- StockNoteApiDocumentation.BidValues
- StockNoteApiDocumentation.CancelOrderResponse
- StockNoteApiDocumentation.CandleData
- StockNoteApiDocumentation.EquitySearchResponse
- StockNoteApiDocumentation.HistoricalCandleResponse
- StockNoteApiDocumentation.Holding
- StockNoteApiDocumentation.HoldingResponse
- StockNoteApiDocumentation.HoldingSummary
- StockNoteApiDocumentation.IndexCandleData
- StockNoteApiDocumentation.IndexCandleDataResponse
- StockNoteApiDocumentation.IndexIntraDayCandleData
- StockNoteApiDocumentation.IndexIntraDayCandleDataResponse
- StockNoteApiDocumentation.IndexQuoteResponse
- StockNoteApiDocumentation.IntraDayCandleData
- StockNoteApiDocumentation.IntraDayCandleResponses
- StockNoteApiDocumentation.Limit
- StockNoteApiDocumentation.LimitResponse
- StockNoteApiDocumentation.LoginRequest
- StockNoteApiDocumentation.LoginResponse
- StockNoteApiDocumentation.MarketDepthResponse
- StockNoteApiDocumentation.ModifyOrderRequest
- StockNoteApiDocumentation.OptionChain
- StockNoteApiDocumentation.OptionChainResponse
- StockNoteApiDocumentation.OrderBookEntry
- StockNoteApiDocumentation.OrderBookResponse
- StockNoteApiDocumentation.OrderDetails
- StockNoteApiDocumentation.OrderDetailsBO
- StockNoteApiDocumentation.OrderDetailsCO
- StockNoteApiDocumentation.OrderRequest
- StockNoteApiDocumentation.OrderRequestBO
- StockNoteApiDocumentation.OrderRequestCO
- StockNoteApiDocumentation.OrderResponse
- StockNoteApiDocumentation.OrderResponseBO
- StockNoteApiDocumentation.OrderResponseCO
- StockNoteApiDocumentation.OrderStatusResponse
- StockNoteApiDocumentation.Position
- StockNoteApiDocumentation.PositionConversionRequest
- StockNoteApiDocumentation.PositionConversionResponse
- StockNoteApiDocumentation.PositionResponse
- StockNoteApiDocumentation.PositionSquareOffListRequest
- StockNoteApiDocumentation.PositionSquareOffListResponse
- StockNoteApiDocumentation.PositionSquareOffRequest
- StockNoteApiDocumentation.PositionSummary
- StockNoteApiDocumentation.ScripDetails
- StockNoteApiDocumentation.SimpleResponse
- StockNoteApiDocumentation.StreamingMarkDataRequest
- StockNoteApiDocumentation.StreamingMarkDataResponse
- StockNoteApiDocumentation.StreamingQuoteDataRequest
- StockNoteApiDocumentation.StreamingQuoteDataResponse
- StockNoteApiDocumentation.TradeBookEntry
- StockNoteApiDocumentation.TradeBookResponse
- StockNoteApiDocumentation.TriggerOrder
- StockNoteApiDocumentation.TriggerOrdersResponse
Documentation for Authorization
All endpoints do not require authorization.