## 🔥 Forex Brokers and Servers API - Complete Database Access
**REST API for forex broker and trading server information**
Access detailed data on **428 unique forex brokers** and their **8,700+ trading servers** across MetaTrader 4 (MT4) and MetaTrader 5 (MT5) platforms. Perfect for fintech developers, trading platforms, broker comparison tools, and financial data aggregation.
---
### ✨ Key Features
#### 📊 **Broker Database**
- **369 MT4 Brokers** - MetaTrader 4 broker listings
- **330 MT5 Brokers** - MetaTrader 5 broker database
- **428 Unique Brokers** - Many brokers support both platforms
- **Global Coverage** - Brokers from around the world
#### 🖥️ **Server Information**
- **8,700+ Trading Servers** - Comprehensive server database
- **Server Details** - Platform type (MT4/MT5), server names
- **Broker-Specific** - Get all servers for any broker
- **Server Titles** - Includes server names like "Demo", "Live", "ECN", etc.
#### 🔍 **Search Capabilities**
- **Broker Search** - Find brokers by name (case-insensitive)
- **Server Search** - Search servers within a broker's list
- **Top 10 Results** - Returns up to 10 matching results
- **Fast Matching** - Quick text-based search
#### ⚡ **Technical Details**
- **Fast Responses** - Optimized for performance
- **JSON Format** - Easy to parse and integrate
- **RESTful Design** - Standard HTTP GET methods
- **CORS Enabled** - Works from frontend applications
---
### 🎯 Perfect For
#### 💼 **Trading Platform Developers**
Build trading applications with accurate broker and server data:
- MetaTrader platform integrations
- Broker connection managers
- Multi-account trading tools
- Copy trading systems
#### 🌐 **Broker Comparison Websites**
Create comprehensive broker comparison tools:
- Display broker platforms (MT4/MT5)
- Show available server types
- Compare broker offerings
- Build ranking systems
#### 📈 **Financial Data Aggregators**
Enrich your datasets with broker information:
- Market research tools
- Trading analytics platforms
- Financial database systems
- Investment research tools
#### 🤖 **Automated Trading Systems**
Power your algorithmic trading with:
- Broker verification systems
- Server availability checkers
- Multi-broker strategies
- Connection pooling
#### 📱 **Mobile Trading Apps**
Integrate broker data into mobile applications:
- Broker selection screens
- Server connection wizards
- Demo account finders
- Platform compatibility checks
---
### 📚 API Endpoints
#### 1️⃣ **GET /api/brokers/mt4**
Get complete list of all MetaTrader 4 brokers
**Response Example:**
```json
[
{
"id": 1,
"name": "Alpari"
},
{
"id": 107,
"name": "Exness"
}
]
```
**Returns:** 369 MT4 brokers
---
#### 2️⃣ **GET /api/brokers/mt5**
Get complete list of all MetaTrader 5 brokers
**Response Example:**
```json
[
{
"id": 1,
"name": "Alpari"
},
{
"id": 128,
"name": "Pepperstone"
}
]
```
**Returns:** 330 MT5 brokers
---
#### 3️⃣ **GET /api/brokers/{id}**
Get detailed information about a specific broker
**Parameters:**
- `id` (integer, required): Broker ID
**Response Example:**
```json
{
"id": 1,
"name": "Alpari",
"platform": "both"
}
```
**Platform Values:**
- `"mt4"` - Only MetaTrader 4
- `"mt5"` - Only MetaTrader 5
- `"both"` - Supports both platforms
---
#### 4️⃣ **GET /api/brokers/search**
Search for brokers by name
**Parameters:**
- `q` (string, required): Search query
**Example:** `/api/brokers/search?q=exness`
**Response Example:**
```json
[
{
"id": 107,
"name": "Exness",
"platform": "both"
}
]
```
**Returns:** Top 10 matching results
---
#### 5️⃣ **GET /api/brokers/{id}/servers**
Get all trading servers for a specific broker
**Parameters:**
- `id` (integer, required): Broker ID
**Response Example:**
```json
[
{
"id": 2286,
"platform": "mt4",
"title": "Alpari-Broker-Server"
},
{
"id": 233,
"platform": "mt4",
"title": "Alpari-Classic"
},
{
"id": 57744,
"platform": "mt5",
"title": "Alpari-Demo01"
}
]
```
**Use Cases:**
- Display available servers for a broker
- Check server availability
- Find demo servers
- Get server connection details
---
#### 6️⃣ **GET /api/brokers/{id}/servers/search**
Search servers for a specific broker
**Parameters:**
- `id` (integer, required): Broker ID
- `q` (string, required): Search query
**Example:** `/api/brokers/1/servers/search?q=demo`
**Response Example:**
```json
[
{
"id": 307,
"platform": "mt4",
"title": "Alpari-Demo"
},
{
"id": 57744,
"platform": "mt5",
"title": "Alpari-Demo01"
}
]
```
**Common Searches:**
- `"demo"` - Find practice servers
- `"live"` - Find real trading servers
- `"ecn"` - Find ECN servers
- `"pro"` - Find professional accounts
---
### 💻 Code Examples
#### JavaScript (Fetch API)
```javascript
const options = {
method: 'GET',
headers: {
'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
'X-RapidAPI-Host': 'forex-brokers-and-servers-metatrader.p.rapidapi.com'
}
};
// Search for brokers
fetch('https://forex-brokers-and-servers-metatrader.p.rapidapi.com/api/brokers/search?q=exness', options)
.then(response => response.json())
.then(data => console.log(data))
.catch(err => console.error(err));
// Get broker servers
fetch('https://forex-brokers-and-servers-metatrader.p.rapidapi.com/api/brokers/1/servers', options)
.then(response => response.json())
.then(data => console.log(data))
.catch(err => console.error(err));
```
#### Python (Requests)
```python
import requests
url = "https://forex-brokers-and-servers-metatrader.p.rapidapi.com/api/brokers/search"
headers = {
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host": "forex-brokers-and-servers-metatrader.p.rapidapi.com"
}
params = {"q": "exness"}
response = requests.get(url, headers=headers, params=params)
print(response.json())
# Get all MT4 brokers
url = "https://forex-brokers-and-servers-metatrader.p.rapidapi.com/api/brokers/mt4"
response = requests.get(url, headers=headers)
print(response.json())
```
#### Node.js (Axios)
```javascript
const axios = require('axios');
const options = {
method: 'GET',
url: 'https://forex-brokers-and-servers-metatrader.p.rapidapi.com/api/brokers/search',
params: { q: 'exness' },
headers: {
'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
'X-RapidAPI-Host': 'forex-brokers-and-servers-metatrader.p.rapidapi.com'
}
};
axios.request(options)
.then(response => console.log(response.data))
.catch(error => console.error(error));
```
#### PHP (cURL)
```php
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://forex-brokers-and-servers-metatrader.p.rapidapi.com/api/brokers/search?q=exness",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host: forex-brokers-and-servers-metatrader.p.rapidapi.com"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
```
#### Ruby
```ruby
require 'uri'
require 'net/http'
url = URI("https://forex-brokers-and-servers-metatrader.p.rapidapi.com/api/brokers/search?q=exness")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-RapidAPI-Key"] = 'YOUR_RAPIDAPI_KEY'
request["X-RapidAPI-Host"] = 'forex-brokers-and-servers-metatrader.p.rapidapi.com'
response = http.request(request)
puts response.read_body
```
#### Java
```java
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://forex-brokers-and-servers-metatrader.p.rapidapi.com/api/brokers/search?q=exness"))
.header("X-RapidAPI-Key", "YOUR_RAPIDAPI_KEY")
.header("X-RapidAPI-Host", "forex-brokers-and-servers-metatrader.p.rapidapi.com")
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```
---
### 🚀 Quick Start Guide
#### Step 1: Subscribe to the API
Choose a pricing plan that fits your needs (Free plan available!)
#### Step 2: Get Your API Key
Copy your RapidAPI key from the dashboard
#### Step 3: Make Your First Request
```bash
curl -X GET \
'https://forex-brokers-and-servers-metatrader.p.rapidapi.com/api/brokers/mt4' \
-H 'X-RapidAPI-Key: YOUR_KEY' \
-H 'X-RapidAPI-Host: forex-brokers-and-servers-metatrader.p.rapidapi.com'
```
#### Step 4: Integrate Into Your App
Use the code examples above for your preferred language
---
### 📊 Use Case Examples
#### Example 1: Build a Broker Selector
```javascript
// Fetch all MT4 brokers
async function loadBrokers() {
const response = await fetch(apiUrl + '/api/brokers/mt4', options);
const brokers = await response.json();
// Display in dropdown
brokers.forEach(broker => {
dropdown.add(new Option(broker.name, broker.id));
});
}
```
#### Example 2: Find Demo Servers
```python
# Search for demo servers for a specific broker
def find_demo_servers(broker_id):
url = f"{base_url}/api/brokers/{broker_id}/servers/search"
params = {"q": "demo"}
response = requests.get(url, headers=headers, params=params)
return response.json()
demo_servers = find_demo_servers(107) # Exness
```
#### Example 3: Broker Comparison Tool
```javascript
// Compare brokers by checking platform support
async function compareBrokers(brokerIds) {
const brokers = await Promise.all(
brokerIds.map(id =>
fetch(`${apiUrl}/api/brokers/${id}`, options)
.then(r => r.json())
)
);
return brokers.map(b => ({
name: b.name,
mt4: b.platform === 'mt4' || b.platform === 'both',
mt5: b.platform === 'mt5' || b.platform === 'both'
}));
}
```
---
### 🎁 Why Choose This API?
✅ **Comprehensive Data** - 428 brokers and 8,700+ servers
✅ **Easy Integration** - Simple REST API, works everywhere
✅ **Clear Documentation** - Examples in multiple languages
✅ **Affordable Pricing** - Free tier available
✅ **No Setup Required** - Start using immediately
✅ **CORS Enabled** - Works from browsers
✅ **JSON Responses** - Easy to parse
✅ **Search Functionality** - Find brokers and servers quickly
---
### 💰 Pricing Plans
#### 🆓 **BASIC** (Free Forever)
- 100 requests/month
- All endpoints included
- Perfect for testing and small projects
#### ⭐ **PRO** ($9.99/month)
- 10,000 requests/month
- 50 requests/second
- Ideal for production apps
#### 🚀 **ULTRA** ($49.99/month)
- 100,000 requests/month
- 100 requests/second
- For high-traffic applications
#### 💎 **MEGA** ($199.99/month)
- 1,000,000 requests/month
- 500 requests/second
- Enterprise-level access
**All plans include:**
- Full access to all endpoints
- Same fast response times
- Full API documentation
- Email support
---
### 📖 Additional Resources
- **Interactive Documentation**: Test all endpoints with live examples
- **OpenAPI Specification**: Download complete API spec
---
### 🔐 Security & Privacy
- **HTTPS Only** - All requests encrypted
- **Rate Limiting** - Protects against abuse
- **Secure Authentication** - RapidAPI handles all auth
---
### 🌟 Start Building Today!
Subscribe now and get instant access to 428 forex brokers and 8,700+ trading servers.
**No credit card required for free tier!**
---
**Subscribe now and start building forex applications! 🚀**