SEP38SellAsset
in package
Sell asset information with indicative price from SEP-38 prices endpoint.
This class represents a single sell asset option with its indicative exchange rate and decimal precision when exchanging for a specified buy asset. Added in SEP-38 v2.3.0 to support reverse price lookups.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- fromJson() : SEP38SellAsset
- Constructs a new instance of SEP38SellAsset by using the given data.
Properties
$asset
public
string
$asset
$decimals
public
int
$decimals
$price
public
string
$price
Methods
__construct()
public
__construct(string $asset, string $price, int $decimals) : mixed
Parameters
- $asset : string
-
The asset identifier that can be sold.
- $price : string
-
The indicative price of one unit of the sell asset in terms of the buy asset.
- $decimals : int
-
The number of decimal places precision supported for this asset.
fromJson()
Constructs a new instance of SEP38SellAsset by using the given data.
public
static fromJson(array<string|int, mixed> $json) : SEP38SellAsset
Parameters
- $json : array<string|int, mixed>
-
the data to construct the object from.
Return values
SEP38SellAsset —the object containing the parsed data.