Service providing external communication capabilities with the Binance REST API.
More...
|
| | fetchHistoricalData (string $symbol, string $interval, int $startTimeMs, int $endTimeMs, int $limit=1000) |
| | Fetches historical klines (candlesticks) from Binance.
|
| |
|
| string | $baseUrl = 'https://api.binance.com/api/v3/' |
| |
Service providing external communication capabilities with the Binance REST API.
◆ fetchHistoricalData()
| App\Services\BinanceService::fetchHistoricalData |
( |
string | $symbol, |
|
|
string | $interval, |
|
|
int | $startTimeMs, |
|
|
int | $endTimeMs, |
|
|
int | $limit = 1000 ) |
Fetches historical klines (candlesticks) from Binance.
- Parameters
-
| string | $symbol | Trading pair identifier (e.g., 'BTCUSDT'). |
| string | $interval | Candlestick dimension (e.g., '1h', '15m'). |
| int | $startTimeMs | UNIX Start time in milliseconds. |
| int | $endTimeMs | UNIX End time in milliseconds. |
| int | $limit | Maximum number of candles to return (Max 1000). |
- Returns
- array Decoded JSON array of candlestick data.
- Exceptions
-
| Exception | If the cURL request fails or returns an invalid code. |
◆ $baseUrl
| string App\Services\BinanceService::$baseUrl = 'https://api.binance.com/api/v3/' |
|
private |
The documentation for this class was generated from the following file: