-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocument.json
More file actions
1 lines (1 loc) · 91.1 KB
/
Copy pathdocument.json
File metadata and controls
1 lines (1 loc) · 91.1 KB
1
{"openapi":"3.0.1","info":{"title":"DhanHQ API"},"servers":[{"url":"https://api.dhan.co/v2","description":"Generated server url"}],"paths":{"/ip/modifyIP":{"put":{"tags":["IP Setup"],"summary":"modify the static IP","description":"You can use this API to modify the Primary & Secondary IP for your account. You can modify the set IP only once in a specified period","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v2/"},"operationId":"modifyIP","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIPRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIPResponse"}}}}}}},"/ip/setIP":{"post":{"tags":["IP Setup"],"summary":"static IP Setup","description":"You can use this API to set the Primary & Secondary IP to be mapped to your account in order to enable Order Placement.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v2/"},"operationId":"setIP","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIPRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIPResponse"}}}}}}},"/ip/getIP":{"get":{"tags":["IP Setup"],"summary":"get the static IP","description":"Fetch the current Primary & Secondary IP for your account.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v2/"},"operationId":"getIP","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIPDetailsResponse"}}}}}}},"/orders/{order-id}":{"get":{"tags":["Orders"],"summary":"get order by id","description":"The api allows you to retrieve the details of an order placed during the day with their last updated status, with their order id.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"getorderbyorderid","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"order-id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}}}},"put":{"tags":["Orders"],"summary":"modify pending order","description":"The api allows you modify pending order in orderbook. The fields that can be modified are price, quantity, order type & validity.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"modifyorder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"order-id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderModifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponse"}}}}}},"delete":{"tags":["Orders"],"summary":"cancel given order","description":"The api allows you to cancel a pending order using the order id","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"cancelorder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"order-id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponse"}}}}}}},"/orders":{"get":{"tags":["Orders"],"summary":"get current orders list","description":"The API lets you retrieve an array of all orders requested in a day with their last updated status.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"getorders","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderResponse"}}}}}}},"post":{"tags":["Orders"],"summary":"place an order","description":"The order request API allows you to place new order.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"placeorder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponse"}}}}}}},"/orders/slicing":{"post":{"tags":["Orders"],"summary":"place slice order","description":"The order request API allows you to place a new slice order.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"placesliceorder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderStatusResponse"}}}}}}}},"/trades":{"get":{"tags":["Orders"],"summary":"get all trades","description":"The api allows you retrieve an array of all trades executed in a day.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"getalltrades","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TradeResponse"}}}}}}}},"/trades/{order-id}":{"get":{"tags":["Orders"],"summary":"get trade by order id","description":"The api allows user to retrieve trade details using an order id. Often during partial trades or Bracket/ Cover Orders, traders get confused in reading trade from tradebook. The response of this API will include all the trades generated for a particular order id.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"gettradebyorderid","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"order-id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TradeResponse"}}}}}}}},"/trades/{from-date}/{to-date}/{page-number}":{"get":{"tags":["Orders"],"summary":"get trade history","description":"The api allows user to retrieve the trade history Often during partial trades or Bracket/ Cover Orders, traders get confused in reading trade from tradebook. The response of the api will include all the trades generated for a particular order id.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"gettradehistory","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"from-date","in":"path","description":"date format : yyyy-MM-dd","required":true,"schema":{"type":"string","description":"date format : yyyy-MM-dd"}},{"name":"to-date","in":"path","description":"date format : yyyy-MM-dd","required":true,"schema":{"type":"string","description":"date format : yyyy-MM-dd"}},{"name":"page-number","in":"path","description":"default value : 0 ","required":true,"schema":{"type":"string","description":"default value : 0 "}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TradeHistoryResponseModel"}}}}}}}},"/orders/external/{correlation-id}":{"get":{"tags":["Orders"],"summary":"get order by correlation id","description":"The api allows you to retrieve the details of an order placed during the day, with its most recent status, using a correlation id provided by the API consumer at the time of order placement. This feature is available in case the user has missed the order id for any reason.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"getorderbycorrelationid","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"correlation-id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}}}}},"/super/orders/{order-id}":{"put":{"tags":["Super Order"],"summary":"modify pending super order","description":"This API can be used to modify any leg of a Super Order till it is in PENDING or PART_TRADED state.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"modifysuperorder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"order-id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperModifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponse"}}}}}}},"/super/orders":{"get":{"tags":["Super Order"],"summary":"get current super orders list","description":"The API lets you retrieve an array of all orders with their last updated status along with legdetails.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"getsuperorders","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SuperOrderResponse"}}}}}}},"post":{"tags":["Super Order"],"summary":"place super order","description":"The order API allows you to place a new order.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"placesuperorder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperOrderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponse"}}}}}}},"/super/orders/{order-id}/{order-leg}":{"delete":{"tags":["Super Order"],"summary":"cancel super order","description":"User can cancel any leg of a super order which is PENDING using this API.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"cancelsuperorder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"order-id","in":"path","description":"Order ID of the Order being cancelled","required":true,"schema":{"type":"string","description":"Order ID of the Order being cancelled"}},{"name":"order-leg","in":"path","description":"Order Leg to be cancelled","required":true,"schema":{"type":"string","description":"Order Leg to be cancelled","enum":["ENTRY_LEG","STOP_LOSS_LEG","TARGET_LEG"]}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponse"}}}}}}},"/alerts/orders/{trigger-id}":{"get":{"tags":["Alert Order"],"summary":"get alert order","description":"Get Conditional Trigger by ID for your account, including the status of the same.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v2/"},"operationId":"getAlertOrder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"trigger-id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAlertResponse"}}}}}},"put":{"tags":["Alert Order"],"summary":"modify order alert","description":"This API can be used to modify existing Conditional Triggers, for both conditions as well as the order parameters.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v2/"},"operationId":"modifyAlertOrder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"trigger-id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertModifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertOrderResponse"}}}}}},"delete":{"tags":["Alert Order"],"summary":"delete alert Order","description":"This API can be used to delete existing Conditional Triggers.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v2/"},"operationId":"delAlertOrder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"trigger-id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponse"}}}}}}},"/alerts/orders":{"get":{"tags":["Alert Order"],"summary":"get all alert order","description":"Get a list of all Conditional Triggers for your account, including the status of the same. ","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v2/"},"operationId":"getAllAlertOrders","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetAlertResponse"}}}}}}},"post":{"tags":["Alert Order"],"summary":"place an alert order","description":"The Conditional Trigger (Alerts) API lets you define conditions (price or technical indicators) that, when met, place one or multiple orders automatically on the user’s Dhan account. It supports multiple combinations of indicators and operators along with optional webhook callbacks.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v2/"},"operationId":"alertOrder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertOrderRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertOrderResponse"}}}}}}},"/forever/orders/{order-id}":{"put":{"tags":["Forever Order"],"summary":"modify pending forever order","description":"The api allows you to modify pending forever order in orderbook. The fields that can be modified are price, quantity and order type.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"modifyforeverorder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"order-id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GttModifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GttOrderStatusResponse"}}}}}},"delete":{"tags":["Forever Order"],"summary":"cancel given forever order","description":"The api allows you to cancel existing forever order.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"cancelforeverorder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"order-id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GttOrderStatusResponse"}}}}}}},"/forever/orders":{"get":{"tags":["Forever Order"],"summary":"get forever orders list","description":"The api allows you to retrieve an array of all forever orders placed with their last updated status.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"getforeverorders","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GttOrderResponse"}}}}}}},"post":{"tags":["Forever Order"],"summary":"place forever order","description":"The order request api allows you place a new forever order.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"placeforeverorder","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GTTOrderModel"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GttOrderStatusResponse"}}}}}}},"/positions/convert":{"post":{"tags":["Portfolio"],"summary":"convert position","description":"Users can convert their open position from intraday to delivery or delivery to intraday.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"convertposition","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionConversionRequest"}}},"required":true},"responses":{"202":{"description":"Successful operation","content":{"application/json":{}}}}}},"/positions":{"get":{"tags":["Portfolio"],"summary":"get current positions","description":"Users can retrieve a list of all open positions for the day. This includes all F&O carryforward positions as well.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"getpositions","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PositionResponse"}}}}}}}},"/holdings":{"get":{"tags":["Portfolio"],"summary":"get current holdings","description":"Users can retrieve all holdings bought/sold in previous trading sessions. All T1 and delivered quantities can be fetched.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"getholdings","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HoldingResponse"}}}}}}}},"/edis/form":{"post":{"tags":["EDIS"],"summary":"generate edis form","description":"Retrieve escaped html form of CDSL and enter T-PIN to mark the stock for EDIS approval. Partner has to render this form at their end to unescape.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"edisform","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdisFormRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdisFormResponse"}}}}}}},"/edis/bulkform":{"post":{"tags":["EDIS"],"summary":"generate bulk edis form","description":"Retrieve escaped html form of CDSL and enter T-PIN to mark the stock for EDIS approval. Partner has to render this form at their end to unescape.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"bulkedisform","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdisBulkFormRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdisFormResponse"}}}}}}},"/edis/tpin":{"get":{"tags":["EDIS"],"summary":"generate edis T-pin","description":"Get T-pin on registered mobile number using this API.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"edistpin","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Successful operation","content":{"application/json":{}}}}}},"/edis/inquire/{isin}":{"get":{"tags":["EDIS"],"summary":"get edis authorized quantity","description":"The api allows user to check the edis status of the securities. User have to enter isin of the stock. An international securities identification number (ISIN) is a 12-digit alphanumeric code that uniquely identifies a specific security. You can get ISIN of portfolio stocks, in response of holdings api.Or use ALL as a special case to query all holdings' edis auth status","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"edisqtystatus","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"isin","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdisQtyStatusResponse"}}}}}}},"/killswitch":{"get":{"tags":["Trader's Control"],"summary":"kill switch status","description":"The api allows you to check killSwitch status for your account, which will disable trading for current trading day","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"KillSwitchStatus","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KillSwitchResponse"}}}}}},"post":{"tags":["Trader's Control"],"summary":"manage kill switch","description":"The api allows you to control killSwitch for your account, which will disable trading for current trading day","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"killswitch","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"killSwitchStatus","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KillSwitchResponse"}}}}}}},"/margincalculator":{"post":{"tags":["Funds"],"summary":"margin calculator","description":"Margin Calculation API lets you calculate span, exposure, var, brokerage, leverage, available margin values for any type of order and instrument.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"margincalculator","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowYourMarginReq"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowYourMarginResponse"}}}}}}},"/fundlimit":{"get":{"tags":["Funds"],"summary":"get fund limit details","description":"Get all information of your trading account like balance, margin utilised, collateral, etc.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"fundlimit","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundLimitResponse"}}}}}}},"/ledger":{"get":{"tags":["Statements"],"summary":"get ledger report","description":"The api allows user to fetch trading account ledger with all credit and debit transaction details","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"ledger","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}},{"name":"from-date","in":"query","description":"date format : yyyy-MM-dd","required":false,"schema":{"type":"string","description":"date format : yyyy-MM-dd"}},{"name":"to-date","in":"query","description":"date format : yyyy-MM-dd","required":false,"schema":{"type":"string","description":"date format : yyyy-MM-dd"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoLedgerResponse"}}}}}}},"/charts/rollingoption":{"post":{"tags":["Data API's"],"summary":"fetch expired option data","description":"Fetch minute-wise rolling option chart data of expired contracts - including OHLC, volume, IV based on strike.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v2/"},"operationId":"optionchart","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionChartRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionChartResponse"}}}}}}},"/charts/intraday":{"post":{"tags":["Data API's"],"summary":"fetch OHLC for minute timeframe","description":"Retrieve OHLC & Volume of minute candle for desired instrument for current day. This data available for all segments including futures & options.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"intradaycharts","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntradayChartsRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartsResponse"}}}}}}},"/charts/historical":{"post":{"tags":["Data API's"],"summary":"fetch OHLC for daily candle","description":"Retrieve OHLC & Volume of daily candle for desired instrument. The data for any scrip is available back upto the date of its inception.","externalDocs":{"description":"please refer the link for detailed docs","url":"https://dhanhq.co/docs/v1/"},"operationId":"historicalcharts","parameters":[{"name":"access-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoricalChartsRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartsResponse"}}}}}}}},"components":{"schemas":{"SuperModifyRequest":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| LIMIT | For Limit Order types |\n| MARKET | For market Order types |","enum":["LIMIT","MARKET"]},"legName":{"type":"string","description":"ENTRY_LEG - Entire Super Order can be modified, only when main order status is `PENDING`, TARGET_LEG STOP_LOSS_LEG","enum":["ENTRY_LEG","STOP_LOSS_LEG","TARGET_LEG"]},"quantity":{"type":"integer","description":"Quantity to be modified - only for ENTRY_LEG","format":"int32"},"price":{"type":"number","description":"Price to be modified - only for ENTRY_LEG","format":"float"},"targetPrice":{"type":"number","description":"Target Price to be modified - ENTRY_LEG or TARGET_LEG","format":"float"},"stopLossPrice":{"type":"number","description":"Stop Loss Price to be modified - ENTRY_LEG or STOP_LOSS_LEG","format":"float"},"trailingJump":{"type":"number","description":"Stop Loss Price jump to be modified - ENTRY_LEG or STOP_LOSS_LEG","format":"float"}}},"OrderStatusResponse":{"type":"object","properties":{"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"orderStatus":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|---------------------------------------------|\n| TRANSIT | Did not reach the exchange server |\n| PENDING | Reached at exchange end, awaiting execution |\n| REJECTED | Rejected at exchange/broker’s end |\n| CANCELLED | Cancelled by user |\n| PART_TRADED | Partially Executed |\n| TRADED | Executed |\n| EXPIRED | Validity of order is expired |","enum":["TRANSIT","PENDING","REJECTED","CANCELLED","PART_TRADED","TRADED","EXPIRED","MODIFIED","TRIGGERED","INACTIVE"]}}},"OrderModifyRequest":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| LIMIT | For Limit Order types |\n| MARKET | For market Order types |\n| STOP_LOSS | For Stop Loss Limit orders |\n| STOP_LOSS_MARKET | For Stop Loss Market orders |","enum":["LIMIT","MARKET","STOP_LOSS","STOP_LOSS_MARKET"]},"legName":{"type":"string","description":"Order leg where modification is to be done","enum":["ENTRY_LEG","STOP_LOSS_LEG","TARGET_LEG","NA"]},"quantity":{"type":"integer","description":"Number of shares for the order","format":"int32"},"price":{"type":"number","description":"Price at which order is placed","format":"float"},"disclosedQuantity":{"type":"integer","description":"Number of shares visible (Keep more than 30% of quantity)","format":"int32"},"triggerPrice":{"type":"number","description":"Price at which the order is triggered, in case of SL-M & SL-L","format":"float"},"validity":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|-----------------------|\n| DAY | Valid till end of day |\n| IOC | Immediate or Cancel |","enum":["DAY","IOC"]}}},"UserIPRequest":{"required":["ip","ipFlag"],"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"ip":{"type":"string","description":"User specific IP"},"ipFlag":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|-----------------------------|\n| PRIMARY | Primary IP |\n| SECONDARY | Secondary IP |"}}},"UserIPResponse":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|----------------|\n| SUCCESS | Operation was successful |\n| ERROR | Operation failed |"}}},"GttModifyRequest":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"orderFlag":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| SINGLE | For GTT Order types |\n| OCO | For OCO Order types |","enum":["SINGLE","OCO"]},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| LIMIT | For Limit Order types |\n| MARKET | For market Order types |","enum":["LIMIT","MARKET"]},"legName":{"type":"string","description":"| **Enum Values** | **Description** |\n|----------------------|-----------------------------------------------|\n| TARGET_LEG | For Target Leg |\n| STOP_LOSS_LEG | For SL leg, in case of OCO OrderType |","enum":["TARGET_LEG","STOP_LOSS_LEG"]},"quantity":{"type":"integer","description":"Number of shares for the order","format":"int32"},"price":{"type":"number","description":"Price at which order is placed","format":"float"},"disclosedQuantity":{"type":"integer","description":"Number of shares visible (Keep more than 30% of quantity)","format":"int32"},"triggerPrice":{"type":"number","description":"Price at which the order is triggered, in case of SL-M & SL-L","format":"float"},"validity":{"type":"string","description":"Valid for 1Year/Expiry"}}},"GttOrderStatusResponse":{"type":"object","properties":{"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"orderStatus":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|---------------------------------------------|\n| PENDING | Reached at exchange end, awaiting execution |\n| REJECTED | Rejected at exchange/broker’s end |\n| CANCELLED | Cancelled by user |\n| EXPIRED | Validity of order is expired |","enum":["PENDING","REJECTED","CANCELLED","EXPIRED"]}}},"AlertCondition":{"type":"object","properties":{"comparisonType":{"type":"string","description":"Type of comparison","enum":["TECHNICAL_WITH_VALUE","TECHNICAL_WITH_INDICATOR","TECHNICAL_WITH_CLOSE","LIVE_SCAN_ALERT","PRICE_WITH_VALUE","PRICE_WITH_PERCENT_CHANGE"]},"exchangeSegment":{"type":"string","description":"The exchange where the condition is checked","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM","IDX_I"]},"securityId":{"type":"string","description":"Unique identifier for the security"},"indicatorName":{"type":"string","description":"Name of the indicator","enum":["SMA_5","SMA_10","SMA_20","SMA_50","SMA_100","SMA_200","EMA_5","EMA_10","EMA_20","EMA_50","EMA_100","EMA_200","BB_UPPER","BB_LOWER","RSI_14","ATR_14","STOCHASTIC","STOCHRSI_14","MACD_26","MACD_12","MACD_HIST"]},"timeFrame":{"type":"string","description":"Time frame for technical indicators","enum":["DAY","ONE_MIN","FIVE_MIN","FIFTEEN_MIN"]},"operator":{"type":"string","description":"Comparison operator","enum":["CROSSING_UP","CROSSING_DOWN","CROSSING_ANY_SIDE","GREATER_THAN","LESS_THAN","GREATER_THAN_EQUAL","LESS_THAN_EQUAL","EQUAL","NOT_EQUAL"]},"comparingValue":{"type":"number","description":"Value to compare the indicator against","format":"float"},"comparingIndicatorName":{"type":"string","description":"Indicator on RHS (for TechnicalWithIndicator)","enum":["SMA_5","SMA_10","SMA_20","SMA_50","SMA_100","SMA_200","EMA_5","EMA_10","EMA_20","EMA_50","EMA_100","EMA_200","BB_UPPER","BB_LOWER","RSI_14","ATR_14","STOCHASTIC","STOCHRSI_14","MACD_26","MACD_12","MACD_HIST"]},"expDate":{"type":"string","description":"Expiry Date ","format":"date"},"frequency":{"type":"string","description":"Frequency of evaluation","enum":["ONCE"]},"userNote":{"type":"string","description":"User-provided note"}},"description":"Alert condition details"},"AlertModifyRequest":{"required":["alertId","condition","dhanClientId"],"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"alertId":{"type":"string","description":"Alert ID generated by Dhan"},"condition":{"$ref":"#/components/schemas/AlertCondition"},"orders":{"type":"array","description":"List of orders to execute when alert is triggered","items":{"$ref":"#/components/schemas/AlertOrder"}}}},"AlertOrder":{"required":["exchangeSegment","orderType","productType","quantity","securityId","transactionType","validity"],"type":"object","properties":{"transactionType":{"type":"string","description":"Type of transaction","enum":["BUY","SELL"]},"exchangeSegment":{"type":"string","description":"The exchange where the transaction takes place","enum":["NSE_EQ","NSE_FNO","NSE_COMM","BSE_EQ","BSE_FNO","MCX_COMM"]},"productType":{"type":"string","description":"Product type","enum":["CNC","INTRADAY","MARGIN","MTF","CO","BO"]},"orderType":{"type":"string","description":"Type of order","enum":["LIMIT","MARKET","STOP_LOSS","STOP_LOSS_MARKET"]},"securityId":{"maxLength":20,"minLength":0,"type":"string","description":"Unique identifier for the security"},"quantity":{"type":"integer","description":"Quantity of securities to trade","format":"int32"},"validity":{"type":"string","description":"Order validity","enum":["DAY","IOC"]},"price":{"type":"string","description":"Price per unit"},"discQuantity":{"type":"string","description":"Disclosed quantity"},"triggerPrice":{"type":"string","description":"Trigger price for stop-loss or trigger orders"}},"description":"List of orders to execute when alert is triggered"},"AlertOrderResponse":{"type":"object","properties":{"alertId":{"type":"string","description":"Alert ID generated by Dhan"},"alertStatus":{"type":"string","description":"| **Status** | **Description** |\n|--------------|-----------------------------------|\n| ACTIVE | Alert is currently active |\n| TRIGGERED | Alert condition has been met |\n| EXPIRED | Alert expired without triggering |\n| CANCELLED | Alert was manually cancelled |"}}},"SuperOrderRequest":{"required":["exchangeSegment","transactionType"],"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"correlationId":{"maxLength":30,"minLength":0,"type":"string","description":"The user/partner generated id for tracking back"},"transactionType":{"type":"string","description":"The trading side of transaction","enum":["BUY","SELL"]},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| NSE_COMM | NSE | Commodity |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n","enum":["NSE_EQ","NSE_FNO","NSE_COMM","BSE_EQ","BSE_FNO","MCX_COMM"]},"productType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |\n| MTF | Margin Traded Fund |\n","enum":["CNC","INTRADAY","MARGIN","MTF"]},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| LIMIT | For Limit Order types |\n| MARKET | For market Order types |","enum":["LIMIT","MARKET"]},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"quantity":{"type":"integer","description":"Number of shares for the order","format":"int32"},"price":{"type":"number","description":"Price at which order is placed","format":"float"},"targetPrice":{"type":"number","description":"Target price for the Super Order","format":"float"},"stopLossPrice":{"type":"number","description":"Stop Loss Price for the Super Order","format":"float"},"trailingJump":{"type":"number","description":"Price Jump by which Stop Loss should be trailed","format":"float"}}},"PositionConversionRequest":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"fromProductType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |","enum":["CNC","INTRADAY","MARGIN","MTF","CO","BO"]},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM"]},"positionType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|-----------------------------------------------------|\n| LONG | When net bought quantity is more than sold quantity |\n| SHORT | When net sold quantity is more than bought quantity |\n| CLOSED | When no open position standing |","enum":["LONG","SHORT","CLOSED"]},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"convertQty":{"type":"integer","description":"Number of shares for the conversion","format":"int32"},"toProductType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |","enum":["CNC","INTRADAY","MARGIN","MTF","CO","BO"]}}},"OrderRequest":{"required":["exchangeSegment","transactionType"],"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"correlationId":{"maxLength":30,"minLength":0,"type":"string","description":"The user/partner generated id for tracking back"},"transactionType":{"type":"string","description":"Signifies the type of transaction whether it's BUY or SELL","enum":["BUY","SELL"]},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| NSE_COMM | NSE | Commodity |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n","enum":["NSE_EQ","NSE_FNO","NSE_COMM","BSE_EQ","BSE_FNO","MCX_COMM"]},"productType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |\n| CO | Cover Order; entry and stop loss |\n| BO | Bracket Order; entry, stop loss & target price |\n| MTF | Margin Traded Fund |\n**CO & BO product types will be valid only for Intraday**","enum":["CNC","INTRADAY","MARGIN","MTF","CO","BO"]},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| LIMIT | For Limit Order types |\n| MARKET | For market Order types |\n| STOP_LOSS | For Stop Loss Limit orders |\n| STOP_LOSS_MARKET | For Stop Loss Market orders |","enum":["LIMIT","MARKET","STOP_LOSS","STOP_LOSS_MARKET"]},"validity":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|-----------------------|\n| DAY | Valid till end of day |\n| IOC | Immediate or Cancel |","enum":["DAY","IOC"]},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"quantity":{"type":"integer","description":"Number of shares for the order","format":"int32"},"disclosedQuantity":{"type":"integer","description":"Number shares visible in the market depth","format":"int32"},"price":{"type":"number","description":"Price at which the order is requested to execute","format":"float"},"triggerPrice":{"type":"number","description":"Price at which the order is triggered","format":"float"},"afterMarketOrder":{"type":"boolean","description":"Flag to inform that the order placed is After Market Order"},"amoTime":{"type":"string","description":"Flag to inform after what time AMO is pumped","enum":["OPEN","OPEN_30","OPEN_60","PRE_OPEN"]},"boProfitValue":{"type":"number","description":"Bracket order Target price","format":"float"},"boStopLossValue":{"type":"number","description":"Bracket Order/Cover Order Stop Loss Price","format":"float"}}},"KnowYourMarginReq":{"required":["exchangeSegment","transactionType"],"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM"]},"transactionType":{"type":"string","description":"Signifies the type of transaction whether it's BUY or SELL","enum":["BUY","SELL"]},"quantity":{"type":"integer","description":"Number of shares for the order","format":"int32"},"productType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |\n| CO | Cover Order; entry and stop loss |\n| BO | Bracket Order; entry, stop loss & target price |\n**CO & BO product types will be valid only for Intraday**","enum":["CNC","INTRADAY","MARGIN","MTF","CO","BO"]},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"price":{"type":"number","description":"Price at which the order is requested to execute","format":"float"},"triggerPrice":{"type":"number","description":"Price at which the order is requested to trigger","format":"float"}}},"KnowYourMarginResponse":{"type":"object","properties":{"totalMargin":{"type":"number","description":"Total available margin to trade","format":"float"},"spanMargin":{"type":"number","description":"Available span margin","format":"float"},"exposureMargin":{"type":"number","description":"Available exposure margin","format":"float"},"availableBalance":{"type":"number","description":"Available balance to trade","format":"float"},"variableMargin":{"type":"number","description":"Variable margin","format":"float"},"insufficientBalance":{"type":"number","description":"Insufficient balance","format":"float"},"brokerage":{"type":"number","description":"Applicable brokerage","format":"float"},"leverage":{"type":"string","description":"Applicable leverage"}}},"KillSwitchResponse":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"killSwitchStatus":{"type":"string","description":"| **Enum Values** | **Description** |\n|-------------------|------------------------|\n| ACTIVATE | KillSwitch Activated |\n| DEACTIVATE | KillSwitch Deactivated |"}}},"GTTOrderModel":{"required":["transactionType"],"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"correlationId":{"maxLength":30,"minLength":0,"type":"string","description":"The user/partner generated id for tracking back"},"orderFlag":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| SINGLE | For GTT Order types |\n| OCO | For OCO Order types |","enum":["SINGLE","OCO"]},"transactionType":{"type":"string","description":"Signifies the type of transaction whether it's BUY or SELL","enum":["BUY","SELL"]},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO"]},"productType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| MTF | Margin Traded Fund |\n| MARGIN | Carry Forward in Futures & Options |\n","enum":["CNC","MTF","MARGIN"]},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| LIMIT | For Limit Order types |\n| MARKET | For market Order types |","enum":["LIMIT","MARKET"]},"validity":{"type":"string","description":"Valid for 1Year/Expiry"},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"quantity":{"type":"integer","description":"Number of shares for the order","format":"int32"},"disclosedQuantity":{"type":"integer","description":"Number of shares visible (Keep more than 30% of quantity)","format":"int32"},"price":{"type":"number","description":"Price at which order is placed","format":"float"},"triggerPrice":{"type":"number","description":"Price at which the order is triggered","format":"float"},"price1":{"type":"number","description":"Target price for OCO order","format":"float"},"triggerPrice1":{"type":"number","description":"Target trigger price For OCO order","format":"float"},"quantity1":{"type":"integer","description":"Target Quantity for OCO order","format":"int32"}}},"EdisFormRequest":{"required":["bulk","exchange","isin","qty","segment"],"type":"object","properties":{"isin":{"type":"string"},"qty":{"minimum":1,"type":"integer","format":"int32"},"exchange":{"type":"string","enum":["NSE","BSE","MCX","ALL"]},"segment":{"type":"string","enum":["EQ","COMM","FNO"]},"bulk":{"type":"boolean"}}},"EdisFormResponse":{"type":"object","properties":{"dhanClientId":{"type":"string"},"edisFormHtml":{"type":"string"}}},"EdisBulkFormRequest":{"required":["exchange","isin","segment"],"type":"object","properties":{"isin":{"type":"array","items":{"type":"string"}},"exchange":{"type":"string","enum":["NSE","BSE","MCX","ALL"]},"segment":{"type":"string","enum":["EQ","COMM","FNO"]}}},"OptionChartRequest":{"type":"object","properties":{"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n| IDX_I | INDEX | Indices |","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM","IDX_I"]},"interval":{"type":"string","description":"Represents time interval in minute, refer charts annexure for possible values.","enum":["1","5","15","25","60"]},"securityId":{"type":"integer","description":"Underlying security Id","format":"int32"},"instrument":{"type":"string","description":"Represents the security instrument type, refer charts annexure for possible values.","enum":["INDEX","FUTIDX","OPTIDX","EQUITY","FUTSTK","OPTSTK","FUTCOM","OPTFUT"]},"expiryFlag":{"type":"string","description":"Expiry flag indicating type of expiry ","enum":["MONTH","WEEK"]},"expiryCode":{"type":"integer","description":"Expiry code value ","format":"int32","enum":[1,2,3]},"strike":{"type":"string","description":"| **Strike** | **Description** |\n|------------|----------------------------------------|\n| ATM | At The Money (default) |\n| ATM±3~3 | ±3 to ±3 strikes (all instruments) |\n| ATM±10~10 | ±10 to ±10 (only for index near expiry) |","default":"ATM"},"drvOptionType":{"type":"string","description":"Option Type","enum":["CALL","PUT"]},"requiredData":{"type":"array","description":"Requested data type ","items":{"type":"string","description":"Requested data type ","enum":["open","high","low","close","iv","volume","strike","oi","spot"]},"enum":["open","high","low","close","iv","volume","strike","oi","spot"]},"fromDate":{"type":"string","description":"Chart data request start date in format YYYY-MM-DD","format":"date"},"toDate":{"type":"string","description":"Chart data request end date in format YYYY-MM-DD","format":"date"}}},"ChartData":{"type":"object","properties":{"ce":{"$ref":"#/components/schemas/OptionChartPayload"},"pe":{"$ref":"#/components/schemas/OptionChartPayload"}},"description":"Chart data for call (ce) and put (pe) options"},"OptionChartPayload":{"type":"object","properties":{"iv":{"type":"array","description":"List of implied volatility values (IV)","items":{"type":"number","description":"List of implied volatility values (IV)","format":"double"}},"oi":{"type":"array","description":"List of open interest values (OI)","items":{"type":"integer","description":"List of open interest values (OI)","format":"int64"}},"strike":{"type":"array","description":"List of strike prices","items":{"type":"number","description":"List of strike prices","format":"double"}},"spot":{"type":"array","description":"List of spot prices","items":{"type":"number","description":"List of spot prices","format":"double"}},"open":{"type":"array","description":"List of open prices","items":{"type":"number","description":"List of open prices","format":"double"}},"high":{"type":"array","description":"List of high prices","items":{"type":"number","description":"List of high prices","format":"double"}},"low":{"type":"array","description":"List of low prices","items":{"type":"number","description":"List of low prices","format":"double"}},"close":{"type":"array","description":"List of close prices","items":{"type":"number","description":"List of close prices","format":"double"}},"volume":{"type":"array","description":"List of traded volumes","items":{"type":"integer","description":"List of traded volumes","format":"int64"}},"timestamp":{"type":"array","description":"List of timestamps in unix","items":{"type":"integer","description":"List of timestamps in unix","format":"int64"}}},"description":"Chart data for Put options, null if option_type is CE"},"OptionChartResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ChartData"}}},"IntradayChartsRequest":{"type":"object","properties":{"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n| IDX_I | INDEX | Indices |","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM","IDX_I"]},"instrument":{"type":"string","description":"Represents the security instrument type, refer charts annexure for possible values.","enum":["INDEX","FUTIDX","OPTIDX","EQUITY","FUTSTK","OPTSTK","FUTCOM","OPTFUT"]},"interval":{"type":"string","description":"Represents time interval in minute, refer charts annexure for possible values.","enum":["1","5","15","25","60"]},"oi":{"type":"boolean","description":"Open Interest Data","default":false},"fromDate":{"type":"string","description":"date format : yyyy-MM-dd"},"toDate":{"type":"string","description":"date format : yyyy-MM-dd"}}},"ChartsResponse":{"type":"object","properties":{"open":{"type":"array","description":"Array of values representing OHLC open value","items":{"type":"number","description":"Array of values representing OHLC open value","format":"double"}},"high":{"type":"array","description":"Array of values representing OHLC high value","items":{"type":"number","description":"Array of values representing OHLC high value","format":"double"}},"low":{"type":"array","description":"Array of values representing OHLC low value","items":{"type":"number","description":"Array of values representing OHLC low value","format":"double"}},"close":{"type":"array","description":"Array of values representing OHLC close value","items":{"type":"number","description":"Array of values representing OHLC close value","format":"double"}},"volume":{"type":"array","description":"Array of values representing volume","items":{"type":"number","description":"Array of values representing volume","format":"double"}},"timestamp":{"type":"array","description":"Array of values representing date times in seconds since January 01, 1980","items":{"type":"number","description":"Array of values representing date times in seconds since January 01, 1980","format":"double"}},"open_interest":{"type":"array","description":"Array of values representing open interest","items":{"type":"number","description":"Array of values representing open interest","format":"double"}}}},"HistoricalChartsRequest":{"type":"object","properties":{"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n| IDX_I | INDEX | Indices |","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM","IDX_I"]},"instrument":{"type":"string","description":"Represents the security instrument type, refer charts annexure for possible values.","enum":["INDEX","FUTIDX","OPTIDX","EQUITY","FUTSTK","OPTSTK","FUTCOM","OPTFUT"]},"expiryCode":{"type":"integer","description":"Represents the expiry code value, refer charts annexure for possible values.","format":"int32"},"oi":{"type":"boolean","description":"Open Interest Data","default":false},"fromDate":{"type":"string","description":"Chart data request start date in format YYYY-MM-DD","format":"date"},"toDate":{"type":"string","description":"Chart data request end date in format YYYY-MM-DD","format":"date"}}},"AlertOrderRequest":{"required":["condition","dhanClientId","orders"],"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"condition":{"$ref":"#/components/schemas/AlertCondition"},"orders":{"type":"array","description":"List of orders to execute when alert is triggered","items":{"$ref":"#/components/schemas/AlertOrder"}}}},"TradeResponse":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"exchangeOrderId":{"type":"string","description":"Order specific identification generated by Exchange"},"exchangeTradeId":{"type":"string","description":"Trade specific identification, generated by exchange once order is executed"},"transactionType":{"type":"string","description":"Signifies the type of transaction whether it's BUY or SELL","enum":["BUY","SELL"]},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM"]},"productType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |\n| CO | Cover Order; entry and stop loss |\n| BO | Bracket Order; entry, stop loss & target price |\n| MTF | Margin Traded Fund |\n**CO & BO product types will be valid only for Intraday**","enum":["CNC","INTRADAY","MARGIN","MTF","CO","BO"]},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| LIMIT | For Limit Order types |\n| MARKET | For market Order types |\n| STOP_LOSS | For Stop Loss Limit orders |\n| STOP_LOSS_MARKET | For Stop Loss Market orders |","enum":["LIMIT","MARKET","STOP_LOSS","STOP_LOSS_MARKET"]},"tradingSymbol":{"type":"string","description":"Exchange standard trading symbol"},"customSymbol":{"type":"string","description":"Custom trading symbol"},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"tradedQuantity":{"type":"integer","description":"Number of shares traded","format":"int32"},"tradedPrice":{"type":"number","description":"Price at which trade executed","format":"float"},"createTime":{"type":"string","description":"Record create date time"},"updateTime":{"type":"string","description":"Record update date time"},"exchangeTime":{"type":"string","description":"Time at which order reached at exchange end"},"drvExpiryDate":{"type":"string","description":"For F&O, expiry date of contract"},"drvOptionType":{"type":"string","description":"For Options, type CALL or PUT","enum":["CALL","PUT","NA"]},"drvStrikePrice":{"type":"number","description":"For Options, Strike Price","format":"float"}}},"TradeHistoryResponseModel":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"exchangeOrderId":{"type":"string","description":"Order specific identification generated by Exchange"},"exchangeTradeId":{"type":"string","description":"Trade specific identification, generated by exchange once order is executed"},"transactionType":{"type":"string","description":"Signifies the type of transaction whether it's BUY or SELL","enum":["BUY","SELL"]},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM"]},"productType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |\n| CO | Cover Order; entry and stop loss |\n| BO | Bracket Order; entry, stop loss & target price |\n| MTF | Margin Traded Fund |\n**CO & BO product types will be valid only for Intraday**","enum":["CNC","INTRADAY","MARGIN","MTF","CO","BO"]},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| LIMIT | For Limit Order types |\n| MARKET | For market Order types |\n| STOP_LOSS | For Stop Loss Limit orders |\n| STOP_LOSS_MARKET | For Stop Loss Market orders |","enum":["LIMIT","MARKET","STOP_LOSS","STOP_LOSS_MARKET"]},"customSymbol":{"type":"string","description":"Custom trading symbol"},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"tradedQuantity":{"type":"integer","description":"Number of shares traded","format":"int32"},"tradedPrice":{"type":"number","description":"Price at which trade executed","format":"float"},"isin":{"type":"string","description":"Isin Number of that scrip"},"instrument":{"type":"string","description":"Instrument of that scrip"},"sebiTax":{"type":"number","description":"SEBI tax","format":"double"},"stt":{"type":"number","description":"stt","format":"double"},"brokerageCharges":{"type":"number","description":"Brokerage Charges","format":"double"},"serviceTax":{"type":"number","description":"Service tax","format":"double"},"exchangeTransactionCharges":{"type":"number","description":"Exchange Transaction Charges","format":"double"},"stampDuty":{"type":"number","description":"Stamp duty paid on transfer of shares","format":"double"},"createTime":{"type":"string","description":"Record create date time"},"updateTime":{"type":"string","description":"Record update date time"},"exchangeTime":{"type":"string","description":"Time at which order reached at exchange end"},"drvExpiryDate":{"type":"string","description":"For F&O, expiry date of contract"},"drvOptionType":{"type":"string","description":"For Options, type CALL or PUT","enum":["CALL","PUT","NA"]},"drvStrikePrice":{"type":"number","description":"For Options, Strike Price","format":"float"}}},"SuperOrderLeg":{"type":"object","properties":{"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"legName":{"type":"string","description":"Order leg where modification is to be done","enum":["STOP_LOSS_LEG","TARGET_LEG"]},"transactionType":{"type":"string","description":"Signifies the type of transaction whether it's BUY or SELL","enum":["BUY","SELL"]},"remainingQuantity":{"type":"integer","description":"Number of shares yet to be traded for the order","format":"int32"},"price":{"type":"number","description":"Price at which the order is requested to execute for the leg","format":"float"},"orderStatus":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|---------------------------------------------|\n| PENDING | Reached at exchange end, awaiting execution |\n| PART_TRADED | Partially Executed |\n| TRIGGERED | Executed |\n| CANCELLED | Legs manually Cancelled by User |\n| EXPIRED | Validity of order is expired |","enum":["PENDING","PART_TRADED","TRIGGERED","CANCELLED","EXPIRED"]},"trailingJump":{"type":"number","description":"Price Jump by which Stop Loss should be trailed","format":"float"}},"description":"Array of Leg Details"},"SuperOrderResponse":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"exchangeOrderId":{"type":"string","description":"Order specific identification generated by Exchange"},"correlationId":{"type":"string","description":"The user/partner generated id for tracking back"},"orderStatus":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------------------------- |\n| TRANSIT | Did not reach the exchange server |\n| PENDING | Reached at exchange end, awaiting execution |\n| REJECTED | Rejected at exchange/broker’s end |\n| CANCELLED | Cancelled by user |\n| PART_TRADED | Partially Executed |\n| TRADED | Executed |\n| CLOSED | ENTRY_LEG along with its respective child legs are/is successfully traded |\n| EXPIRED | Validity of order is expired |","enum":["TRANSIT","PENDING","REJECTED","CANCELLED","PART_TRADED","TRADED","CLOSED","EXPIRED"]},"transactionType":{"type":"string","description":"The trading side of transaction","enum":["BUY","SELL"]},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n","enum":["NSE_EQ","NSE_FNO","NSE_COMM","BSE_EQ","BSE_FNO","MCX_COMM","NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM"]},"productType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |\n| MTF | Margin Traded Fund |\n","enum":["CNC","INTRADAY","MARGIN","MTF"]},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| LIMIT | For Limit Order types |\n| MARKET | For market Order types |","enum":["LIMIT","MARKET"]},"validity":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|-----------------------|\n| DAY | Valid till end of day |\n| IOC | Immediate or Cancel |","enum":["DAY","IOC"]},"tradingSymbol":{"type":"string","description":"Refer Trading Symbol in Tables"},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"quantity":{"type":"integer","description":"Number of shares for the order","format":"int32"},"remainingQuantity":{"type":"integer","description":"Quantity pending execution","format":"int32"},"ltp":{"type":"number","description":"Price at which the stock is currently trading","format":"float"},"price":{"type":"number","description":"Price at which the order is requested to execute","format":"float"},"afterMarketOrder":{"type":"boolean","description":"If the order is placed after market"},"legName":{"type":"string","description":"Leg identification","enum":["ENTRY_LEG"]},"createTime":{"type":"string","description":"Time at which the record is created"},"updateTime":{"type":"string","description":"Time at which the record is updated"},"exchangeTime":{"type":"string","description":"Time at which order reached at exchange end"},"omsErrorDescription":{"type":"string","description":"Description of error in case the order is rejected or failed"},"algoId":{"type":"string","description":"Algo id"},"legDetails":{"type":"array","description":"Array of Leg Details","items":{"$ref":"#/components/schemas/SuperOrderLeg"}},"averageTradedPrice":{"type":"number","description":"Average price at which order is traded","format":"float"},"filledQty":{"type":"integer","description":"Quantity of order traded on Exchange","format":"int32"}}},"PositionResponse":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"tradingSymbol":{"type":"string","description":"Exchange standard trading symbol"},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"positionType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|-----------------------------------------------------|\n| LONG | When net bought quantity is more than sold quantity |\n| SHORT | When net sold quantity is more than bought quantity |\n| CLOSED | When no open position standing |","enum":["LONG","SHORT","CLOSED"]},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM"]},"productType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |\n| CO | Cover Order; entry and stop loss |\n| BO | Bracket Order; entry, stop loss & target price |\n| MTF | Margin Traded Fund |\n**CO & BO product types will be valid only for Intraday**","enum":["CNC","INTRADAY","MARGIN","MTF","CO","BO"]},"buyAvg":{"type":"number","description":"Average buy price","format":"float"},"costPrice":{"type":"number","description":"Cost price","format":"float"},"buyQty":{"type":"integer","description":"Total quantity bought","format":"int32"},"sellAvg":{"type":"number","description":" Average sell price","format":"float"},"sellQty":{"type":"integer","description":"Total quantities sold","format":"int32"},"netQty":{"type":"integer","description":"buyQty minus sellQty equals netQty","format":"int32"},"realizedProfit":{"type":"number","description":"Profit or loss booked","format":"float"},"unrealizedProfit":{"type":"number","description":"Profit or loss standing for open position","format":"float"},"rbiReferenceRate":{"type":"number","description":"RBI mandated reference rate for forex","format":"float"},"multiplier":{"type":"integer","description":"Multiplying factor for currency F&O","format":"int32"},"carryForwardBuyQty":{"type":"integer","description":"Carry forward F&O long quantities","format":"int32"},"carryForwardSellQty":{"type":"integer","description":"Carry forward F&O short quantities","format":"int32"},"carryForwardBuyValue":{"type":"number","description":"Carry forward F&O long value","format":"float"},"carryForwardSellValue":{"type":"number","description":"Carry forward F&O short value","format":"float"},"dayBuyQty":{"type":"integer","description":"Quantities bought today","format":"int32"},"daySellQty":{"type":"integer","description":"Quantities sold today","format":"int32"},"dayBuyValue":{"type":"number","description":"Value of quantities bought today","format":"float"},"daySellValue":{"type":"number","description":"Value of quantities sold today","format":"float"},"drvExpiryDate":{"type":"string","description":"For F&O, expiry date of contract"},"drvOptionType":{"type":"string","description":"For Options, type CALL or PUT","enum":["CALL","PUT","NA"]},"drvStrikePrice":{"type":"number","description":"For Options, Strike Price","format":"float"},"crossCurrency":{"type":"boolean"}}},"OrderResponse":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"exchangeOrderId":{"type":"string","description":"Order specific identification generated by Exchange"},"correlationId":{"type":"string","description":"The user/partner generated id for tracking back"},"orderStatus":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|---------------------------------------------|\n| TRANSIT | Did not reach the exchange server |\n| PENDING | Reached at exchange end, awaiting execution |\n| REJECTED | Rejected at exchange/broker’s end |\n| CANCELLED | Cancelled by user |\n| PART_TRADED | Partially Executed |\n| TRADED | Executed |\n| EXPIRED | Validity of order is expired |","enum":["TRANSIT","PENDING","REJECTED","CANCELLED","PART_TRADED","TRADED","EXPIRED"]},"transactionType":{"type":"string","description":"Signifies the type of transaction whether it's BUY or SELL","enum":["BUY","SELL"]},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| BSE_FNO | BSE | Futures & Options |\n| MCX_COMM | MCX | Commodity |\n","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM"]},"productType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |\n| CO | Cover Order; entry and stop loss |\n| BO | Bracket Order; entry, stop loss & target price |\n| MTF | Margin Traded Fund |\n**CO & BO product types will be valid only for Intraday**","enum":["CNC","INTRADAY","MARGIN","MTF","CO","BO"]},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|-----------------------------|\n| LIMIT | For Limit Order types |\n| MARKET | For market Order types |\n| STOP_LOSS | For Stop Loss Limit orders |\n| STOP_LOSS_MARKET | For Stop Loss Market orders |","enum":["LIMIT","MARKET","STOP_LOSS","STOP_LOSS_MARKET"]},"validity":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|-----------------------|\n| DAY | Valid till end of day |\n| IOC | Immediate or Cancel |","enum":["DAY","IOC"]},"tradingSymbol":{"type":"string","description":"Exchange standard trading symbol"},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"quantity":{"type":"integer","description":"Number of shares for the order","format":"int32"},"disclosedQuantity":{"type":"integer","description":"Number shares visible in the market depth","format":"int32"},"price":{"type":"number","description":"Price at which the order is requested to execute","format":"float"},"triggerPrice":{"type":"number","description":"Price at which the order is triggered","format":"float"},"afterMarketOrder":{"type":"boolean","description":"Flag to inform that the order placed is After Market Order"},"boProfitValue":{"type":"number","description":"Bracket order Target price","format":"float"},"boStopLossValue":{"type":"number","description":"Bracket Order/Cover Order Stop Loss Price","format":"float"},"legName":{"type":"string","description":"Order leg where modification is to be done","enum":["ENTRY_LEG","STOP_LOSS_LEG","TARGET_LEG","NA"]},"createTime":{"type":"string","description":"Time at which the record is created"},"updateTime":{"type":"string","description":"Time at which the record is updated"},"exchangeTime":{"type":"string","description":"Time at which order reached at exchange end"},"drvExpiryDate":{"type":"string","description":"For F&O, expiry date of contract"},"drvOptionType":{"type":"string","description":"For Options, type CALL or PUT","enum":["CALL","PUT","NA"]},"drvStrikePrice":{"type":"number","description":"For Options, Strike Price","format":"float"},"omsErrorCode":{"type":"string","description":"When order is rejected or failed, omsErrorCode would be populated"},"omsErrorDescription":{"type":"string","description":"When order is rejected or failed, omsErrorDescription would be populated"},"algoId":{"type":"string","description":"Algo_ID"},"remainingQuantity":{"type":"integer","description":"Number of shares yet to be traded for the order","format":"int32"},"averageTradedPrice":{"type":"number","description":"Average price at which order is traded","format":"float"},"filledQty":{"type":"integer","description":"Filled Quantity","format":"int32"}}},"BoLedgerResponse":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"narration":{"type":"string","description":"narration"},"voucherdate":{"type":"string","description":"voucher date"},"exchange":{"type":"string","description":"exchange name"},"voucherdesc":{"type":"string","description":"voucher decscription"},"vouchernumber":{"type":"string","description":"voucher number"},"debit":{"type":"string","description":"debited amount"},"credit":{"type":"string","description":"credited amount"},"runbal":{"type":"string","description":"runnable balance"}}},"GetIPDetailsResponse":{"type":"object","properties":{"modifyDatePrimary":{"type":"string","description":"Date when secondary IP can be modified again (format: yyyy-MM-dd)"},"modifyDateSecondary":{"type":"string","description":"Date when primary IP can be modified again (format: yyyy-MM-dd)"},"primaryIP":{"type":"string","description":"Primary IP address associated with the user"},"secondaryIP":{"type":"string","description":"Secondary IP address associated with the user"}}},"HoldingResponse":{"type":"object","properties":{"exchange":{"type":"string","description":"Enum values is either NSE or BSE","enum":["NSE","BSE","MCX","ALL"]},"tradingSymbol":{"type":"string","description":"Exchange standard trading symbol"},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"isin":{"type":"string","description":"International Securities Identification Number"},"totalQty":{"type":"integer","description":"Total number of shares in holding for given stock","format":"int32"},"dpQty":{"type":"integer","description":"Quantities present in depository","format":"int32"},"t1Qty":{"type":"integer","description":"Quantities not delivered to depository","format":"int32"},"mtf_t1_qty":{"type":"integer","description":"MTF Quantities not delivered to depository","format":"int32"},"mtf_qty":{"type":"integer","description":"MTF Quantities delivered to depository","format":"int32"},"availableQty":{"type":"integer","description":"Quantities available for transactions","format":"int32"},"collateralQty":{"type":"integer","description":"Quantities placed as collateral with broker","format":"int32"},"avgCostPrice":{"type":"number","description":"Average Buy Price of total quantities","format":"float"},"lastTradedPrice":{"type":"number","description":"Last Traded Price for the scrip","format":"float"}}},"FundLimitResponse":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"availabelBalance":{"type":"number","description":"Available balance to trade","format":"float"},"sodLimit":{"type":"number","description":"Start of the day amount","format":"float"},"collateralAmount":{"type":"number","description":"Amount received against collateral","format":"float"},"receiveableAmount":{"type":"number","description":"Amount available against selling deliveries","format":"float"},"utilizedAmount":{"type":"number","description":"Amount utilised in the day","format":"float"},"blockedPayoutAmount":{"type":"number","description":"Amount blocked against payout request","format":"float"},"withdrawableBalance":{"type":"number","description":"Amount available to withdraw to bank","format":"float"}}},"GttOrderResponse":{"type":"object","properties":{"dhanClientId":{"type":"string","description":"User specific identification generated by Dhan"},"orderId":{"type":"string","description":"Order specific identification generated by Dhan"},"orderStatus":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|---------------------------------------------|\n| PENDING | Reached at exchange end, awaiting execution |\n| REJECTED | Rejected at exchange/broker’s end |\n| CANCELLED | Cancelled by user |\n| EXPIRED | Validity of order is expired |","enum":["PENDING","REJECTED","CANCELLED","EXPIRED"]},"transactionType":{"type":"string","description":"Signifies the type of transaction whether it's BUY or SELL","enum":["BUY","SELL"]},"exchangeSegment":{"type":"string","description":"| **Enums** | **Exchange** | **Segment** |\n|--------------|--------------|-------------------|\n| NSE_EQ | NSE | Equity Cash |\n| NSE_FNO | NSE | Futures & Options |\n| BSE_EQ | BSE | Equity Cash |\n| MCX_COMM | MCX | Commodity |","enum":["NSE_EQ","NSE_FNO","BSE_EQ","BSE_FNO","MCX_COMM"]},"productType":{"type":"string","description":"| **Enum Values** | **Description** |\n|-----------------|------------------------------------------------|\n| CNC | Cash & Carry for equity deliveries |\n| INTRADAY | Intraday for Equity, Futures & Options |\n| MARGIN | Carry Forward in Futures & Options |\n","enum":["CNC","INTRADAY","MARGIN"]},"orderType":{"type":"string","description":"| **Enum Values** | **Description** |\n|------------------|----------------------------------|\n| SINGLE | For Single Forever Order types |\n| OCO | For OCO Forever Order types |\n","enum":["SINGLE","OCO"]},"tradingSymbol":{"type":"string","description":"Exchange standard trading symbol"},"securityId":{"type":"string","description":"Exchange standard identification for each scrip"},"quantity":{"type":"integer","description":"Number of shares for the order","format":"int32"},"price":{"type":"number","description":"Price at which order is placed","format":"float"},"triggerPrice":{"type":"number","description":"Price at which the order is triggered","format":"float"},"legName":{"type":"string","description":"Order leg of Forever Order where modification is to be done","enum":["TARGET_LEG","STOP_LOSS_LEG"]},"createTime":{"type":"string","description":"Time at which the record is created"},"updateTime":{"type":"string","description":"Time at which the record is updated"},"exchangeTime":{"type":"string","description":"Time at which order reached at exchange end"},"drvExpiryDate":{"type":"string","description":"Contract Expiry Date for F&O"},"drvOptionType":{"type":"string","description":"Type of Option","enum":["CALL","PUT","NA"]},"drvStrikePrice":{"type":"number","description":"Strike Price for Options","format":"float"}}},"EdisQtyStatusResponse":{"type":"object","properties":{"clientId":{"type":"string"},"isin":{"type":"string"},"totalQty":{"type":"string"},"aprvdQty":{"type":"string"},"status":{"type":"string"},"remarks":{"type":"string"}}},"GetAlertResponse":{"required":["alertId","condition","createdTime","lastPrice","orders","triggeredTime"],"type":"object","properties":{"alertId":{"type":"string","description":"Alert ID generated by Dhan"},"alertStatus":{"type":"string","description":"| **Status** | **Description** |\n|--------------|-----------------------------------|\n| ACTIVE | Alert is currently active |\n| TRIGGERED | Alert condition has been met |\n| EXPIRED | Alert expired without triggering |\n| CANCELLED | Alert was manually cancelled |"},"createdTime":{"type":"string","description":"Alert Created Time","format":"date-time"},"triggeredTime":{"type":"string","description":"Alert Triggered Time","format":"date-time"},"lastPrice":{"type":"number","description":"Last Time","format":"double"},"condition":{"$ref":"#/components/schemas/AlertCondition"},"orders":{"type":"array","description":"List of orders to execute when alert is triggered","items":{"$ref":"#/components/schemas/AlertOrder"}}}}}}}