Your browser does not support JavaScript! Alguracy Technologies LLP : API Specifiations Page

Hosting Your Strategy with Alguracy

REST Example

/**
 * Open Trade method
 */
curl -XPOST -H 'Content-Type: application/x-www-form-urlencoded' -H 'x-api-key: Ngdeb!E%7D' -d 'symbol:TATASTEEL
entry_price:490
target:10
exchange:NSE
sl:5
unique_id:Orbbreakout
trade_type:1' 'https://www.alguracy.com/api/openTrade'

Request Parameters :-
symbol ( Mandatory ) : Exact symbol name to be Traded
unique_id ( Mandatory ) : Unique Id of your strategy
exchange ( Mandatory ) : Exchange Value ( NSE -> Equity Cash, NFO -> Futures & Options, MCX -> Commodity )
entry_price ( Mandatory ) : Entry price for Trade
target ( Optional ) : Target points for Trade, required in case of OCO/BO
sl ( Optional )  : SL points for Trade, required in case of OCO/BO


Headers
x-api-key : Your unique api key required for authentication


Response
{"success":true,"msg":"Order Successfull","order_id":"TATASTEEL-1248387344"}

/**
 * Close Trade method
 */
curl -XPOST -H 'Content-Type: application/x-www-form-urlencoded' -H 'x-api-key: Ngdeb!E%7D' -d 'order_id:1
unique_id:Orbbreakout
exchange:NSE
symbol:TATASTEEL' 'https://www.alguracy.com/api/closeTrade'


Request Parameters :-
order_id ( Mandatory ) : Order Id to be closed
unique_id ( Mandatory ) : Unique Id of your strategy
exchange ( Mandatory ) : Exchange Value ( NSE -> Equity Cash, NFO -> Futures & Options, MCX -> Commodity )
symbol ( Mandatory ) : Exact symbol name to be Closed

Headers
x-api-key : Your unique api key required for authentication


Response
{"success":true,"msg":"Order Closed Succesfully"}

Amibroker Example

/**
 * For Opening Trade
 */
InternetOpenURL("https://www.alguracy.com/api/postTrade?symbol=BANKNIFTY1970431300CE&entry=145&unique_id={your_unique_id}&exchange=NFO&api_key={your_api_key}&target={target_points}&sl={sl_points}");

Parameters :-
symbol ( Mandatory ) : Exact symbol name to be Traded
unique_id ( Mandatory ) : Unique Id of your strategy
exchange ( Mandatory ) : Exchange Value ( NSE -> Equity Cash, NFO -> Futures & Options, MCX -> Commodity )
api_key ( Mandatory ) : Your unique api key required for authentication
entry ( Mandatory ) : Entry price for Trade
target ( Optional ) : Target points for Trade, required in case of OCO/BO
sl ( Optional )  : SL points for Trade, required in case of OCO/BO


/**
 * For Closing Trade
 */
InternetOpenURL("https://www.alguracy.com/api/closePosition?symbol=BANKNIFTY1970431300CE&unique_id={your_unique_id}&exchange=NFO&api_key={your_api_key}"); 

Parameters :-
symbol ( Mandatory ) : Exact symbol name to be Closed
unique_id ( Mandatory ) : Unique Id of your strategy
exchange ( Mandatory ) : Exchange Value ( NSE -> Equity Cash, NFO -> Futures & Options, MCX -> Commodity )
api_key ( Mandatory ) : Your unique api key required for authentication

MetaTrader Example

/**
 * Opening a trade
 */
string headers;
char post[], result[];
int res = WebRequest("GET", "https://www.alguracy.com/api/postTrade?symbol=BANKNIFTY1970431300CE&entry=145&unique_id={your_unique_id}&exchange=NFO&api_key={your_api_key}&target={target_points}&sl={sl_points}", "", NULL, 10000, post, ArraySize(post), result, headers);
Print("Status code: " , res, ", error: ", GetLastError());
Print("Server response: ", CharArrayToString(result));

Parameters :-
symbol ( Mandatory ) : Exact symbol name to be Traded
unique_id ( Mandatory ) : Unique Id of your strategy
exchange ( Mandatory ) : Exchange Value ( NSE -> Equity Cash, NFO -> Futures & Options, MCX -> Commodity )
api_key ( Mandatory ) : Your unique api key required for authentication
entry ( Mandatory ) : Entry price for Trade
target ( Optional ) : Target points for Trade, required in case of OCO/BO
sl ( Optional )  : SL points for Trade, required in case of OCO/BO

/**
 * Closing a trade
 */
 string headers;
char post[], result[];
int res = WebRequest("GET", "https://www.alguracy.com/api/closePosition?symbol=BANKNIFTY1970431300CE&unique_id={your_unique_id}&exchange=NFO&api_key={your_api_key}", "", NULL, 10000, post, ArraySize(post), result, headers);
Print("Status code: " , res, ", error: ", GetLastError());
Print("Server response: ", CharArrayToString(result));

Parameters :-
symbol ( Mandatory ) : Exact symbol name to be Closed
unique_id ( Mandatory ) : Unique Id of your strategy
exchange ( Mandatory ) : Exchange Value ( NSE -> Equity Cash, NFO -> Futures & Options, MCX -> Commodity )
api_key ( Mandatory ) : Your unique api key required for authentication