# Install requests package if needed: pip install requests
import requests
# Mock connection parameters
proxy_host = "quant.algodevstudio.in"
proxy_port = "10146"
proxy_user = "u_demo_user"
proxy_pass = "demo_password_xyz"
# Format authenticated proxy URL
proxy_url = f"http://{proxy_user}:{proxy_pass}@{proxy_host}:{proxy_port}"
proxies = {
"http": proxy_url,
"https": proxy_url,
}
# Target Broker API Endpoint (e.g. Groww API)
api_url = "https://api.groww.in/v1/orders"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
payload = {
"symbol": "NIFTY",
"quantity": 50,
"order_type": "MARKET"
}
# Send order requests via your Dedicated Static IP proxy
response = requests.post(api_url, json=payload, headers=headers, proxies=proxies)
print(response.status_code)
print(response.json())
// Install required dependency: npm install axios https-proxy-agent
const axios = require('axios');
const { HttpsProxyAgent } = require('https-proxy-agent');
const proxyHost = 'quant.algodevstudio.in';
const proxyPort = '10146';
const proxyUser = 'u_demo_user';
const proxyPass = 'demo_password_xyz';
// Build proxy agent with credentials
const agent = new HttpsProxyAgent(
`http://${proxyUser}:${proxyPass}@${proxyHost}:${proxyPort}`
);
// Make calls via the proxy
axios.post('https://api.groww.in/v1/orders', {
symbol: 'NIFTY',
quantity: 50,
order_type: 'MARKET'
}, {
httpsAgent: agent,
headers: {
Authorization: 'Bearer YOUR_API_TOKEN'
}
})
.then(response => console.log(response.data))
.catch(error => console.error('Error routing order:', error));
# Send a direct POST request routed through the proxy endpoint
curl -x http://u_demo_user:demo_password_xyz@quant.algodevstudio.in:10146 \
-X POST https://api.groww.in/v1/orders \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"symbol": "NIFTY", "quantity": 50, "order_type": "MARKET"}'
using System;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
// Configure proxy credentials
var proxy = new WebProxy
{
Address = new Uri("http://quant.algodevstudio.in:10146"),
BypassOnLocal = false,
UseDefaultCredentials = false,
Credentials = new NetworkCredential("u_demo_user", "demo_password_xyz")
};
var handler = new HttpClientHandler { Proxy = proxy };
using var client = new HttpClient(handler);
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_TOKEN");
var payload = new StringContent("{\"symbol\": \"NIFTY\", \"quantity\": 50}", Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.groww.in/v1/orders", payload);
string result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}