# n8n-nodes-fxcm

This is an n8n community node for FXCM trading integration. It provides functionality for automated trading, market data access, and account management through FXCM's Trading Station.

## Features

- Real-time market data streaming
- Place market and limit orders
- Manage trading positions
- Account information and history
- WebSocket connection for real-time updates

## Installation

### In n8n:
1. Go to Settings > Community Nodes
2. Click on "Install a community node"
3. Enter `n8n-nodes-fxcm`
4. Click "Install"

### Manual Installation:
```bash
npm install n8n-nodes-fxcm
```

## Configuration

1. Get your FXCM API credentials:
   - Create an FXCM account
   - Generate API Token from Trading Station
   - Note your Trading Station ID

2. In n8n:
   - Go to Credentials
   - Create new credential of type "FXCM API"
   - Enter your API Token and Trading Station ID
   - Select account type (Demo/Live)

## Usage Examples

### Place Market Order
```json
{
  "resource": "trading",
  "operation": "placeMarketOrder",
  "instrument": "EUR/USD",
  "orderType": "buy",
  "amount": 1000,
  "stopLoss": 1.1000,
  "takeProfit": 1.1200
}
```

### Get Market Data
```json
{
  "resource": "marketData",
  "operation": "getCurrentPrice",
  "instrument": "EUR/USD"
}
```

## Support & Contribution

- Create issues for bugs or feature requests
- Pull requests are welcome
- Documentation improvements are appreciated

## License

[MIT License](LICENSE.md)