Просмотр исходного кода

docs: update API endpoints documentation with query parameters and examples

- Add query parameter examples for symbols search endpoint (q=EURUSD)
- Enhance candles endpoints with detailed parameter examples
- Add missing DELETE /api/candles/cleanup endpoint documentation
- Update git branch references from main to master in deployment guide
- Improve API documentation clarity with practical usage examples
uzairrizwan1 месяцев назад: 3
Родитель
Сommit
5c701c25d5
1 измененных файлов с 6 добавлено и 5 удалено
  1. 6 5
      README.md

+ 6 - 5
README.md

@@ -474,7 +474,7 @@ cp .env .env.backup
474
 cp ecosystem.config.js ecosystem.config.js.backup
474
 cp ecosystem.config.js ecosystem.config.js.backup
475
 
475
 
476
 # Pull latest changes
476
 # Pull latest changes
477
-git pull origin main
477
+git pull origin master
478
 
478
 
479
 # Install any new dependencies
479
 # Install any new dependencies
480
 npm install --production
480
 npm install --production
@@ -506,7 +506,7 @@ sudo systemctl stop nginx
506
 
506
 
507
 # Update code
507
 # Update code
508
 git fetch origin
508
 git fetch origin
509
-git reset --hard origin/main
509
+git reset --hard origin/master
510
 
510
 
511
 # Install dependencies
511
 # Install dependencies
512
 npm install --production
512
 npm install --production
@@ -679,18 +679,19 @@ CORS_ORIGIN=*
679
 
679
 
680
 ### Symbols
680
 ### Symbols
681
 - `GET /api/symbols` - Get all symbols (with filtering)
681
 - `GET /api/symbols` - Get all symbols (with filtering)
682
-- `GET /api/symbols/search` - Search symbols by name
682
+- `GET /api/symbols/search?q=EURUSD` - Search symbols by name
683
 - `GET /api/symbols/:id` - Get symbol by ID
683
 - `GET /api/symbols/:id` - Get symbol by ID
684
 - `POST /api/symbols` - Create new symbol
684
 - `POST /api/symbols` - Create new symbol
685
 - `PUT /api/symbols/:id` - Update symbol
685
 - `PUT /api/symbols/:id` - Update symbol
686
 - `DELETE /api/symbols/:id` - Delete symbol (soft delete)
686
 - `DELETE /api/symbols/:id` - Delete symbol (soft delete)
687
 
687
 
688
 ### Candles
688
 ### Candles
689
-- `GET /api/candles` - Get candles with filtering
690
-- `GET /api/candles/ohlc` - Get OHLC data
689
+- `GET /api/candles?symbolId=1&startTime=2025-01-01T00:00:00Z&endTime=2025-01-02T00:00:00Z&limit=100&offset=0` - Get candles with filtering
690
+- `GET /api/candles/ohlc?symbolId=1&period=1h&limit=100` - Get OHLC data
691
 - `GET /api/candles/:symbolId/latest` - Get latest candle for symbol
691
 - `GET /api/candles/:symbolId/latest` - Get latest candle for symbol
692
 - `POST /api/candles` - Create new candle
692
 - `POST /api/candles` - Create new candle
693
 - `POST /api/candles/bulk` - Bulk create candles
693
 - `POST /api/candles/bulk` - Bulk create candles
694
+- `DELETE /api/candles/cleanup/:symbolId?keep=1000` - Clean up old candles, keep latest N (default 1000)
694
 
695
 
695
 ### Live Prices
696
 ### Live Prices
696
 - `GET /api/live-prices` - Get all live prices
697
 - `GET /api/live-prices` - Get all live prices