v1

latestOpenAPI 3.1.02026-07-24416405768.8 KB
t) Rewards Exchange

Initiate a reward exchange

Creates a new reward exchange for the wallet using either a selling or buying currency. Simultaneous selling and buying currency exchanges are not supported.

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

Path parameters

tenantIdinteger required
walletIdinteger required

Request body

buyingAmountnumber

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

buyingCurrencystring
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

externalUniqueIdstring required

Provide a GUID for the value exchange to prevent replays/duplicates

provider'ZA_DUMMY' | 'ZA_GB' | 'ZA_MR' | 'ZA_SAA' required

Currently supported reward types.

sellingAmountnumber

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

sellingCurrencystring

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

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"
}