To use the technical analysis endpoints for multiple indicators on a specific asset, you can use the Bulk Indicators endpoint. Here's how to do it:
- Endpoint: Use the Bulk Indicators endpoint: https://tradingapi.rest/v1/indicators
- HTTP Method: POST
- Headers:
- Accept: "application/json"
- Content-Type: "application/json"
- X-API-KEY: Your API key
- User-Agent: Your custom User Agent (optional)
- Request Body: Provide a JSON object with two main parts:
- indicators: An array of indicators you want to analyze
- data: Common parameters for all indicators
import requests url = "https://tradingapi.rest/v1/indicators" params = { "timestamp": 1 } headers = { "Accept": "application/json", "Content-Type": "application/json", "X-API-KEY": "YOUR-API-KEY", "User-Agent": "YOUR-USER-AGENT" } data = { "indicators": [ { "rsi": { "timeperiod": 14, "timestamp": 1, "reverse": 0 } }, "macd", "2crows", "bbands" # Example of another indicator ], "data": { "exchange": "bybit", "limit": 50, "interval": "1m", "base": "BTC", "quote": "USDT", "reverse": 1, "timestamp": 0, "backtracks": 50, "backtrack": 50 } } response = requests.post(url, params=params, headers=headers, json=data) result = response.json() print(result)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article