{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://api-v2.upstox.com"}],"tags":[{"name":"Login"},{"name":"User"},{"name":"Portfolio"},{"name":"Order"},{"name":"Pre Risk Checks"},{"name":"Market Quote"},{"name":"Market Quote V3"},{"name":"Market Holidays and Timings"},{"name":"Options"},{"name":"Trade Profit And Loss"},{"name":"History"},{"name":"History V3"},{"name":"History V3","description":"Historical Candle Data V3"},{"name":"Charge"},{"name":"Websocket"},{"name":"Post Trade"},{"name":"Expired Instrument"},{"name":"Instruments"},{"name":"News"}],"paths":{"/v3/order/modify":{"put":{"tags":["Order"],"operationId":"modifyOrder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyOrderRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ModifyOrderV3Response"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/order/gtt/modify":{"put":{"tags":["Order"],"summary":"Modify GTT order","description":"This API allows you to modify GTT orders.","operationId":"modifyGTTOrder","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GttModifyOrderRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GttTriggerOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/user/ip":{"get":{"tags":["User"],"operationId":"getUserIps","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserIpResponse"}}}}},"security":[{"OAUTH2":[]}]},"put":{"tags":["User"],"operationId":"updateUserIp","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserIpRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserIpResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/portfolio/convert-position":{"put":{"tags":["Portfolio"],"summary":"Convert Positions","description":"Convert the margin product of an open position","operationId":"convertPositions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertPositionRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertPositionResponse"}}}},"401":{"description":"Authorization Failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/modify":{"put":{"tags":["Order"],"summary":"Modify order","description":"This API allows you to modify an order. For modification orderId is mandatory. With orderId you need to send the optional parameter which needs to be modified. In case the optional parameters aren't sent, the default will be considered from the original order","operationId":"modifyOrder_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyOrderRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI100010 - Unknown order id | order request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/order/place":{"post":{"tags":["Order"],"operationId":"placeOrder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceOrderV3Request"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PlaceOrderV3Response"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/order/gtt/place":{"post":{"tags":["Order"],"summary":"Place GTT order","description":"This API allows you to place GTT orders.","operationId":"placeGTTOrder","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GttPlaceOrderRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GttTriggerOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/login/auth/token/request/{client_id}":{"post":{"tags":["Login"],"summary":"Init token API","description":"This API provides the initialize the generate token and it's expiry for an indie user","operationId":"initTokenRequestForIndieUser","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndieUserTokenRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1017 - API Key is required <br/>UDAPI1024 - App Secret is required <br/>","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}}}}},"/v2/user/kill-switch":{"get":{"tags":["User"],"summary":"Get kill switch status","description":"Returns the disable/enable status of all trading segments for the user.","operationId":"getKillSwitch","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1181 - The specified segment does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KillSwitchResponse"}}}}},"security":[{"OAUTH2":[]}]},"post":{"tags":["User"],"summary":"Update kill switch","description":"Enable or disable specific trading segments.","operationId":"updateKillSwitch","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KillSwitchSegmentUpdateRequest"}}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1184 - Segment status cannot be changed until all open positions are closed.\nUDAPI1185 - Cannot enable segment - cooling period is still in effect.\nUDAPI1186 - The specified segment does not exist.\nUDAPI1187 - Failed to update segment status due to an error processing open orders.\nUDAPI1188 - Invalid action. Allowed values are ENABLE and DISABLE.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KillSwitchResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/positions/exit":{"post":{"tags":["Order"],"summary":"Exit all positions","description":"This API provides the functionality to exit all the positions ","operationId":"exitPositions","parameters":[{"name":"tag","in":"query","description":"The tag associated with the positions for which the positions must be exit","required":false,"schema":{"type":"string"}},{"name":"segment","in":"query","description":"The segment for which the positions must be exit","required":false,"schema":{"type":"string"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1105 - Invalid segment. <br>UDAPI1108 - No open position available to exit.<br>UDAPI1109 - Available open positions should not be more than limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrExitMultiOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/place":{"post":{"tags":["Order"],"summary":"Place order","description":"This API allows you to place an order to the exchange via Upstox.","operationId":"placeOrder_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceOrderRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/multi/place":{"post":{"tags":["Order"],"summary":"Place multi order","description":"This API allows you to place multiple orders to the exchange via Upstox.","operationId":"placeMultiOrder","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MultiOrderRequest"}}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/login/authorization/token":{"post":{"tags":["Login"],"summary":"Get token API","description":"This API provides the functionality to obtain opaque token from authorization_code exchange and also provides the user’s profile in the same response.","operationId":"token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1017 - API Key is required <br/>UDAPI1018 - Redirect URI is required <br/>UDAPI1022 - Code is required <br/>UDAPI1023 - Grant type is required <br/>UDAPI1024 - App Secret is required <br/>","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}}}}},"/v2/charges/margin":{"post":{"tags":["Charge"],"summary":"Calculate Margin","description":"Compute Margin","operationId":"postMargin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarginRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1095 - The price must be greater than zero<br>UDAPI1096 - Quantity cannot be less than or equal to zero<br>UDAPI1097 - The quantity is required<br>UDAPI1098 - The instrument_token is of invalid format<br>UDAPI1099 - The instrument key is required<br>UDAPI1100 - The product is required<br>UDAPI1101 - The transaction_type is required<br>UDAPI1102 - The instrument limit has been exceeded<br>UDAPI1103 - Instrument key cannot be duplicated<br>UDAPI1104 - Quantity should be multiple of lot size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostMarginResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/user/get-funds-and-margin":{"get":{"tags":["User"],"summary":"Get User Fund And Margin","description":"Shows the detailed balance breakdown of the user including cash, pledged margin, available-to-trade, and unavailable-to-trade components.","operationId":"getUserFundMarginV3","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserFundMarginV3Response"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/portfolio/mtf-positions":{"get":{"tags":["Portfolio"],"summary":"Get MTF positions","description":"This API allows you to get MTF positions.","operationId":"getMtfPositions","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPositionResponse"}}}},"401":{"description":"Authorization Failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/order/gtt":{"get":{"tags":["Order"],"summary":"Get GTT order details","description":"GTT_ORDER_DESCRIPTION","operationId":"getGttOrderDetails","parameters":[{"name":"gtt_order_id","in":"query","description":"Unique identifier of the GTT order for which the order history is required","required":false,"schema":{"type":"string","pattern":"^GTT-.+$"},"example":"GTT-XX221130000253265"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetGttOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/market-quote/option-greek":{"get":{"tags":["Market Quote V3"],"summary":"Market quotes and instruments - Option Greek","description":"This API provides the functionality to retrieve the Option Greek data for one or more instruments.This API returns the Option Greek data of up to 500 instruments in one go.","operationId":"getMarketQuoteOptionGreek","parameters":[{"name":"instrument_key","in":"query","description":"Comma separated list of instrument keys","required":false,"schema":{"type":"string"},"example":"NSE_EQ|INE848E01016,NSE_EQ|INE009A01021"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1009 - symbol is required<br>UDAPI1011 - symbol is of invalid format<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMarketQuoteOptionGreekResponseV3"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/market-quote/ohlc":{"get":{"tags":["Market Quote V3"],"summary":"Market quotes and instruments - OHLC quotes","description":"This API provides the functionality to retrieve the OHLC quotes for one or more instruments.This API returns the OHLC snapshots of up to 500 instruments in one go.","operationId":"getMarketQuoteOHLCV3","parameters":[{"name":"instrument_key","in":"query","description":"Comma separated list of instrument keys","required":false,"schema":{"type":"string"},"example":"NSE_EQ|INE848E01016,NSE_EQ|INE009A01021"},{"name":"interval","in":"query","description":"Interval to get ohlc data","required":true,"schema":{"type":"string","minLength":1,"pattern":"^(1d|I1|I30)$"},"example":"1d"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1009 - symbol is required<br>UDAPI1011 - symbol is of invalid format<br>UDAPI1027 - interval is required<br>UDAPI1028 - Invalid interval<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMarketQuoteOHLCResponseV3"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/market-quote/ltp":{"get":{"tags":["Market Quote V3"],"summary":"Market quotes and instruments - LTP quotes.","description":"This API provides the functionality to retrieve the LTP quotes for one or more instruments.This API returns the LTPs of up to 500 instruments in one go.","operationId":"getLtp","parameters":[{"name":"instrument_key","in":"query","description":"Comma separated list of instrument keys","required":false,"schema":{"type":"string"},"example":"NSE_EQ|INE848E01016,NSE_EQ|INE009A01021"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1009 - symbol is required<br>UDAPI1011 - symbol is of invalid format<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMarketQuoteLastTradedPriceResponseV3"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/historical-candle/{instrumentKey}/{unit}/{interval}/{to_date}":{"get":{"tags":["History V3"],"summary":"Historical candle data","description":"Get OHLC values for all instruments for the present trading day with expanded interval options.","operationId":"getHistoricalCandleData","parameters":[{"name":"instrumentKey","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"}},{"name":"unit","in":"path","required":true,"schema":{"type":"string","pattern":"^(minutes|hours|days|weeks|months)$"}},{"name":"interval","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"to_date","in":"path","required":true,"schema":{"type":"string","pattern":"^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1015 - to_date must be greater than or equal to from_date and Date should be in valid format: yyyy-mm-dd<br>UDAPI1021 - Instrument key is of invalid format<br>UDAPI1022 - to_date is required<br>UDAPI1146 - Invalid unit<br>UDAPI1147 - Invalid interval<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHistoricalCandleResponse"}}}}}}},"/v3/historical-candle/{instrumentKey}/{unit}/{interval}/{to_date}/{from_date}":{"get":{"tags":["History V3"],"summary":"Historical candle data","description":"Get OHLC values for all instruments for the present trading day with expanded interval options","operationId":"getHistoricalCandleData_1","parameters":[{"name":"instrumentKey","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"}},{"name":"unit","in":"path","required":true,"schema":{"type":"string","pattern":"^(minutes|hours|days|weeks|months)$"}},{"name":"interval","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"to_date","in":"path","required":true,"schema":{"type":"string","pattern":"^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$"}},{"name":"from_date","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1015 - to_date must be greater than or equal to from_date and Date should be in valid format: yyyy-mm-dd<br>UDAPI1021 - Instrument key is of invalid format<br>UDAPI1022 - to_date is required<br>UDAPI1146 - Invalid unit<br>UDAPI1147 - Invalid interval<br>UDAPI1148 - Invalid date range<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHistoricalCandleResponse"}}}}}}},"/v3/historical-candle/intraday/{instrumentKey}/{unit}/{interval}":{"get":{"tags":["History V3"],"summary":"Intra day candle data","description":"Get OHLC values for all instruments for the present trading day","operationId":"getIntraDayCandleData","parameters":[{"name":"instrumentKey","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"}},{"name":"unit","in":"path","required":true,"schema":{"type":"string","pattern":"^(minutes|hours|days)$"}},{"name":"interval","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1021 - Instrument key is of invalid format<br>UDAPI1146 - Invalid unit<br>UDAPI1147 - Invalid interval<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntraDayCandleResponse"}}}}}}},"/v2/user/profile":{"get":{"tags":["User"],"summary":"Get profile","description":"This API allows to fetch the complete information of the user who is logged in including the products, order types and exchanges enabled for the user","operationId":"getProfile","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProfileResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/user/get-funds-and-margin":{"get":{"tags":["User"],"summary":"Get User Fund And Margin","description":"Shows the balance of the user in equity and commodity market.","operationId":"getUserFundMargin","parameters":[{"name":"segment","in":"query","required":false,"schema":{"type":"string","enum":["SEC","COM"]}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1019 - segment is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserFundMarginResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/trade/profit-loss/metadata":{"get":{"tags":["Trade Profit And Loss"],"summary":"Get profit and loss meta data on trades","description":"This API gives the data of the realised Profit and Loss report requested by a user","operationId":"getTradeWiseProfitAndLossMetaData","parameters":[{"name":"from_date","in":"query","description":"Date from which data needs to be fetched. from_date and to_date should fall under the same financial year as mentioned in financial_year attribute. Date in dd-mm-yyyy format","required":false,"schema":{"type":"string"},"example":"01-04-2022"},{"name":"to_date","in":"query","description":"Date till which data needs to be fetched. from_date and to_date should fall under the same financial year as mentioned in financial_year attribute. Date in dd-mm-yyyy format","required":false,"schema":{"type":"string"},"example":"31-03-2023"},{"name":"segment","in":"query","description":"Segment for which data is requested can be from the following options EQ - Equity,   FO - Futures and Options,   COM  - Commodity,   CD - Currency Derivatives","required":true,"schema":{"type":"string"},"example":"EQ"},{"name":"financial_year","in":"query","description":"Financial year for which data has been requested. Concatenation of last 2 digits of from year and to year Sample:for 2021-2022, financial_year will be 2122","required":true,"schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"example":2223}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1070 - The financial_year is required<br>UDAPI1067 - The ''segment'' is required<br>UDAPI1066 - The ''segment'' is invalid<br>UDAPI1073 - Financial year should have max length of 4<br>UDAPI1068 - The start_date is required<br>UDAPI1069 - The end_date is required<br>UDAPI1105 - The provided dates do not fall within the specified financial year","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTradeWiseProfitAndLossMetaDataResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/trade/profit-loss/data":{"get":{"tags":["Trade Profit And Loss"],"summary":"Get Trade-wise Profit and Loss Report Data","description":"This API gives the data of the realised Profit and Loss report requested by a user","operationId":"getTradeWiseProfitAndLossData","parameters":[{"name":"from_date","in":"query","description":"Date from which data needs to be fetched. from_date and to_date should fall under the same financial year as mentioned in financial_year attribute. Date in dd-mm-yyyy format","required":false,"schema":{"type":"string"},"example":"01-04-2022"},{"name":"to_date","in":"query","description":"Date till which data needs to be fetched. from_date and to_date should fall under the same financial year as mentioned in financial_year attribute. Date in dd-mm-yyyy format","required":false,"schema":{"type":"string"},"example":"31-03-2023"},{"name":"segment","in":"query","description":"Segment for which data is requested can be from the following options EQ - Equity,   FO - Futures and Options,   COM  - Commodity,   CD - Currency Derivatives","required":true,"schema":{"type":"string"},"example":"EQ"},{"name":"financial_year","in":"query","description":"Financial year for which data has been requested. Concatenation of last 2 digits of from year and to year Sample:for 2021-2022, financial_year will be 2122","required":true,"schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"example":2223},{"name":"page_number","in":"query","description":"Page Number, the pages are starting from 1","required":true,"schema":{"type":"integer","format":"int32"},"example":1},{"name":"page_size","in":"query","description":"Page size for pagination. The maximum page size value is obtained from P and L report metadata API.","required":true,"schema":{"type":"integer","format":"int32","maximum":5000,"minimum":1},"example":3000}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1070 - The financial_year is required<br>UDAPI1071 - The page_number is required<br>UDAPI1072 - The page_size is required<br>UDAPI1067 - The ''segment'' is required<br>UDAPI1066 - The ''segment'' is invalid<br>UDAPI1073 - Financial year should have max length of 4<br>UDAPI1106 - The page_size should be greater than or equal to 1<br>UDAPI1107 - The page_size should be less than or equal to 5000>br>UDAPI1105 - The given dates are not in the mentioned financial year","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTradeWiseProfitAndLossDataResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/trade/profit-loss/charges":{"get":{"tags":["Trade Profit And Loss"],"summary":"Get profit and loss on trades","description":"This API gives the charges incurred by users for their trades","operationId":"getProfitAndLossCharges","parameters":[{"name":"from_date","in":"query","description":"Date from which data needs to be fetched. from_date and to_date should fall under the same financial year as mentioned in financial_year attribute. Date in dd-mm-yyyy format","required":false,"schema":{"type":"string"},"example":"01-04-2022"},{"name":"to_date","in":"query","description":"Date till which data needs to be fetched. from_date and to_date should fall under the same financial year as mentioned in financial_year attribute. Date in dd-mm-yyyy format","required":false,"schema":{"type":"string"},"example":"31-03-2023"},{"name":"segment","in":"query","description":"Segment for which data is requested can be from the following options EQ - Equity,   FO - Futures and Options,   COM  - Commodity,   CD - Currency Derivatives","required":true,"schema":{"type":"string"},"example":"EQ"},{"name":"financial_year","in":"query","description":"Financial year for which data has been requested. Concatenation of last 2 digits of from year and to year Sample:for 2021-2022, financial_year will be 2122","required":true,"schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"example":2223}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1067 - The ''segment'' is required<br>UDAPI1066 - The ''segment'' is invalid<br>UDAPI1068 - The start_date is required<br>UDAPI1069 - The end_date is required<br>UDAPI1105 - The provided dates do not fall within the specified financial year","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProfitAndLossChargesResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/portfolio/short-term-positions":{"get":{"tags":["Portfolio"],"summary":"Get Positions","description":"Fetches the current positions for the user for the current day.","operationId":"getPositions","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPositionResponse"}}}},"401":{"description":"Authorization Failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/portfolio/long-term-holdings":{"get":{"tags":["Portfolio"],"summary":"Get Holdings","description":"Fetches the holdings which the user has bought/sold in previous trading sessions.","operationId":"getHoldings","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHoldingsResponse"}}}},"401":{"description":"Authorization Failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/trades":{"get":{"tags":["Order"],"summary":"Get trades for order","description":"Retrieve the trades executed for an order","operationId":"getTradesByOrder","parameters":[{"name":"order_id","in":"query","description":"The order ID for which the order to get order trades","required":true,"schema":{"type":"string","minLength":1,"pattern":"^[-a-zA-Z0-9]+"},"example":12345667890}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1010 - Order id accepts only alphanumeric characters and '-'.<br>UDAPI1023 - Order id is required<br>UDAPI100010 - Unknown order id | order request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTradeResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/trades/get-trades-for-day":{"get":{"tags":["Order"],"summary":"Get trades","description":"Retrieve the trades executed for the day","operationId":"getTradeHistory","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTradeResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/retrieve-all":{"get":{"tags":["Order"],"summary":"Get order book","description":"This API provides the list of orders placed by the user. The orders placed by the user is transient for a day and is cleared by the end of the trading session. This API returns all states of the orders, namely, open, pending, and filled ones.","operationId":"getOrderBook","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderBookResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/history":{"get":{"tags":["Order"],"summary":"Get order history","description":"This API provides the details of the particular order the user has placed. The orders placed by the user is transient for a day and are cleared by the end of the trading session. This API returns all states of the orders, namely, open, pending, and filled ones.\n\nThe order history can be requested either using order_id or tag.\n\nIf both the options are passed, the history of the order which precisely matches both the order_id and tag will be returned in the response.\n\nIf only the tag is passed, the history of all the associated orders which matches the tag will be shared in the response.","operationId":"getOrderDetails","parameters":[{"name":"order_id","in":"query","description":"The order reference ID for which the order history is required","required":false,"schema":{"type":"string","pattern":"^[-a-zA-Z0-9]+"},"example":12345667890},{"name":"tag","in":"query","description":"The unique tag of the order for which the order history is being requested","required":false,"schema":{"type":"string"},"example":"2qdqjppebx"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1010 - Order id accepts only alphanumeric characters and '-'<br>UDAPI1023 - Order id is required<br>UDAPI100010 - Unknown order id | order request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/details":{"get":{"tags":["Order"],"summary":"Get order details","description":"This API provides the recent detail of the particular order the user has placed. The orders placed by the user is transient for a day and are cleared by the end of the trading session.\\n\\nThe order details can be requested using order_id.\n\n","operationId":"getOrderStatus","parameters":[{"name":"order_id","in":"query","description":"The order reference ID for which the order details is required","required":false,"schema":{"type":"string","pattern":"^[-a-zA-Z0-9]+"},"example":12345667890}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1010 - Order id accepts only alphanumeric characters and '-'<br>UDAPI1023 - Order id is required<br>UDAPI100010 - Unknown order id | order request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderDetailsResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/option/contract":{"get":{"tags":["Options"],"summary":"Get option contracts","description":"This API provides the functionality to retrieve the option contracts","operationId":"getOptionContracts","parameters":[{"name":"instrument_key","in":"query","description":"Instrument key for an underlying symbol","required":true,"schema":{"type":"string"},"example":"NSE_INDEX|Nifty 50"},{"name":"expiry_date","in":"query","description":"Expiry date in format: YYYY-mm-dd","required":false,"schema":{"type":"string"},"example":"2024-02-01"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOptionContractResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/option/chain":{"get":{"tags":["Options"],"summary":"Get option chain","description":"This API provides the functionality to retrieve the option chain","operationId":"getPutCallOptionChain","parameters":[{"name":"instrument_key","in":"query","description":"Instrument key for an underlying symbol","required":true,"schema":{"type":"string"},"example":"NSE_INDEX|Nifty 50"},{"name":"expiry_date","in":"query","description":"Expiry date in format: YYYY-mm-dd","required":true,"schema":{"type":"string"},"example":"2024-02-01"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOptionChainResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/news":{"get":{"tags":["News"],"summary":"Get News","description":"Fetches news articles for the given instrument keys, or the user's current positions or holdings.","operationId":"getNews","parameters":[{"name":"category","in":"query","description":"Category of news to fetch. Allowed values: instrument_keys, positions, holdings","required":true,"schema":{"type":"string"},"example":"instrument_keys"},{"name":"instrument_keys","in":"query","description":"Comma-separated list of instrument keys. Required when category is instrument_keys.","required":false,"schema":{"type":"string"},"example":"NSE_EQ|INE002A01018,NSE_EQ|INE669E01016"},{"name":"page_number","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer","format":"int32","default":1,"maximum":100,"minimum":1},"example":1},{"name":"page_size","in":"query","description":"Number of records per page","required":false,"schema":{"type":"integer","format":"int32","default":100,"maximum":100,"minimum":1},"example":100}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1189 - Invalid category. Allowed values: instrument_keys, positions, holdings.<br>UDAPI1190 - instrument_keys is required when category is instrument_keys.<br>UDAPI1193 - News can be fetched for a maximum of 30 instrument keys per request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetNewsResponse"}}}},"401":{"description":"Authorization Failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/market/timings/{date}":{"get":{"tags":["Market Holidays and Timings"],"summary":"Get Exchange Timings on particular date","description":"This API provides the functionality to retrieve the exchange timings on particular date","operationId":"getExchangeTimings","parameters":[{"name":"date","in":"path","required":true,"schema":{"type":"string","pattern":"^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetExchangeTimingResponse"}}}}}}},"/v2/market/status/{exchange}":{"get":{"tags":["Market Holidays and Timings"],"summary":"Get Market status for particular exchange","description":"This API provides the functionality to retrieve the market status for particular exchange","operationId":"getMarketStatus","parameters":[{"name":"exchange","in":"path","required":true,"schema":{"type":"string","pattern":"^(\\s*|(?:NSE|NFO|CDS|BSE|BFO|BCD|MCX|NSCOM)+)$"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMarketStatusResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/market/holidays":{"get":{"tags":["Market Holidays and Timings"],"summary":"Get Holiday list of current year","description":"This API provides the functionality to retrieve the holiday list of current year","operationId":"getHolidays","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHolidayResponse"}}}}}}},"/v2/market/holidays/{date}":{"get":{"tags":["Market Holidays and Timings"],"summary":"Get Holiday on particular date","description":"This API provides the functionality to retrieve the holiday on particular date","operationId":"getHoliday","parameters":[{"name":"date","in":"path","required":true,"schema":{"type":"string","pattern":"^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHolidayResponse"}}}}}}},"/v2/market-quote/quotes":{"get":{"tags":["Market Quote"],"summary":"Market quotes and instruments - Full market quotes","description":"This API provides the functionality to retrieve the full market quotes for one or more instruments.This API returns the complete market data snapshot of up to 500 instruments in one go.","operationId":"getFullMarketQuote","parameters":[{"name":"symbol","in":"query","description":"Comma separated list of symbols","required":false,"deprecated":true,"schema":{"type":"string"},"example":"NSE_EQ|INE848E01016,NSE_EQ|INE848E01039"},{"name":"instrument_key","in":"query","description":"Comma separated list of instrument keys","required":false,"schema":{"type":"string"},"example":"NSE_EQ|INE848E01016,NSE_EQ|INE848E01039"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1009 - symbol is required<br>UDAPI1011 - symbol is of invalid format<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFullMarketQuoteResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/market-quote/ohlc":{"get":{"tags":["Market Quote"],"summary":"Market quotes and instruments - OHLC quotes","description":"This API provides the functionality to retrieve the OHLC quotes for one or more instruments.This API returns the OHLC snapshots of up to 1000 instruments in one go.","operationId":"getMarketQuoteOHLC","parameters":[{"name":"symbol","in":"query","description":"Comma separated list of symbols","required":false,"deprecated":true,"schema":{"type":"string"},"example":"NSE_EQ|INE848E01016,NSE_EQ|INE848E01039"},{"name":"instrument_key","in":"query","description":"Comma separated list of instrument keys","required":false,"schema":{"type":"string"},"example":"NSE_EQ|INE848E01016,NSE_EQ|INE848E01039"},{"name":"interval","in":"query","description":"Interval to get ohlc data","required":true,"schema":{"type":"string","minLength":1,"pattern":"^(1d|I1|I30)$"},"example":"1d"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1009 - symbol is required<br>UDAPI1011 - symbol is of invalid format<br>UDAPI1027 - interval is required<br>UDAPI1028 - Invalid interval<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMarketQuoteOHLCResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/market-quote/ltp":{"get":{"tags":["Market Quote"],"summary":"Market quotes and instruments - LTP quotes.","description":"This API provides the functionality to retrieve the LTP quotes for one or more instruments.This API returns the LTPs of up to 1000 instruments in one go.","operationId":"ltp","parameters":[{"name":"symbol","in":"query","description":"Comma separated list of symbols","required":false,"deprecated":true,"schema":{"type":"string"},"example":"NSE_EQ|INE848E01016,NSE_EQ|INE848E01039"},{"name":"instrument_key","in":"query","description":"Comma separated list of instrument keys","required":false,"schema":{"type":"string"},"example":"NSE_EQ|INE848E01016,NSE_EQ|INE848E01039"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1009 - symbol is required<br>UDAPI1011 - symbol is of invalid format<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMarketQuoteLastTradedPriceResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/login/authorization/dialog":{"get":{"tags":["Login"],"summary":"Authorize API","description":"This provides details on the login endpoint.","operationId":"authorize","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1018 - Redirect URI is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"302":{"description":"Successful Operation"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}}}}},"/v2/instruments/search":{"get":{"tags":["Instruments"],"summary":"Search instruments","description":"This API provides the functionality to retrieve the instrument details for searched query","operationId":"searchInstrument","parameters":[{"name":"query","in":"query","description":"natural language query","required":true,"schema":{"type":"string","minLength":1},"example":"RELIANCE 1500 PE"},{"name":"exchanges","in":"query","description":"Comma separated exchanges","required":false,"schema":{"type":"string","pattern":"^(ALL|NSE|BSE|MCX)(,(ALL|NSE|BSE|MCX))*$"},"example":"NSE,BSE,MCX"},{"name":"segments","in":"query","description":"Comma separated segments","required":false,"schema":{"type":"string","pattern":"^(ALL|EQ|FO|CURR|COMM|INDEX|OPT|FUT|OPTION_CHAIN)(,(ALL|EQ|FO|CURR|COMM|INDEX|OPT|FUT|OPTION_CHAIN))*$"},"example":"EQ,FO,CURR,COMM"},{"name":"instrument_types","in":"query","description":"Comma separated instrument types","required":false,"schema":{"type":"string"},"example":"CE,PE"},{"name":"expiry","in":"query","description":"expiry in format: yyyy-MM-dd","required":false,"schema":{"type":"string"},"example":"2025-12-28"},{"name":"atm_offset","in":"query","description":"page number greater than or equal to 1","required":false,"schema":{"type":"integer","format":"int32"},"example":2},{"name":"page_number","in":"query","description":"ATM offset number for queries like ATM, ATM+1, ATM-1, etc.","required":false,"schema":{"type":"integer","format":"int32","default":1},"example":1},{"name":"records","in":"query","description":"no of records in a single page","required":false,"schema":{"type":"integer","format":"int32","default":10},"example":20}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchInstrumentResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/historical-candle/{instrumentKey}/{interval}/{to_date}":{"get":{"tags":["History"],"summary":"Historical candle data","description":"Get OHLC values for all instruments across various timeframes. Historical data can be fetched for the following durations.\n1minute: last 1 month candles till endDate\n30minute: last 1 year candles till endDate\nday: last 1 year candles till endDate\nweek: last 10 year candles till endDate\nmonth: last 10 year candles till endDate","operationId":"getHistoricalCandleData_2","parameters":[{"name":"instrumentKey","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"}},{"name":"interval","in":"path","required":true,"schema":{"type":"string","pattern":"^(1minute|30minute|day|week|month)$"}},{"name":"to_date","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1015 - to_date must be greater than or equal to from_date and Date should be in valid format: yyyy-mm-dd<br>UDAPI1020 - Interval accepts one of (1minute,30minute,day,week,month)<br>UDAPI1021 - Instrument key is of invalid format<br>UDAPI1022 - to_date is required<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHistoricalCandleResponse"}}}}}}},"/v2/historical-candle/{instrumentKey}/{interval}/{to_date}/{from_date}":{"get":{"tags":["History"],"summary":"Historical candle data","description":"Get OHLC values for all instruments across various timeframes. Historical data can be fetched for the following durations.\n1minute: last 1 month candles till endDate\n30minute: last 1 year candles till endDate\nday: last 1 year candles till endDate\nweek: last 10 year candles till endDate\nmonth: last 10 year candles till endDate","operationId":"getHistoricalCandleData_3","parameters":[{"name":"instrumentKey","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"}},{"name":"interval","in":"path","required":true,"schema":{"type":"string","pattern":"^(1minute|30minute|day|week|month)$"}},{"name":"to_date","in":"path","required":true,"schema":{"type":"string"}},{"name":"from_date","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1015 - to_date must be greater than or equal to from_date and Date should be in valid format: yyyy-mm-dd<br>UDAPI1020 - Interval accepts one of (1minute,30minute,day,week,month)<br>UDAPI1021 - Instrument key is of invalid format<br>UDAPI1022 - to_date is required<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHistoricalCandleResponse"}}}}}}},"/v2/historical-candle/intraday/{instrumentKey}/{interval}":{"get":{"tags":["History"],"summary":"Intra day candle data","description":"Get OHLC values for all instruments for the present trading day","operationId":"getIntraDayCandleData_1","parameters":[{"name":"instrumentKey","in":"path","required":true,"schema":{"type":"string","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"}},{"name":"interval","in":"path","required":true,"schema":{"type":"string","pattern":"^(1minute|30minute)$"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1076 - Interval accepts one of (1minute,30minute)<br>UDAPI1021 - Instrument key is of invalid format<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntraDayCandleResponse"}}}}}}},"/v2/feed/portfolio-stream-feed":{"get":{"tags":["Websocket"],"summary":"Portfolio Stream Feed","description":"This API redirects the client to the respective socket endpoint to receive Portfolio updates.","operationId":"getPortfolioStreamFeed","parameters":[{"name":"update_types","in":"query","description":"Identifiers separated by commas denote the types of updates to receive.","required":false,"schema":{"type":"string","pattern":"^(order|gtt_order|position|holding)(,(order|gtt_order|position|holding))*$"},"example":"order,gtt_order,position,holding"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"302":{"description":"Location for authorized access of portfolio stream feed"}},"security":[{"OAUTH2":[]}]}},"/v2/feed/portfolio-stream-feed/authorize":{"get":{"tags":["Websocket"],"summary":"Portfolio Stream Feed Authorize","description":" This API provides the functionality to retrieve the socket endpoint URI for Portfolio updates.","operationId":"getPortfolioStreamFeedAuthorize","parameters":[{"name":"update_types","in":"query","description":"Identifiers separated by commas denote the types of updates to receive.","required":false,"schema":{"type":"string","pattern":"^(order|gtt_order|position|holding)(,(order|gtt_order|position|holding))*$"},"example":"order,gtt_order,position,holding"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsocketAuthRedirectResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/feed/market-data-feed":{"get":{"tags":["Websocket"],"summary":"Market Data Feed","description":" This API redirects the client to the respective socket endpoint to receive Market updates.","operationId":"getMarketDataFeed","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"302":{"description":"Location for authorized access of market data feed"}},"security":[{"OAUTH2":[]}]}},"/v2/feed/market-data-feed/authorize":{"get":{"tags":["Websocket"],"summary":"Market Data Feed Authorize","description":"This API provides the functionality to retrieve the socket endpoint URI for Market updates.","operationId":"getMarketDataFeedAuthorize","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsocketAuthRedirectResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/expired-instruments/option/contract":{"get":{"tags":["Expired Instrument"],"summary":"Get expired option contracts","description":"This API provides the functionality to retrieve the expired option contracts","operationId":"getExpiredOptionContracts","parameters":[{"name":"instrument_key","in":"query","description":"Instrument key for an underlying symbol","required":true,"schema":{"type":"string","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"},"example":"NSE_INDEX|Nifty 50"},{"name":"expiry_date","in":"query","description":"Expiry date in format: YYYY-mm-dd","required":true,"schema":{"type":"string","pattern":"^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$"},"example":"2024-02-01"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOptionContractResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/expired-instruments/historical-candle/{expired_instrument_key}/{interval}/{to_date}/{from_date}":{"get":{"tags":["Expired Instrument"],"summary":"Expired Historical candle data","description":"Get Expired OHLC values for all instruments across various timeframes. Expired Historical data can be fetched for the following durations.\n1minute: last 1 month candles till endDate\n30minute: last 1 year candles till endDate\nday: last 1 year candles till endDate\nweek: last 10 year candles till endDate\nmonth: last 10 year candles till endDate","operationId":"getExpiredHistoricalCandleData","parameters":[{"name":"expired_instrument_key","in":"path","description":"Expired Instrument Key of asset","required":true,"schema":{"type":"string","pattern":"^(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w\\d\\-]+\\|(0[1-9]|[12]\\d|3[01])-(0[1-9]|1[012])-(\\d{4})$"},"example":"NSE_EQ|INE848E01016|24-04-2025"},{"name":"interval","in":"path","description":"Interval to get expired ohlc data","required":true,"schema":{"type":"string","pattern":"^(1minute|3minute|5minute|15minute|30minute|day)$"},"example":"day"},{"name":"to_date","in":"path","description":"to date","required":true,"schema":{"type":"string","pattern":"^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$"},"example":"2025-01-01"},{"name":"from_date","in":"path","description":"from date","required":true,"schema":{"type":"string","pattern":"^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$"},"example":"2024-01-01"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1015 - to_date must be greater than or equal to from_date and Date should be in valid format: yyyy-mm-dd<br>UDAPI1020 - Interval accepts one of (1minute,30minute,day,week,month)<br>UDAPI1021 - Instrument key is of invalid format<br>UDAPI1022 - to_date is required<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetHistoricalCandleResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/expired-instruments/future/contract":{"get":{"tags":["Expired Instrument"],"summary":"Expired instruments - Get future contracts","description":"This API provides the functionality to retrieve expired future contracts for a given instrument key and expiry date.","operationId":"getExpiredFutureContracts","parameters":[{"name":"instrument_key","in":"query","description":"Instrument Key of asset","required":true,"schema":{"type":"string","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"},"example":"NSE_EQ|INE848E01016"},{"name":"expiry_date","in":"query","description":"Expiry date of the instrument","required":true,"schema":{"type":"string","pattern":"^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$"},"example":"2023-10-05"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1009 - instrument_key is required<br>UDAPI1011 - instrument_key is of invalid format<br>UDAPI100011 - Invalid Instrument key<br>","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetExpiredFuturesContractResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/expired-instruments/expiries":{"get":{"tags":["Expired Instrument"],"summary":"Expired instruments - Get expiries","description":"This API provides the functionality to retrieve expiry dates for a given instrument key.","operationId":"getExpiriesResponse","parameters":[{"name":"instrument_key","in":"query","description":"Instrument Key of asset","required":true,"schema":{"type":"string","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"},"example":"NSE_EQ|INE848E01016"}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1009 - instrument_key is required<br>UDAPI1011 - instrument_key is of invalid format<br>UDAPI100011 - Invalid Instrument key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetExpiriesResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/charges/historical-trades":{"get":{"tags":["Post Trade"],"summary":"Get historical trades","description":"This API retrieves the trade history for a specified time interval.","operationId":"getTradesByDateRange","parameters":[{"name":"segment","in":"query","description":"Segment for which data is requested can be from the following options EQ - Equity,   FO - Futures and Options,   COM  - Commodity,   CD - Currency Derivatives MF - Mutual Funds","required":false,"schema":{"type":"string","default":""},"example":"EQ"},{"name":"start_date","in":"query","description":"Date from which trade history needs to be fetched. Date in YYYY-mm-dd format","required":true,"schema":{"type":"string"},"example":"2022-04-01"},{"name":"end_date","in":"query","description":"Date till which history needs needs to be fetched. Date in YYYY-mm-dd format","required":true,"schema":{"type":"string"},"example":"2023-03-31"},{"name":"page_number","in":"query","description":"Page number for which you want to fetch trade history ","required":true,"schema":{"type":"integer","format":"int32","minimum":1},"example":1},{"name":"page_size","in":"query","description":"How many records you want for a page ","required":true,"schema":{"type":"integer","format":"int32","maximum":5000,"minimum":1},"example":100}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TradeHistoryResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/charges/brokerage":{"get":{"tags":["Charge"],"summary":"Brokerage details","description":"Compute Brokerage Charges","operationId":"getBrokerage","parameters":[{"name":"instrument_token","in":"query","description":"Key of the instrument","required":true,"schema":{"type":"string","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"},"example":"NSE_EQ|INE848E01016"},{"name":"quantity","in":"query","description":"Quantity with which the order is to be placed","required":true,"schema":{"type":"integer","format":"int32","minimum":0},"example":10},{"name":"product","in":"query","description":"Product with which the order is to be placed","required":true,"schema":{"type":"string"},"example":"I"},{"name":"transaction_type","in":"query","description":"Indicates whether its a BUY or SELL order","required":true,"schema":{"type":"string"},"example":"BUY"},{"name":"price","in":"query","description":"Price with which the order is to be placed","required":true,"schema":{"type":"number","format":"float","minimum":0},"example":123.1}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1060 - The quantity is required<br>UDAPI1061 - The price is required<br>UDAPI1062 - The transaction_type is required<br> UDAPI1063 - The product is required<br> UDAPI1064 - The quantity cannot be zero<br>UDAPI1065 - The price cannot be zero<br>UDAPI1059 - The instrument_token is of invalid format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBrokerageResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/order/gtt/cancel":{"delete":{"tags":["Order"],"summary":"Cancel GTT order","description":"This API allows you to cancel GTT orders.","operationId":"cancelGTTOrder","parameters":[{"name":"Origin","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GttCancelOrderRequest"}}},"required":true},"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GttTriggerOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v3/order/cancel":{"delete":{"tags":["Order"],"operationId":"cancelOrder","parameters":[{"name":"order_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"pattern":"^[-a-zA-Z0-9]+"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CancelOrderV3Response"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/multi/cancel":{"delete":{"tags":["Order"],"summary":"Cancel multi order","description":"API to cancel all the open or pending orders which can be applied to both AMO and regular orders.","operationId":"cancelMultiOrder","parameters":[{"name":"tag","in":"query","description":"The tag associated with the orders for which the orders must be cancelled","required":false,"schema":{"type":"string"}},{"name":"segment","in":"query","description":"The segment for which the orders must be cancelled","required":false,"schema":{"type":"string"}}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1105 - Invalid segment<br>UDAPI1108 - No open or pending order available<br>UDAPI1109 - Available open or pending orders should not be more than limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrExitMultiOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/order/cancel":{"delete":{"tags":["Order"],"summary":"Cancel order","description":"Cancel order API can be used for two purposes:\nCancelling an open order which could be an AMO or a normal order\nIt is also used to EXIT a CO or OCO(bracket order)","operationId":"cancelOrder_1","parameters":[{"name":"order_id","in":"query","description":"The order ID for which the order must be cancelled","required":true,"schema":{"type":"string","minLength":1,"pattern":"^[-a-zA-Z0-9]+"},"example":12345667890}],"responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"UDAPI1010 - Order id accepts only alphanumeric characters and '-'.<br>UDAPI1023 - Order id is required<br>UDAPI100010 - Unknown order id | order request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderResponse"}}}}},"security":[{"OAUTH2":[]}]}},"/v2/logout":{"delete":{"tags":["Login"],"summary":"Logout","description":"Logout","operationId":"logout","responses":{"405":{"description":"Method Not Allowed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiGatewayErrorResponse"}}}},"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutResponse"}}}},"401":{"description":"Authorization Failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientException"}}}}},"security":[{"OAUTH2":[]}]}}},"components":{"schemas":{"ApiGatewayErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"errors":{"type":"array","items":{"$ref":"#/components/schemas/Problem"}}}},"Problem":{"type":"object","properties":{"errorCode":{"type":"string","deprecated":true,"description":"Unique code for the error state"},"message":{"type":"string","description":"Verbose message for the error state"},"propertyPath":{"type":"string","deprecated":true,"description":"Path to property failing validation"},"invalidValue":{"deprecated":true,"description":"Invalid value for the property failing validation"},"error_code":{"type":"string"},"property_path":{"type":"string"},"invalid_value":{}}},"ModifyOrderRequest":{"type":"object","properties":{"quantity":{"type":"integer","format":"int32","description":"Quantity with which the order was placed","example":1},"validity":{"type":"string","description":"Order validity (DAY- Day and IOC- Immediate or Cancel (IOC) order)","enum":["DAY","IOC"],"example":"DAY"},"price":{"type":"number","format":"float","description":"Price at which the order was placed","example":120.01},"order_id":{"type":"string","description":"The order ID for which the order must be modified","example":1644490272000},"order_type":{"type":"string","description":"Type of order. It can be one of the following\nMARKET refers to market order\nLIMILT refers to Limit Order\nSL refers to Stop Loss Limit\nSL-M refers to Stop Loss Market","enum":["MARKET","LIMIT","SL","SL-M"],"example":"MARKET"},"disclosed_quantity":{"type":"integer","format":"int32","description":"The quantity that should be disclosed in the market depth","example":0},"trigger_price":{"type":"number","format":"float","description":"If the order is a stop loss order then the trigger price to be set is mentioned here","example":0}},"required":["order_id","order_type","price","trigger_price","validity"]},"ModifyOrderData":{"type":"object","properties":{"order_id":{"type":"string","description":"Order ID","example":1644490272000,"readOnly":true}}},"ModifyOrderV3Response":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/ModifyOrderData"},"metadata":{"$ref":"#/components/schemas/OrderMetadata"}}},"OrderMetadata":{"type":"object","properties":{"latency":{"type":"integer","format":"int64"}}},"GttModifyOrderRequest":{"type":"object","properties":{"type":{"type":"string","description":"Type of GTT order. It can be one of the following:\nSINGLE refers to a single-leg GTT order\nMULTIPLE refers to a multi-leg GTT order","enum":["SINGLE","MULTIPLE"],"example":"SINGLE"},"quantity":{"type":"integer","format":"int32","description":"Quantity with which the order is to be placed","example":1},"rules":{"type":"array","description":"List of rules defining the conditions for each leg in the GTT order","items":{"$ref":"#/components/schemas/GttRule"}},"gtt_order_id":{"type":"string","description":"Unique identifier of the GTT order to be modified","example":"GTT-12345678","pattern":"^GTT-.+$"}},"required":["gtt_order_id","quantity","rules","type"]},"GttRule":{"type":"object","properties":{"strategy":{"type":"string","description":"Defines the strategy for the GTT order leg:\nENTRY - First leg order\nSTOPLOSS - Stop-loss order\nTARGET - Target order","enum":["ENTRY","STOPLOSS","TARGET"],"example":"ENTRY"},"trigger_type":{"type":"string","description":"Trigger type for each leg of the order","enum":["ABOVE","BELOW","IMMEDIATE"],"example":"ABOVE"},"trigger_price":{"type":"number","format":"double","description":"Trigger price for the GTT order leg","example":1500.5},"trailing_gap":{"type":"number","format":"double","description":"Optional parameter defining the trailing gap for the GTT order","example":0.5},"market_protection":{"type":"number","format":"double","description":"Optional parameter defining the market protection percentage for the GTT order","example":3,"maximum":25,"minimum":-1}},"required":["strategy","trigger_price","trigger_type"]},"GttOrderData":{"type":"object","properties":{"gtt_order_ids":{"type":"array","description":"Order ID for the placed GTT order","example":"GTT-221130000253265","items":{"type":"string"},"readOnly":true}}},"GttTriggerOrderResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/GttOrderData","description":"Response data for GTT order request"},"metadata":{"$ref":"#/components/schemas/OrderMetadata"}}},"UpdateUserIpRequest":{"type":"object","properties":{"primary_ip":{"type":"string"},"secondary_ip":{"type":"string"}}},"FamilyMemberData":{"type":"object","properties":{"user_id":{"type":"string"},"name":{"type":"string"}}},"UserIpResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/UserIpResponseData","description":"Current IP configuration."}}},"UserIpResponseData":{"type":"object","properties":{"primary_ip":{"type":"string"},"secondary_ip":{"type":"string"},"primary_ip_updated_at":{"type":"string","description":"ISO-8601 timestamp when primary IP was last changed."},"secondary_ip_updated_at":{"type":"string","description":"ISO-8601 timestamp when secondary IP was last changed."},"primary_ip_family_members":{"type":"array","items":{"$ref":"#/components/schemas/FamilyMemberData"}},"secondary_ip_family_members":{"type":"array","items":{"$ref":"#/components/schemas/FamilyMemberData"}},"access_tokens_invalidated":{"type":"boolean"}}},"ConvertPositionRequest":{"type":"object","properties":{"instrument_token":{"type":"string","description":"Key of the instrument","example":151064324},"new_product":{"type":"string","description":"Indicates the new product to use for the convert positions","enum":["I","D","CO","OCO","MTF"],"example":"D"},"old_product":{"type":"string","description":"Indicates the old product to use for the convert positions","enum":["I","D","CO","OCO","MTF"],"example":"I"},"transaction_type":{"type":"string","description":"Indicates whether its a buy(b) or sell(s) order","enum":["BUY","SELL"],"example":"BUY"},"quantity":{"type":"integer","format":"int32","description":"Quantity with which the position to convert","example":1}},"required":["instrument_token","new_product","old_product","quantity","transaction_type"]},"ConvertPositionData":{"type":"object","properties":{"status":{"type":"string","description":"Status message for convert position request","example":"complete","readOnly":true}}},"ConvertPositionResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/ConvertPositionData","description":"Response data for convert position request"},"errors":{"type":"array","description":"Error details for convert position request","items":{"$ref":"#/components/schemas/Problem"}}}},"ModifyOrderResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/ModifyOrderData","description":"Response data for modify order request"}}},"PlaceOrderV3Request":{"type":"object","properties":{"quantity":{"type":"integer","format":"int32","description":"Quantity with which the order is to be placed","example":1},"product":{"type":"string","description":"Signifies if the order was either Intraday, Delivery, CO or OCO","enum":["I","D"],"example":"D"},"validity":{"type":"string","description":"It can be one of the following - DAY(default), IOC","enum":["DAY","IOC"],"example":"DAY"},"price":{"type":"number","format":"float","description":"Price at which the order will be placed","example":0},"tag":{"type":"string","maxLength":40,"minLength":0},"slice":{"type":"boolean"},"instrument_token":{"type":"string","description":"Key of the instrument","example":"NSE_EQ|INE848E01016"},"order_type":{"type":"string","description":"Type of order. It can be one of the following\nMARKET refers to market order\nLIMIT refers to Limit Order\nSL refers to Stop Loss Limit\nSL-M refers to Stop Loss Market","enum":["MARKET","LIMIT","SL","SL-M"],"example":"MARKET"},"transaction_type":{"type":"string","description":"Indicates whether its a buy or sell order","enum":["BUY","SELL"],"example":"BUY"},"disclosed_quantity":{"type":"integer","format":"int32","description":"The quantity that should be disclosed in the market depth","example":0},"trigger_price":{"type":"number","format":"float","description":"If the order is a stop loss order then the trigger price to be set is mentioned here","example":0},"is_amo":{"type":"boolean","description":"Signifies if the order is an After Market Order","example":false}},"required":["disclosed_quantity","instrument_token","is_amo","order_type","price","product","quantity","transaction_type","trigger_price","validity"]},"MultiOrderV3Data":{"type":"object","properties":{"order_ids":{"type":"array","items":{"type":"string"}}}},"PlaceOrderV3Response":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/MultiOrderV3Data"},"metadata":{"$ref":"#/components/schemas/OrderMetadata"}}},"GttPlaceOrderRequest":{"type":"object","properties":{"type":{"type":"string","description":"Type of GTT order. It can be one of the following:\nSINGLE refers to a single-leg GTT order\nMULTIPLE refers to a multi-leg GTT order","enum":["SINGLE","MULTIPLE"],"example":"SINGLE"},"quantity":{"type":"integer","format":"int32","description":"Quantity with which the order is to be placed","example":1},"product":{"type":"string","description":"Signifies if the order was either Intraday, Delivery or MTF","enum":["I","D","MTF"],"example":"D"},"rules":{"type":"array","description":"List of rules defining the conditions for each leg in the GTT order","items":{"$ref":"#/components/schemas/GttRule"}},"instrument_token":{"type":"string","description":"Key of the instrument","example":"NSE_EQ|INE848E01016"},"transaction_type":{"type":"string","description":"Indicates whether its a buy or sell order","enum":["BUY","SELL"],"example":"BUY"}},"required":["instrument_token","product","quantity","rules","transaction_type","type"]},"IndieUserTokenRequest":{"type":"object","properties":{"client_id":{"type":"string","description":"OAuth API key that is a public identifier for app"},"client_secret":{"type":"string","description":"OAuth client secret that is a private secret known only to app and authorization server"},"otp_verification_disabled":{"type":"boolean","description":"To enable/disable otp auth flow"}}},"TokenResponse":{"type":"object","properties":{"email":{"type":"string","description":"E-mail address of the user","example":"client@email.com","readOnly":true},"exchanges":{"type":"array","description":"Lists the exchanges to which the user has access","example":"NSE","items":{"type":"string","enum":["NSE","NFO","CDS","BSE","BFO","BCD","MCX","NSCOM"]},"readOnly":true},"products":{"type":"array","description":"Lists the products types to which the user has access","example":"D","items":{"type":"string","enum":["I","D","CO","OCO","MTF"]},"readOnly":true},"broker":{"type":"string","description":"The broker ID","example":"UPSTOX","readOnly":true},"user_id":{"type":"string","description":"Uniquely identifies the user","example":202251,"readOnly":true},"user_name":{"type":"string","description":"Name of the user","example":"client","readOnly":true},"order_types":{"type":"array","description":"Order types enabled for the user","example":"LIMIT","items":{"type":"string","enum":["MARKET","LIMIT","SL","SL-M"]},"readOnly":true},"user_type":{"type":"string","description":"\t\nIdentifies the user's registered role at the broker. This will be individual for all retail users","example":"individual","readOnly":true},"poa":{"type":"boolean","description":"\t\nTo depict if the user has given power of attorney for transactions","example":true,"readOnly":true},"ddpi":{"type":"boolean","description":"\t\nIndicates if DDPI is enabled for trading","example":true,"readOnly":true},"is_active":{"type":"boolean","description":"\t\nWhether the status of account is active or not","example":true,"readOnly":true},"access_token":{"type":"string","description":"The authentication token that is to used with every subsequent API requests","readOnly":true},"extended_token":{"type":"string","description":"An extended authentication token with a prolonged validity period, intended for specific API requests. Ensure you use this token only with the designated set of APIs.","readOnly":true},"expires_in":{"type":"integer","format":"int32","description":"The number of seconds until the access token expires","readOnly":true},"token_type":{"type":"string","description":"The type of token","readOnly":true},"refresh_token":{"type":"string","description":"The refresh token that can be used to refresh the access token","readOnly":true},"refresh_token_expires_in":{"type":"integer","format":"int32","description":"The number of seconds until the refresh token expires","readOnly":true}}},"KillSwitchSegmentUpdateRequest":{"type":"object","properties":{"segment":{"type":"string","enum":["BSE_EQ","NSE_EQ","NCD_FO","BCD_FO","NSE_FO","BSE_FO","BSE_MF","MCX_FO","NSE_COM"]},"action":{"type":"string","enum":["ENABLE","DISABLE"]}},"required":["action","segment"]},"KillSwitchResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/KillSwitchSegmentData"}}}},"KillSwitchSegmentData":{"type":"object","properties":{"segment":{"type":"string"},"segment_status":{"type":"string","enum":["ACTIVE","INACTIVE"]},"kill_switch_enabled":{"type":"boolean"}}},"BatchExecutionSummary":{"type":"object","properties":{"total":{"type":"integer","format":"int32","description":"The total number of order lines present in the payload.","example":3,"readOnly":true},"success":{"type":"integer","format":"int32","description":"The number of order lines that were successfully placed without any errors.","example":2,"readOnly":true},"error":{"type":"integer","format":"int32","description":"The number of order lines that encountered errors during processing, despite their payloads being valid.","example":1,"readOnly":true}}},"CancelOrExitMultiOrderData":{"type":"object","properties":{"order_ids":{"type":"array","description":"Reference order IDs","example":"['1644490272000']","items":{"type":"string"},"readOnly":true}}},"CancelOrExitMultiOrderResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/CancelOrExitMultiOrderData","description":"Response data for cancel or exit order request"},"errors":{"type":"array","description":"Error data for cancel or exit order request","items":{"$ref":"#/components/schemas/CancelOrExitOrderErrorData"}},"summary":{"$ref":"#/components/schemas/BatchExecutionSummary","description":"Execution summary for cancel or exit order request"}}},"CancelOrExitOrderErrorData":{"type":"object","properties":{"errorCode":{"type":"string","deprecated":true,"description":"Unique code for the error state"},"message":{"type":"string","description":"Verbose message for the error state"},"propertyPath":{"type":"string","deprecated":true,"description":"Path to property failing validation"},"invalidValue":{"deprecated":true,"description":"Invalid value for the property failing validation"},"error_code":{"type":"string"},"property_path":{"type":"string"},"invalid_value":{},"instrument_key":{"type":"string","description":"Key of instrument","example":"NSE_EQ|INE002A01018","readOnly":true},"order_id":{"type":"string","description":"Reference order ID","example":1644490272000,"readOnly":true}}},"PlaceOrderRequest":{"type":"object","properties":{"quantity":{"type":"integer","format":"int32","description":"Quantity with which the order is to be placed","example":1},"product":{"type":"string","description":"Signifies if the order was either Intraday, Delivery, CO or OCO","enum":["I","D"],"example":"D"},"validity":{"type":"string","description":"It can be one of the following - DAY(default), IOC","enum":["DAY","IOC"],"example":"DAY"},"price":{"type":"number","format":"float","description":"Price at which the order will be placed","example":0},"tag":{"type":"string","description":"Tag for a particular order"},"instrument_token":{"type":"string","description":"Key of the instrument","example":"NSE_EQ|INE848E01016"},"order_type":{"type":"string","description":"Type of order. It can be one of the following\nMARKET refers to market order\nLIMIT refers to Limit Order\nSL refers to Stop Loss Limit\nSL-M refers to Stop Loss Market","enum":["MARKET","LIMIT","SL","SL-M"],"example":"MARKET"},"transaction_type":{"type":"string","description":"Indicates whether its a buy or sell order","enum":["BUY","SELL"],"example":"BUY"},"disclosed_quantity":{"type":"integer","format":"int32","description":"The quantity that should be disclosed in the market depth","example":0},"trigger_price":{"type":"number","format":"float","description":"If the order is a stop loss order then the trigger price to be set is mentioned here","example":0},"is_amo":{"type":"boolean","description":"Signifies if the order is an After Market Order","example":false}},"required":["disclosed_quantity","instrument_token","is_amo","order_type","price","product","quantity","transaction_type","trigger_price","validity"]},"PlaceOrderData":{"type":"object","properties":{"order_id":{"type":"string","description":"An order ID for the order request placed","example":1644490272000,"readOnly":true}}},"PlaceOrderResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/PlaceOrderData","description":"Response data for place order request"}}},"MultiOrderRequest":{"type":"object","properties":{"quantity":{"type":"integer","format":"int32","description":"Quantity with which the order is to be placed","example":1},"product":{"type":"string","description":"Signifies if the order was either Intraday, Delivery, CO or OCO","enum":["I","D"],"example":"D"},"validity":{"type":"string","description":"It can be one of the following - DAY(default), IOC","enum":["DAY","IOC"],"example":"DAY"},"price":{"type":"number","format":"float","description":"Price at which the order will be placed","example":0},"tag":{"type":"string","maxLength":40,"minLength":0},"slice":{"type":"boolean","description":"To divide the order line based on predefined exchange definitions","example":false},"instrument_token":{"type":"string","description":"Key of the instrument","example":"NSE_EQ|INE848E01016"},"order_type":{"type":"string","description":"Type of order. It can be one of the following\nMARKET refers to market order\nLIMIT refers to Limit Order\nSL refers to Stop Loss Limit\nSL-M refers to Stop Loss Market","enum":["MARKET","LIMIT","SL","SL-M"],"example":"MARKET"},"transaction_type":{"type":"string","description":"Indicates whether its a buy or sell order","enum":["BUY","SELL"],"example":"BUY"},"disclosed_quantity":{"type":"integer","format":"int32","description":"The quantity that should be disclosed in the market depth","example":0},"trigger_price":{"type":"number","format":"float","description":"If the order is a stop loss order then the trigger price to be set is mentioned here","example":0},"is_amo":{"type":"boolean","description":"Signifies if the order is an After Market Order","example":false},"correlation_id":{"type":"string","description":"A unique identifier for tracking individual orders within the batch","example":12345678,"maxLength":20,"minLength":1},"market_protection":{"type":"number","format":"float","description":"Optional parameter defining the market protection percentage for the multi order","example":3,"maximum":25,"minimum":-1}},"required":["correlation_id","disclosed_quantity","instrument_token","is_amo","order_type","price","product","quantity","slice","transaction_type","trigger_price","validity"]},"MultiOrderData":{"type":"object","properties":{"correlation_id":{"type":"string","description":"A unique identifier for tracking individual orders within the batch","example":"213fsf2324","readOnly":true},"order_id":{"type":"string","description":"An order ID for the order request placed","example":1644490272000,"readOnly":true}}},"MultiOrderError":{"type":"object","properties":{"errorCode":{"type":"string","deprecated":true,"description":"Unique code for the error state"},"message":{"type":"string","description":"Verbose message for the error state"},"propertyPath":{"type":"string","deprecated":true,"description":"Path to property failing validation"},"invalidValue":{"deprecated":true,"description":"Invalid value for the property failing validation"},"error_code":{"type":"string"},"property_path":{"type":"string"},"invalid_value":{},"correlation_id":{"type":"string","description":"A unique identifier for tracking individual orders within the batch","example":"213fsf2324","readOnly":true}}},"MultiOrderResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for multi order request","items":{"$ref":"#/components/schemas/MultiOrderData"}},"errors":{"type":"array","description":"Error details for multi order request","items":{"$ref":"#/components/schemas/MultiOrderError"}},"summary":{"$ref":"#/components/schemas/MultiOrderSummary","description":"Execution summary for multi order request"}}},"MultiOrderSummary":{"type":"object","properties":{"total":{"type":"integer","format":"int32","description":"The total number of order lines present in the payload.","example":3,"readOnly":true},"success":{"type":"integer","format":"int32","description":"The number of order lines that were successfully placed without any errors.","example":2,"readOnly":true},"error":{"type":"integer","format":"int32","description":"The number of order lines that encountered errors during processing, despite their payloads being valid.","example":1,"readOnly":true},"payload_error":{"type":"integer","format":"int32","description":"The number of order lines with payload errors, indicating formatting or data validity issues.<br/><br/><b>Note</b>: Orders are processed only if the entire batch is free of payload_error, ensuring error-free transactions.","example":0,"readOnly":true}}},"TokenRequest":{"type":"object","properties":{"code":{"type":"string","minLength":1},"client_id":{"type":"string","description":"OAuth API key that is a public identifier for app","minLength":1},"client_secret":{"type":"string","description":"OAuth client secret that is a private secret known only to app and authorization server","minLength":1},"redirect_uri":{"type":"string","description":"Authorization server will redirect the user back to the application via redirect url","minLength":1},"grant_type":{"type":"string","description":"Type of grant used to get an access token","minLength":1},"refresh_extended_token":{"type":"boolean","description":"Whether to refresh (regenerate) the extended access token. Defaults to false when absent. Set to true to refresh; false or omit to reuse an existing extended token when available."}},"required":["client_id","client_secret","code","grant_type","redirect_uri"]},"Instrument":{"type":"object","properties":{"instrument_key":{"type":"string","description":"Instrument Key of the Instrument","example":"NSE_EQ|INE848E01016","pattern":"^(?:^NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+(,(?:NSE_EQ|NSE_FO|NCD_FO|BSE_EQ|BSE_FO|BCD_FO|MCX_FO|NSE_INDEX|BSE_INDEX|MCX_INDEX|NSE_COM)\\|[\\w ]+)*?$"},"quantity":{"type":"integer","format":"int32","description":"Quantity of the instrument to buy or sell for margin calculation","example":1,"minimum":1},"product":{"type":"string","description":"Product with which the order is to be placed","example":"D"},"transaction_type":{"type":"string","description":"Indicates whether its a BUY or SELL order","example":"BUY"},"price":{"type":"number","format":"double","description":"price","example":123.9,"minimum":0}},"required":["instrument_key","product","quantity","transaction_type"]},"MarginRequest":{"type":"object","properties":{"instruments":{"type":"array","description":"instruments","example":[{"instrument_key":"NSE_EQ|INE669E01016","quantity":2,"transaction_type":"BUY","product":"D"},{"instrument_key":"NSE_EQ|INE848E01016","quantity":5,"transaction_type":"BUY","product":"D"}],"items":{"$ref":"#/components/schemas/Instrument"}}},"required":["instruments"]},"Margin":{"type":"object","properties":{"span_margin":{"type":"number","format":"double","description":"Upfront margin mandatory by exchange for derivatives trade applicable on only FNO trade","readOnly":true},"exposure_margin":{"type":"number","format":"double","description":"Based on ELM percentage values provided by exchange, applicable on only FNO trade","readOnly":true},"equity_margin":{"type":"number","format":"double","description":"Margin applicable for any equity trade","readOnly":true},"net_buy_premium":{"type":"number","format":"double","description":"Option premium required.","readOnly":true},"additional_margin":{"type":"number","format":"double","description":"Application margin applicable on MCX FNO trade for certain commodities","readOnly":true},"total_margin":{"type":"number","format":"double","description":"Total margin required for the basket","readOnly":true},"tender_margin":{"type":"number","format":"double","description":"Tender margin","readOnly":true}}},"MarginData":{"type":"object","properties":{"margins":{"type":"array","description":"Response data for instrument margin details","items":{"$ref":"#/components/schemas/Margin"},"readOnly":true},"required_margin":{"type":"number","format":"double","description":"Total margin required to execute the orders","readOnly":true},"final_margin":{"type":"number","format":"double","description":"Total margin after margin benefit","readOnly":true}}},"PostMarginResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/MarginData","description":"Response data for margin"}}},"AvailableToTrade":{"type":"object","properties":{"total":{"type":"number","format":"float"},"cash_available_to_trade":{"$ref":"#/components/schemas/CashAvailableToTrade"},"pledge_available_to_trade":{"$ref":"#/components/schemas/PledgeAvailableToTrade"}}},"CashAvailableToTrade":{"type":"object","properties":{"total":{"type":"number","format":"float"},"cash":{"$ref":"#/components/schemas/CashBreakdown"},"margin_used":{"$ref":"#/components/schemas/CashMarginUsed"}}},"CashBreakdown":{"type":"object","properties":{"opening_balance":{"type":"number","format":"float"},"added_today":{"type":"number","format":"float"},"withdrawn_today":{"type":"number","format":"float"},"amount_from_stock_sale":{"type":"number","format":"float"},"unpaid_charges":{"type":"number","format":"float"}}},"CashMarginUsed":{"type":"object","properties":{"total":{"type":"number","format":"float"},"mtf":{"type":"number","format":"float"},"loss":{"$ref":"#/components/schemas/Loss"},"span_exposure":{"type":"number","format":"float"},"cash_margin_var_elm":{"type":"number","format":"float"},"premium_present":{"type":"number","format":"float"},"delivery_margin":{"$ref":"#/components/schemas/DeliveryMargin"}}},"CashUnavailableToTrade":{"type":"object","properties":{"unsettled_profit":{"$ref":"#/components/schemas/UnsettledProfit"}}},"DeliveryMargin":{"type":"object","properties":{"total":{"type":"number","format":"float"},"equity":{"type":"number","format":"float"},"fo_settlement":{"type":"number","format":"float"}}},"GetUserFundMarginV3Response":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/UserFundMarginV3Data","description":"Response data for fund and margin v3"}}},"Loss":{"type":"object","properties":{"total":{"type":"number","format":"float"},"realised":{"type":"number","format":"float"},"unrealised":{"type":"number","format":"float"}}},"MarginFromPledge":{"type":"object","properties":{"total":{"type":"number","format":"float"},"equity":{"type":"number","format":"float"},"mutual_funds":{"type":"number","format":"float"}}},"PledgeAvailableToTrade":{"type":"object","properties":{"margin_from_pledge":{"$ref":"#/components/schemas/MarginFromPledge"},"margin_used":{"$ref":"#/components/schemas/PledgeMarginUsed"}}},"PledgeMarginUsed":{"type":"object","properties":{"total":{"type":"number","format":"float"},"mtf":{"type":"number","format":"float"},"span_exposure":{"type":"number","format":"float"},"cash_margin_var_elm":{"type":"number","format":"float"},"premium_present":{"type":"number","format":"float"},"delivery_margin":{"$ref":"#/components/schemas/DeliveryMargin"}}},"PledgeUnavailableToTrade":{"type":"object","properties":{"equity":{"type":"number","format":"float"},"mutual_funds":{"type":"number","format":"float"}}},"UnavailableToTrade":{"type":"object","properties":{"cash_unavailable_to_trade":{"$ref":"#/components/schemas/CashUnavailableToTrade"},"pledge_unavailable_to_trade":{"$ref":"#/components/schemas/PledgeUnavailableToTrade"}}},"UnsettledProfit":{"type":"object","properties":{"todays_profit":{"type":"number","format":"float"},"previous_days":{"type":"number","format":"float"}}},"UserFundMarginV3Data":{"type":"object","properties":{"available_to_trade":{"$ref":"#/components/schemas/AvailableToTrade"},"unavailable_to_trade":{"$ref":"#/components/schemas/UnavailableToTrade"}}},"GetPositionResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for position details","items":{"$ref":"#/components/schemas/PositionData"}},"metadata":{"$ref":"#/components/schemas/OrderMetadata"}}},"PositionData":{"type":"object","properties":{"exchange":{"type":"string","description":"Exchange to which the order is associated","enum":["NSE","NFO","CDS","BSE","BFO","BCD","MCX","NSCOM"],"example":"NSE","readOnly":true},"multiplier":{"type":"number","format":"float","description":"The quantity/lot size multiplier used for calculating P&Ls","example":1,"readOnly":true},"value":{"type":"number","format":"float","description":"Net value of the position","example":120,"readOnly":true},"pnl":{"type":"number","format":"float","description":"Profit and loss - net returns on the position","example":121.01,"readOnly":true},"product":{"type":"string","description":"Shows if the order was either Intraday, Delivery, CO or OCO","example":"D","readOnly":true},"instrument_token":{"type":"string","description":"Key issued by Upstox for the instrument","example":151064324,"readOnly":true},"average_price":{"type":"number","format":"float","description":"Average price at which the net position quantity was acquired","example":120.01,"readOnly":true},"buy_value":{"type":"number","format":"float","description":"Net value of the bought quantities","example":120,"readOnly":true},"overnight_quantity":{"type":"integer","format":"int32","description":"Quantity held previously and carried forward over night","example":1,"readOnly":true},"day_buy_value":{"type":"number","format":"float","description":"Amount at which the quantity is bought during the day","example":120.01,"readOnly":true},"day_buy_price":{"type":"number","format":"float","description":"Average price at which the day qty was bought. Default is empty string","example":120.01,"readOnly":true},"overnight_buy_amount":{"type":"number","format":"float","description":"Amount at which the quantity was bought in the previous session","example":12,"readOnly":true},"overnight_buy_quantity":{"type":"integer","format":"int32","description":"Quantity bought in the previous session","example":12,"readOnly":true},"day_buy_quantity":{"type":"integer","format":"int32","description":"Quantity bought during the day","example":1,"readOnly":true},"day_sell_value":{"type":"number","format":"float","description":"Amount at which the quantity is sold during the day","example":0,"readOnly":true},"day_sell_price":{"type":"number","format":"float","description":"Average price at which the day quantity was sold","example":0,"readOnly":true},"overnight_sell_amount":{"type":"number","format":"float","description":"Amount at which the quantity was sold in the previous session","example":120.01,"readOnly":true},"overnight_sell_quantity":{"type":"integer","format":"int32","description":"Quantity sold short in the previous session","example":0,"readOnly":true},"day_sell_quantity":{"type":"integer","format":"int32","description":"Quantity sold during the day","example":0,"readOnly":true},"quantity":{"type":"integer","format":"int32","description":"Quantity left after nullifying Day and CF buy quantity towards Day and CF sell quantity","example":2,"readOnly":true},"last_price":{"type":"number","format":"float","description":"Last traded market price of the instrument","example":120.01,"readOnly":true},"unrealised":{"type":"number","format":"float","description":"Day PnL generated against open positions","example":121.01,"readOnly":true},"realised":{"type":"number","format":"float","description":"Day PnL generated against closed positions","example":0,"readOnly":true},"sell_value":{"type":"number","format":"float","description":"Net value of the sold quantities","example":0,"readOnly":true},"tradingsymbol":{"type":"string","deprecated":true,"description":"Shows the trading symbol of the instrument","example":"GMR","readOnly":true},"trading_symbol":{"type":"string","description":"Shows the trading symbol of the instrument","example":"GMR","readOnly":true},"close_price":{"type":"number","format":"float","description":"Closing price of the instrument from the last trading day","example":102.0,"readOnly":true},"buy_price":{"type":"number","format":"float","description":"Average price at which quantities were bought","example":102.0,"readOnly":true},"sell_price":{"type":"number","format":"float","description":"Average price at which quantities were sold","example":102.0,"readOnly":true}}},"GetGttOrderResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for order details","items":{"$ref":"#/components/schemas/GttOrderDetails"}},"metadata":{"$ref":"#/components/schemas/OrderMetadata"}}},"GttOrderDetails":{"type":"object","properties":{"type":{"type":"string"},"exchange":{"type":"string"},"quantity":{"type":"integer","format":"int32"},"product":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/Rule"}},"trading_symbol":{"type":"string"},"instrument_token":{"type":"string"},"gtt_order_id":{"type":"string"},"expires_at":{"type":"integer","format":"int64"},"created_at":{"type":"integer","format":"int64"}}},"Rule":{"type":"object","properties":{"strategy":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"trigger_type":{"type":"string"},"trigger_price":{"type":"number","format":"double"},"transaction_type":{"type":"string"},"order_id":{"type":"string"},"trailing_gap":{"type":"number","format":"double"}}},"GetMarketQuoteOptionGreekResponseV3":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MarketQuoteOptionGreekV3"}}}},"MarketQuoteOptionGreekV3":{"type":"object","properties":{"last_price":{"type":"number","format":"double"},"instrument_token":{"type":"string"},"ltq":{"type":"integer","format":"int64"},"volume":{"type":"integer","format":"int64"},"cp":{"type":"number","format":"double"},"iv":{"type":"number","format":"double"},"vega":{"type":"number","format":"double"},"gamma":{"type":"number","format":"double"},"theta":{"type":"number","format":"double"},"delta":{"type":"number","format":"double"},"oi":{"type":"number","format":"double"}}},"GetMarketQuoteOHLCResponseV3":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MarketQuoteOHLCV3"}}}},"MarketQuoteOHLCV3":{"type":"object","properties":{"last_price":{"type":"number","format":"double","description":"The last traded price of symbol","example":120.01,"readOnly":true},"instrument_token":{"type":"string"},"prev_ohlc":{"$ref":"#/components/schemas/OhlcV3"},"live_ohlc":{"$ref":"#/components/schemas/OhlcV3"}}},"OhlcV3":{"type":"object","properties":{"open":{"type":"number","format":"double","description":"The open price of the trading session","example":120.01,"readOnly":true},"high":{"type":"number","format":"double","description":"The high price of the trading session","example":121.0,"readOnly":true},"low":{"type":"number","format":"double","description":"The low price of the trading session","example":119.0,"readOnly":true},"close":{"type":"number","format":"double","description":"The close price of the symbol from the previous session of trading","example":120.0,"readOnly":true},"volume":{"type":"integer","format":"int64","description":"The volume of the symbol traded in the session","example":2589075,"readOnly":true},"ts":{"type":"integer","format":"int64","description":"Starting timestamp of candle","example":1743750900000,"readOnly":true}}},"GetMarketQuoteLastTradedPriceResponseV3":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MarketQuoteSymbolLtpV3"}}}},"MarketQuoteSymbolLtpV3":{"type":"object","properties":{"last_price":{"type":"number","format":"double"},"instrument_token":{"type":"string"},"ltq":{"type":"integer","format":"int64"},"volume":{"type":"integer","format":"int64"},"cp":{"type":"number","format":"double"}}},"GetHistoricalCandleResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/HistoricalCandleData","description":"Get OHLC values for all instruments across various timeframes"}}},"HistoricalCandleData":{"type":"object","properties":{"candles":{"type":"array","example":"[[<br>        \"2022-11-21T00:00:00+05:30\",<br>        37.4,<br>        37.8,<br>        36.95,<br>        37.6,<br>        5539471,<br>        0<br>      ]]","items":{"type":"array","items":{}},"readOnly":true}}},"GetIntraDayCandleResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/IntraDayCandleData","description":"Get OHLC values for all instruments across various timeframes"}}},"IntraDayCandleData":{"type":"object","properties":{"candles":{"type":"array","example":"[[<br>        \"2022-11-21T00:00:00+05:30\",<br>        37.4,<br>        37.8,<br>        36.95,<br>        37.6,<br>        5539471,<br>        0<br>      ]]","items":{"type":"array","items":{}},"readOnly":true}}},"GetProfileResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/ProfileData","description":"Response data for user profile"}}},"ProfileData":{"type":"object","properties":{"email":{"type":"string","description":"E-mail address of the user","example":"client@email.com","readOnly":true},"exchanges":{"type":"array","description":"Lists the exchanges to which the user has access","example":"NSE","items":{"type":"string","enum":["NSE","NFO","CDS","BSE","BFO","BCD","MCX","NSCOM"]},"readOnly":true},"products":{"type":"array","description":"Lists the products types to which the user has access","example":"D","items":{"type":"string","enum":["I","D","CO","OCO","MTF"]},"readOnly":true},"broker":{"type":"string","description":"The broker ID","example":"UPSTOX","readOnly":true},"user_id":{"type":"string","description":"Uniquely identifies the user","example":202251,"readOnly":true},"user_name":{"type":"string","description":"Name of the user","example":"client","readOnly":true},"order_types":{"type":"array","description":"Order types enabled for the user","example":"LIMIT","items":{"type":"string","enum":["MARKET","LIMIT","SL","SL-M"]},"readOnly":true},"user_type":{"type":"string","description":"\t\nIdentifies the user's registered role at the broker. This will be individual for all retail users","example":"individual","readOnly":true},"poa":{"type":"boolean","description":"\t\nTo depict if the user has given power of attorney for transactions","example":true,"readOnly":true},"ddpi":{"type":"boolean","description":"\t\nIndicates if DDPI is enabled for trading","example":true,"readOnly":true},"is_active":{"type":"boolean","description":"\t\nWhether the status of account is active or not","example":true,"readOnly":true}}},"GetUserFundMarginResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UserFundMarginData"},"description":"Response data for Balance"}}},"UserFundMarginData":{"type":"object","properties":{"used_margin":{"type":"number","format":"float","description":"Positive values denote the amount blocked into an Open order or position. \nNegative value denotes the amount being released.","example":120.01,"readOnly":true},"payin_amount":{"type":"number","format":"float","description":"Instant payin will reflect here","example":0,"readOnly":true},"span_margin":{"type":"number","format":"float","description":"Amount blocked on futures and options towards SPAN","example":0,"readOnly":true},"adhoc_margin":{"type":"number","format":"float","description":"Payin amount credited through a manual process","example":0,"readOnly":true},"notional_cash":{"type":"number","format":"float","description":"The amount maintained for withdrawal","example":0,"readOnly":true},"available_margin":{"type":"number","format":"float","description":"Total margin available for trading","example":200.0,"readOnly":true},"exposure_margin":{"type":"number","format":"float","description":"Amount blocked on futures and options towards Exposure","example":0,"readOnly":true}}},"GetTradeWiseProfitAndLossMetaDataResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/TradeWiseMetaData","description":"Response data for brokerage"}}},"TradeWiseMetaData":{"type":"object","properties":{"trades_count":{"type":"integer","format":"int32","description":"Total count of trades in the trade wise P and L report","example":10,"readOnly":true},"page_size_limit":{"type":"integer","format":"int32","description":"Maximum number of trades in a page of the trade wise P and L report API","example":5000,"readOnly":true}}},"GetTradeWiseProfitAndLossDataResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for trade wise data details","items":{"$ref":"#/components/schemas/TradeWiseProfitAndLossData"}},"metadata":{"$ref":"#/components/schemas/ProfitAndLossMetaDataWrapper"}}},"ProfitAndLossMetaData":{"type":"object","properties":{"page_number":{"type":"integer","format":"int32","description":"pageNumber for pagination","example":1,"readOnly":true},"page_size":{"type":"integer","format":"int32","description":"Page size","example":2,"readOnly":true}}},"ProfitAndLossMetaDataWrapper":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/ProfitAndLossMetaData","description":"Meta data for trade wise data details"}}},"TradeWiseProfitAndLossData":{"type":"object","properties":{"quantity":{"type":"number","format":"float","description":"The quantity of stock traded","example":100,"readOnly":true},"isin":{"type":"string","description":"ISIN of the stock","example":"INE256A01028","readOnly":true},"scrip_name":{"type":"string","description":"Name of the scrip traded","example":"ZEE ENTER","readOnly":true},"trade_type":{"type":"string","description":"FUT - Futures\n\r\nOPT - Options\r\n\r\nEQ - Equity","example":"EQ","readOnly":true},"buy_date":{"type":"string","description":"The date on which the stock was bought","example":"14-09-2021","readOnly":true},"buy_average":{"type":"number","format":"float","description":"The average rate at which each quantity of the stock was bought","example":12345.67,"readOnly":true},"sell_date":{"type":"string","description":"The date on which the stock was sold","example":"14-09-2021","readOnly":true},"sell_average":{"type":"number","format":"float","description":"The average rate at which each quantity of the stock was sold","example":12345.67,"readOnly":true},"buy_amount":{"type":"number","format":"float","description":"Total buy amount","example":12345.67,"readOnly":true},"sell_amount":{"type":"number","format":"float","description":"Total sell amount","example":12345.67,"readOnly":true}}},"GetProfitAndLossChargesResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/ProfitAndLossChargesWrapperData","description":"Response data for brokerage"}}},"ProfitAndLossChargesData":{"type":"object","properties":{"total":{"type":"number","format":"float","description":"  Total charges for the user","example":123.1,"readOnly":true},"brokerage":{"type":"number","format":"float","description":"Brokerage charges for the order","example":432.1,"readOnly":true},"taxes":{"$ref":"#/components/schemas/ProfitAndLossChargesTaxes","description":"Taxes levied on order","readOnly":true},"charges":{"$ref":"#/components/schemas/ProfitAndLossOtherChargesTaxes","description":"Other charges levied","readOnly":true}}},"ProfitAndLossChargesTaxes":{"type":"object","properties":{"gst":{"type":"number","format":"float","description":"GST charges"},"stt":{"type":"number","format":"float","description":"STT charges"},"stamp_duty":{"type":"number","format":"float","description":"Stamp duty charges"}}},"ProfitAndLossChargesWrapperData":{"type":"object","properties":{"charges_breakdown":{"$ref":"#/components/schemas/ProfitAndLossChargesData","description":"Response data for charges details"}}},"ProfitAndLossOtherChargesTaxes":{"type":"object","properties":{"transaction":{"type":"number","format":"float","description":"transaction charges"},"clearing":{"type":"number","format":"float","description":"clearing charges"},"ipft":{"type":"number","format":"float","description":"IPF charges"},"others":{"type":"number","format":"float","description":"others charges"},"sebi_turnover":{"type":"number","format":"float","description":"SEBI turnover"},"demat_transaction":{"type":"number","format":"float","description":"demat transaction charges"}}},"GetHoldingsResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for holdings","items":{"$ref":"#/components/schemas/HoldingsData"}}}},"HoldingsData":{"type":"object","properties":{"isin":{"type":"string","description":"The standard ISIN representing stocks listed on multiple exchanges","example":"INE118H01025","readOnly":true},"cnc_used_quantity":{"type":"integer","format":"int32","description":"Quantity either blocked towards open or completed order","example":0,"readOnly":true},"collateral_type":{"type":"string","description":"Category of collateral assigned by RMS","example":"WC","readOnly":true},"company_name":{"type":"string","description":"Name of the company","example":"BSE LIM","readOnly":true},"haircut":{"type":"number","format":"float","description":"This is the haircut percentage applied from RMS (applicable incase of collateral)","example":0.23,"readOnly":true},"product":{"type":"string","description":"Shows if the order was either Intraday, Delivery, CO or OCO","example":"D","readOnly":true},"quantity":{"type":"integer","format":"int32","description":"The total holding qty","example":1,"readOnly":true},"tradingsymbol":{"type":"string","deprecated":true,"description":"Shows the trading symbol of the instrument","example":"BSE","readOnly":true},"last_price":{"type":"number","format":"float","description":"The last traded price of the instrument","example":120.01,"readOnly":true},"close_price":{"type":"number","format":"float","description":"Closing price of the instrument from the last trading day","example":120.01,"readOnly":true},"pnl":{"type":"number","format":"float","description":"Profit and Loss","example":120.01,"readOnly":true},"day_change":{"type":"number","format":"float","description":"Day's change in absolute value for the stock","example":0,"readOnly":true},"day_change_percentage":{"type":"number","format":"float","description":"Day's change in percentage for the stock","example":0,"readOnly":true},"instrument_token":{"type":"string","description":"Key issued by Upstox for the instrument","example":151064324,"readOnly":true},"average_price":{"type":"number","format":"float","description":"Average price at which the net holding quantity was acquired","example":120.01,"readOnly":true},"collateral_quantity":{"type":"integer","format":"int32","description":"Quantity marked as collateral by RMS on users request","example":0,"readOnly":true},"collateral_update_quantity":{"type":"integer","format":"int32","example":0,"readOnly":true},"trading_symbol":{"type":"string","description":"Shows the trading symbol of the instrument","example":"BSE","readOnly":true},"t1_quantity":{"type":"integer","format":"int32","description":"Quantity on T+1 day after order execution","example":0,"readOnly":true},"exchange":{"type":"string","description":"Exchange of the trading symbol","enum":["NSE","NFO","CDS","BSE","BFO","BCD","MCX","NSCOM"],"example":"NSE","readOnly":true}}},"GetTradeResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for trades","items":{"$ref":"#/components/schemas/TradeData"}}}},"TradeData":{"type":"object","properties":{"exchange":{"type":"string","description":"Exchange to which the order is associated","enum":["NSE","NFO","CDS","BSE","BFO","BCD","MCX","NSCOM"],"example":"NSE","readOnly":true},"product":{"type":"string","description":"Shows if the order was either Intraday, Delivery, CO or OCO","enum":["I","D","CO","OCO","MTF"],"example":"D","readOnly":true},"tradingsymbol":{"type":"string","deprecated":true,"description":"Shows the trading symbol which could be a combination of symbol name, instrument, expiry date etc","example":"GMRINFRA-EQ","readOnly":true},"trading_symbol":{"type":"string","description":"Shows the trading symbol which could be a combination of symbol name, instrument, expiry date etc","example":"GMRINFRA-EQ","readOnly":true},"instrument_token":{"type":"string","description":"Identifier issued by Upstox used for subscribing to live market quotes","example":151064324,"readOnly":true},"order_type":{"type":"string","description":"Type of order. It can be one of the following\nMARKET refers to market order<br>LIMIT refers to Limit Order<br>SL refers to Stop Loss Limit<br>SL-M refers to Stop loss market","enum":["MARKET","LIMIT","SL","SL-M"],"example":"MARKET","readOnly":true},"transaction_type":{"type":"string","description":"Indicates whether the order was a buy or sell order","enum":["BUY","SELL"],"example":"BUY","readOnly":true},"quantity":{"type":"integer","format":"int32","description":"The total quantity traded from this particular order","example":1,"readOnly":true},"exchange_order_id":{"type":"string","description":"Unique order ID assigned by the exchange for the order placed","example":221013001021540,"readOnly":true},"order_id":{"type":"string","description":"Unique order ID assigned internally for the order placed","example":221013001021539,"readOnly":true},"exchange_timestamp":{"type":"string","description":"User readable time at when the trade occurred","example":"03-Aug-2017 15:03:42","readOnly":true},"average_price":{"type":"number","format":"float","description":"Price at which the traded quantity is traded","example":299.4,"readOnly":true},"trade_id":{"type":"string","description":"Trade ID generated from exchange towards traded transaction","example":50091502,"readOnly":true},"order_ref_id":{"type":"string","description":"The order reference ID for which the order must be modified","example":"udapi-aqwsed14356","readOnly":true},"order_timestamp":{"type":"string","description":"User readable timestamp at which the order was placed","example":"23-Apr-2021 14:22:06","readOnly":true}}},"GetOrderBookResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for order Book","items":{"$ref":"#/components/schemas/OrderBookData"}}}},"OrderBookData":{"type":"object","properties":{"exchange":{"type":"string","description":"Exchange to which the order is associated","enum":["NSE","NFO","CDS","BSE","BFO","BCD","MCX","NSCOM"],"example":"NSE","readOnly":true},"product":{"type":"string","description":"Shows if the order was either Intraday, Delivery, CoverOrder or OneCancelsOther","enum":["I","D","CO","OCO","MTF"],"example":"D","readOnly":true},"price":{"type":"number","format":"float","description":"Price at which the order was placed","example":120.01,"readOnly":true},"quantity":{"type":"integer","format":"int32","description":"Quantity with which the order was placed","example":1,"readOnly":true},"status":{"type":"string","description":"Indicates the current status of the order. Valid order status’ are outlined in the table below","example":"Complete","readOnly":true},"guid":{"type":"string","readOnly":true},"tag":{"type":"string","description":"Tag to uniquely identify an order","readOnly":true},"instrument_token":{"type":"string","description":"Identifier issued by Upstox used for subscribing to live market quotes","example":151064324,"readOnly":true},"placed_by":{"type":"string","description":"Uniquely identifies the user","example":200123,"readOnly":true},"tradingsymbol":{"type":"string","deprecated":true,"description":"Shows the trading symbol of the instrument","example":"GMR","readOnly":true},"trading_symbol":{"type":"string","description":"Shows the trading symbol of the instrument","example":"GMR","readOnly":true},"order_type":{"type":"string","description":"Type of order. It can be one of the following\nMARKET refers to market order<br>LIMIT refers to Limit Order<br>SL refers to Stop Loss Limit<br>SL-M refers to Stop loss market","enum":["MARKET","LIMIT","SL","SL-M"],"example":"MARKET","readOnly":true},"validity":{"type":"string","description":"Order validity (DAY- Day and IOC- Immediate or Cancel (IOC) order)","enum":["DAY","IOC","EOS"],"example":"DAY","readOnly":true},"trigger_price":{"type":"number","format":"float","description":"If the order was a stop loss order then the trigger price set is mentioned here","example":120,"readOnly":true},"disclosed_quantity":{"type":"integer","format":"int32","description":"The quantity that should be disclosed in the market depth","example":1,"readOnly":true},"transaction_type":{"type":"string","description":"Indicates whether the order was a buy or sell order","enum":["BUY","SELL"],"example":"BUY","readOnly":true},"average_price":{"type":"number","format":"float","description":"Average price at which the qty got traded","example":120.01,"readOnly":true},"filled_quantity":{"type":"integer","format":"int32","description":"The total quantity traded from this particular order","example":120.01,"readOnly":true},"pending_quantity":{"type":"integer","format":"int32","description":"Pending quantity to be filled","example":1,"readOnly":true},"status_message":{"type":"string","description":"Indicates the reason when any order is rejected, not modified or cancelled","readOnly":true},"status_message_raw":{"type":"string","description":"Description of the order's status as received from RMS","readOnly":true},"exchange_order_id":{"type":"string","description":"Unique order ID assigned by the exchange for the order placed","example":221013001021540,"readOnly":true},"parent_order_id":{"type":"string","description":"In case the order is part of the second or third leg of a CO or OCO, the parent order ID is indicated here","example":221013001021541,"readOnly":true},"order_id":{"type":"string","description":"Unique order ID assigned internally for the order placed","example":221013001021541,"readOnly":true},"variety":{"type":"string","description":"Order complexity","example":"SIMPLE","readOnly":true},"order_timestamp":{"type":"string","description":"User readable timestamp at which the order was placed","example":"23-Apr-2021 14:22:06","readOnly":true},"exchange_timestamp":{"type":"string","description":"User readable time at which the order was placed or updated","example":"24-Apr-2021 14:22:06","readOnly":true},"is_amo":{"type":"boolean","description":"Signifies if the order is an After Market Order","example":false,"readOnly":true},"order_request_id":{"type":"string","description":"Apart from 1st order it shows the count of how many requests were sent","example":221013001021542,"readOnly":true},"order_ref_id":{"type":"string","description":"The order reference ID for which the order must be modified","example":"udapi-12345abcd","readOnly":true}}},"GetOrderResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for order details","items":{"$ref":"#/components/schemas/OrderData"}}}},"OrderData":{"type":"object","properties":{"exchange":{"type":"string","description":"Exchange to which the order is associated","enum":["NSE","NFO","CDS","BSE","BFO","BCD","MCX","NSCOM"],"example":"NSE","readOnly":true},"price":{"type":"number","format":"float","description":"Price at which the order was placed","example":120.01,"readOnly":true},"product":{"type":"string","description":"Shows if the order was either Intraday, Delivery, CoverOrder or OneCancelsOther","enum":["I","D","CO","OCO","MTF"],"example":"D","readOnly":true},"quantity":{"type":"integer","format":"int32","description":"Quantity with which the order was placed","example":1,"readOnly":true},"status":{"type":"string","description":"Indicates the current status of the order. Valid order status’ are outlined in the table below","example":"complete","readOnly":true},"tag":{"type":"string","description":"Tag to uniquely identify an order","readOnly":true},"validity":{"type":"string","description":"Order validity (DAY- Day and IOC- Immediate or Cancel (IOC) order)","enum":["DAY","IOC","EOS"],"example":"DAY","readOnly":true},"average_price":{"type":"number","format":"float","description":"Average price at which the qty got traded","example":120.01,"readOnly":true},"disclosed_quantity":{"type":"integer","format":"int32","description":"The quantity that should be disclosed in the market depth","example":1,"readOnly":true},"exchange_order_id":{"type":"string","description":"Unique order ID assigned by the exchange for the order placed","example":221013001021540,"readOnly":true},"exchange_timestamp":{"type":"string","description":"User readable time at which the order was placed or updated","example":"03-Aug-2017 15:03:42","readOnly":true},"instrument_token":{"type":"string","description":"Identifier issued by Upstox used for subscribing to live market quotes","example":151064324,"readOnly":true},"is_amo":{"type":"boolean","description":"Signifies if the order is an After Market Order","example":false,"readOnly":true},"status_message":{"type":"string","description":"Indicates the reason when any order is rejected, not modified or cancelled","readOnly":true},"order_id":{"type":"string","description":"Unique order ID assigned internally for the order placed","example":221013001021541,"readOnly":true},"order_request_id":{"type":"string","description":"Apart from 1st order it shows the count of how many requests were sent","example":221013001021542,"readOnly":true},"order_type":{"type":"string","description":"Type of order. It can be one of the following\nMARKET refers to market order<br>LIMIT refers to Limit Order<br>SL refers to Stop Loss Limit<br>SL-M refers to Stop loss market","enum":["MARKET","LIMIT","SL","SL-M"],"example":"MARKET","readOnly":true},"parent_order_id":{"type":"string","description":"In case the order is part of the second or third leg of a CO or OCO, the parent order ID is indicated here","example":221013001021543,"readOnly":true},"tradingsymbol":{"type":"string","deprecated":true,"description":"Shows the trading symbol of the instrument","example":"GMR","readOnly":true},"trading_symbol":{"type":"string","description":"Shows the trading symbol of the instrument","example":"GMR","readOnly":true},"order_timestamp":{"type":"string","description":"User readable timestamp at which the order was placed","example":"23-Apr-2021 14:22:06","readOnly":true},"filled_quantity":{"type":"integer","format":"int32","description":"The total quantity traded from this particular order","example":1,"readOnly":true},"transaction_type":{"type":"string","description":"Indicates whether the order was a buy or sell order","enum":["BUY","SELL"],"example":"BUY","readOnly":true},"trigger_price":{"type":"number","format":"float","description":"If the order was a stop loss order then the trigger price set is mentioned here","example":120.01,"readOnly":true},"placed_by":{"type":"string","description":"Uniquely identifies the user","example":200123,"readOnly":true},"variety":{"type":"string","description":"Order complexity","example":"SIMPLE","readOnly":true}}},"GetOrderDetailsResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/OrderBookData","description":"Response data for order details"}}},"GetOptionContractResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for option contracts","items":{"$ref":"#/components/schemas/InstrumentData"}}}},"InstrumentData":{"type":"object","properties":{"name":{"type":"string"},"segment":{"type":"string"},"exchange":{"type":"string"},"isin":{"type":"string"},"expiry":{"type":"string","format":"date-time"},"country":{"type":"string"},"latency":{"type":"string"},"description":{"type":"string"},"currency":{"type":"string"},"weekly":{"type":"boolean"},"instrument_key":{"type":"string"},"exchange_token":{"type":"string"},"trading_symbol":{"type":"string"},"short_name":{"type":"string"},"tick_size":{"type":"number","format":"double"},"lot_size":{"type":"integer","format":"int64"},"instrument_type":{"type":"string"},"freeze_quantity":{"type":"number","format":"double"},"underlying_key":{"type":"string"},"underlying_type":{"type":"string"},"underlying_symbol":{"type":"string"},"last_trading_date":{"type":"string","format":"date-time"},"strike_price":{"type":"number","format":"double"},"price_quote_unit":{"type":"string"},"qty_multiplier":{"type":"integer","format":"int64"},"minimum_lot":{"type":"integer","format":"int64"},"start_time":{"type":"string"},"end_time":{"type":"string"},"week_days":{"type":"string"},"general_denominator":{"type":"number","format":"double"},"general_numerator":{"type":"number","format":"double"},"price_numerator":{"type":"number","format":"double"},"price_denominator":{"type":"number","format":"double"},"mtf_enabled":{"type":"boolean"},"mtf_bracket":{"type":"number","format":"double"},"security_type":{"type":"string"}}},"AnalyticsData":{"type":"object","properties":{"vega":{"type":"number","format":"double"},"theta":{"type":"number","format":"double"},"gamma":{"type":"number","format":"double"},"delta":{"type":"number","format":"double"},"iv":{"type":"number","format":"double"},"pop":{"type":"number","format":"double"}}},"GetOptionChainResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for option chain data","items":{"$ref":"#/components/schemas/OptionStrikeData"}}}},"MarketData":{"type":"object","properties":{"ltp":{"type":"number","format":"double"},"volume":{"type":"integer","format":"int64"},"oi":{"type":"number","format":"double"},"close_price":{"type":"number","format":"double"},"bid_price":{"type":"number","format":"double"},"bid_qty":{"type":"integer","format":"int32"},"ask_price":{"type":"number","format":"double"},"ask_qty":{"type":"integer","format":"int32"},"prev_oi":{"type":"number","format":"double"}}},"OptionStrikeData":{"type":"object","properties":{"expiry":{"type":"string","format":"date-time"},"pcr":{"type":"number","format":"double"},"strike_price":{"type":"number","format":"double"},"underlying_key":{"type":"string"},"underlying_spot_price":{"type":"number","format":"double"},"call_options":{"$ref":"#/components/schemas/PutCallOptionChainData"},"put_options":{"$ref":"#/components/schemas/PutCallOptionChainData"}}},"PutCallOptionChainData":{"type":"object","properties":{"instrument_key":{"type":"string"},"market_data":{"$ref":"#/components/schemas/MarketData"},"option_greeks":{"$ref":"#/components/schemas/AnalyticsData"}}},"GetNewsResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/NewsItemData"}}},"metadata":{"$ref":"#/components/schemas/NewsResponseMetaData"}}},"NewsItemData":{"type":"object","properties":{"heading":{"type":"string"},"summary":{"type":"string"},"thumbnail":{"type":"string"},"article_link":{"type":"string"},"published_time":{"type":"integer","format":"int64"}}},"NewsResponseMetaData":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/NewsResponsePageData"}}},"NewsResponsePageData":{"type":"object","properties":{"page_number":{"type":"integer","format":"int32"},"page_size":{"type":"integer","format":"int32"},"total_records":{"type":"integer","format":"int32"},"total_pages":{"type":"integer","format":"int32"}}},"ExchangeTimingData":{"type":"object","properties":{"exchange":{"type":"string"},"start_time":{"type":"integer","format":"int64"},"end_time":{"type":"integer","format":"int64"}}},"GetExchangeTimingResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for exchange timing list","items":{"$ref":"#/components/schemas/ExchangeTimingData"}}}},"GetMarketStatusResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/MarketStatusData","description":"Response data for market live status"}}},"MarketStatusData":{"type":"object","properties":{"exchange":{"type":"string"},"status":{"type":"string"},"last_updated":{"type":"integer","format":"int64"}}},"GetHolidayResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for holiday list","items":{"$ref":"#/components/schemas/HolidayData"}}}},"HolidayData":{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"description":{"type":"string"},"holiday_type":{"type":"string","enum":["ALL","SETTLEMENT_HOLIDAY","TRADING_HOLIDAY","SPECIAL_TIMING"]},"closed_exchanges":{"type":"array","items":{"type":"string"}},"open_exchanges":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeTimingData"}}}},"Depth":{"type":"object","properties":{"quantity":{"type":"integer","format":"int32","description":"quantity"},"price":{"type":"number","format":"double","description":"price"},"orders":{"type":"integer","format":"int32","description":"orders"}}},"DepthMap":{"type":"object","properties":{"buy":{"type":"array","description":"Bids","example":120.01,"items":{"$ref":"#/components/schemas/Depth"},"readOnly":true},"sell":{"type":"array","description":"Asks","example":120.01,"items":{"$ref":"#/components/schemas/Depth"},"readOnly":true}}},"GetFullMarketQuoteResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MarketQuoteSymbol"}}}},"MarketQuoteSymbol":{"type":"object","properties":{"ohlc":{"$ref":"#/components/schemas/Ohlc"},"depth":{"$ref":"#/components/schemas/DepthMap"},"timestamp":{"type":"string","description":"Time in milliseconds at which the feeds was updated","example":"2022-11-16 06:14:48","readOnly":true},"instrument_token":{"type":"string","description":"Key issued by Upstox for the instrument","example":"NSE_EQ|INE160A01022","readOnly":true},"symbol":{"type":"string","description":"Shows the trading symbol of the instrument","example":"NHPC","readOnly":true},"last_price":{"type":"number","format":"double","description":"The last traded price of symbol","example":120.01,"readOnly":true},"volume":{"type":"integer","format":"int64","description":"The volume traded today on symbol","example":2344451,"readOnly":true},"average_price":{"type":"number","format":"double","description":"Average price","example":120.01,"readOnly":true},"oi":{"type":"number","format":"double","description":"Total number of outstanding contracts held by market participants exchange-wide (only F&O)","example":0,"readOnly":true},"net_change":{"type":"number","format":"double","description":"The absolute change from yesterday's close to last traded price","example":0.01,"readOnly":true},"total_buy_quantity":{"type":"number","format":"double","description":"The total number of bid quantity available for trading","example":0,"readOnly":true},"total_sell_quantity":{"type":"number","format":"double","description":"The total number of ask quantity available for trading","example":0,"readOnly":true},"lower_circuit_limit":{"type":"number","format":"double","description":"The lower circuit of symbol","example":119.0,"readOnly":true},"upper_circuit_limit":{"type":"number","format":"double","description":"The upper circuit of symbol","example":121.0,"readOnly":true},"last_trade_time":{"type":"string","description":"Time in milliseconds at which last trade happened","example":"2022-11-16 06:14:48","readOnly":true},"oi_day_high":{"type":"number","format":"double","example":0,"readOnly":true},"oi_day_low":{"type":"number","format":"double","example":0,"readOnly":true}}},"Ohlc":{"type":"object","properties":{"open":{"type":"number","format":"double","description":"The open price of the trading session","example":120.01,"readOnly":true},"high":{"type":"number","format":"double","description":"The high price of the trading session","example":121.0,"readOnly":true},"low":{"type":"number","format":"double","description":"The low price of the trading session","example":119.0,"readOnly":true},"close":{"type":"number","format":"double","description":"The close price of the symbol from the previous session of trading","example":120.0,"readOnly":true}}},"GetMarketQuoteOHLCResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MarketQuoteOHLC"}}}},"MarketQuoteOHLC":{"type":"object","properties":{"ohlc":{"$ref":"#/components/schemas/Ohlc"},"last_price":{"type":"number","format":"float","description":"The last traded price of symbol","example":120.01,"readOnly":true},"instrument_token":{"type":"string"}}},"GetMarketQuoteLastTradedPriceResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MarketQuoteSymbolLtp"}}}},"MarketQuoteSymbolLtp":{"type":"object","properties":{"last_price":{"type":"number","format":"double","description":"The last traded price of symbol","example":120.01,"readOnly":true},"instrument_token":{"type":"string"}}},"SearchInstrumentResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","description":"Response data for search instrument request","items":{"$ref":"#/components/schemas/InstrumentData"}},"meta_data":{"$ref":"#/components/schemas/SearchMetaData","description":"Meta data for search instrument response"}}},"SearchMetaData":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/SearchPage"}}},"SearchPage":{"type":"object","properties":{"page_number":{"type":"integer","format":"int32"},"total_pages":{"type":"integer","format":"int32"},"records":{"type":"integer","format":"int32"},"total_records":{"type":"integer","format":"int32"}}},"WebsocketAuthRedirectResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/WebsocketAuthRedirectResponseData","description":"Response data for WebsocketAuthRedirectResponse"}}},"WebsocketAuthRedirectResponseData":{"type":"object","properties":{"authorizedRedirectUri":{"type":"string","deprecated":true},"authorized_redirect_uri":{"type":"string"}}},"ExpiredFutureData":{"type":"object","properties":{"name":{"type":"string","description":"Name of the instrument","example":"NIFTY"},"segment":{"type":"string","description":"Segment of the instrument","example":"NSE_FO"},"exchange":{"type":"string","description":"Exchange of the instrument","example":"NSE"},"expiry":{"type":"string","description":"Expiry date of the instrument","example":"2024-12-26"},"instrument_key":{"type":"string","description":"Unique key identifying the instrument","example":"NSE_FO|35005"},"exchange_token":{"type":"string","description":"Token assigned by the exchange","example":35005},"trading_symbol":{"type":"string","description":"Symbol used for trading","example":"NIFTY FUT 26 DEC 24"},"tick_size":{"type":"number","format":"double","description":"Minimum price movement","example":5},"lot_size":{"type":"integer","format":"int64","description":"Number of units per lot","example":25},"instrument_type":{"type":"string","description":"Type of the instrument","example":"FUT"},"freeze_quantity":{"type":"number","format":"double","description":"Maximum allowed quantity","example":1800},"underlying_key":{"type":"string","description":"Key of the underlying asset","example":"NSE_INDEX|Nifty 50"},"underlying_type":{"type":"string","description":"Type of the underlying asset","example":"INDEX"},"underlying_symbol":{"type":"string","description":"Symbol of the underlying asset","example":"NIFTY"},"minimum_lot":{"type":"integer","format":"int64","description":"Minimum lot size","example":25}}},"GetExpiredFuturesContractResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ExpiredFutureData"}}}},"GetExpiriesResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","items":{"type":"string"}}}},"TradeHistoryResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/TradeHistoryResponseTradeData"}},"metaData":{"$ref":"#/components/schemas/TradeHistoryResponseMetaData"}}},"TradeHistoryResponseMetaData":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/TradeHistoryResponsePageData"}}},"TradeHistoryResponsePageData":{"type":"object","properties":{"page_number":{"type":"integer","format":"int32"},"page_size":{"type":"integer","format":"int32"},"total_records":{"type":"integer","format":"int32"},"total_pages":{"type":"integer","format":"int32"}}},"TradeHistoryResponseTradeData":{"type":"object","properties":{"exchange":{"type":"string"},"segment":{"type":"string"},"option_type":{"type":"string"},"quantity":{"type":"integer","format":"int32"},"amount":{"type":"number","format":"float"},"trade_id":{"type":"string"},"trade_date":{"type":"string"},"transaction_type":{"type":"string"},"scrip_name":{"type":"string"},"strike_price":{"type":"string"},"expiry":{"type":"string"},"price":{"type":"number","format":"float"},"isin":{"type":"string"},"symbol":{"type":"string"},"instrument_token":{"type":"string"}}},"BrokerageData":{"type":"object","properties":{"total":{"type":"number","format":"float","description":"Total charges for the order","readOnly":true},"brokerage":{"type":"number","format":"float","description":"Brokerage charges for the order","readOnly":true},"taxes":{"$ref":"#/components/schemas/BrokerageTaxes","description":"Taxes levied on order","readOnly":true},"otherTaxes":{"$ref":"#/components/schemas/OtherTaxes","deprecated":true,"description":"Other charges levied","readOnly":true},"dpPlan":{"$ref":"#/components/schemas/DpPlan","deprecated":true,"description":"DP charges related information","readOnly":true},"other_charges":{"$ref":"#/components/schemas/OtherTaxes"},"dp_plan":{"$ref":"#/components/schemas/DpPlan"}}},"BrokerageTaxes":{"type":"object","properties":{"gst":{"type":"number","format":"float","description":"GST charges"},"stt":{"type":"number","format":"float","description":"STT charges"},"stamp_duty":{"type":"number","format":"float","description":"Stamp duty charges"}}},"BrokerageWrapperData":{"type":"object","properties":{"charges":{"$ref":"#/components/schemas/BrokerageData","description":"Response data for charges details"}}},"DpPlan":{"type":"object","properties":{"name":{"type":"string","description":"Name"},"min_expense":{"type":"number","format":"float","description":"Minimum expense charges"}}},"GetBrokerageResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/BrokerageWrapperData","description":"Response data for brokerage"}}},"OtherTaxes":{"type":"object","properties":{"transaction":{"type":"number","format":"float","description":"Transaction charges"},"clearing":{"type":"number","format":"float","description":"Clearing charges"},"ipft":{"type":"number","format":"float","description":"IPF charges"},"sebi_turnover":{"type":"number","format":"float","description":"SEBI turnover charges"}}},"GttCancelOrderRequest":{"type":"object","properties":{"gtt_order_id":{"type":"string","description":"Unique identifier of the GTT order to be cancelled","example":"GTT-12345678","pattern":"^GTT-.+$"}},"required":["gtt_order_id"]},"CancelOrderData":{"type":"object","properties":{"order_id":{"type":"string","description":"Reference order ID","example":1644490272000,"readOnly":true}}},"CancelOrderV3Response":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/CancelOrderData"},"metadata":{"$ref":"#/components/schemas/OrderMetadata"}}},"CancelOrderResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"$ref":"#/components/schemas/CancelOrderData","description":"Response data for Cancel order request"}}},"LogoutResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error","partial_success"]},"data":{"type":"boolean","description":"Logout status"}}},"OAuthClientException":{"type":"object","properties":{"cause":{"type":"object","properties":{"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"message":{"type":"string"},"localizedMessage":{"type":"string"}}},"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"message":{"type":"string"},"suppressed":{"type":"array","items":{"type":"object","properties":{"stackTrace":{"type":"array","items":{"type":"object","properties":{"classLoaderName":{"type":"string"},"moduleName":{"type":"string"},"moduleVersion":{"type":"string"},"methodName":{"type":"string"},"fileName":{"type":"string"},"lineNumber":{"type":"integer","format":"int32"},"className":{"type":"string"},"nativeMethod":{"type":"boolean"}}}},"message":{"type":"string"},"localizedMessage":{"type":"string"}}}},"localizedMessage":{"type":"string"}}}},"securitySchemes":{"OAUTH2":{"type":"oauth2","scheme":"BEARER","flows":{"authorizationCode":{"authorizationUrl":"https://api-v2.upstox.com/v2/login/authorization/dialog","tokenUrl":"https://api-v2.upstox.com/v2/login/authorization/token","scopes":{"read":"Read access","write":"Write access"}}}}}}}