curl --request POST \
--url https://sg.sandbox.api.reap.global/virtual-assets/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"symbol": "<string>",
"name": "<string>",
"decimals": 9,
"rateSource": "FIXED",
"rate": 1,
"httpEndpoint": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
symbol: '<string>',
name: '<string>',
decimals: 9,
rateSource: 'FIXED',
rate: 1,
httpEndpoint: '<string>'
})
};
fetch('https://sg.sandbox.api.reap.global/virtual-assets/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/virtual-assets/"
payload = {
"symbol": "<string>",
"name": "<string>",
"decimals": 9,
"rateSource": "FIXED",
"rate": 1,
"httpEndpoint": "<string>"
}
headers = {
"Reap-Version": "<reap-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "<string>",
"name": "<string>",
"decimals": 0,
"status": "ACTIVE",
"rateSource": "FIXED",
"httpEndpoint": "<string>",
"currentRate": 1,
"currentRateUpdatedAt": "<string>",
"allocated": {
"amount": "<string>",
"value": 123
},
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "VIRTUAL_ASSETS_NOT_ENABLED",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "DUPLICATE_VIRTUAL_ASSET_SYMBOL",
"message": "<string>",
"detail": {}
}
}Create virtual asset
Defines a new virtual asset for the project. Only available when virtual assets are enabled for the project. For FIXED rate source, an initial rate must be provided. For HTTP rate source, an endpoint URL is required.
curl --request POST \
--url https://sg.sandbox.api.reap.global/virtual-assets/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"symbol": "<string>",
"name": "<string>",
"decimals": 9,
"rateSource": "FIXED",
"rate": 1,
"httpEndpoint": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
symbol: '<string>',
name: '<string>',
decimals: 9,
rateSource: 'FIXED',
rate: 1,
httpEndpoint: '<string>'
})
};
fetch('https://sg.sandbox.api.reap.global/virtual-assets/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/virtual-assets/"
payload = {
"symbol": "<string>",
"name": "<string>",
"decimals": 9,
"rateSource": "FIXED",
"rate": 1,
"httpEndpoint": "<string>"
}
headers = {
"Reap-Version": "<reap-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "<string>",
"name": "<string>",
"decimals": 0,
"status": "ACTIVE",
"rateSource": "FIXED",
"httpEndpoint": "<string>",
"currentRate": 1,
"currentRateUpdatedAt": "<string>",
"allocated": {
"amount": "<string>",
"value": 123
},
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "VIRTUAL_ASSETS_NOT_ENABLED",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "DUPLICATE_VIRTUAL_ASSET_SYMBOL",
"message": "<string>",
"detail": {}
}
}Authorizations
API key as Bearer token
Headers
API version (YYYY-MM-DD)
2025-02-14 "2025-02-14"
Body
Unique symbol within the project (e.g., USDC, BTC, GOLD, POINTS). Uppercase alphanumeric and underscores only.
^[A-Z0-9_]{1,10}$Display name for the virtual asset
1 - 50Number of decimal places for amounts
0 <= x <= 18How the exchange rate (in the project billing currency) is determined for this virtual asset.
FIXED, HTTP "FIXED"
Initial rate for 1 unit of this virtual asset, in the project billing currency. Required when rateSource is FIXED. Ignored for HTTP. The rate prices the asset wherever it is valued: a balance of n units counts as n × rate toward available balance, and a SETTLEMENT posting of n units clears n × rate of card debt. Use 1 for a unit pegged to the billing currency (cashback, a credit line), 0.01 for points worth one cent each, or a market price such as 3487.42 for a unit tracking ETH.
1
0.01
3487.42
URL of the rate endpoint. Required when rateSource is HTTP. Must be HTTPS and resolve to a public address (no private IPs). The endpoint must respond to GET requests with JSON: { "rate": <number> } where rate is the value of 1 unit of this virtual asset in the project billing currency, for example { "rate": 3487.42 } for a unit tracking ETH in a USD-billed program. Rates are fetched periodically by the platform.
Response
Virtual asset definition
Unique virtual asset identifier
Virtual asset symbol
Display name
Number of decimal places for amounts
-9007199254740991 <= x <= 9007199254740991Lifecycle status. Disabled assets are excluded from balance computation.
ACTIVE, DISABLED "ACTIVE"
How the exchange rate (in the project billing currency) is determined for this virtual asset.
FIXED, HTTP "FIXED"
Rate endpoint URL. Present only for HTTP rate source.
Latest known rate per unit, in the project billing currency. This is the rate a SETTLEMENT posting made now would be priced at. Null if no rate snapshot exists yet.
x > 01
ISO 8601 timestamp of the latest rate snapshot. Null when currentRate is null.
Total amount of this virtual asset allocated across all accounts in the project.
Show child attributes
Show child attributes
ISO 8601 creation timestamp
ISO 8601 last update timestamp