### Get Trade Response Example Source: https://www.multitradesoftech.com/mtsrestapidocs This snippet demonstrates the structure of a successful trade response from the API, including details like trade ID, order ID, and transaction specifics. ```JSON { "Message": "Trade", "status": "Successful", "data": { "trade_id": "12440", "order_id": "6746", "exchange_trade_id": "T28856746975208", "exchange_order_id": "O28856746", "Exchange": "NSECM", "tradingsymbol": "RELIANCE", "instrument_token": "2885", "tag": "HELLOMOTO2", "product": "CNC", "average_price": "2939.50", "price": "2939.50", "quantity": "100", "pending_quantity": "0", "transaction_type": "BUY", "fill_timestamp": "2024-03-03 00:28:09", "order_timestamp": "00:28:09", "exchange_timestamp": "2024-03-03 00:28:09" } } ``` -------------------------------- ### Get User Margins (Node.js) Source: https://www.multitradesoftech.com/mtsrestapidocs This Node.js example shows how to retrieve user margin information using the requests library. It sets up the necessary headers, including API version and authorization, and makes a GET request to the /user/margins endpoint. ```javascript const requests = require('requests'); const url = "https://wss1.multitrade.tech:15207/user/margins"; const headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" }; requests.get(url, { headers: headers }, (error, response, body) => { if (error) { console.error(error); } else { console.log(body); } }); ``` -------------------------------- ### Get Order Status by Reference Source: https://www.multitradesoftech.com/mtsrestapidocs Retrieves the status of a placed trade using a Tag and OrderID. Requires an API key and specific headers, including the API version. ```Python import requests url = "https://wss1.multitrade.tech:15207/orders/ReferenceTag/2920" headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Get Order Status - Python Source: https://www.multitradesoftech.com/mtsrestapidocs This Python code snippet demonstrates how to retrieve the status of all placed orders using the Multitrade API. It makes a GET request to the orders endpoint with the necessary API version and authorization headers. ```Python import requests url = "https://wss1.multitrade.tech:15207/orders" headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Get Auctions Data (Python) Source: https://www.multitradesoftech.com/mtsrestapidocs This Python code snippet shows how to retrieve auction data using the requests library. It makes a GET request to the /auctions endpoint with the required 'Api-Version' header. ```Python import requests url = "https://wss1.multitrade.tech:15207/auctions" headers = { 'Api-Version': '3', } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### Get All Instruments (Python) Source: https://www.multitradesoftech.com/mtsrestapidocs Fetches a gzipped CSV dump of all tradable instruments across different exchanges and segments. The data is generated daily, so last prices are not real-time. The response is processed to save as a CSV file. ```Python import requests import csv url = "https://wss1.multitrade.tech:15207/instruments" headers = { 'Api-Version': '3', 'Authorization': 'API_KEY:REQUEST_TOKEN' 'Content-Type':'application/x-www-form-urlencoded' } response = requests.get( url, headers=headers,verify=False) if response.status_code ==200: content =response.content.decode('utf-8') csv_data = [line.split(',')for line in content.split(' ')if line.strip()] with open ('response_data.csv','w',newline='')as csvfile: writer = csv.writer(csvfile) writer.writerows(csv_data) print("Data has been written to response_data.csv successfully.") else: print(f"Error:{reasponse.status_code}") ``` -------------------------------- ### Web Browser Trading Solution Source: https://www.multitradesoftech.com/index Enables trading from any web browser with powerful features, offering accessibility and convenience without the need for dedicated software installation. It ensures a rich trading experience across devices. ```Web Browser Trading Experience trading anywhere with browser-based backed with power rich features ``` -------------------------------- ### Get All Trades Source: https://www.multitradesoftech.com/mtsrestapidocs This endpoint retrieves all executed trade events. Clients can register to receive these events. The API requires an Api-Version of '3' and authorization via an API key and request token. It supports GET requests. ```Python import requests url = "https://wss1.multitrade.tech:15207/trades" payload={} headers = { 'Api-Version': '3', 'Authorization': 'API_KEY:REQUEST_TOKEN' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text) ``` -------------------------------- ### Get Trades by OrderID Source: https://www.multitradesoftech.com/mtsrestapidocs This API retrieves trade events associated with a specific OrderID. It requires an Api-Version of '3' and authorization using an API key and request token. The endpoint supports GET requests. ```Python import requests url = "https://wss1.multitrade.tech:15207/trades/2920" payload={} headers = { 'Api-Version': '3', 'Authorization': 'API_KEY:REQUEST_TOKEN' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text) ``` -------------------------------- ### Get Multitradesoftech User Profile Source: https://www.multitradesoftech.com/mtsrestapidocs This snippet shows how to retrieve user profile data from the Multitradesoftech API using a GET request. Users can access their profile information stored by the broker, ensuring secure access to personal data. The response contains details like user type, email, and access token. ```Python import requests url = "https://wss1.multitrade.tech:15207/user/profile" headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Get Trades by Reference and Order ID (Python) Source: https://www.multitradesoftech.com/mtsrestapidocs Retrieves trade execution details using a reference tag and order ID. Requires API key authentication and specifies the API version. The response is a JSON object containing trade data. ```Python import requests url = "https://wss1.multitrade.tech:15207/trades/ReferenceTag/2920" payload={} headers = { 'Api-Version': '3', 'Authorization': 'API_KEY:REQUEST_TOKEN' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text) ``` -------------------------------- ### Common Error Responses in Multitrade API Source: https://www.multitradesoftech.com/mtsrestapidocs This section details common HTTP status codes encountered when using the Multitrade API, along with their descriptions and example error responses, aiding in debugging and error handling. ```text Status_Code | Description | Example Response ---|---|--- 401 | Invalid AccessToken | {"status": "unsuccessful", "data": {"error": "Invalid AccessToken"}} 410 | Application Not Active | {"status": "unsuccessful", "data": {"error": "Application Not Active"}} 404 | Application Not Found | {"status": "unsuccessful", "data": {"error": "Application Not Found"}} 500 | Api Server Not Connected | {"status": "unsuccessful", "data": {"error": "Api Server Not Connected"}} 409 | Invalid API version 3 needed | {"status": "unsuccessful", "data": {"error": "Invalid API version 3 needed"}} 405 | Invalid Method | {"status": "unsuccessful", "data": {"error": "Invalid Method"}} 404 | Wrong Request please check path | {"status": "unsuccessful", "data": {"error": "Wrong Request please check path"}} 429 | Msg rate limit exceeded | {"status": "unsuccessful", "data": {"error_text": "Message rate limit has exceeded by it's limit"}} ``` -------------------------------- ### Get User Margins (cURL) Source: https://www.multitradesoftech.com/mtsrestapidocs This cURL command demonstrates how to fetch user margin details. It specifies the API version and includes authorization headers with an API key and request token. The endpoint used is /user/margins. ```bash curl -X GET "https://wss1.multitrade.tech:15207/user/margins" \ -H "Api-Version: 3" \ -H "Authorization: API_KEY:REQUEST_TOKEN" ``` -------------------------------- ### Get Multitradesoftech Session Token Source: https://www.multitradesoftech.com/mtsrestapidocs This snippet demonstrates how to retrieve a session token from the Multitradesoftech API using a GET request. The session token is valid for 24 hours or until logout and is required for accessing features securely. The response includes user details and access token. ```Python import requests url = "https://wss1.multitrade.tech:15207/session/token" headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Support Contact Information Source: https://www.multitradesoftech.com/index Provides phone numbers for immediate customer support, ensuring users can get timely assistance for any issues or queries. ```Phone +91 79 4777 4777 ``` ```Phone +91 89809 85000 ``` -------------------------------- ### Get User Margins Source: https://www.multitradesoftech.com/mtsrestapidocs Retrieves detailed information about a user's funds, cash, and margin status across equity and commodity segments. Requires an API key and request token for authorization. The response includes status and detailed margin data categorized by segment (CM, DEPOSIT, FO, MCX). ```Python import requests url = "https://wss1.multitrade.tech:15207/user/margins" headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Get Expiry Date for Instrument (Python) Source: https://www.multitradesoftech.com/mtsrestapidocs Retrieves the expiry dates for a given financial instrument symbol and exchange. Requires API version 3 and authentication. ```Python import requests url = "https://wss1.multitrade.tech:15207/expirydate" payload = { "symbol":"NIFTY", "exchange":"NSEFO" } headers = { "Api-Version": "3", "Content-Type": "application/x-www-form-urlencoded", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, data=payload, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Get Instrument ID for Index (Python) Source: https://www.multitradesoftech.com/mtsrestapidocs Obtains the InstrumentID (SecurityID) for a specified index symbol, exchange, and instrument type. Requires API version 3 and authentication. ```Python import requests url = "https://wss1.multitrade.tech:15207/instrumentid" payload = { "symbol": "NIFTY", "exchange": "NSECM", "instrument_type": "INDEX", } headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, data=payload, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Get Instrument ID for Equity (Python) Source: https://www.multitradesoftech.com/mtsrestapidocs Fetches the InstrumentID (SecurityID) for an equity instrument. Requires specifying the symbol, expiry date (e.g., 'EQ' for NSECM), exchange, and instrument type. API version 3 and authentication are necessary. ```Python import requests url = "https://wss1.multitrade.tech:15207/instrumentid" payload = { "symbol": "TCS", "expiry_date": "EQ", "exchange": "NSECM", "instrument_type": "EQUITY", } headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, data=payload, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Get Future Instrument ID Source: https://www.multitradesoftech.com/mtsrestapidocs Retrieves the InstrumentID for a given future contract. Requires symbol, expiry date, exchange, and instrument type. The API returns a status and the instrument data, including the instrument ID. ```Python import requests url = "https://wss1.multitrade.tech:15207/instrumentid" payload = { "symbol": "NIFTY", "expiry_date": "25JUL2024", "exchange": "NSEFO", "instrument_type": "FUT", } headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, data=payload, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Retrieve Order Status by Order ID (Python) Source: https://www.multitradesoftech.com/mtsrestapidocs This Python code snippet demonstrates how to fetch the status of a specific order using the Multitrade API. It sends a GET request to the orders endpoint with the order ID and required headers, then prints the JSON response. ```Python import requests url = "https://wss1.multitrade.tech:15207/orders/2920" headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Get Option Instrument ID Source: https://www.multitradesoftech.com/mtsrestapidocs Retrieves the InstrumentID for a given option contract. Requires symbol, expiry date, strike price, option type, exchange, and instrument type. The API returns a status and the instrument data. ```Python import requests url = "https://wss1.multitrade.tech:15207/instrumentid" payload = { "symbol": "NIFTY", "expiry_date": "16MAY2024", "strike_price": "21000", "option_type": "PE", "exchange": "NSEFO", "instrument_type": "OPT", } headers = { "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.get(url, data=payload, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Place Regular Order - Python Source: https://www.multitradesoftech.com/mtsrestapidocs This Python code snippet demonstrates how to place a regular order (e.g., LIMIT order) using the Multitrade API. It includes parameters for trading security, exchange, transaction type, quantity, price, and product. The request is sent as form-urlencoded data with necessary headers. ```Python import requests url = "https://wss1.multitrade.tech:15207/orders/regular" payload = { "tradingsecurity": "3045", "exchange": "NSECM", "transaction_type": "BUY", "order_type": "LIMIT", "quantity": "10", "validity": "DAY", "price": "830", "product": "CNC" } headers = { "Content-Type": "application/x-www-form-urlencoded", "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.post(url, data=payload, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Place SLBM Order - Python Source: https://www.multitradesoftech.com/mtsrestapidocs This Python code snippet shows how to place a Stock Lending and Borrowing Market (SLBM) order using the Multitrade API. It includes parameters specific to SLBM, such as 'open_close' for buy (Borrow/Recall) or sell (Lend/Repay) actions, along with standard order details. ```Python import requests url = "https://wss1.multitrade.tech:15207/orders/regular" payload = { "tradingsecurity": "150013", "exchange": "NSESLBM", "transaction_type": "SELL", "order_type": "LIMIT", "quantity": "8", "validity": "DAY", "price": "800", "product": "NRML", "open_close":"Lend", "userid":"DAPI1" } headers = { "Content-Type": "application/x-www-form-urlencoded", "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.post(url, data=payload, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Place Auction Order (Python) Source: https://www.multitradesoftech.com/mtsrestapidocs This Python code snippet demonstrates how to place an auction order using the requests library. It sends a POST request to the auction order endpoint with specified payload and headers, including API key and request token for authentication. ```Python import requests url = "https://wss1.multitrade.tech:15207/auctionorder" payload = { "tradingsecurity": "220", "exchange": "NSECM", "transaction_type": "SELL", "order_type": "AUCTION", "quantity": "10", "validity": "DAY", "price": "830", "product": "CNC", "userid":"DAPI1", "tag":"ReferenceTag", "auction_number":"2044" } headers = { "Content-Type": "application/x-www-form-urlencoded", "Api-Version": "3", "Authorization": "API_KEY:REQUEST_TOKEN" } response = requests.post(url, data=payload, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Establish WebSocket Connection (Python) Source: https://www.multitradesoftech.com/mtsrestapidocs Demonstrates how to establish a WebSocket connection to the Multitradesoftech server using the 'websockets' library in Python. It checks for a successful handshake response. ```Python import asyncio import websockets async def connect_to_server(): async with websockets.connect('wss://wss1.multitrade.tech:15208') as websocket: response = await websocket.recv() if "HandShake" in response: print("WebSocket connection successful!") else: print("WebSocket connection failed") asyncio.run(connect_to_server()) ``` -------------------------------- ### Login to Multitradesoftech API Source: https://www.multitradesoftech.com/mtsrestapidocs This snippet demonstrates how to log in to the Multitradesoftech API using a POST request. It includes the necessary URL, payload with API key and secrets, and headers with content type and API version. The response is then parsed as JSON. ```Python import requests url = "https://wss1.multitrade.tech:15207/connect/login" payload = { "api_key": "API_KEY", "api_secrets": "API_SECRET" } headers = { "Content-Type": "application/x-www-form-urlencoded", "Api-Version": "3" } response = requests.post(url, data=payload, headers=headers) data = response.json() print(data) ``` -------------------------------- ### Establish WebSocket Connection (Node.js) Source: https://www.multitradesoftech.com/mtsrestapidocs Shows how to establish a WebSocket connection to the Multitradesoftech server using the 'ws' library in Node.js. It verifies the handshake and closes the connection. ```Node.js const WebSocket = require('ws'); async function connectToServer() { const websocket = new WebSocket('wss://wss1.multitrade.tech:15208'); websocket.on('message', function(message) { if (message.includes('HandShake')) { console.log('WebSocket connection successful!'); } else { console.log('WebSocket connection failed'); } websocket.close(); }); } connectToServer(); ``` -------------------------------- ### WebSocket Login (Python) Source: https://www.multitradesoftech.com/mtsrestapidocs This Python code uses the asyncio and websockets libraries to establish a WebSocket connection and log in to the Multitradesoftech server. It sends a JSON payload containing login credentials. ```Python import asyncio import websockets async def connect_to_server(): async with websockets.connect('wss://wss1.multitrade.tech:15207') as websocket: sc = "{\"Message\":\"Login\",\"API_KEY\":\".KAoiU$GCfrrNDN4H|qq< { const sc = '{"Message":"Broadcast","EXC":"NSECM","SECID":"3045"}'; await ws.send(sc); }); let oldVWAP = -1; ws.on('message', data => { const response = data.toString(); if (response.includes('"VWAP"')) { const responses = response.trim().split("\n\n"); for (const res of responses) { try { const jsonData = JSON.parse(res); if (jsonData["VWAP"] && oldVWAP !== jsonData["VWAP"]) { oldVWAP = jsonData["VWAP"]; console.log("VWAP:", jsonData["VWAP"]); } } catch (error) { console.error('Error parsing JSON:', error); } } } }); } connectToServer().catch(console.error); ``` -------------------------------- ### Python: Connect and Watch Market Data Source: https://www.multitradesoftech.com/mtsrestapidocs Connects to the Multitradesoftech WebSocket server using Python's asyncio and websockets library. It sends a 'Watch' request for a specific security and prints the received market data. Requires the 'websockets' library. ```Python import asyncio import websockets async def connect_to_server(): async with websockets.connect('wss://wss1.multitrade.tech:15208') as websocket: response = await websocket.recv() if "HandShake" in response: sc = "{\"Message\":\"Watch\",\"EXC\":\"NSEFO\",\"SECID\":\"71441\"}" await websocket.send(sc) while True: response = await websocket.recv() if "\"Watch\"" in response: print(response) else: print("WebSocket connection failed") asyncio.run(connect_to_server()) ``` -------------------------------- ### Multitrade API Authentication Header Source: https://www.multitradesoftech.com/mtsrestapidocs Demonstrates the format for API authentication using an API Key and Secret Key, specifically how to construct the 'Authorization' header required for secure API requests. ```text Authorization: .KAoiU$GCfrrNDN4H|qq< ws.send('{\"Message\":\"Watch\",\"EXC\":\"NSEFO\",\"SECID\":\"71441\"}')); ws.on('message', data => { if (data instanceof Buffer) { // Convert binary buffer to string data = data.toString('utf-8'); } console.log(data.includes('\"Watch\"') ? data : 'WebSocket connection failed'); }); } connect(); ``` -------------------------------- ### Python: Connect and Request Auction Data Source: https://www.multitradesoftech.com/mtsrestapidocs Connects to the Multitradesoftech WebSocket server using Python's asyncio and websockets library. It sends an 'Auction' request for a specific security and prints the received auction data. Requires the 'websockets' library. ```Python import asyncio import websockets async def connect_to_server(): async with websockets.connect('wss://wss1.multitrade.tech:15208') as websocket: response = await websocket.recv() if "HandShake" in response: sc = "{\"Message\":\"Auction\",\"EXC\":\"NSECM\",\"SECID\":\"10397\"}" await websocket.send(sc) response = await websocket.recv() if "\"Auction\"" in response: print(response) else: print("WebSocket connection failed") asyncio.run(connect_to_server()) ``` -------------------------------- ### API/ATINS Order Placement Response Source: https://www.multitradesoftech.com/mtsrestapidocs This JSON object represents the successful response received when an order is placed via the API or ATINS. It contains details about the order, including its status, unique identifiers, trading parameters, and timestamps. ```JSON { "Message": "Order", "status": "Successful", "data": { "order_id": "23", "parent_order_id": "6746", "exchange_order_id": "", "placed_by": "DAPI1", "tradingsymbol": "RELIANCE", "exchange": "NSECM", "instrument_token": "2885", "transaction_type": "Buy", "order_type": "MARKET", "status": "Unknown", "product": "CNC", "validity": "DAY", "price": "0.00", "userid": "DAPI1", "quantity": "100", "trigger_price": "0.00", "pending_quantity": "100", "filled_quantity": "0", "disclosed_quantity": "0", "order_timestamp": "02\/03\/2024 18:58:09", "exchange_timestamp": "01\/01\/1970 05:30:00", "status_message": "", "tag": "HELLOMOTO2" } } ``` -------------------------------- ### Python WebSocket LTP Request Source: https://www.multitradesoftech.com/mtsrestapidocs Connects to the Multitradesoftech WebSocket server using Python to request and print the Last Traded Price (LTP) for a given security. ```Python import asyncio import websockets async def connect_to_server(): async with websockets.connect('wss://wss1.multitrade.tech:15208') as websocket: response = await websocket.recv() if "HandShake" in response: sc = "{\"Message\":\"LTP\",\"EXC\":\"NSEFO\",\"SECID\":\"35020\"}" await websocket.send(sc) while True: response = await websocket.recv() if "\"LTP\"" in response: print(response) else: print("WebSocket connection failed") asyncio.run(connect_to_server()) ``` -------------------------------- ### Send Broadcast Request and Receive Data (Node.js) Source: https://www.multitradesoftech.com/mtsrestapidocs Establishes a WebSocket connection, sends a 'Broadcast' request for market data, and logs the received broadcast message or an error. ```Node.js const WebSocket = require('ws'); async function connect() { const ws = new WebSocket('wss://wss1.multitrade.tech:15208'); ws.on('open', () => ws.send('{"Message":"Broadcast","EXC":"NSECM","SECID":"3045"}')); ws.on('message', data => { if (data instanceof Buffer) { // Convert binary buffer to string data = data.toString('utf-8'); } console.log(data.includes('"Broadcast"') ? data : 'WebSocket connection failed'); }); } connect(); ``` -------------------------------- ### Retrieve Historical Data with Python Source: https://www.multitradesoftech.com/mtsrestapidocs This Python code snippet shows how to fetch historical trading data from the Multitradesoftech API. It requires specifying the exchange, security ID, time range, and resolution. ```Python import requests url = "https://wss1.multitrade.tech:15208/ticks?EXC=NSECM&SECID=2885&FROM=1719998100&TO=1720020600&RESOLUTION=15" response = requests.request("GET", url) print(response.text) ``` -------------------------------- ### Sample JSON Response for Multiple Orders Source: https://www.multitradesoftech.com/mtsrestapidocs This JSON structure represents a successful response from the Multitrade API, detailing the status of multiple orders. It includes information such as order ID, transaction type, status, and quantities for each order. ```JSON { "status": "successful", "data": [ { "order_id": "2918", "parent_order_id": "2918", "exchange_order_id": "O30452918", "placed_by": "DAPI1", "tradingsymbol": "SBIN", "exchange": "NSECM", "instrument_token": "3045", "transaction_type": "Sell", "order_type": "MARKET", "status": "Execute", "product": "CNC", "validity": "DAY", "price": "830.000000", "userid": "DAPI1", "quantity": "10", "trigger_price": "829.0000", "average_price": "747.700000", "pending_quantity": "0", "filled_quantity": "10", "disclosed_quantity": "0", "market_protection": "0.00", "order_timestamp": "23/03/202415:01:11", "exchange_timestamp": "23/03/202420:31:11", "status_message": "", "tag": "ReferenceTag" }, { "order_id": "2919", "parent_order_id": "2919", "exchange_order_id": "O30452919", "placed_by": "DAPI1", "tradingsymbol": "SBIN", "exchange": "NSECM", "instrument_token": "3045", "transaction_type": "Sell", "order_type": "MARKET", "status": "Execute", "product": "CNC", "validity": "DAY", "price": "830.000000", "userid": "DAPI1", "quantity": "10", "trigger_price": "0.000000", "average_price": "747.400000", "pending_quantity": "0", "filled_quantity": "10", "disclosed_quantity": "0", "market_protection": "0.00", "order_timestamp": "23/03/202415:01:19", "exchange_timestamp": "23/03/202420:31:19", "status_message": "", "tag": "MTS" }, { "order_id": "2920", "parent_order_id": "2920", "exchange_order_id": "O30452920", "placed_by": "DAPI1", "tradingsymbol": "SBIN", "exchange": "NSECM", "instrument_token": "3045", "transaction_type": "Sell", "order_type": "MARKET", "status": "Execute", "product": "NRML", "validity": "DAY", "price": "830.000000", "userid": "DAPI1", "quantity": "10", "trigger_price": "829.000000", "average_price": "748.050000", "pending_quantity": "0", "filled_quantity": "10", "disclosed_quantity": "0", "market_protection": "0.00", "order_timestamp": "23/03/202415:02:24", "exchange_timestamp": "23/03/202420:32:24", "status_message": "", "tag": "ReferenceTag" } ] } ``` -------------------------------- ### Sample JSON Response for a Single Order Source: https://www.multitradesoftech.com/mtsrestapidocs This JSON structure represents a successful response from the Multitrade API for a single order query. It provides detailed information about the order, including its status, transaction details, and timestamps. ```JSON { "status": "Successful", "data": [ { "order_id": "2920", "parent_order_id": "2920", "exchange_order_id": "O30452920", "placed_by": "DAPI1", "status": "Execute", "tradingsymbol": "SBIN", "exchange": "NSECM", "instrument_token": "3045", "transaction_type": "Sell", "order_type": "MARKET", "product": "NRML", "validity": "DAY", "price": "829.000000", "userid": "DAPI1", "quantity": "10", "trigger_price": "0.000000", "average_price": "0.00", "pending_quantity": "0", "filled_quantity": "10", "disclosed_quantity": "0", "market_protection": "0.00", "order_timestamp": "23/03/202415:02:24", "exchange_timestamp": "23/03/202420:32:24", "status_message": "", "tag": "ReferenceTag" } ] } ``` -------------------------------- ### Trading Software ATINS Description Source: https://www.multitradesoftech.com/index Describes the ATINS trading software as a robust platform for trading various financial instruments including Stocks, Futures, Options, Forex, and Crypto. ```FAQ Our trading software is a robust platform designed to facilitate the buying & selling of financial instruments like Stocks, Futures, Options, Forex, Crypto and many more asset classes. ``` -------------------------------- ### Login Endpoint Request Body Source: https://www.multitradesoftech.com/mtsrestapidocs Shows the structure of the request body for the login endpoint, including the required 'api_key' and 'api_secrets' parameters for authenticating with the Interactive API server. ```text api_key: .KAoiU$GCfrrNDN4H|qq< ws.send('{"Message":"LTP","EXC":"NSEFO","SECID":"35020"}')); ws.on('message', data => { if (data instanceof Buffer) { // Convert binary buffer to string data = data.toString('utf-8'); } console.log(data.includes('"LTP"') ? data : 'WebSocket connection failed'); }); } connect(); ``` -------------------------------- ### Node.js: Connect and Request Auction Data Source: https://www.multitradesoftech.com/mtsrestapidocs Connects to the Multitradesoftech WebSocket server using Node.js and the 'ws' library. It sends an 'Auction' request for a specific security and logs the received auction data. Requires the 'ws' package. ```Node.js const WebSocket = require('ws'); async function connect() { const ws = new WebSocket('wss://wss1.multitrade.tech:15208'); ws.on('open', () => ws.send('{\"Message\":\"Auction\",\"EXC\":\"NSECM\",\"SECID\":\"10397\"}')); ws.on('message', data => { if (data instanceof Buffer) { // Convert binary buffer to string data = data.toString('utf-8'); } console.log(data.includes('\"Auction\"') ? data : 'WebSocket connection failed'); }); } connect(); ``` -------------------------------- ### REST APIs for Trading Platforms Source: https://www.multitradesoftech.com/index Provides platform-independent REST APIs to offer flexibility for front-end development and trading logic customization. This enables users to integrate their custom solutions with the trading platform. ```REST APIs Platform Independent API to get freedom of your front-end and logic ``` -------------------------------- ### Python WebSocket OHLCL Request Source: https://www.multitradesoftech.com/mtsrestapidocs Connects to the Multitradesoftech WebSocket server using Python to request and print the Open, High, Low, Close (OHLCL) data for a given security. ```Python import asyncio import websockets async def connect_to_server(): async with websockets.connect('wss://wss1.multitrade.tech:15208') as websocket: response = await websocket.recv() if "HandShake" in response: sc = "{\"Message\":\"OHLCL\",\"EXC\":\"NSEFO\",\"SECID\":\"35707\"}" await websocket.send(sc) while True: response = await websocket.recv() if "\"OHLCL\"" in response: print(response) else: print("WebSocket connection failed") asyncio.run(connect_to_server()) ```