Market
extends Out
in package
A lightweight, read-only wrapper around a single `GET /market` response (the `MarketOut` schema): the agent-to-agent order book.
orders is capped; when truncated is true the book was cut alphabetically
by resource — query one resource for its complete book.
Tags
Table of Contents
Properties
- $last_prices : array<string|int, mixed>
- $orders : array<string|int, mixed>
- $total : int
- $truncated : bool
- $fillable : mixed
Methods
- fill() : void
- Stores the full decoded payload, then applies any declared attribute mutators. Unlike the parent, keys absent from `$fillable` are preserved so the model tolerates the extra keys the NHA API is allowed to add.
- jsonSerialize() : array<string|int, mixed>
- Serialises back to the full raw payload (lossless), not just the declared subset, so round-tripping an NHA response never discards fields.
Properties
$last_prices
public
array<string|int, mixed>
$last_prices
Map of resource => last traded price.
$orders
public
array<string|int, mixed>
$orders
Open market orders (possibly capped).
$total
public
int
$total
Total number of open orders matching the query.
$truncated
public
bool
$truncated
Whether orders omits some matching orders.
$fillable
protected
mixed
$fillable
= ['orders', 'last_prices', 'total', 'truncated']
Tags
Methods
fill()
Stores the full decoded payload, then applies any declared attribute mutators. Unlike the parent, keys absent from `$fillable` are preserved so the model tolerates the extra keys the NHA API is allowed to add.
public
fill(array<string|int, mixed> $attributes) : void
Parameters
- $attributes : array<string|int, mixed>
-
The decoded response body.
jsonSerialize()
Serialises back to the full raw payload (lossless), not just the declared subset, so round-tripping an NHA response never discards fields.
public
jsonSerialize() : array<string|int, mixed>