Read the sandbox treasury that funds emulated credits
curl --request GET \
--url https://api.example.com/sandbox/treasury \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/sandbox/treasury"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/sandbox/treasury', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"chainId": 123,
"address": "<string>",
"gasBalance": "500.00",
"maxCredit": "500.00",
"balances": [
{
"token": "USDC",
"tokenAddress": "<string>",
"balance": "500.00"
}
]
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Sandbox
Read the sandbox treasury that funds emulated credits
GET
/
sandbox
/
treasury
Read the sandbox treasury that funds emulated credits
curl --request GET \
--url https://api.example.com/sandbox/treasury \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/sandbox/treasury"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/sandbox/treasury', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"chainId": 123,
"address": "<string>",
"gasBalance": "500.00",
"maxCredit": "500.00",
"balances": [
{
"token": "USDC",
"tokenAddress": "<string>",
"balance": "500.00"
}
]
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The client account to act for, as a cl_… id. Omit it to act as yourself.
Example:
"cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"
Response
Successful Response
Numeric network identifier used by the sandbox treasury.
Sandbox treasury address.
Native-asset balance available for transaction fees.
Example:
"500.00"
Maximum test amount allowed in one credit.
Example:
"500.00"
Settlement assets available to the emulator.
Show child attributes
Show child attributes
Was this page helpful?