Stellar PHP SDK API Documentation

TradeAggregationsResponse extends IteratorIterator

Iterable collection of trade aggregation responses

This class provides an iterable wrapper around a collection of TradeAggregationResponse objects representing OHLC candlestick data. It extends IteratorIterator to enable efficient traversal of trade aggregations returned from Horizon API endpoints. The collection supports iteration, counting, array conversion, and dynamic addition of aggregation records.

Used by TradeAggregationsPageResponse to hold the aggregations contained in a single page of results. Each item represents a time bucket with open, high, low, close prices, volumes, and trade counts for a specific asset pair during that period.

Tags
see
TradeAggregationResponse

For individual aggregation details

see
TradeAggregationsPageResponse

For paginated aggregation results

Table of Contents

Methods

__construct()  : mixed
Constructs a new trade aggregations collection
add()  : void
Adds a trade aggregation response to the collection
count()  : int
Gets the total number of aggregations in this collection
current()  : TradeAggregationResponse
Gets the current trade aggregation in the iteration
toArray()  : array<string|int, TradeAggregationResponse>

Methods

count()

Gets the total number of aggregations in this collection

public count() : int
Return values
int

The count of trade aggregation records


        
On this page

Search results