boltQuickstart

Quickstart

Use this guide to make your first request to the TestMachine Token Custody API and interpret the custody-risk behaviors returned for an ERC-20 token.

What you’ll do

  • Authenticate with an API key

  • Request a token custody analysis (pull mode)

  • Read the behaviors array and map it to custody controls

Prerequisites

Make your first request

1

Set your API key

Store your API key in an environment variable:

export TESTMACHINE_API_KEY="<YOUR_API_KEY>"
circle-exclamation
2

Choose a token

You’ll need:

  • NETWORK_ID — EVM chain ID (for example 1 for Ethereum, 8453 for Base)

  • ADDRESS — token contract address (checksummed or lowercase)

Example:

export NETWORK_ID=1
export ADDRESS="0x0000000000000000000000000000000000000000"
3

Request token analysis (pull mode)

Call your environment’s token analysis endpoint using X-API-Key authentication.

Because the exact path can vary by deployment, use this as a template and map it to the endpoint described in Tokens.

curl "https://api.testmachine.ai/<TOKENS_ENDPOINT>?network_id=$NETWORK_ID&address=$ADDRESS" \
  -H "X-API-Key: $TESTMACHINE_API_KEY"
circle-info

If you paste the exact request format you’re using (method + URL + params), we can update the docs to match it precisely.

4

Interpret the response

A successful response includes a behaviors array:

  • Use Behaviors to understand each identifier

  • Treat the result as an input into your onboarding and monitoring controls (manual review, policy checks, alerting)

Example:

{
  "address": "0x…",
  "network_id": 1,
  "behaviors": ["pause", "upgrade", "confiscation"]
}
5

Handle errors

If your request fails:

Next steps

  • Read About TestMachine for architecture and modes of use

  • If you plan to run continuous monitoring (push mode), confirm the integration details for your environment and we’ll document the webhook/event format

Last updated