v1

latestOpenAPI 3.1.02026-07-24416405768.8 KB
t) Rewards Exchange

Redeem a reward

Exchanges the reward into the wallet using either a selling or buying currency. Simultaneous selling and buying currency exchanges are not supported.

put/eclipse-conductor/rest/v1/tenants/{tenantId}/wallets/{walletId}/rewards/{rewardId}

Path parameters

tenantIdinteger required
walletIdinteger required
rewardIdinteger required

Request body

buyingAmountnumber

Amount that need to be exchanged e.g. 50.80 for 50 GBP and 80 etc

callbackUrlstring

The URL Eclipse must post the EclipseRewardResult to when the value exchange is finalised (either successful or error). Optional as one can always do a GET to get the result instead of using callbacks. This will be a system-system call

sellingAmountnumber

Amount that need to be exchanged e.g. 50.80 for 50 GBP and 80 etc

status'BUILDING' | 'CANCELLED' | 'ERROR_PERM' | 'ERROR_TEMP' | 'PENDING' | 'REVERSED' | 'SUCCESSFUL' | 'TIMEOUT'

Status of a reward

submitboolean

If true then the caller indicates they are happy with the value exchange quotes and it can be submitted

Response

OK

buyingAmountnumber

Amount that need to be exchanged e.g. 50.80 for 50 GBP and 80 etc

buyingCurrencystring

The currency from which wanted to exchange the amount- e.g. GB, SAA

createdstring date-time
errorDescriptionstring
exchangeRatenumber

The rate of value exchange between currency

feeAmountnumber

The fee which has been debited from source wallet in source wallet currency for value exchange

quoteExpiresstring date-time

Quote expire time.

rewardIdinteger
sellingAmountnumber

Amount that need to be exchanged e.g. 50.80 for 50 GBP and 80 etc

sellingCurrencystring

The currency in which wanted to exchange the amount- e.g. GB, SAA

status'BUILDING' | 'CANCELLED' | 'ERROR_PERM' | 'ERROR_TEMP' | 'PENDING' | 'REVERSED' | 'SUCCESSFUL' | 'TIMEOUT'

Status of a reward

tradeType'BUY' | 'SELL'

Example response

{
  "created": "2022-03-10T12:15:50-04:00",
  "quoteExpires": "2022-03-10T12:15:50-04:00"
}