Skip to main content

Invest Button API

📋 Purpose

The Invest Button API enables users to execute trades directly. Any fintech company (Publisher) mapped to a broker in ODIN Connector can integrate this API to execute trades and allow BUY/SELL order placement through their portal.

🛣️ Flow

When a user clicks BUY/SELL for any scrip/basket from the Publisher portal:

  • The user is redirected to the ODIN Connector Basket page.
  • After successful order placement, the user is redirected back to the Publisher website.
  • Valid session: Direct redirect to connector basket page.
  • Invalid session: Message displayed — "Invalid session. Please login with your broker and try it."

The callback URL shares parameters including partner id, user session, scrip name, quantity, price, and single/multiple scrip details.

💰 ODIN Connector Invest (BUY/SELL) Button API

FieldValue
NameODIN Connector Invest (BUY/SELL) Button API
URLhttps://odinconnector-apiuat.63moons.com/productmgmtservice/apiButtonRequest
DescriptionBasket execution using Buy/Sell button via button API
MethodPOST

🏷️ Request

Header

Content-Type: application/json

Body

ParameterData TypeMandatory/OptionalDescription
sessionIdStringMSession received from Persistence Login Request
sRecoIdString (varchar 6)MUnique per each basket rebalance
sClientCodeString (varchar 50)MThird party application user id
basketDataArrayMArray of basket scrip to be buy/sell
info

For basket data scrip details, refer to Order Details.

Example Request

{
"sessionId": "XYZ",
"sRecoId": "01F5h9",
"sClientCode": "connector",
"basketData": [
{
"ordPrice": 0,
"ordGTD1": 1,
"prodType": "DELIVERY",
"orderSide": "BUY",
"sLTriggerPrice": 0,
"buyOrSell": "1",
"sLOrderPrice": 0,
"orgQTY": 500,
"mktSegId": 1,
"days": "0",
"scripTkn": 12716,
"trigPrice": 0,
"validity": 1,
"ordType": "RL-MKT",
"discQty": 50
}
]
}

📄 Response

ParameterData TypeMandatory/OptionalDescription
SuccessBooleanMtrue – Success, false – Failure
DataStringMURL for redirecting to basket page
MessageStringMSuccess/Failure message for the API
statusCodeStringMApplication status code
traceIdStringMSystem generated Code by third-party, used for VAS log purpose

** 🟢 Example Success Response**

{
"success": true,
"data": "http://odinconnectoruat.63moons.com/landing/redirect?sAppToken=ButtonAPI63moonsnode9867283a319&sTwoWayToken=abc&sProductCode=BUTTON-API-1963809e-481a-11ef-9234-ddd0376485c8&sTpUserId=4560A&sPartnerId=0AF1C1&nRequestType=3&sSession=XYZ",
"message": "Url successfully formed",
"statusCode": "vasprd-200-818",
"traceId": "traceId-0001"
}

** 🔴 Example Failure Response**

{
"success": false,
"data": null,
"message": "Invalid session. Please login with your broker and try it",
"statusCode": "vasprd-400-500",
"traceId": "traceId-0001"
}