Stellar PHP SDK API Documentation

OrderBookRowResponse

Represents a single price level in the order book

This response represents one row in the order book, aggregating all offers at a specific price level. Each row shows the total amount available and the price, provided in both decimal string format and rational fraction format for precision.

Order book rows are aggregated by price, meaning multiple individual offers at the same price are combined into a single row showing the total available amount. This provides a consolidated view of market depth at each price level.

Used within OrderBookResponse to represent individual entries in the bids or asks collections.

Tags
see
OrderBookRowsResponse

For collections of order book rows

see
OrderBookResponse

For the complete order book

see
OfferPriceResponse

For the rational price representation

Table of Contents

Methods

fromJson()  : OrderBookRowResponse
Creates an OrderBookRowResponse from JSON data
getAmount()  : string
Gets the total amount available at this price level
getPrice()  : string
Gets the price for this order book level
getPriceR()  : OfferPriceResponse
Gets the rational representation of the price
loadFromJson()  : void

Methods

fromJson()

Creates an OrderBookRowResponse from JSON data

public static fromJson(array<string|int, mixed> $json) : OrderBookRowResponse
Parameters
$json : array<string|int, mixed>

Associative array of parsed JSON response

Return values
OrderBookRowResponse

The populated order book row

getAmount()

Gets the total amount available at this price level

public getAmount() : string
Return values
string

The aggregated amount from all offers at this price

getPrice()

Gets the price for this order book level

public getPrice() : string
Return values
string

The price as a decimal string (counter per base)

loadFromJson()

protected loadFromJson(array<string|int, mixed> $json) : void
Parameters
$json : array<string|int, mixed>

        
On this page

Search results