Authorization

Order Connect [Offsite Orders]

GET
/api-gw/oauth/order-connect

Authorize to place orders and get oAuth Code to the redirect url at once.

Note: This API cannot be tested from this API document since it gets redirected.

Query Parameters

client_id*string

Your app's alphanumeric API key from the Apps Section app registration page. If the value does not match the registered app, authorization will be denied.

redirect_uri*string

The callback URL registered in your app on the Apps Section. Must match exactly — if it does not, authorization will be denied.

response_type*string

As per oAuth specification this value should be "code"

scope*string

This field value should be "general".

state*string

A literal string that will be return in the final redirection callback.

params*string

This field value should be the params required to place orders in json array format and get oAuth Code.

Note: Each array value should match any of examples provided. Else your authorization will fail.

Example:

[{"exch":"NSE","symbol":"ACC","series":"EQ","inst":"EQT","qty":10,"side":"buy","type":"limit","product":"intraday","limitPrice":2700.55,"validity":"day"},{"exch":"NFO","symbol":"NIFTY","expiry":"2022-11-24","inst":"FUTIDX","qty":2000,"side":"sell","type":"market","product":"intraday","limitPrice":0,"validity":"ioc","discQty":500},{"exch":"NFO","symbol":"BANKNIFTY","expiry":"2022-11-24","optType":"PE","inst":"OPTIDX","strike":"34000","qty":1500,"side":"buy","type":"market","product":"delivery","limitPrice":0,"validity":"day","mktProt":5}]

For equity symbol instrument must be EQT

Response Body

application/json

application/json

curl -X GET "https://example.com/api-gw/oauth/order-connect?client_id=%3Capi+key%3E&redirect_uri=http%3A%2Fmyapp.in%2F&response_type=code&scope=general&state=&params="
Empty
{
  "s": "error",
  "msg": "Input validation failed. Kindly check your input contains required fields for the request"
}
{
  "s": "error",
  "msg": "Unauthorized"
}