Fund the sandbox treasury
Fund the sandbox treasury float so quotes have inventory.
curl -X POST "https://sandbox.rasto.co/api/sandbox/treasury/funding" \
-H "Content-Type: application/json" \
-H "Api-Version: 2026-08-01" \
-H "Idempotency-Key: 6f1c9a0e-2b7d-4c3a-9e58-0d4b7a1f2c63" \
-H "Api-Key: YOUR_API_KEY" \
-d '{
"amount": "10000",
"chain": "solana",
"currency": "usdc"
}'
import requests
import json
url = "https://sandbox.rasto.co/api/sandbox/treasury/funding"
headers = {
"Content-Type": "application/json",
"Api-Version": "2026-08-01",
"Idempotency-Key": "6f1c9a0e-2b7d-4c3a-9e58-0d4b7a1f2c63",
"Api-Key": "YOUR_API_KEY"
}
data = {
"amount": "10000",
"chain": "solana",
"currency": "usdc"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://sandbox.rasto.co/api/sandbox/treasury/funding", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Api-Version": "2026-08-01",
"Idempotency-Key": "6f1c9a0e-2b7d-4c3a-9e58-0d4b7a1f2c63",
"Api-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"amount": "10000",
"chain": "solana",
"currency": "usdc"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"amount": "10000",
"chain": "solana",
"currency": "usdc"
}`)
req, err := http.NewRequest("POST", "https://sandbox.rasto.co/api/sandbox/treasury/funding", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Api-Version", "2026-08-01")
req.Header.Set("Idempotency-Key", "6f1c9a0e-2b7d-4c3a-9e58-0d4b7a1f2c63")
req.Header.Set("Api-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://sandbox.rasto.co/api/sandbox/treasury/funding')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Api-Version'] = '2026-08-01'
request['Idempotency-Key'] = '6f1c9a0e-2b7d-4c3a-9e58-0d4b7a1f2c63'
request['Api-Key'] = 'YOUR_API_KEY'
request.body = '{
"amount": "10000",
"chain": "solana",
"currency": "usdc"
}'
response = http.request(request)
puts response.body
{
"amount": "10000",
"chain": "solana",
"currency": "usdc",
"network": "testnet",
"object": "treasury_funding"
}
{
"error": {
"code": "missing_api_key",
"kind": "authentication_error",
"message": "Provide your secret key in the Api-Key header.",
"param": null,
"request_id": "req_03567mJQHwb7YWJE7YDlTz"
}
}
{
"error": {
"code": "invalid_parameter",
"kind": "invalid_request_error",
"message": "Field required",
"param": "chain",
"request_id": "req_03567mJQsBg4gghJyHmgxI"
}
}
{
"error": {
"code": "rate_limited",
"kind": "rate_limit_error",
"message": "Too many requests. Back off and retry after the indicated delay.",
"param": null,
"request_id": "req_03567mJQHwb7YWJE7YDlTz"
}
}
{
"error": {
"code": "upstream_error",
"kind": "api_error",
"message": "The request could not be completed right now. Nothing was charged or changed; retry shortly, and contact support if it persists.",
"param": null,
"request_id": "req_03567mJQHwb7YWJE7YDlTz"
}
}
/api/sandbox/treasury/funding
Target server for requests. Edit to use your own host.
Your secret API key, sent in the Api-Key header on every request. Create keys on the dashboard. A sandbox key starts with sk_test_ and works only on https://sandbox.rasto.co; a live key starts with sk_live_ and works only on https://api.rasto.co. A read-only key can call every GET and is refused on anything that changes state. Keep keys on your server: never ship one in a browser or mobile app.
Api-Key header on every request. Create keys on the dashboard. A sandbox key starts with sk_test_ and works only on https://sandbox.rasto.co; a live key starts with sk_live_ and works only on https://api.rasto.co. A read-only key can call every GET and is refused on anything that changes state. Keep keys on your server: never ship one in a browser or mobile app.The media type of the request body
The API version to use for this request, as a date (YYYY-MM-DD). Optional: without it you get version 2026-08-01, and that never changes. A later breaking change reaches you only when you send its newer date. Supported: 2026-08-01.
A value you choose, unique per request (a UUID works), at most 255 characters. Retrying with the same key and the same body replays the first answer instead of acting again. Keys are kept for 24 hours.
The stablecoin to fund, in lowercase, such as usdc or usdt. Defaults to usdc. A currency we do not deliver returns 400 unsupported_currency.
Required. The chain to fund: solana, ethereum or base. Any other returns 400 unsupported_chain.
Required. How much to fund, as a decimal string greater than 0. Fundings are capped at 10,000 per day in sum; past it the call returns 422 invalid_parameter.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Your secret API key, sent in the Api-Key header on every request. Create keys on the dashboard. A sandbox key starts with sk_test_ and works only on https://sandbox.rasto.co; a live key starts with sk_live_ and works only on https://api.rasto.co. A read-only key can call every GET and is refused on anything that changes state. Keep keys on your server: never ship one in a browser or mobile app.
Headers
The API version to use for this request, as a date (YYYY-MM-DD). Optional: without it you get version 2026-08-01, and that never changes. A later breaking change reaches you only when you send its newer date. Supported: 2026-08-01.
2026-08-01A value you choose, unique per request (a UUID works), at most 255 characters. Retrying with the same key and the same body replays the first answer instead of acting again. Keys are kept for 24 hours.
6f1c9a0e-2b7d-4c3a-9e58-0d4b7a1f2c63Body
The stablecoin to fund, in lowercase, such as usdc or usdt. Defaults to usdc. A currency we do not deliver returns 400 unsupported_currency.
Required. The chain to fund: solana, ethereum or base. Any other returns 400 unsupported_chain.
Required. How much to fund, as a decimal string greater than 0. Fundings are capped at 10,000 per day in sum; past it the call returns 422 invalid_parameter.
10.5