{"id":21831349,"url":"https://github.com/nodef/extra-fyers","last_synced_at":"2025-07-19T06:03:59.503Z","repository":{"id":56899858,"uuid":"459926913","full_name":"nodef/extra-fyers","owner":"nodef","description":"A Javascript interface for FYERS API.","archived":false,"fork":false,"pushed_at":"2024-09-29T07:32:48.000Z","size":565,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-19T21:31:17.486Z","etag":null,"topics":["api","cancel-order","cancel-orders","commodity-futures-charges","commodity-options-charges","connect-market-data","connect-order-update","convert-position","currency-futures-charges","currency-options-charges","derivative-type","derivative-type-description","equity-delivery-charges","extra","finance","fyers","http","market","stock","websocket"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/extra-fyers","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-16T09:04:58.000Z","updated_at":"2024-10-05T18:18:59.000Z","dependencies_parsed_at":"2024-06-21T20:21:30.755Z","dependency_job_id":"13773f7a-0a6e-4b0c-91b6-b5124f7525e4","html_url":"https://github.com/nodef/extra-fyers","commit_stats":{"total_commits":101,"total_committers":1,"mean_commits":101.0,"dds":0.0,"last_synced_commit":"dc513adb51946aab776bc67334a234e928f2c53f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-fyers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-fyers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-fyers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-fyers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodef","download_url":"https://codeload.github.com/nodef/extra-fyers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226806641,"owners_count":17685040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cancel-order","cancel-orders","commodity-futures-charges","commodity-options-charges","connect-market-data","connect-order-update","convert-position","currency-futures-charges","currency-options-charges","derivative-type","derivative-type-description","equity-delivery-charges","extra","finance","fyers","http","market","stock","websocket"],"created_at":"2024-11-27T19:09:47.804Z","updated_at":"2025-04-14T07:06:37.018Z","avatar_url":"https://github.com/nodef.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Javascript interface for FYERS API.\u003cbr\u003e\n📦 [Node.js](https://www.npmjs.com/package/extra-fyers),\n🌐 [Web](https://www.npmjs.com/package/extra-fyers.web),\n📜 [Files](https://unpkg.com/extra-fyers/),\n📰 [Docs](https://nodef.github.io/extra-fyers/).\n\n[FYERS] is one of the cheapest online stock brokers in India, that offers\ntrading in the equity (NSE, BSE), currency (NSE), and commodity segments (MCX).\nThe objective of this package is to provide a cleaner interface to [FYERS API].\nThe `http` namespace provides the same interface as FYERS HTTP API. The\n`websocket` namespace provides the same interface as FYERS WebSocket API, along\nwith parsing of binary market data. This allows you to recieve *instant*\nnotifications of *order update* and *market data*. The top namespace (global\nfunctions, classes) provide a [facade] for the HTTP and the WebSocket APIs and\nprovides additional utility functions, such as calculating charges.\n\nGlobal functions associated with FYERS API, such as `getPositions()`, are\nstateless and accept `Authorization` as the first parameter. On the other\nhand, the `Api` class includes stateful functions which do not require\nthe `Authorization` parameter (required while creating object). Note that\nthis authorization can be obtained be performing login with `loginStep1()`\nand `loginStep2()`.\n\nThe goals for the future include doing a thorough interface check, and possibly\nwriting a CLI interface. Obtaining details of symbols, including images and more\ncould be done as part of a separate package.\n\nThis package is available in both *Node.js* and *Web* formats. The web format\nis exposed as `extra_fyers` standalone variable and can be loaded from\n[jsDelivr CDN].\n\n\u003e Stability: [Experimental](https://www.youtube.com/watch?v=L1j93RnIxEo).\n\n[FYERS]: https://fyers.in\n[FYERS API]: https://myapi.fyers.in/docs/\n[facade]: https://en.wikipedia.org/wiki/Facade_pattern\n[jsDelivr CDN]: https://cdn.jsdelivr.net/npm/extra-fyers.web/index.js\n\n\u003cbr\u003e\n\n```javascript\nconst fyers = require('extra-fyers');\n\nasync function main() {\n  var appId       = '****';  // app_id recieved after creating app\n  var accessToken = '****';  // access_token recieved after login\n  var api = new fyers.Api(appId, accessToken);\n\n  // List equity and commodity fund limits.\n  console.log(await api.getFunds());\n\n  // List holdings.\n  console.log(await api.getHoldings());\n\n  // Place CNC market order for SBIN (equity) on NSE for 5 shares\n  var id = await api.placeOrder({symbol: 'NSE:SBIN-EQ', quantity: 5});\n\n  // List postions for today (should list NSE:SBIN-EQ-CNC).\n  console.log(await api.getPositions());\n\n\n  // Connect to Market data with WebSocket\n  // and recieve real-time market quotes.\n  await api.connectMarketData(quote =\u003e {\n    console.log(quote);\n  });\n  // Choose which symbols you want to subscribe to.\n  await api.subscribeMarketDepth(['NSE:SBIN-EQ']);\n\n  // Connect to Order update with WebSocket\n  // and recieve real-time order status updates.\n  await api.connectOrderUpdate(order =\u003e {\n    console.log(order);\n  });\n  // Subscribe to order status updates.\n  await api.subscribeOrderUpdate();\n}\nmain();\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n## Index\n\n| Property | Description |\n|  ----  |  ----  |\n| [exchangeDescription] | Get exchange description. |\n| [exchange] | Get exchange code. |\n| [segmentDescription] | Get segment description. |\n| [segment] | Get segment code. |\n| [positionSideDescription] | Get position side description. |\n| [positionSide] | Get position side code. |\n| [orderSideDescription] | Get order side description. |\n| [orderSide] | Get order side code. |\n| [orderSourceDescription] | Get order source description. |\n| [orderSource] | Get order source code. |\n| [orderStatusDescription] | Get order status description. |\n| [orderStatus] | Get order status code. |\n| [orderTypeDescription] | Get order type description. |\n| [orderType] | Get order type code. |\n| [orderValidityDescription] | Get order validity description. |\n| [orderValidity] | Get order validity code. |\n| [optionTypeDescription] | Get option type description. |\n| [optionType] | Get option type code. |\n| [derivativeTypeDescription] | Get derivative type description. |\n| [derivativeType] | Get derivative type code. |\n| [holdingTypeDescription] | Get holding type description. |\n| [holdingType] | Get holding type code. |\n| [productTypeDescription] | Get product type description. |\n| [productType] | Get product type code. |\n| [instrumentTypeDescription] | Get instrument type description. |\n| [instrumentType] | Get instrument type code. |\n|  |  |\n| [symbolName] | Get symbol exchange, underlying, currency-pair, or commodity name. |\n| [symbolExchange] | Get symbol exchange. |\n| [symbolSeries] | Get symbol exchange series. |\n| [symbolOptionType] | Get symbol option type. |\n| [symbolDerivativeType] | Get symbol derivative type. |\n| [symbolStrikePrice] | Get symbol strike price. |\n| [symbolToken] | Get symbol token, a unique identifier. |\n| [symbolDescription] | Get symbol description. |\n| [symbolIsin] | Get symbol ISIN. |\n| [symbolLotSize] | Get symbol minimum lot size. |\n|  |  |\n| [equityDeliveryCharges] | Get equity delivery charges. |\n| [equityIntradayCharges] | Get equity intraday charges. |\n| [equityFuturesCharges] | Get equity futures charges. |\n| [equityOptionsCharges] | Get equity options charges. |\n| [currencyFuturesCharges] | Get currency futures charges. |\n| [currencyOptionsCharges] | Get currency options charges. |\n| [commodityFuturesCharges] | Get commodity futures charges. |\n| [commodityOptionsCharges] | Get commodity options charges. |\n|  |  |\n| [loginStep1] | Get request step 1 for authorization. |\n| [loginStep2] | Get request step 2 for authorization. |\n|  |  |\n| [getProfile] | Get basic details of the client. |\n| [getFunds] | Get balance available for the user for capital as well as the commodity market. |\n| [getHoldings] | Get the equity and mutual fund holdings which the user has in this demat account. |\n|  |  |\n| [getOrder] | Get details of an order placed in the current trading day. |\n| [getOrders] | Get details of all the orders placed in the current trading day. |\n| [getPositions] | Get details of all the positions in the current trading day. |\n| [getTrades] | Get details of all the trades in the current trading day. |\n| [placeOrder] | Place an order to any exchange via Fyers. |\n| [placeOrders] | Place multiple orders to any exchange via Fyers. |\n| [modifyOrder] | Modifies an order placed on any exchange via Fyers. |\n| [modifyOrders] | Modifies orders placed on any exchange via Fyers. |\n| [cancelOrder] | Cancels an order placed on any exchange via Fyers. |\n| [cancelOrders] | Cancels orders placed on any exchange via Fyers. |\n| [exitPosition] | Exits a position on the current trading day. |\n| [exitAllPositions] | Exits all positions on the current trading day. |\n| [convertPosition] | Converts a position on the current trading day. |\n|  |  |\n| [getMarketStatus] | Get the current market status of all the exchanges and their segments. |\n| [getMarketHistory] | Get the market history for a particular symbol. |\n| [getMarketQuotes] | Get the current market quotes for a set of symbols. |\n| [getMarketDepth] | Get the current market depth for a particular symbol. |\n|  |  |\n| [getSymbolMaster] | Get all the latest symbols of all the exchanges from the symbol master files. |\n| [processSymbolMaster] | Get details of symbols from the symbol master file text. |\n| [loadSymbolMaster] | Get details of symbols from the symbol master files. |\n|  |  |\n| [generateEdisTpin] | Generate e-DIS TPIN for validating/authorising transaction. |\n| [getEdisTransactions] | Get the necessary information regarding the holdings you have on your and also the status of the holdings. |\n| [submitEdisHoldingsStep] | Redirect to CDSL page for login where you can submit your Holdings information and accordingly you can provide the same to exchange to Sell your holdings (browser only). |\n| [inquireEdisTransaction] | Inquire the information/status of the provided transaction Id for the respective holdings you have on your end. |\n|  |  |\n| [connectMarketData] | Connect to Market data URL with WebSocket. |\n| [subscribeMarketQuote] | Subscribe to market quote. |\n| [subscribeMarketDepth] | Subscribe to market depth. |\n| [unsubscribeMarketQuote] | Unsubscribe to market quote. |\n| [unsubscribeMarketDepth] | Unsubscribe to market depth. |\n| [connectOrderUpdate] | Connect to Order update URL with WebSocket. |\n| [subscribeOrderUpdate] | Subscribe to order update. |\n| [unsubscribeOrderUpdate] | Unsubscribe to order update. |\n|  |  |\n| [Api] | Stateful interface for FYERS API. |\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n## References\n\n- [FYERS API Docs](https://myapi.fyers.in/docs/)\n- [FYERS Community](https://community.fyers.in/)\n- [FYERS Detailed Charges List](https://fyers.in/charges-list/)\n- [fyers-api-v2 package](https://www.npmjs.com/package/fyers-api-v2)\n- [C# wrapper of Fyers API v2 : ArthaChitra](https://github.com/arthachitra/FyersAPI)\n- [Fyers API golang client : Rishi Anand](https://github.com/rishi-anand/fyers-go-client)\n- [The Kite Connect API Javascript client - v4](https://kite.trade/docs/kiteconnectjs/v3/index.html)\n- [Intermarket Trading System (ITS)](https://www.investopedia.com/terms/i/intermarket-trading-system.asp)\n- [What are stop loss orders and how to use them?](https://support.zerodha.com/category/trading-and-markets/margin-leverage-and-product-and-order-types/articles/what-are-stop-loss-orders-and-how-to-use-them)\n- [How to use Stoploss-limit(SL) order like a Stoploss-Market(SLM) order?](https://support.zerodha.com/category/trading-and-markets/margin-leverage-and-product-and-order-types/articles/how-to-use-sl-l-order-like-a-sl-m-order)\n- [What is disclosed quantity feature and how to use it?](https://support.zerodha.com/category/trading-and-markets/kite-web-and-mobile/articles/what-is-disclosed-quantity-feature-and-how-to-use-it)\n- [What are cover orders and how to use them?](https://support.zerodha.com/category/trading-and-markets/product-and-order-types/order/articles/what-are-cover-orders-and-how-to-use-them)\n- [What does CNC, MIS and NRML mean?](https://support.zerodha.com/category/trading-and-markets/margin-leverage-and-product-and-order-types/articles/what-does-cnc-mis-and-nrml-mean)\n- [What is UNDCUR,UNDIRC, UNDIRT, UNDIRT in CDs? And what its use](https://tradingqna.com/t/what-is-undcur-undirc-undirt-undirt-in-cds-and-what-its-use/756)\n- [Can some one tell me what is FUTIRC?](https://tradingqna.com/t/can-some-one-tell-me-what-is-futirc/34069)\n- [I want to know in nifty f \u0026 o what is futidx, futivx, futstk?](https://tradingqna.com/t/i-want-to-know-in-nifty-f-o-what-is-futidx-futivx-futstk/2367)\n- [What Is a Rally?](https://www.investopedia.com/terms/r/rally.asp)\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n[![](https://img.youtube.com/vi/AGCC-_Cuhhw/maxresdefault.jpg)](https://www.youtube.com/watch?v=AGCC-_Cuhhw)\n[![ORG](https://img.shields.io/badge/org-nodef-green?logo=Org)](https://nodef.github.io)\n[![DOI](https://zenodo.org/badge/459926913.svg)](https://zenodo.org/badge/latestdoi/459926913)\n![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/extra-fyers)\n\n[exchangeDescription]: https://nodef.github.io/extra-fyers/functions/exchangeDescription.html\n[exchange]: https://nodef.github.io/extra-fyers/functions/exchange.html\n[segmentDescription]: https://nodef.github.io/extra-fyers/functions/segmentDescription.html\n[segment]: https://nodef.github.io/extra-fyers/functions/segment.html\n[positionSideDescription]: https://nodef.github.io/extra-fyers/functions/positionSideDescription.html\n[positionSide]: https://nodef.github.io/extra-fyers/functions/positionSide.html\n[orderSideDescription]: https://nodef.github.io/extra-fyers/functions/orderSideDescription.html\n[orderSide]: https://nodef.github.io/extra-fyers/functions/orderSide.html\n[orderSourceDescription]: https://nodef.github.io/extra-fyers/functions/orderSourceDescription.html\n[orderSource]: https://nodef.github.io/extra-fyers/functions/orderSource.html\n[orderStatusDescription]: https://nodef.github.io/extra-fyers/functions/orderStatusDescription.html\n[orderStatus]: https://nodef.github.io/extra-fyers/functions/orderStatus.html\n[orderTypeDescription]: https://nodef.github.io/extra-fyers/functions/orderTypeDescription.html\n[orderType]: https://nodef.github.io/extra-fyers/functions/orderType.html\n[orderValidityDescription]: https://nodef.github.io/extra-fyers/functions/orderValidityDescription.html\n[orderValidity]: https://nodef.github.io/extra-fyers/functions/orderValidity.html\n[optionTypeDescription]: https://nodef.github.io/extra-fyers/functions/optionTypeDescription.html\n[optionType]: https://nodef.github.io/extra-fyers/functions/optionType.html\n[derivativeTypeDescription]: https://nodef.github.io/extra-fyers/functions/derivativeTypeDescription.html\n[derivativeType]: https://nodef.github.io/extra-fyers/functions/derivativeType.html\n[holdingTypeDescription]: https://nodef.github.io/extra-fyers/functions/holdingTypeDescription.html\n[holdingType]: https://nodef.github.io/extra-fyers/functions/holdingType.html\n[productTypeDescription]: https://nodef.github.io/extra-fyers/functions/productTypeDescription.html\n[productType]: https://nodef.github.io/extra-fyers/functions/productType.html\n[instrumentTypeDescription]: https://nodef.github.io/extra-fyers/functions/instrumentTypeDescription.html\n[instrumentType]: https://nodef.github.io/extra-fyers/functions/instrumentType.html\n[symbolName]: https://nodef.github.io/extra-fyers/functions/symbolName.html\n[symbolExchange]: https://nodef.github.io/extra-fyers/functions/symbolExchange.html\n[symbolSeries]: https://nodef.github.io/extra-fyers/functions/symbolSeries.html\n[symbolOptionType]: https://nodef.github.io/extra-fyers/functions/symbolOptionType.html\n[symbolDerivativeType]: https://nodef.github.io/extra-fyers/functions/symbolDerivativeType.html\n[symbolStrikePrice]: https://nodef.github.io/extra-fyers/functions/symbolStrikePrice.html\n[symbolToken]: https://nodef.github.io/extra-fyers/functions/symbolToken.html\n[symbolDescription]: https://nodef.github.io/extra-fyers/functions/symbolDescription.html\n[symbolIsin]: https://nodef.github.io/extra-fyers/functions/symbolIsin.html\n[symbolLotSize]: https://nodef.github.io/extra-fyers/functions/symbolLotSize.html\n[equityDeliveryCharges]: https://nodef.github.io/extra-fyers/functions/equityDeliveryCharges.html\n[equityIntradayCharges]: https://nodef.github.io/extra-fyers/functions/equityIntradayCharges.html\n[equityFuturesCharges]: https://nodef.github.io/extra-fyers/functions/equityFuturesCharges.html\n[equityOptionsCharges]: https://nodef.github.io/extra-fyers/functions/equityOptionsCharges.html\n[currencyFuturesCharges]: https://nodef.github.io/extra-fyers/functions/currencyFuturesCharges.html\n[currencyOptionsCharges]: https://nodef.github.io/extra-fyers/functions/currencyOptionsCharges.html\n[commodityFuturesCharges]: https://nodef.github.io/extra-fyers/functions/commodityFuturesCharges.html\n[commodityOptionsCharges]: https://nodef.github.io/extra-fyers/functions/commodityOptionsCharges.html\n[loginStep1]: https://nodef.github.io/extra-fyers/functions/loginStep1.html\n[loginStep2]: https://nodef.github.io/extra-fyers/functions/loginStep2.html\n[getProfile]: https://nodef.github.io/extra-fyers/functions/getProfile.html\n[getFunds]: https://nodef.github.io/extra-fyers/functions/getFunds.html\n[getHoldings]: https://nodef.github.io/extra-fyers/functions/getHoldings.html\n[getOrder]: https://nodef.github.io/extra-fyers/functions/getOrder.html\n[getOrders]: https://nodef.github.io/extra-fyers/functions/getOrders.html\n[getPositions]: https://nodef.github.io/extra-fyers/functions/getPositions.html\n[getTrades]: https://nodef.github.io/extra-fyers/functions/getTrades.html\n[placeOrder]: https://nodef.github.io/extra-fyers/functions/placeOrder.html\n[placeOrders]: https://nodef.github.io/extra-fyers/functions/placeOrders.html\n[modifyOrder]: https://nodef.github.io/extra-fyers/functions/modifyOrder.html\n[modifyOrders]: https://nodef.github.io/extra-fyers/functions/modifyOrders.html\n[cancelOrder]: https://nodef.github.io/extra-fyers/functions/cancelOrder.html\n[cancelOrders]: https://nodef.github.io/extra-fyers/functions/cancelOrders.html\n[exitPosition]: https://nodef.github.io/extra-fyers/functions/exitPosition.html\n[exitAllPositions]: https://nodef.github.io/extra-fyers/functions/exitAllPositions.html\n[convertPosition]: https://nodef.github.io/extra-fyers/functions/convertPosition.html\n[getMarketStatus]: https://nodef.github.io/extra-fyers/functions/getMarketStatus.html\n[getMarketHistory]: https://nodef.github.io/extra-fyers/functions/getMarketHistory.html\n[getMarketQuotes]: https://nodef.github.io/extra-fyers/functions/getMarketQuotes.html\n[getMarketDepth]: https://nodef.github.io/extra-fyers/functions/getMarketDepth.html\n[getSymbolMaster]: https://nodef.github.io/extra-fyers/functions/getSymbolMaster.html\n[processSymbolMaster]: https://nodef.github.io/extra-fyers/functions/processSymbolMaster.html\n[loadSymbolMaster]: https://nodef.github.io/extra-fyers/functions/loadSymbolMaster.html\n[generateEdisTpin]: https://nodef.github.io/extra-fyers/functions/generateEdisTpin.html\n[getEdisTransactions]: https://nodef.github.io/extra-fyers/functions/getEdisTransactions.html\n[submitEdisHoldingsStep]: https://nodef.github.io/extra-fyers/functions/submitEdisHoldingsStep.html\n[inquireEdisTransaction]: https://nodef.github.io/extra-fyers/functions/inquireEdisTransaction.html\n[connectMarketData]: https://nodef.github.io/extra-fyers/functions/connectMarketData.html\n[subscribeMarketQuote]: https://nodef.github.io/extra-fyers/functions/subscribeMarketQuote.html\n[subscribeMarketDepth]: https://nodef.github.io/extra-fyers/functions/subscribeMarketDepth.html\n[unsubscribeMarketQuote]: https://nodef.github.io/extra-fyers/functions/unsubscribeMarketQuote.html\n[unsubscribeMarketDepth]: https://nodef.github.io/extra-fyers/functions/unsubscribeMarketDepth.html\n[connectOrderUpdate]: https://nodef.github.io/extra-fyers/functions/connectOrderUpdate.html\n[subscribeOrderUpdate]: https://nodef.github.io/extra-fyers/functions/subscribeOrderUpdate.html\n[unsubscribeOrderUpdate]: https://nodef.github.io/extra-fyers/functions/unsubscribeOrderUpdate.html\n[Api]: https://nodef.github.io/extra-fyers/classes/Api.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-fyers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodef%2Fextra-fyers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-fyers/lists"}