Torus Digital Open API
  • Introduction
  • Get Started
  • Authentication
    • Login
    • Session Token
  • SDK
    • Self Generated SDK'S
  • Orders
    • Order Entry
    • Order Modify
    • Order Cancel
    • Order Convert To delivery
    • Order Margin
    • Order Book
    • Order Details
  • Holdings and Portfolio
    • Portfolio
    • Holding
    • Holding Details
    • Net Positions
  • Market
    • Market Status
  • Trade
    • Trade Book
    • Trade Details
  • Funds
    • Fund limits
    • Fund limits details
  • Historical Data
    • Search Stock
    • Company Basic Detail
    • Indices List
    • Monthly/Yearly Returns
    • Share Holding Pattern
    • Balance Sheet
    • Cash Flow
    • Profit and Loss
Powered by GitBook
On this page
  1. Orders

Order Convert To delivery

This API converts an intraday (I) position to a delivery (C) position for a specific security on the exchange. The backend processes the request by validating the provided credentials and order details, updating the order's status and type in the trading system, and then confirming the successful conversion.

Endpoint

Base URL
https://connects.torusdigital.com/api/v1/order/convert/delivery

Header Parameters

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Request Parameter

Parameter
Value
Mandatory
Remarks

exchange

NSE

Y

The exchange where the transaction takes place, it can be NSE/BSE.

segment

E

Y

The market segment, where "E" might stand for "Equity".

security_id

14366

Y

The unique identifier for the security being traded.

quantity

2

Y

Non-zero integer value

txn_type

B

Y

B for buy position, S for sell position

mkt_type

N

Y

Default value is NL

product_from

I

Y

Original product while placing order.

product_to

C

Y

Change to new product.

user_type

C/D

Y

C – Client, D - Dealer

Request

cURL
curl --location 'https://connects.torusdigital.com/api/v1/order/convert/delivery' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "source": "N",
    "data": {
        "exchange": "NSE",
        "segment": "E",
        "security_id": "14366",
        "quantity": 1,
        "mkt_type": "NL",
        "product_from": "I",
        "product_to": "C",
        "user_type": "C",
        "txn_type": "B"
    }
}'
Java-Unirest
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://connects.torusdigital.com/api/v1/order/convert/delivery")
  .header("Authorization", "Bearer {{token}}")
  .header("Content-Type", "application/json")
  .body("{\n" +
        "    \"source\": \"N\",\n" +
        "    \"data\": {\n" +
        "        \"exchange\": \"NSE\",\n" +
        "        \"segment\": \"E\",\n" +
        "        \"security_id\": \"14366\",\n" +
        "        \"quantity\": 1,\n" +
        "        \"mkt_type\": \"NL\",\n" +
        "        \"product_from\": \"I\",\n" +
        "        \"product_to\": \"C\",\n" +
        "        \"user_type\": \"C\",\n" +
        "        \"txn_type\": \"B\"\n" +
        "    }\n" +
        "}")
  .asString();
Go-Native
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"strings"
)

func main() {
	url := "https://connects.torusdigital.com/api/v1/order/convert/delivery"
	method := "POST"

	payload := strings.NewReader(`{
		"source": "N",
		"data": {
			"exchange": "NSE",
			"segment": "E",
			"security_id": "14366",
			"quantity": 1,
			"mkt_type": "NL",
			"product_from": "I",
			"product_to": "C",
			"user_type": "C",
			"txn_type": "B"
		}
	}`)

	client := &http.Client{}
	req, err := http.NewRequest(method, url, payload)

	if err != nil {
		fmt.Println(err)
		return
	}
	req.Header.Add("Authorization", "Bearer {{token}}")
	req.Header.Add("Content-Type", "application/json")

	res, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}
	defer res.Body.Close()

	body, err := ioutil.ReadAll(res.Body)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(string(body))
}
JavaScript-jQuery
var settings = {
  "url": "https://connects.torusdigital.com/api/v1/order/convert/delivery",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json"
  },
  "data": JSON.stringify({
    "source": "N",
    "data": {
      "exchange": "NSE",
      "segment": "E",
      "security_id": "14366",
      "quantity": 1,
      "mkt_type": "NL",
      "product_from": "I",
      "product_to": "C",
      "user_type": "C",
      "txn_type": "B"
    }
  }),
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Response

{
    "status": "success",
    "message": "Position converted successfully.",
    "data": []
}

Response

Parameter
Description

Status

“success”

Message

“Some Message”

Data

An object containing the details of the order.

order_no

Order specific identification number.

PreviousOrder CancelNextOrder Margin

Last updated 11 months ago