The Guro Markets API gives you programmatic access to live market data, order execution, account management and portfolio analytics. Build trading bots, automate strategies, and integrate with your own systems.
⚠ Security: Never expose your API keys in client-side code, public repositories, or URLs. Store secrets in environment variables and rotate keys every 90 days.
Getting Started
Quick Start
Get up and running in under 5 minutes. Place your first trade programmatically using our REST API.
JavaScript (Node.js)
// Install: npm install @guromarkets/apiimport { GuroMarketsClient } from'@guromarkets/api';
const client = newGuroMarketsClient({
apiKey: process.env.GURO_API_KEY,
environment: 'live', // or 'paper'
});
// Get account balanceconst account = await client.account.get();
console.log(`Balance: $${account.balance}`);
// Get live price for XAU/USDconst quote = await client.marketData.getQuote('XAUUSD');
console.log(`XAU/USD: ${quote.bid} / ${quote.ask}`);
// Place a market buy orderconst order = await client.orders.create({
instrument: 'XAUUSD',
side: 'buy',
type: 'market',
volume: 0.1, // 0.1 lots
stopLoss: 2368.00,
takeProfit: 2410.00,
});
console.log(`Order placed: ${order.id} @ ${order.executionPrice}`);
Python
# Install: pip install guromarketsfrom guromarkets import GuroMarketsClient
import os
client = GuroMarketsClient(
api_key=os.environ['GURO_API_KEY'],
environment='live'
)
# Get account balance
account = client.account.get()
print(f"Balance: ${account['balance']}")
# Get live quote
quote = client.market_data.get_quote('XAUUSD')
print(f"XAU/USD: {quote['bid']} / {quote['ask']}")
# Place a market buy order
order = client.orders.create(
instrument='XAUUSD',
side='buy',
order_type='market',
volume=0.1,
stop_loss=2368.00,
take_profit=2410.00
)
print(f"Order: {order['id']} @ {order['execution_price']}")
cURL
# Get account infocurl -X GET "https://api.guromarkets.com/v2/account" \
-H "X-API-Key: gm_live_sk_YOUR_KEY" \
-H "Content-Type: application/json"# Place a market ordercurl -X POST "https://api.guromarkets.com/v2/orders" \
-H "X-API-Key: gm_live_sk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"instrument": "XAUUSD",
"side": "buy",
"type": "market",
"volume": 0.1,
"stopLoss": 2368.00,
"takeProfit": 2410.00
}'
REST API
Market Data
Real-time and historical price data for all 500+ instruments. No authentication required for public endpoints.
Added WebSocket ohlc channel for real-time candlestick data. Added OCO (One-Cancels-Other) order type. Added GET /instruments/search endpoint.
v2.0.0
March 15, 2026
Major
Full API redesign. New authentication model with scoped API keys. WebSocket v2 with sub-10ms latency. Improved error codes. Rate limit headers on all responses. v1 deprecated — sunset June 2026.
v1.8.2
Jan 20, 2026
Bug fixes: Fixed race condition in order execution under high-frequency conditions. Improved margin calculation accuracy for cross-currency pairs.