BLOCK CLI CLI / APIllms.txt
Introduction

Solana first.
Built for agents.

Give your agent a Solana home base, an EVM wallet, and one interface to onchain tools. Start with funds on Solana. Use Relay to prepare a bridge when the next action lives on another chain.

  1. Create walletsKeys stay in your runtime
  2. Fund on SolanaSOL + SPL tokens
  3. Bridge with RelayPrepare a native SOL deposit
  4. Use EVM toolsAfter verified settlement

Staying on Solana? Use Solana, Jupiter, Raydium, Pump.fun, and other supported actions directly.

Your agent owns the wallet.

The CLI creates keys locally. The hosted API accepts public addresses and returns data or unsigned transactions. Transaction review, signing, and submission belong to your agent’s external wallet integration.

Connect in minutes

#

The CLI and HTTP API use the same capability registry. You need Node.js 22, a source checkout of the CLI, and a gateway access key supplied by the service operator. The package is private and is not published on npm.

To install the local command, run npm link after building, then use block-cli in place of node dist/cli.js. The previous agent-crypto command remains an alias.

Terminal · from the CLI source directory
npm ci
npm run build

export AGENT_CRYPTO_URL='https://agent-crypto-production.up.railway.app'
# Inject AGENT_CRYPTO_API_KEY from your runtime's secret store.

node dist/cli.js platforms
node dist/cli.js schema solana balance
node dist/cli.js call solana balance --params '{"address":"11111111111111111111111111111111"}'

The balance example uses Solana’s public system-program address. Replace it with your agent’s public address when reading its balance. Set the gateway URL explicitly; the CLI otherwise defaults to localhost.

Already have an HTTP tool?

Call the hosted API directly from your agent’s runtime. Use the same gateway URL and access key. Wallet creation still happens locally; it is not a hosted API endpoint.

HTTP · read a public Solana balance
curl --silent --show-error "$AGENT_CRYPTO_URL/v1/execute" \
  -H "Authorization: Bearer $AGENT_CRYPTO_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
    "platform": "solana",
    "action": "balance",
    "params": {"address": "11111111111111111111111111111111"}
  }'
RequestPurpose
GET /v1/platformsDiscover platforms, available actions, and input schemas.
GET /v1/platforms/{id}Inspect one platform’s actions and limitations.
POST /v1/executeCall an action using platform, action, and params.
GET /openapi.jsonGet the authenticated OpenAPI 3.1 document.

API origin: https://agent-crypto-production.up.railway.app. These four endpoints require a Bearer key. /health and /v1/progress are public.

Create agent-owned wallets

#

Create an independent Solana keypair and EVM keypair in one encrypted local keystore. The EVM address works across supported EVM networks, including Ethereum, Base, BNB Chain, and Robinhood Chain. Balances remain separate on each network.

Local wallet creation
# Inject AGENT_CRYPTO_WALLET_PASSWORD from your secret store.
# It must contain at least 16 characters.
mkdir -p work

node dist/cli.js wallet create --chain both \
  --out work/agent-wallets.enc.json > work/wallet-public.json

node dist/cli.js wallet inspect --file work/agent-wallets.enc.json

--chain both is the default. Choose solana or evm to create only one wallet. wallet inspect unlocks and verifies the keystore, then prints public addresses. Both commands run locally without contacting the gateway.

Private material

Private keys are encrypted in the local keystore. Its file permissions are restricted, and creation refuses to overwrite an existing file. Inject the password through your runtime’s secret manager.

Public output

JSON output contains the keystore location and public addresses. Keep the encrypted file and its password recoverable; there is no recovery phrase, key export, or hosted recovery service.

The wallet password and gateway access key are separate secrets. Never put wallet passwords, private keys, keystore contents, or seed phrases in prompts or API parameters.

Using HTTP without the CLI?

A Node.js agent can call the local wallet module from the built source checkout, then use HTTP for platform actions. Reopen the same keystore on later runs.

JavaScript · local wallet module
import { createLocalWallets, inspectLocalWallets } from './dist/wallets.js';

const wallet = await createLocalWallets({
  chain: 'both',
  out: './agent-wallets.enc.json',
  password: process.env.AGENT_CRYPTO_WALLET_PASSWORD,
});
// Use wallet.wallets.solana.address and wallet.wallets.evm.address.
// Later: await inspectLocalWallets({ file: './agent-wallets.enc.json' });

Fund the Solana home base

#

Deposit SOL or supported SPL tokens to the agent’s Solana address using your existing wallet or funding service. Keep enough native SOL for transaction fees. The CLI does not initiate an exchange withdrawal or automatically fund a new wallet.

Read the agent’s public addresses and SOL balance
# These examples use jq to read public addresses.
export SOLANA_ADDRESS="$(jq -r '.data.wallets.solana.address' work/wallet-public.json)"
export EVM_ADDRESS="$(jq -r '.data.wallets.evm.address' work/wallet-public.json)"

jq -n --arg address "$SOLANA_ADDRESS" '{address: $address}' |
  node dist/cli.js call solana balance --stdin

node dist/cli.js schema solana token_accounts

Use solana.balance for native SOL and solana.token_accounts for SPL holdings. The gateway can prepare SOL and classic SPL Token transfers and simulate unsigned Solana transactions. Token-2022 transfers are not currently prepared.

Amounts are integer strings."100000000" lamports = 0.1 SOL.slippageBps: 50 = 0.5%.

Use each token’s decimals and BigInt for raw arithmetic. Do not convert large raw amounts to JavaScript Number.

Go from Solana to EVM

#

Ask Relay for available chains and currencies, inspect a route, then prepare a fresh unsigned deposit with the Solana address as payer and EVM address as recipient. A supported destination in the catalog does not guarantee liquidity or an available route.

Inspect Relay before preparing a bridge
node dist/cli.js call relay chains --params '{"chainIds":[792703809,1,8453,56,4663],"limit":20}'
node dist/cli.js schema relay quote
node dist/cli.js schema relay prepare_bridge_solana
Prepare native SOL → Base ETH
# 100,000,000 lamports = 0.1 SOL. Destination: native ETH on Base.
# This prepares an unsigned transaction; it does not move funds.
jq -n --arg user "$SOLANA_ADDRESS" --arg recipient "$EVM_ADDRESS" '{
  user: $user,
  recipient: $recipient,
  originChainId: 792703809,
  destinationChainId: 8453,
  originCurrency: "11111111111111111111111111111111",
  destinationCurrency: "0x0000000000000000000000000000000000000000",
  amount: "100000000",
  slippageBps: 50,
  maxGasFeeAmount: "100000"
}' | node dist/cli.js call relay prepare_bridge_solana --stdin > work/bridge.json

The example uses public addresses from the wallet setup above. For an informational quote, call relay quote with the same parameters except maxGasFeeAmount. SOL’s Relay currency identifier is the system address, not the wrapped SOL mint.

Preparation is one step in the bridge flow.

The native SOL path returns an unsigned V0 transaction. It validates the expected deposit instruction, payer, order, vault, and fee bounds. It does not check your balance, simulate, sign, or submit the transaction. Your wallet must review it, simulate it, and sign and submit within its policy and the transaction’s validity window.

Native SOL origin preparation is supported. SPL-token origin deposits and approval/signature flows remain unsupported. maxGasFeeAmount is in origin native units—lamports for Solana—and limits the supported fee estimates; it is not a guarantee of bridge completion.

The response includes transactionBase64, blockhash, and lastValidBlockHeight. An access key with the simulate scope can dry-run the unsigned transaction:

Simulate the unsigned Solana deposit
jq '{transactionBase64: .data.transactionBase64}' work/bridge.json |
  node dist/cli.js call solana simulate --stdin

Simulation replaces the blockhash and does not verify signatures. It does not establish future success or extend the original transaction’s validity.

Track the Relay intent
# Relay's data.requestId identifies the bridge intent.
# The outer requestId identifies the gateway request.
jq '{requestId: .data.requestId}' work/bridge.json |
  node dist/cli.js call relay status --stdin

Wait for a filled intent and verify the destination transaction and recipient balance before using EVM funds. A pending intent is not delivered; a refund is not a successful destination payment. Status is Relay-reported, not independent onchain verification.

DestinationChain IDNative fee asset
Ethereum1ETH
Base8453ETH
BNB Chain56BNB
Robinhood Chain4663ETH

Select a route and destination currency from Relay discovery. Your EVM wallet may need native destination tokens for gas even when the received asset is a token.

One registry. Every capability.

#

This reference is generated from the API snapshot for v0.7.0: 67 registered actions across 16 platform and tool groups. Fetch the authenticated runtime catalog before calling an action; it contains current schemas and limitations.

read Inspect or quoteprepare Build unsigned transactionssimulate Dry-run an unsigned transaction
Solana RPC6 actions

Read balances and status, prepare unsigned SOL/classic SPL transfers, and simulate unsigned transactions.

solana · runtime schemas
node dist/cli.js platforms solana
node dist/cli.js schema solana prepare_transfer_sol
prepare_transfer_solprepare
Prepare an unsigned native SOL transfer between existing ordinary wallets with an explicit fee ceiling.
prepare_transfer_tokenprepare
Prepare an unsigned TransferChecked for existing classic SPL token accounts; rejects Token-2022 and wrapped SOL.
balanceread
Get native SOL balance; lamports and SOL are exact decimal strings.
token_accountsread
List classic SPL Token and Token-2022 accounts owned by an address.
transaction_statusread
Look up a transaction signature, including historical status when available.
simulatesimulate
Simulate one unsigned base64 transaction without signing or broadcasting.
Current limitations
  • Never stores keys, signs, or broadcasts transactions.
  • Native balances above JavaScript safe-integer precision are rejected instead of rounded.
  • Simulation does not verify signatures and cannot prove a transaction is safe or will execute later.
  • Individual simulations do not carry state across a multi-transaction sequence.
  • Transfers require existing accounts, on-curve wallets, and an explicit network fee ceiling; no account creation or priority fee.
  • Token transfers support classic SPL Token only, with existing owner-controlled accounts; no Token-2022, wrapped SOL, multisig, or delegated transfers.
Robinhood Chain5 actions

Read Robinhood Chain mainnet state and prepare unsigned native ETH transfers.

robinhood · runtime schemas
node dist/cli.js platforms robinhood
node dist/cli.js schema robinhood chain_info
chain_inforead
Verify Robinhood mainnet and read the current L2 block identity.
balanceread
Read an address native ETH balance as exact wei at a canonical block hash.
token_balanceread
Read exact balance and decimals for one specified ERC-20 contract at a canonical block hash.
transaction_statusread
Read transaction/receipt state and verify L2 block inclusion without claiming L1 finality.
prepare_transfer_nativeprepare
Prepare an unsigned native ETH transfer on Robinhood Chain 4663 between ordinary wallets with a total network fee ceiling.
Current limitations
  • Mainnet chain 4663 only. No custody, signing, broadcasting, bridging, or stock-token trading.
  • State reads use canonical block hashes and require an EIP-1898-capable RPC. Public RPC access is rate-limited.
  • Token balance requires a caller-specified contract implementing ERC-20 balanceOf and decimals; it does not discover tokens or verify their legitimacy.
  • Transaction confirmation means observed L2 receipt inclusion only; Ethereum posting and L1 finality are not verified.
Ethereum5 actions

Read Ethereum mainnet state and prepare unsigned native ETH transfers.

ethereum · runtime schemas
node dist/cli.js platforms ethereum
node dist/cli.js schema ethereum chain_info
chain_inforead
Verify Ethereum mainnet and read the current block identity.
balanceread
Read an address native ETH balance as exact wei at a canonical block hash.
token_balanceread
Read exact balance and decimals for one specified ERC-20 contract at a canonical block hash.
transaction_statusread
Read transaction/receipt state and verify canonical block inclusion without claiming finality.
prepare_transfer_nativeprepare
Prepare an unsigned native ETH transfer on Ethereum between ordinary wallets with a preparation-time fee budget.
Current limitations
  • Mainnet chain 1 only. Native currency is ETH. No custody, signing, broadcasting, bridging, or trading.
  • Balance and token state reads require EIP-1898 canonical block hash support; unsupported providers fail closed. Public RPCs may impose rate limits.
  • Token balance requires a caller-specified contract implementing ERC-20 balanceOf and decimals. It does not discover tokens or verify their legitimacy; decimals must be uint8 and calls are limited to 200,000 gas each.
  • Transaction confirmation means observed canonical receipt inclusion only. Consensus finality and confirmation depth are not verified.
  • Native transfer preparation supports ordinary empty-code wallets only and does not sign or broadcast. Pending reads are not atomic; an external signer must recheck the chain, recipient, nonce, code, balance, and fees.
Base5 actions

Read Base mainnet state and prepare unsigned native ETH transfers.

base · runtime schemas
node dist/cli.js platforms base
node dist/cli.js schema base chain_info
chain_inforead
Verify Base mainnet and read the current block identity.
balanceread
Read an address native ETH balance as exact wei at a canonical block hash.
token_balanceread
Read exact balance and decimals for one specified ERC-20 contract at a canonical block hash.
transaction_statusread
Read transaction/receipt state and verify canonical block inclusion without claiming finality.
prepare_transfer_nativeprepare
Prepare an unsigned native ETH transfer on Base between ordinary wallets with a preparation-time fee budget.
Current limitations
  • Mainnet chain 8453 only. Native currency is ETH. No custody, signing, broadcasting, bridging, or trading.
  • Balance and token state reads require EIP-1898 canonical block hash support; unsupported providers fail closed. Public RPCs may impose rate limits.
  • Token balance requires a caller-specified contract implementing ERC-20 balanceOf and decimals. It does not discover tokens or verify their legitimacy; decimals must be uint8 and calls are limited to 200,000 gas each.
  • Transaction confirmation means observed canonical L2 receipt inclusion only. Ethereum posting and L1 finality are not verified.
  • Native transfer preparation supports ordinary empty-code wallets only and does not sign or broadcast. Pending reads are not atomic; an external signer must recheck the chain, recipient, nonce, code, balance, and fees.
  • Base maxFeeWei is a preparation-time budget covering execution plus a reserve for current L1 data and operator fee estimates. Supplemental fees can change; only execution fees are capped by the serialized transaction.
BNB Chain5 actions

Read BNB Chain mainnet state and prepare unsigned native BNB transfers.

bnb · runtime schemas
node dist/cli.js platforms bnb
node dist/cli.js schema bnb chain_info
chain_inforead
Verify BNB Chain mainnet and read the current block identity.
balanceread
Read an address native BNB balance as exact wei at a canonical block hash.
token_balanceread
Read exact balance and decimals for one specified ERC-20 contract at a canonical block hash.
transaction_statusread
Read transaction/receipt state and verify canonical block inclusion without claiming finality.
prepare_transfer_nativeprepare
Prepare an unsigned native BNB transfer on BNB Chain between ordinary wallets with a preparation-time fee budget.
Current limitations
  • Mainnet chain 56 only. Native currency is BNB. No custody, signing, broadcasting, bridging, or trading.
  • Balance and token state reads require EIP-1898 canonical block hash support; unsupported providers fail closed. Public RPCs may impose rate limits.
  • Token balance requires a caller-specified contract implementing ERC-20 balanceOf and decimals. It does not discover tokens or verify their legitimacy; decimals must be uint8 and calls are limited to 200,000 gas each.
  • Transaction confirmation means observed canonical receipt inclusion only. Consensus finality and confirmation depth are not verified.
  • Native transfer preparation supports ordinary empty-code wallets only and does not sign or broadcast. Pending reads are not atomic; an external signer must recheck the chain, recipient, nonce, code, balance, and fees.
Solana market discovery2 actions

Search indexed Solana pairs for Pump.fun/PumpSwap, Meteora/DBC, and Raydium through DexScreener.

discovery · runtime schemas
node dist/cli.js platforms discovery
node dist/cli.js schema discovery search
searchread
Search indexed Solana pairs and filter to supported DEX venues.
token_pairsread
List indexed Solana pairs for a mint at supported DEX venues.
Current limitations
  • Third-party indexed data may be delayed or incomplete; results are untrusted market metadata.
  • DEX filters identify current market venues, not a token launch origin.
  • No complete newly launched token stream and no direct launch/trading support for Pump.fun or Meteora.
  • Search is limited to the provider result set before local platform filtering.
Raydium Trade API4 actions

Indexed pool discovery and details, exact-input swap quotes, and unsigned V0 transaction preparation through official Raydium APIs.

raydium · runtime schemas
node dist/cli.js platforms raydium
node dist/cli.js schema raydium pools
poolsread
List or filter indexed Raydium pools by mint addresses and pool type with bounded cursor pagination.
poolread
Inspect one indexed Raydium pool by its Solana pool account address.
quoteread
Get an exact-input quote. Amounts use raw token units as decimal strings.
build_swapprepare
Fetch a fresh quote and prepare unsigned swap transactions for an external signer.
Current limitations
  • Mainnet only; liquidity management and token launches are not implemented.
  • Pool reads are indexed snapshots, not executable quotes. Search uses exact mint addresses and provider cursors; names and symbols are not search terms.
  • Pool pagination is not an atomic snapshot. Reuse the same filters with nextPageId; expired cursors require a fresh search. Market figures are approximate provider numbers.
  • Slippage is capped at 500 bps; requested compute-unit price is capped at 1,000,000 micro-lamports.
  • Transactions pass structural, signer, and fee-payer checks only; their instruction semantics and lookup-table accounts are not audited.
  • A policy-enforcing external signer must decode instructions, resolve lookup tables, and verify amounts, recipients, programs, and total fees.
  • Multiple transactions may depend on earlier state changes; separate simulations do not simulate a bundle.
Pump.fun3 actions

Read on-chain Pump mint and curve details, and canonical PumpSwap pool state over Solana RPC.

pumpfun · runtime schemas
node dist/cli.js platforms pumpfun
node dist/cli.js schema pumpfun token
tokenread
Read on-chain mint state and canonical Pump curve reserves from one Solana snapshot.
pumpswap_poolread
Read verified PumpSwap pool identities and raw vault balances from one Solana snapshot.
bonding_curveread
Read exact raw reserve values from the Pump bonding curve derived from a mint.
Current limitations
  • Only the stable bonding-curve reserve prefix is decoded; current fee, quote-mint, and launch-mode extensions are not interpreted.
  • Reserve amounts are raw integer strings. Quote reserves must not be assumed to mean SOL or used as an executable price.
  • Token details contain on-chain mint state and the stable curve prefix, not off-chain names, artwork, or history. Token-2022 extensions are identified but not interpreted.
  • PumpSwap reads verify pool/vault identities and report raw balances from one RPC snapshot. Legacy pools expose only the supported prefix; unknown virtual reserves are null.
  • Search, executable quotes, launch preparation, signing, and execution are not implemented.
  • A missing account can indicate the wrong network, an unknown mint, or a removed curve; it does not prove a token is invalid.
Meteora2 actions

Search and inspect DLMM and DAMM v2 pools through Meteora public data APIs.

meteora · runtime schemas
node dist/cli.js platforms meteora
node dist/cli.js schema meteora pools
poolsread
Search indexed Meteora pools with bounded pagination.
poolread
Inspect one indexed Meteora pool by its account address.
Current limitations
  • Read-only DLMM and DAMM v2 coverage. DBC launches, swaps, liquidity management, and signing are not implemented.
  • Pool market figures are indexed snapshots and must not be treated as executable swap quotes.
  • Public API limits are 30 requests/second for DLMM and 10 requests/second for DAMM v2.
StonkFun6 actions

Discover StonkFun tokens, launch records, and supported quote assets through its public API.

stonkfun · runtime schemas
node dist/cli.js platforms stonkfun
node dist/cli.js schema stonkfun tokens
tokensread
List or search live StonkFun tokens and market data.
tokenread
Read one token and its launch record by mint.
pairsread
List quote tokens and current launch-readiness flags.
launchesread
Read the launch ledger, optionally filtered by creator and time.
recentread
Read recent launches with cursor pagination; the provider window is ten minutes.
statsread
Read platform totals and currently enabled launch features.
Current limitations
  • This adapter provides reads only. Launch transaction building, fee claims, signing, and execution are not implemented.
  • Market values are indexed and may lag on-chain state. Preserve the provider timestamps when consuming results.
  • StonkFun applies per-IP rate limits. The recent feed covers a ten-minute window; use launches for older history.
  • Launch readiness changes over time. Read pairs and stats before implementing a launch.
Pons v23 actions

Read the documented Pons v2 factory and prepare an unsigned token launch on Robinhood Chain.

pons · runtime schemas
node dist/cli.js platforms pons
node dist/cli.js schema pons launch_config
launch_configread
Read a Pons launch configuration and current launch fee at one block.
tokenread
Resolve a token through the current Pons v2 factory.
prepare_launchprepare
Prepare unsigned Pons launch calldata with pinned economics and an explicit fee ceiling.
Current limitations
  • Only the current v2 factory is covered; v1 tokens are not included.
  • No indexed token feed, swaps, transaction signing, submission, or wallet custody.
  • Launch preparation returns calldata and current terms. It does not execute or simulate a launch.
  • A signer must independently verify the chain, factory, metadata, fees and calldata before signing.
Hyperliquid Perps6 actions

Read default Hyperliquid perpetual markets, books, funding, positions, orders, and recent fills from the public mainnet Info API.

hyperliquid · runtime schemas
node dist/cli.js platforms hyperliquid
node dist/cli.js schema hyperliquid markets
marketsread
List default perpetual market metadata with mark/oracle prices, current funding, and open interest.
orderbookread
Read up to 20 bid/ask price levels for a verified default perpetual market.
funding_historyread
Read hourly funding records for one default perpetual market in a time window of at most 30 days.
accountread
Read default perpetual positions and clearinghouse margin for a master or subaccount address.
open_ordersread
Read bounded open default perpetual orders; excludes spot orders and HIP-3 markets.
user_fillsread
Read recent default perpetual fills within at most seven days; excludes spot and HIP-3 fills.
Current limitations
  • Read-only default perpetual DEX coverage. Spot and HIP-3 builder DEXs are excluded; no order placement, cancellation, leverage changes, signing, deposits, or withdrawals.
  • Use the actual master or subaccount address, not an agent signer address. Account endpoints do not independently prove address ownership.
  • Clearinghouse margin is not a complete unified-account or portfolio-margin balance; use the relevant spot balance endpoint directly for those account modes.
  • Market snapshots are not executable quotes. No eligibility, jurisdiction, or liquidation-risk determination is performed.
  • Fills are limited by the provider to 2000 records per response and the latest 10000 fills; pagination cannot guarantee complete history, especially when many fills share a timestamp.
Jupiter Perps4 actions

Read SOL, ETH, and BTC perpetual market statistics, liquidity, JLP custody data, and wallet positions from Jupiter.

jupiter_perps · runtime schemas
node dist/cli.js platforms jupiter_perps
node dist/cli.js schema jupiter_perps market_stats
market_statsread
Read a SOL, ETH, or BTC perpetual market price, 24-hour change, range, and volume.
pool_inforead
Read indicative long/short available liquidity, utilization, and borrow and open fee rates for one perpetual market.
jlp_inforead
Read Jupiter-reported JLP AUM, supply, APR/APY, and token custody inventory without rounding raw amounts.
positionsread
Read currently open positions and existing TP/SL requests for a Solana wallet; PnL and liquidation values are provider estimates.
Current limitations
  • Read-only integration. No position opening, closing, collateral changes, TP/SL creation, signatures, or broadcasts.
  • Data is reported by Jupiter Perps API v2; account ownership, oracle inputs, PnL, and liquidation estimates are not independently recomputed or verified onchain.
  • The provider exposes no common block slot or snapshot guarantee. Market statistics, liquidity, and positions may reflect different update times.
  • Prices, borrow rates, liquidity, APR/APY, and estimated PnL are indicative snapshots, not executable quotes or guaranteed returns.
  • Positions returns currently open positions only, with up to 100 positions and 100 TP/SL requests per position; unexpected or changed schemas fail closed.
Jupiter DEX5 actions

Jupiter token discovery, indexed USD prices, and exact-input Metis quotes and unsigned V0 swap orders through the current Swap API V2.

jupiter · runtime schemas
node dist/cli.js platforms jupiter
node dist/cli.js schema jupiter token_search
token_searchread
Search Jupiter token metadata by name, symbol or mint; returns up to 20 indexed results.
tokenread
Read indexed Jupiter metadata for one exact mint address.
pricesread
Get indexed USD prices for up to 50 exact mint addresses; unavailable prices are listed separately.
quoteread
Get a fresh exact-input Metis quote with explicit slippage and token-fee ceilings. Amounts are raw integer strings.
build_swapprepare
Fetch a fresh Metis order and return an unsigned V0 swap for the wallet as sole signer, subject to token and reported network-fee ceilings.
Current limitations
  • Solana mainnet only. Keyless Jupiter requests share a 0.5 RPS upstream limit; configure JUPITER_API_KEY for production quotas. Rate limits surface as retryable errors.
  • Token metadata, verification labels and prices come from Jupiter indexing; they do not establish legitimacy or execution prices. Missing prices are explicit.
  • Quotes and builds use Metis only. JupiterZ RFQ, Dflow, OKX, gasless sponsorship, alternate recipients, referral fees and transaction V1 are unsupported.
  • Slippage is capped at 500 bps. Returned token fees must respect maxPlatformFeeBps; builds additionally check reported signature, priority/tip and rent fees against maxNetworkFeeLamports.
  • Nonzero explicit platformFee.amount responses fail closed because the current V2 quote documentation does not specify their exact calculation basis and rounding. The verified Metis response path omits that field.
  • Transaction validation covers structure, V0 version, requested fee payer, one signer and empty signatures only. Instruction semantics and lookup-table contents are not audited.
  • An external signer must resolve lookup tables, decode every instruction, verify all amounts, recipients, programs and fees, and simulate a fresh transaction before signing. Preparation does not reserve funds or guarantee execution.
  • Never signs or submits. Limit orders, recurring orders and managed execution are not implemented.
Relay6 actions

Relay chain and currency discovery, cross-chain exact-input quotes, verified unsigned native SOL and EVM deposit preparation, and intent status.

relay · runtime schemas
node dist/cli.js platforms relay
node dist/cli.js schema relay chains
chainsread
List Relay mainnet chain metadata and availability flags; inclusion does not guarantee an executable bridge route.
currenciesread
Search Relay currency metadata by chain and symbol or exact address; token verification and route eligibility are provider-reported.
statusread
Read Relay request status, including delays, failure and refund outcomes; success is Relay-reported and not independently verified onchain.
quoteread
Get a cross-chain exact-input quote for supported EVM and Solana routes. Amounts are raw integer strings; no transaction is returned.
prepare_bridgeprepare
Prepare a fresh unsigned native EVM bridge deposit, binding canonical calldata to verified Relay order terms. Requires an external wallet to simulate, sign and submit.
prepare_bridge_solanaprepare
Prepare a fresh unsigned V0 native SOL deposit for Relay bridging to Ethereum, Base, BNB or Robinhood. Verifies the protocol order, deposit instruction, canonical program accounts and network fee; the local wallet signs and submits.
Current limitations
  • Quote routes are limited to Ethereum (1), Base (8453), BNB (56), Robinhood (4663) and Solana (792703809); origin and destination must differ. Route and token availability depend on Relay.
  • Exact-input quotes only, with at most 500 bps slippage and no application fees. Currency and chain discovery may return providers beyond the executable route allowlist.
  • Unsigned preparation supports native SOL and native EVM origin assets with one explicit deposit to the canonical Relay depository. SPL/ERC-20 origin assets, approvals, permits, deposit addresses and arbitrary calls are unsupported.
  • Order V1 terms, settlement recipient, minimum output, origin refund availability and beneficiaries, canonical settlement contracts, recomputed order ID, canonical depository, payer and exact deposit calldata are checked. Native SOL additionally verifies the mainnet genesis, program/config/vault owners and PDAs, exact deposit instruction, sole signer, blockhash and network fee. No wallet balance check or transaction simulation is performed.
  • maxGasFeeAmount bounds provider and RPC network fees for SOL (lamports), or provider gas and gas × maxFeePerGas for EVM. SOL transactions use fresh unsigned V0 messages without lookup tables or account creation. L2 fees and external wallet changes require additional checks.
  • Configure server-side RELAY_API_KEY for authenticated production access. Relay documents mandatory quote keys; missing or rejected keys can make otherwise supported quotes unavailable.
  • No signing, broadcasting, automatic recovery or guaranteed settlement. An external wallet must validate, simulate and execute fresh transactions. Relay status is provider-reported.
LongPlanned

Requested platform; no verified public integration interface is connected yet.

No callable actions are currently registered. Track planned work on the coverage map.

Current limitations
  • Discovery, launches, swaps and signing are unavailable until an official supported interface is verified.

Authentication & predictable errors

#

Supply the gateway access key as Authorization: Bearer …. The CLI reads it from AGENT_CRYPTO_API_KEY and does not save credentials. The operator assigns read, prepare, and simulate scopes per key. Provider credentials, such as the Relay API key, are configured separately on the gateway.

BLOCK CLI retains the existing AGENT_CRYPTO_* configuration names so current agent integrations keep working.

Machine-readable responses

Successful CLI commands print one JSON envelope to stdout and exit 0. Failures print an error envelope to stderr and exit nonzero. --help prints plain text. The HTTP API uses these envelopes, except /openapi.json, which returns the OpenAPI document directly.

Success envelope
{"ok":true,"data":{"example":"result"},"requestId":"gateway-request-id"}
Error envelope
{
  "ok": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This action requires the prepare scope.",
    "retryable": false
  },
  "requestId": "gateway-request-id"
}
ErrorAgent response
UNAUTHORIZEDCheck the gateway access key.
SCOPE_DENIEDUse a key authorized for the action’s scope.
INVALID_INPUTFetch the current schema and correct parameters.
UNSUPPORTED_ACTIONRefresh the catalog; do not invent a method.
RATE_LIMITEDWait at least 60 seconds before a bounded retry.

Retry only errors marked retryable: true, with bounded backoff. Preserve requestId for diagnostics; local CLI failures may omit it. The CLI has a 35-second request timeout, a 256 KiB parameter limit, and a 4,000,000-byte response limit. Per-key quotas are operator configured; upstream providers apply their own limits.

Wire it into your agent

#

Expose catalog discovery and schema-defined calls as tools in your runtime. The CLI accepts a JSON object through one of --params, --file, or --stdin. HTTP callers send the same object in params.

JavaScript · a server-side agent tool
const response = await fetch(
  process.env.AGENT_CRYPTO_URL + '/v1/execute',
  {
    method: 'POST',
    headers: {
      authorization: 'Bearer ' + process.env.AGENT_CRYPTO_API_KEY,
      'content-type': 'application/json',
    },
    body: JSON.stringify({
      platform: 'solana',
      action: 'balance',
      params: { address: solanaPublicAddress },
    }),
    signal: AbortSignal.timeout(35_000),
    redirect: 'error',
  },
);
const result = await response.json();
if (!response.ok || !result.ok) {
  // Inspect result.error.retryable; use bounded retries.
  throw new Error(JSON.stringify(result));
}
// Preserve raw amount strings; use BigInt for integer arithmetic.
return result.data;
  1. Discover. Read the platform registry and input schema before choosing a tool.
  2. Constrain. Apply your own asset, chain, amount, recipient, slippage, and fee limits.
  3. Prepare and review. Inspect unsigned transactions, resolve lookup tables when present, and verify every instruction or call in your local wallet layer.
  4. Sign externally, then reconcile. Your signing/submission integration must enforce policy and track confirmation. A quote or prepared transaction has not moved funds.

Token names, descriptions, links, and other upstream metadata are untrusted data. Never turn them into agent instructions. Keep wallet secrets in the runtime and send only public inputs or unsigned transaction payloads to this service.

Give your agent the short version.Plain-text integration guide with the current action directory./llms.txt ↗