🚀 CoinAppElixir API Documentation
🔐 Authentication Required: All API endpoints require an
X-API-Key
header.
Base URL: http://localhost:4000
Content-Type: application/json
for POST requests
Get your API key from:
Developer Dashboard
👤 User & Profile
GET
/api/v1/profile
Get current user profile information
curl example:
curl -H "X-API-Key: YOUR_KEY" http://localhost:4000/api/v1/profile
GET
/api/v1/hello
API health check endpoint
🔗 Exchange Accounts
GET
/api/v1/exchange_accounts
List all connected exchange accounts
POST
/api/v1/exchange_accounts
Create new exchange account connection
Request body:
{"exchange_account": {"name": "My Binance", "exchange": "binance", "api_key": "...", "api_secret": "...", "is_testnet": true}}
POST
/api/v1/exchange_accounts/:id/verify
Verify exchange account credentials
📈 Market Data & Trading
GET
/api/v1/markets?exchange_id=:id
List all trading pairs for an exchange
GET
/api/v1/ticker/:symbol?exchange_id=:id
Get ticker data for a trading pair (e.g., BTC/USDT)
GET
/api/v1/balances?exchange_id=:id
Get account balances
POST
/api/v1/orders
Create new order
Market Buy Example:
{"exchange_id": "exch_123", "symbol": "BTC/USDT", "type": "market", "side": "buy", "amount": "0.001"}
POST
/api/v1/orders/market/buy/usd
Market buy with USD amount
$100 BTC Purchase:
{"exchange_id": "exch_123", "symbol": "BTC/USDT", "quoteOrderQty": "100"}
DELETE
/api/v1/orders/:id?exchange_id=:id&symbol=:symbol
Cancel specific order
GET
/api/v1/orders?exchange_id=:id&status=open
List orders (status: open, closed)
🤖 Trading Strategies
GET
/api/v1/strategies
List all trading strategies
POST
/api/v1/strategies
Create new trading strategy
DCA Strategy Example:
{"strategy": {"name": "Bitcoin DCA", "type": "dca", "symbol": "BTC/USDT", "exchange_account_id": "exch_123", "params": {"amount_per_order": 25, "interval_hours": 24}}}
POST
/api/v1/strategies/:id/pause
Pause strategy execution
POST
/api/v1/strategies/:id/activate
Resume strategy execution
📡 Trading Signals
POST
/api/v1/signals/rotation/analyze
Analyze crypto rotation signals for multiple coins
Analyze Top 5 Cryptos:
{"coins": ["BTC", "ETH", "SOL", "ADA", "DOT"]}
GET
/api/v1/signals/rotation/winner
Get current rotation winner (best performing crypto)
POST
/api/v1/signals/tradingview/analyze
TradingView technical analysis
Technical Analysis:
{"coins": ["BTC", "ETH", "SOL"]}
GET
/api/v1/signals/rotation/health
Check signals service health
🧮 Risk Management
POST
/api/v1/calculate_position_size
Calculate position size for risk management
2% Risk Example:
{"risk_percent": "2", "account_balance": "1000", "entry_price": "50000", "stop_loss": "48000"}
📁 File Upload
POST
/api/v1/upload
Upload file to cloud storage (multipart/form-data)
GET
/api/v1/files
List uploaded files