Stellar PHP SDK API Documentation

OrderBookRowsResponse extends IteratorIterator

Iterable collection of order book row responses

This class provides an iterable wrapper around a collection of OrderBookRowResponse objects representing price levels in an order book. It extends IteratorIterator to enable efficient traversal of order book entries (bids or asks) returned from Horizon. The collection supports iteration, counting, array conversion, and dynamic addition of row records.

Used by OrderBookResponse to hold the bids or asks for a trading pair. Each item represents an aggregated price level showing the total amount available at a specific price. Rows are sorted by price with best prices first (ascending for asks, descending for bids).

Tags
see
OrderBookRowResponse

For individual price level details

see
OrderBookResponse

For the complete order book

Table of Contents

Methods

__construct()  : mixed
Constructs a new order book rows collection
add()  : void
Adds an order book row to the collection
count()  : int
Gets the total number of price levels in this collection
current()  : OrderBookRowResponse
Gets the current order book row in the iteration
toArray()  : array<string|int, OrderBookRowResponse>

Methods

count()

Gets the total number of price levels in this collection

public count() : int
Return values
int

The count of order book rows


        
On this page

Search results