curl --request POST \
--url https://api.range.org/v2/intents/evaluate \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"network": "eth",
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28",
"to": "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
"asset": "USDC",
"amount_usd": "15000.50",
"amount": "15000.50",
"counterparty_id": "9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60"
}
'import requests
url = "https://api.range.org/v2/intents/evaluate"
payload = {
"network": "eth",
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28",
"to": "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
"asset": "USDC",
"amount_usd": "15000.50",
"amount": "15000.50",
"counterparty_id": "9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
network: 'eth',
from: '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28',
to: '0x8ba1f109551bD432803012645Ac136ddd64DBA72',
asset: 'USDC',
amount_usd: '15000.50',
amount: '15000.50',
counterparty_id: '9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60'
})
};
fetch('https://api.range.org/v2/intents/evaluate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.range.org/v2/intents/evaluate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'network' => 'eth',
'from' => '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28',
'to' => '0x8ba1f109551bD432803012645Ac136ddd64DBA72',
'asset' => 'USDC',
'amount_usd' => '15000.50',
'amount' => '15000.50',
'counterparty_id' => '9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.range.org/v2/intents/evaluate"
payload := strings.NewReader("{\n \"network\": \"eth\",\n \"from\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28\",\n \"to\": \"0x8ba1f109551bD432803012645Ac136ddd64DBA72\",\n \"asset\": \"USDC\",\n \"amount_usd\": \"15000.50\",\n \"amount\": \"15000.50\",\n \"counterparty_id\": \"9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.range.org/v2/intents/evaluate")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"network\": \"eth\",\n \"from\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28\",\n \"to\": \"0x8ba1f109551bD432803012645Ac136ddd64DBA72\",\n \"asset\": \"USDC\",\n \"amount_usd\": \"15000.50\",\n \"amount\": \"15000.50\",\n \"counterparty_id\": \"9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.range.org/v2/intents/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network\": \"eth\",\n \"from\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28\",\n \"to\": \"0x8ba1f109551bD432803012645Ac136ddd64DBA72\",\n \"asset\": \"USDC\",\n \"amount_usd\": \"15000.50\",\n \"amount\": \"15000.50\",\n \"counterparty_id\": \"9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60\"\n}"
response = http.request(request)
puts response.read_body{
"verdict": "blocked",
"breaches": [
{
"policy_key": "treasury.asset_concentration",
"policy_type": "concentration",
"policy_name": "Asset concentration bound",
"reason": "Projected asset share for USDC is 34.2%, above the 30% bound (currently 28.1%)",
"projected_effect": {
"kind": "concentration",
"dimension": "asset",
"subject": "USDC",
"current_share_percent": 28.1,
"projected_share_percent": 34.2,
"bound_percent": 30
}
}
],
"evaluated_policies": 4
}Evaluate a proposed transaction against the treasury policies
Takes a transaction intent — the transaction you are about to sign — and answers whether Range’s treasury policies allow it. Returns every breaching policy with a reason and the projected effect, so the breach can be previewed before anything is submitted. A breach is blocking: there is no warn tier on this surface. Read-only — evaluating an intent records nothing and notifies no one.
curl --request POST \
--url https://api.range.org/v2/intents/evaluate \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"network": "eth",
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28",
"to": "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
"asset": "USDC",
"amount_usd": "15000.50",
"amount": "15000.50",
"counterparty_id": "9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60"
}
'import requests
url = "https://api.range.org/v2/intents/evaluate"
payload = {
"network": "eth",
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28",
"to": "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
"asset": "USDC",
"amount_usd": "15000.50",
"amount": "15000.50",
"counterparty_id": "9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
network: 'eth',
from: '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28',
to: '0x8ba1f109551bD432803012645Ac136ddd64DBA72',
asset: 'USDC',
amount_usd: '15000.50',
amount: '15000.50',
counterparty_id: '9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60'
})
};
fetch('https://api.range.org/v2/intents/evaluate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.range.org/v2/intents/evaluate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'network' => 'eth',
'from' => '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28',
'to' => '0x8ba1f109551bD432803012645Ac136ddd64DBA72',
'asset' => 'USDC',
'amount_usd' => '15000.50',
'amount' => '15000.50',
'counterparty_id' => '9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.range.org/v2/intents/evaluate"
payload := strings.NewReader("{\n \"network\": \"eth\",\n \"from\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28\",\n \"to\": \"0x8ba1f109551bD432803012645Ac136ddd64DBA72\",\n \"asset\": \"USDC\",\n \"amount_usd\": \"15000.50\",\n \"amount\": \"15000.50\",\n \"counterparty_id\": \"9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.range.org/v2/intents/evaluate")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"network\": \"eth\",\n \"from\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28\",\n \"to\": \"0x8ba1f109551bD432803012645Ac136ddd64DBA72\",\n \"asset\": \"USDC\",\n \"amount_usd\": \"15000.50\",\n \"amount\": \"15000.50\",\n \"counterparty_id\": \"9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.range.org/v2/intents/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network\": \"eth\",\n \"from\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28\",\n \"to\": \"0x8ba1f109551bD432803012645Ac136ddd64DBA72\",\n \"asset\": \"USDC\",\n \"amount_usd\": \"15000.50\",\n \"amount\": \"15000.50\",\n \"counterparty_id\": \"9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60\"\n}"
response = http.request(request)
puts response.read_body{
"verdict": "blocked",
"breaches": [
{
"policy_key": "treasury.asset_concentration",
"policy_type": "concentration",
"policy_name": "Asset concentration bound",
"reason": "Projected asset share for USDC is 34.2%, above the 30% bound (currently 28.1%)",
"projected_effect": {
"kind": "concentration",
"dimension": "asset",
"subject": "USDC",
"current_share_percent": 28.1,
"projected_share_percent": 34.2,
"bound_percent": 30
}
}
],
"evaluated_policies": 4
}Authorizations
Authorization method required to allow user to access the api endpoints.
Body
Network the proposed transaction would settle on.
"eth"
Sending address — the position the projection debits.
"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28"
Destination address.
"0x8ba1f109551bD432803012645Ac136ddd64DBA72"
Asset ticker, matched against the workspace balance tickers.
64"USDC"
USD value of the proposed transaction. Required: every C149 rule is denominated in USD, and on a blocking path the caller’s own execution quote is the right price to judge against.
64"15000.50"
Quantity in asset units, as a positive decimal string. Optional: every rule on this surface is denominated in USD, so the evaluation reads amount_usd and carries this only as caller context.
64"15000.50"
Expected counterparty for the destination. Must belong to the caller workspace and cover the destination address, otherwise the destination is treated as unknown.
"9d5c1a7e-4f3b-4c2a-8e6d-1b2c3d4e5f60"
Response
A breach is blocking: there is no warn tier on this surface. Both outcomes are HTTP 200 — a block is a successful evaluation.
blocked, allowed Show child attributes
Show child attributes
How many treasury policies were evaluated.
4
Was this page helpful?