SEP38PricesResponse
in package
Indicative prices for multiple buy or sell assets via SEP-38.
This class represents the response from GET /prices, containing indicative exchange rates. Response contains either buy_assets (for selling a specified asset) or sell_assets (for buying a specified asset). Support for sell_assets was added in SEP-38 v2.3.0.
Tags
Table of Contents
Properties
- $buyAssets : array<string|int, mixed>|null
- $sellAssets : array<string|int, mixed>|null
Methods
- __construct() : mixed
- fromJson() : SEP38PricesResponse
- Constructs a new instance of SEP38PricesResponse by using the given data.
Properties
$buyAssets
public
array<string|int, mixed>|null
$buyAssets
= null
$sellAssets
public
array<string|int, mixed>|null
$sellAssets
= null
Methods
__construct()
public
__construct([array<string|int, SEP38BuyAsset>|null $buyAssets = null ][, array<string|int, SEP38SellAsset>|null $sellAssets = null ]) : mixed
Parameters
- $buyAssets : array<string|int, SEP38BuyAsset>|null = null
-
Array of available buy assets with their prices (when selling a specified asset).
- $sellAssets : array<string|int, SEP38SellAsset>|null = null
-
Array of available sell assets with their prices (when buying a specified asset, added in SEP-38 v2.3.0).
fromJson()
Constructs a new instance of SEP38PricesResponse by using the given data.
public
static fromJson(array<string|int, mixed> $json) : SEP38PricesResponse
Parameters
- $json : array<string|int, mixed>
-
the data to construct the object from.
Return values
SEP38PricesResponse —the object containing the parsed data.