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