DepositResponse
extends Response
in package
Response from deposit endpoint containing instructions for completing the deposit.
Provides all information needed for the user to initiate a deposit, including destination addresses, memos, fee details, and deposit instructions. The instructions field contains structured deposit information (replacing the deprecated how field).
Response includes transaction ID for status tracking, time estimates, and any amount limits or fees that apply to the deposit.
Tags
Table of Contents
Properties
- $eta : int|null
- $extraInfo : ExtraInfo|null
- $feeFixed : float|null
- $feePercent : float|null
- $how : string|null
- $id : string|null
- $instructions : array<string, DepositInstruction>|null
- $maxAmount : float|null
- $minAmount : float|null
- $httpClient : Client|null
- $rateLimitLimit : int|null
- $rateLimitRemaining : int|null
- $rateLimitReset : int|null
Methods
- fromJson() : DepositResponse
- Constructs a new instance of DepositResponse by using the given data.
- getHttpClient() : Client|null
- Gets the HTTP client used for pagination requests
- getRateLimitLimit() : int|null
- Returns X-RateLimit-Limit header from the response.
- getRateLimitRemaining() : int|null
- Returns X-RateLimit-Remaining header from the response.
- getRateLimitReset() : int|null
- Returns X-RateLimit-Reset header from the response. Seconds until a new window starts.
- setHeaders() : void
- Extracts and sets rate limiting information from HTTP response headers
- setHttpClient() : void
- Sets the HTTP client for making follow-up requests
- loadFromJson() : void
- Loads the needed data from a json array.
Properties
$eta
public
int|null
$eta
(optional) Estimate of how long the deposit will take to credit in seconds.
$extraInfo
public
ExtraInfo|null
$extraInfo
= null
additional information about the deposit process.
$feeFixed
public
float|null
$feeFixed
= null
(optional) Fixed fee (if any). In units of the deposited asset.
$feePercent
public
float|null
$feePercent
= null
(optional) Percentage fee (if any). In units of percentage points.
$how
public
string|null
$how
(deprecated, use instructions instead) Terse but complete instructions for how to deposit the asset. In the case of most cryptocurrencies it is just an address to which the deposit should be sent.
$id
public
string|null
$id
= null
(optional) The anchor's ID for this deposit. The wallet will use this ID to query the /transaction endpoint to check status of the request.
$instructions
public
array<string, DepositInstruction>|null
$instructions
$maxAmount
public
float|null
$maxAmount
= null
(optional) Maximum amount of asset that a user can deposit.
$minAmount
public
float|null
$minAmount
= null
(optional) Minimum amount of an asset that a user can deposit.
$httpClient
protected
Client|null
$httpClient
= null
$rateLimitLimit
protected
int|null
$rateLimitLimit
= null
$rateLimitRemaining
protected
int|null
$rateLimitRemaining
= null
$rateLimitReset
protected
int|null
$rateLimitReset
= null
Methods
fromJson()
Constructs a new instance of DepositResponse by using the given data.
public
static fromJson(array<string|int, mixed> $json) : DepositResponse
Parameters
- $json : array<string|int, mixed>
-
the data to construct the object from.
Return values
DepositResponse —the object containing the parsed data.
getHttpClient()
Gets the HTTP client used for pagination requests
public
getHttpClient() : Client|null
Return values
Client|null —The HTTP client instance, or null if not set
getRateLimitLimit()
Returns X-RateLimit-Limit header from the response.
public
getRateLimitLimit() : int|null
This number represents the he maximum number of requests that the current client can make in one hour.
Tags
Return values
int|nullgetRateLimitRemaining()
Returns X-RateLimit-Remaining header from the response.
public
getRateLimitRemaining() : int|null
The number of remaining requests for the current window.
Tags
Return values
int|nullgetRateLimitReset()
Returns X-RateLimit-Reset header from the response. Seconds until a new window starts.
public
getRateLimitReset() : int|null
Tags
Return values
int|nullsetHeaders()
Extracts and sets rate limiting information from HTTP response headers
public
setHeaders(array<string|int, mixed> $headers) : void
This method processes the X-Ratelimit-* headers from the HTTP response and stores them for client access.
Parameters
- $headers : array<string|int, mixed>
-
Associative array of HTTP headers from the response
setHttpClient()
Sets the HTTP client for making follow-up requests
public
setHttpClient([Client|null $httpClient = null ]) : void
Paginated responses contain links to next/previous pages. This HTTP client is used when following those links to fetch additional pages.
Parameters
- $httpClient : Client|null = null
-
The Guzzle HTTP client to use for pagination
loadFromJson()
Loads the needed data from a json array.
protected
loadFromJson(array<string|int, mixed> $json) : void
Parameters
- $json : array<string|int, mixed>
-
the data array to read from.