Stellar PHP SDK API Documentation

SEP38QuoteResponse
in package

Firm quote response containing guaranteed exchange rates and expiration via SEP-38.

This class represents a firm quote with a guaranteed price that expires at a specific time. It includes the exchange rate, amounts, fees, and a unique quote ID that can be used to reference this quote in subsequent transactions.

Tags
see
https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#post-quote
see
QuoteService::postQuote()
see
QuoteService::getQuote()
see
SEP38Fee

Table of Contents

Properties

$buyAmount  : string
$buyAsset  : string
$buyDeliveryMethod  : string|null
$expiresAt  : DateTime
$fee  : SEP38Fee
$id  : string
$price  : string
$sellAmount  : string
$sellAsset  : string
$sellDeliveryMethod  : string|null
$totalPrice  : string

Methods

__construct()  : mixed
fromJson()  : SEP38QuoteResponse
Constructs a new instance of SEP38QuoteResponse by using the given data.

Properties

Methods

__construct()

public __construct(string $id, DateTime $expiresAt, string $totalPrice, string $price, string $sellAsset, string $sellAmount, string $buyAsset, string $buyAmount, SEP38Fee $fee[, string|null $sellDeliveryMethod = null ][, string|null $buyDeliveryMethod = null ]) : mixed
Parameters
$id : string

The unique identifier for this quote.

$expiresAt : DateTime

The date and time when the quote will expire.

$totalPrice : string

The total price of the quote including fees.

$price : string

The exchange rate without fees.

$sellAsset : string

The asset being sold.

$sellAmount : string

The amount of the sell asset.

$buyAsset : string

The asset being purchased.

$buyAmount : string

The amount of the buy asset.

$fee : SEP38Fee

The fee structure for this quote.

$sellDeliveryMethod : string|null = null

The method used by the client to deliver the sell asset to the Anchor.

$buyDeliveryMethod : string|null = null

The method used by the Anchor to deliver the buy asset to the client.

fromJson()

Constructs a new instance of SEP38QuoteResponse by using the given data.

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

the data to construct the object from.

Return values
SEP38QuoteResponse

the object containing the parsed data.


        
On this page

Search results