curl --request PUT \
--url https://sg.sandbox.api.reap.global/virtual-assets/{id}/rate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '{
"rate": 1
}'const options = {
method: 'PUT',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({rate: 1})
};
fetch('https://sg.sandbox.api.reap.global/virtual-assets/{id}/rate', 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/{id}/rate"
payload = { "rate": 1 }
headers = {
"Reap-Version": "<reap-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(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": "INVALID_RATE_SOURCE",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "VIRTUAL_ASSET_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}Set rate for virtual asset
Sets a new exchange rate (in the project billing currency) for a virtual asset with FIXED rate source. Not available for HTTP rate source assets.
curl --request PUT \
--url https://sg.sandbox.api.reap.global/virtual-assets/{id}/rate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Reap-Version: <reap-version>' \
--data '{
"rate": 1
}'const options = {
method: 'PUT',
headers: {
'Reap-Version': '<reap-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({rate: 1})
};
fetch('https://sg.sandbox.api.reap.global/virtual-assets/{id}/rate', 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/{id}/rate"
payload = { "rate": 1 }
headers = {
"Reap-Version": "<reap-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(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": "INVALID_RATE_SOURCE",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "VIRTUAL_ASSET_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}Authorizations
API key as Bearer token
Headers
API version (YYYY-MM-DD)
2025-02-14 "2025-02-14"
Path Parameters
Virtual asset ID
Body
New rate for 1 unit of this virtual asset, in the project billing currency. Only available for virtual assets with FIXED rate source. Takes effect immediately: every balance valuation, authorization, and SETTLEMENT posting after this call uses it. Postings already made keep the rate they were priced at.
1
0.01
3487.42
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