Upstox Order API

The Order API from Upstox — 18 operation(s) for order.

Operations 18

PUT /v3/order/modify Modify order #
PUT /v3/order/gtt/modify Modify GTT order #
PUT /v2/order/modify Modify order #
POST /v3/order/place Place order #
POST /v3/order/gtt/place Place GTT order #
POST /v2/order/positions/exit Exit all positions #
POST /v2/order/place Place order #
POST /v2/order/multi/place Place multi order #
GET /v3/order/gtt Get GTT order details #
GET /v2/order/trades Get trades for order #
GET /v2/order/trades/get-trades-for-day Get trades #
GET /v2/order/retrieve-all Get order book #
GET /v2/order/history Get order history #
GET /v2/order/details Get order details #
DELETE /v3/order/gtt/cancel Cancel GTT order #
DELETE /v3/order/cancel Cancel order #
DELETE /v2/order/multi/cancel Cancel multi order #
DELETE /v2/order/cancel Cancel order #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/upstox-order-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

upstox-order-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenAPI definition Order API
  version: v0
servers:
- url: https://api-v2.upstox.com
tags:
- name: Order
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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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: []
      summary: Modify order
      x-summary-source: derived
  /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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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/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'
        '400':
          description: UDAPI100010 - Unknown order id | order request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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/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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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: []
      summary: Place order
      x-summary-source: derived
  /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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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/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'
        '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'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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/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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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: []
  /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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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: []
  /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'
        '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'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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/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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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.


        The order history can be requested either using order_id or tag.


        If 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.


        If 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'
        '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'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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/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.
      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'
        '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'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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/GetOrderDetailsResponse'
      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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiGatewayErrorResponse'
        '403':
          description: Forbidden
          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:
   

# --- truncated at 32 KB (76 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/upstox/refs/heads/main/openapi/upstox-order-api-openapi.yml