Quick Start
Prerequisites
- A valid API key (starts with
fxd_) - Any HTTP client:
curl, Python, or JavaScript
Step 1 — First Request
The simplest test: list available symbols.
cURL
curl -H "X-API-Key: fxd_your_key_here" \
"https://api.pipdata.net/v1/symbols?limit=5"
Sample response:
{
"symbols": [
{
"symbol": "WMMARKETS:ZERO:EURUSD",
"display_symbol": "EUR/USD",
"description": "EUR/USD — WM Markets Ltd",
"type": "forex",
"digits": 5
}
],
"total": 230,
"limit": 5,
"offset": 0
}
Step 2 — Fetch Historical Data
Get OHLCV bars for EUR/USD at H1 resolution (last 500 candles):
cURL
curl -H "X-API-Key: fxd_your_key_here" \
"https://api.pipdata.net/v1/history?symbol=WMMARKETS:ZERO:EURUSD&resolution=60&countback=500"
Sample response:
{
"s": "ok",
"t": [1749556800, 1749560400, 1749564000],
"o": [1.08234, 1.08198, 1.08215],
"h": [1.08267, 1.08241, 1.08259],
"l": [1.08190, 1.08182, 1.08198],
"c": [1.08198, 1.08215, 1.08241],
"v": [1250, 980, 1100],
"meta": {
"symbol": "WMMARKETS:ZERO:EURUSD",
"resolution": "60",
"bar_count": 3
}
}
Step 3 — Live Prices via WebSocket
Subscribe to real-time M1 bar updates as each candle closes:
const ws = new WebSocket(
"wss://api.pipdata.net/v1/stream?api_key=fxd_your_key_here"
);
ws.onopen = () => {
ws.send(JSON.stringify({
action: "subscribe",
symbols: ["WMMARKETS:ZERO:EURUSD", "WMMARKETS:ZERO:XAUUSD"],
type: "bar"
}));
};
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
if (msg.type === "connected") {
console.log("Connected — session:", msg.session_id);
}
if (msg.type === "bar") {
console.log(`${msg.symbol}: close = ${msg.bar.close}`);
}
};
Step 4 — Check Service Health
curl -H "X-API-Key: fxd_your_key_here" \
"https://api.pipdata.net/v1/status"
{
"status": "ok",
"server_time": 1749600000,
"feeds": {
"WMMARKETS:ZERO": {
"status": "live",
"last_candle_age_seconds": 45,
"symbol_count": 230
}
}
}
Endpoint Summary
| Endpoint | Description |
|---|---|
GET /v1/config | TradingView configuration object |
GET /v1/symbols | Symbol list and search |
GET /v1/history | Historical OHLCV bars |
GET /v1/coverage | Available data date ranges per symbol |
GET /v1/status | Live feed health status |
GET /v1/usage | Your API key usage statistics |
WS /v1/stream | Real-time M1 bar WebSocket stream |
Next Steps
Read the Authentication guide to understand all auth methods, rate-limit headers, and error handling.