Coinbase Policy Engine API

The Policy Engine APIs evaluate policies (a set of rules) to govern the behavior of accounts or projects, such as enforce allowlists and denylists. - A **policy** is a collection of `rules` with defined criteria. - Each **rule** contains a specified `action`, `operation`, and `criteria`: - An `action` can either `accept` or `reject` a transaction if the criteria in the rule are met. - `criteria` is an array of logical expressions. All parameters must evaluate to true for the action to be applied. - An `operation` corresponds to a CDP v2 API: - `signEvmTransaction` or `signSolTransaction` for signing transactions (to set a transaction limit). - `sendEvmTransaction` for signing a transaction, and sending it to a supported network. - `signEvmHash` for signing an arbitrary 32 byte hash. - `signEvmMessage` for signing an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message. - `prepareUserOperation` for preparing user operations on a smart account. - `sendUserOperation` for sending user operations using a smart account. - `signEndUserEvmTransaction` or `signEndUserSolTransaction` for signing end user transactions (to set a transaction limit). - `sendEndUserEvmTransaction` for signing an end user transaction, and sending it to a supported EVM network. - `sendEndUserSolTransaction` for signing an end user transaction, and sending it to a supported Solana network. - `signEndUserEvmMessage` for signing an end user [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message. - `signEndUserEvmTypedData` for signing end user [EIP-712](https://eips.ethereum.org/EIPS/eip-712) typed data. - `signEndUserSolMessage` for signing an end user Solana message. - A **rule** indicates how an operation should behave, specifying whether a request with defined criteria should be accepted or rejected. ## Policy Scope Policies can be applied at the project and/or account level: - **Project-level policy**: A `project`-level policy applies to all accounts in a CDP Project. Only one project-level policy can be applied to accounts within a CDP Project at any given time. - **Account-level policy**: An `account`-level policy applies to one or more accounts. An account can have at most one account-level policy at any given time. Thus, a single account can be assigned at most two policies at any given time: one project-level policy and one account-level policy. **Note:** End user operation rules (e.g., `signEndUserEvmTransaction`, `sendEndUserSolTransaction`) currently only apply for policies with the `project` scope. Scope is specified in the `scope` field of a policy: ```json { "description": "Project-level policy", "scope": "account", ... ``` ## Policy Evaluation A rule *targets* an operation when its `operation` field equals the requested operation. A rule *matches* when it targets the operation and all of its criteria are met (logical **AND**). Reject-over-accept precedence does not depend on rule order. For matching rules with the same action, the first in policy order applies. **Project-level policies** are evaluated first, followed by **account-level policies**. Within a policy, any matching `reject` rule rejects the request. Otherwise, any matching `accept` rule accepts it. If no rule in the project-level policy matches, the account-level policy is evaluated the same way, if one exists. A decision in the project-level policy is final. A `reject` rule overrides an `accept` rule only within the same policy, so an account-level `reject` rule does not override a matching project-level `accept` rule. If neither policy makes a decision, the request is accepted when no rule in either policy targets the operation, and rejected when at least one rule targets it. For example, this project-level policy accepts `signEvmTransaction` requests up to 2000000000000000000 wei, but rejects any request to `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`. A request to that address for 1 ETH matches both rules and is rejected regardless of their order. ```json { "description": "Project-level policy", "scope": "project", "rules": [ { "action": "accept", "operation": "signEvmTransaction", "criteria": [ { "type": "ethValue", "ethValue": "2000000000000000000", "operator": "", }, ], }, { "action": "reject", "operation": "signEvmTransaction", "criteria": [ { "type": "netUSDChange", "changeCents": 10000, "operator": ">", }, ], }, ], } ``` ### Limiting USDC Spend This policy restricts USDC transactions on the Base network to transfers of 10,000 tokens or less. It applies to both signing and sending transactions to the USDC contract address, using the ERC20 ABI to validate that only `transfer` function calls with a `value` parameter under the specified limit are permitted. ```json { "description": "Limit USDC Spend", "scope": "account", "rules": [ { "action": "accept", "operation": "sendEvmTransaction", "criteria": [ { "type": "evmNetwork", "networks": ["base"], "operator": "in" }, { "type": "evmAddress", "addresses": ["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"], "operator": "in" }, { "type": "evmData", "abi": "erc20", "conditions": [ { "function": "transfer", "params": [ { "name": "value", "operator": "<=", "value": "10000" } ] } ] } ] }, { "action": "accept", "operation": "signEvmTransaction", "criteria": [ { "type": "evmAddress", "addresses": ["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"], "operator": "in" }, { "type": "evmData", "abi": "erc20", "conditions": [ { "function": "transfer", "params": [ { "name": "value", "operator": "<=", "value": "10000" } ] } ] } ] } ] } ```.

Operations 5

GET /v2/policy-engine/policies List policies #
POST /v2/policy-engine/policies Create policy #
GET /v2/policy-engine/policies/{policyId} Get policy by ID #
DELETE /v2/policy-engine/policies/{policyId} Delete policy #
PUT /v2/policy-engine/policies/{policyId} Update policy #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-conversion-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-currency-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-payment-method-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-transfer-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-transaction-summary-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-price-book-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-product-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-candle-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-trade-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-order-book-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-trade-2-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/json-schema/coinbase-profile-schema.json

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/coinbase:coinbase-policy-engine-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

coinbase-policy-engine-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Coinbase Developer Platform Policy Engine API
  description: The Coinbase Developer Platform APIs - leading the world's transition onchain.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 2.0.0
  contact:
    name: Coinbase Developer Platform
    email: cdp@coinbase.com
    url: https://cdp.coinbase.com
servers:
- url: https://api.cdp.coinbase.com/platform
  description: The production server of the CDP APIs.
security:
- apiKeyAuth: []
tags:


# --- truncated at 32 KB (152 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/coinbase/refs/heads/main/openapi/coinbase-policy-engine-api-openapi.yml