Stellar PHP SDK API Documentation

SEP38PostQuoteRequest
in package

Request body for requesting a firm quote via SEP-38.

This class represents the data required to submit a POST /quote request to obtain a firm, time-limited quote for exchanging assets. Either sellAmount or buyAmount must be provided, but not both.

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

Table of Contents

Properties

$buyAmount  : string|null
$buyAsset  : string
$buyDeliveryMethod  : string|null
$context  : string
$countryCode  : string|null
$expireAfter  : DateTime|null
$sellAmount  : string|null
$sellAsset  : string
$sellDeliveryMethod  : string|null

Methods

__construct()  : mixed
toJson()  : array<string|int, mixed>

Properties

Methods

__construct()

public __construct(string $context, string $sellAsset, string $buyAsset[, string|null $sellAmount = null ][, string|null $buyAmount = null ][, DateTime|null $expireAfter = null ][, string|null $sellDeliveryMethod = null ][, string|null $buyDeliveryMethod = null ][, string|null $countryCode = null ]) : mixed
Parameters
$context : string

The context for the quote: 'sep6', 'sep24', or 'sep31'.

$sellAsset : string

The asset the client would like to sell in Stellar Asset Identification Format or an off-chain asset identifier.

$buyAsset : string

The asset the client would like to buy in Stellar Asset Identification Format or an off-chain asset identifier.

$sellAmount : string|null = null

The amount of the sell asset the client would like to exchange for buy asset (mutually exclusive with buyAmount).

$buyAmount : string|null = null

The amount of the buy asset the client would like to purchase with sell asset (mutually exclusive with sellAmount).

$expireAfter : DateTime|null = null

The client's desired expiration date and time for the 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.

$countryCode : string|null = null

The country code of the user's current location in ISO 3166-2 or ISO 3166-1 alpha-2 format.

toJson()

public toJson() : array<string|int, mixed>
Return values
array<string|int, mixed>

json data


        
On this page

Search results