Get the active policy and its validation by policy type
Returns the active policy and its validation for a specific policy type.
Endpoint Permissions: Owner, Admin, Non-Signing Admin.
GET
/
policy
/
active_policy
TypeScript
const response: Promise<FireblocksResponse<PolicyAndValidationResponse>> = fireblocks.policyEditorV2.getActivePolicy(policyEditorV2ApiGetActivePolicyRequest);CompletableFuture<ApiResponse<PolicyAndValidationResponse>> response = fireblocks.policyEditorV2().getActivePolicy(policyType);response = fireblocks.policy_editor_v2.get_active_policy(policy_type);curl --request GET \
--url https://api.fireblocks.io/v1/policy/active_policyconst options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/policy/active_policy', 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.fireblocks.io/v1/policy/active_policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/policy/active_policy"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/policy/active_policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"policy": {
"rules": [
{
"name": "High Value Transfer Policy",
"id": "policy_rule_001",
"policyEngineVersion": "v2",
"type": "TRANSFER",
"initiator": "*",
"source": {
"operator": "INCLUDES",
"type": [
"VAULT",
"UNMANAGED"
],
"subType": [
{
"type": "VAULT",
"id": "account123",
"subType": "INTERNAL",
"address": "0x123..."
}
],
"ids": [
{
"type": "VAULT",
"id": "account123",
"subType": "INTERNAL",
"address": "0x123..."
}
],
"tags": [
{
"id": "tag_001"
}
],
"matchFrom": "ACCOUNT"
},
"verdict": {
"action": "ALLOW",
"approvers": {
"canInitiatorApprove": false,
"operator": "AND",
"allowOperatorAsAuthorizer": false,
"approvalGroups": [
{
"threshold": 2,
"users": [
"user1",
"user2"
]
}
]
},
"designatedSigners": {
"type": "SINGLE",
"users": [
"user1",
"user2"
],
"groups": [
"group1",
"group2"
]
}
},
"subType": "TRANSFER",
"asset": {
"nftTransfer": false,
"assetTypes": [
"FUNGIBLE",
"NFT",
"*"
],
"operator": "INCLUDES"
},
"destination": {
"type": [
"EXTERNAL"
],
"operator": "INCLUDES",
"addressType": "WHITELISTED"
},
"account": {
"operator": "INCLUDES",
"type": [
"VAULT"
],
"subType": [
{
"type": "VAULT",
"id": "account123",
"subType": "INTERNAL",
"address": "0x123..."
}
],
"ids": [
{
"type": "VAULT",
"id": "account123",
"subType": "INTERNAL",
"address": "0x123..."
}
],
"tags": [
{
"id": "tag_001"
}
],
"matchFrom": "ACCOUNT"
},
"side": "BUY",
"amountOverTime": {
"range": {
"min": "100",
"max": "10000"
},
"currency": "USD",
"timePeriod": {
"seconds": "86400",
"initiator": "PER_SINGLE_MATCH",
"source": "PER_SINGLE_MATCH",
"destination": "PER_SINGLE_MATCH"
}
},
"amount": {
"range": {
"min": "100",
"max": "10000"
},
"currency": "USD"
},
"externalDescriptor": "High value transfer policy for institutional clients",
"method": "*",
"isGlobalPolicy": false,
"programCall": {
"allowedSolanaProgramCalls": "WHITELISTED"
},
"screeningMetadata": {
"direction": "OUTBOUND",
"provider": "CHAINALYSIS",
"riskRating": "MEDIUM",
"riskScore": "0.8",
"exposureType": "DIRECT",
"category": [
"<string>"
],
"name": [
"<string>"
],
"categoryId": [
"<string>"
],
"status": "COMPLETED",
"sourceAddress": "0x123...",
"destAddress": "0x456..."
},
"quoteAsset": {
"nftTransfer": false,
"assetTypes": [
"FUNGIBLE",
"NFT",
"*"
],
"operator": "INCLUDES"
},
"baseAsset": {
"nftTransfer": false,
"assetTypes": [
"FUNGIBLE",
"NFT",
"*"
],
"operator": "INCLUDES"
},
"quoteAmount": {
"range": {
"min": "100",
"max": "10000"
}
},
"baseAmount": {
"range": {
"min": "100",
"max": "10000"
}
},
"dAppAddress": {
"globalWhitelisted": [
"rabby.io",
"jup.ag"
],
"tenantWhitelisted": [
"uniswap.com",
"opensea.io"
],
"urls": [
"*"
],
"operator": "INCLUDES"
},
"derivationPath": {
"path": [
44,
0,
0,
0,
0
],
"partial": false
},
"index": 1
}
],
"metadata": {
"TRANSFER": {
"editedBy": "user123",
"editedAt": "2024-01-15T10:30:00Z",
"publishedBy": "user456",
"publishedAt": "2024-01-15T11:00:00Z"
}
}
},
"validation": {
"status": "<string>",
"checkResult": {
"errors": 123,
"results": [
{
"index": 123,
"errors": [
{
"errorMessage": "<string>",
"errorCode": 123,
"errorCodeName": "<string>"
}
]
}
]
}
}
}{
"message": "<string>",
"code": 123
}Query Parameters
The policy type(s) to retrieve. Can be a single type or multiple types by repeating the parameter (e.g., ?policyType=TRANSFER&policyType=MINT). Policy type enumeration
Available options:
TRANSFER, STAKE, CONTRACT_CALL, TYPED_MESSAGE, APPROVE, MINT, BURN, RAW, COMPLIANCE, DEPLOYMENT, PROGRAM_CALL, DAPP_CONNECTION, UPGRADE, ORDER, AML_CHAINALYSIS_V2_SCREENING, AML_CHAINALYSIS_V2_POST_SCREENING, AML_ELLIPTIC_HOLISTIC_SCREENING, AML_ELLIPTIC_HOLISTIC_POST_SCREENING, TR_NOTABENE_SCREENING, TR_NOTABENE_POST_SCREENING Example:
"TRANSFER"
Was this page helpful?
Previous
Get the active draft by policy typeReturns the active draft and its validation for a specific policy type.
Next
⌘I
TypeScript
const response: Promise<FireblocksResponse<PolicyAndValidationResponse>> = fireblocks.policyEditorV2.getActivePolicy(policyEditorV2ApiGetActivePolicyRequest);CompletableFuture<ApiResponse<PolicyAndValidationResponse>> response = fireblocks.policyEditorV2().getActivePolicy(policyType);response = fireblocks.policy_editor_v2.get_active_policy(policy_type);curl --request GET \
--url https://api.fireblocks.io/v1/policy/active_policyconst options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/policy/active_policy', 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.fireblocks.io/v1/policy/active_policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/policy/active_policy"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/policy/active_policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"policy": {
"rules": [
{
"name": "High Value Transfer Policy",
"id": "policy_rule_001",
"policyEngineVersion": "v2",
"type": "TRANSFER",
"initiator": "*",
"source": {
"operator": "INCLUDES",
"type": [
"VAULT",
"UNMANAGED"
],
"subType": [
{
"type": "VAULT",
"id": "account123",
"subType": "INTERNAL",
"address": "0x123..."
}
],
"ids": [
{
"type": "VAULT",
"id": "account123",
"subType": "INTERNAL",
"address": "0x123..."
}
],
"tags": [
{
"id": "tag_001"
}
],
"matchFrom": "ACCOUNT"
},
"verdict": {
"action": "ALLOW",
"approvers": {
"canInitiatorApprove": false,
"operator": "AND",
"allowOperatorAsAuthorizer": false,
"approvalGroups": [
{
"threshold": 2,
"users": [
"user1",
"user2"
]
}
]
},
"designatedSigners": {
"type": "SINGLE",
"users": [
"user1",
"user2"
],
"groups": [
"group1",
"group2"
]
}
},
"subType": "TRANSFER",
"asset": {
"nftTransfer": false,
"assetTypes": [
"FUNGIBLE",
"NFT",
"*"
],
"operator": "INCLUDES"
},
"destination": {
"type": [
"EXTERNAL"
],
"operator": "INCLUDES",
"addressType": "WHITELISTED"
},
"account": {
"operator": "INCLUDES",
"type": [
"VAULT"
],
"subType": [
{
"type": "VAULT",
"id": "account123",
"subType": "INTERNAL",
"address": "0x123..."
}
],
"ids": [
{
"type": "VAULT",
"id": "account123",
"subType": "INTERNAL",
"address": "0x123..."
}
],
"tags": [
{
"id": "tag_001"
}
],
"matchFrom": "ACCOUNT"
},
"side": "BUY",
"amountOverTime": {
"range": {
"min": "100",
"max": "10000"
},
"currency": "USD",
"timePeriod": {
"seconds": "86400",
"initiator": "PER_SINGLE_MATCH",
"source": "PER_SINGLE_MATCH",
"destination": "PER_SINGLE_MATCH"
}
},
"amount": {
"range": {
"min": "100",
"max": "10000"
},
"currency": "USD"
},
"externalDescriptor": "High value transfer policy for institutional clients",
"method": "*",
"isGlobalPolicy": false,
"programCall": {
"allowedSolanaProgramCalls": "WHITELISTED"
},
"screeningMetadata": {
"direction": "OUTBOUND",
"provider": "CHAINALYSIS",
"riskRating": "MEDIUM",
"riskScore": "0.8",
"exposureType": "DIRECT",
"category": [
"<string>"
],
"name": [
"<string>"
],
"categoryId": [
"<string>"
],
"status": "COMPLETED",
"sourceAddress": "0x123...",
"destAddress": "0x456..."
},
"quoteAsset": {
"nftTransfer": false,
"assetTypes": [
"FUNGIBLE",
"NFT",
"*"
],
"operator": "INCLUDES"
},
"baseAsset": {
"nftTransfer": false,
"assetTypes": [
"FUNGIBLE",
"NFT",
"*"
],
"operator": "INCLUDES"
},
"quoteAmount": {
"range": {
"min": "100",
"max": "10000"
}
},
"baseAmount": {
"range": {
"min": "100",
"max": "10000"
}
},
"dAppAddress": {
"globalWhitelisted": [
"rabby.io",
"jup.ag"
],
"tenantWhitelisted": [
"uniswap.com",
"opensea.io"
],
"urls": [
"*"
],
"operator": "INCLUDES"
},
"derivationPath": {
"path": [
44,
0,
0,
0,
0
],
"partial": false
},
"index": 1
}
],
"metadata": {
"TRANSFER": {
"editedBy": "user123",
"editedAt": "2024-01-15T10:30:00Z",
"publishedBy": "user456",
"publishedAt": "2024-01-15T11:00:00Z"
}
}
},
"validation": {
"status": "<string>",
"checkResult": {
"errors": 123,
"results": [
{
"index": 123,
"errors": [
{
"errorMessage": "<string>",
"errorCode": 123,
"errorCodeName": "<string>"
}
]
}
]
}
}
}{
"message": "<string>",
"code": 123
}