Skip to content

Quote the WHUF cost of restoring the current streak gap

GET
/contributions/whuf-streak-restore/quote
curl --request GET \
--url https://api.ethos.network/api/v2/contributions/whuf-streak-restore/quote \
--header 'X-Ethos-Api-Key: <X-Ethos-Api-Key>'

Lists the missed days and the streak they interrupted, with the full cost (costWei), the member’s WHUF credit balance (creditWei) and what is still due after that credit (dueWei). openRestore is a restore the member started and has not finished.

Successful response

Media typeapplication/json
object
cooldownEndsAt
required
string | null
costPerDayWhuf
required
integer
> 0 <= 9007199254740991
costWei
required
integer format: int64
costWhuf
required
integer
<= 9007199254740991
creditWei
required
integer format: int64
dueWei
required
integer format: int64
maxDays
required
integer
> 0 <= 9007199254740991
missedDays
required
Array<string>
openRestore
required
Any of:
object
costWei
required
integer format: int64
dueWei
required
integer format: int64
expiresAt
required
string
id
required
integer
> 0 <= 9007199254740991
missedDays
required
Array<string>
previousStreakDays
required
integer
<= 9007199254740991
resultingStreakDays
required
integer
<= 9007199254740991
status
required
string
Allowed values: available cooldown gapTooLong noMissedDays

Example

{
"status": "available"
}

Authorization not provided

Media typeapplication/json
Authorization not provided error (401)

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}

Insufficient access

Media typeapplication/json
Insufficient access error (403)

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}

Internal server error

Media typeapplication/json
Internal server error error (500)

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}