This page is a practical workflow for engineers who want to use the API from zero to production-style integration.
Scenario:
You want to create a Strategy programmatically.
The Strategy should focus on safe new launches with minimum liquidity and social proof.
You want to backtest it, activate it, observe notifications, track performance, and receive webhook events.
Prerequisites
Set your environment variables:
export MP_BASE_URL = "https://api.memeperfect.io/api/external/v1"
export MP_API_KEY = "mpk_your_api_key_here"
Common header:
-H "X-API-Key: $MP_API_KEY "
Step 1: Confirm plan and limits
curl -s " $MP_BASE_URL /me" \
-H "X-API-Key: $MP_API_KEY "
Use this to confirm:
your plan (PRO or DEGEN)
strategy activation limit
requests-per-minute limit
Step 2: Create a strategy
This example strategy:
triggers on newly created tokens
uses a single external rules[] list
marks critical checks as dealbreakers
applies market, launch-origin, and social filters
sets alertCooldownMins to suppress duplicate alerts per token
keeps default trigger config empty because this example does not use twitter trigger types
curl -s -X POST " $MP_BASE_URL /strategies" \
-H "X-API-Key: $MP_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"name": "API Safe Launch Flow",
"description": "Programmatic strategy for safer early launches",
"strict": true,
"alertCooldownMins": 30,
"triggers": ["new_token_created"],
"rules": [
{ "rule": "is_honeypot", "dealbreaker": true, "enabled": true },
{ "rule": "has_freeze_authority", "dealbreaker": true, "enabled": true },
{ "rule": "risk_level", "dealbreaker": true, "value": "LOW" },
{ "rule": "launch_platform", "dealbreaker": false, "operator": "not_equals", "value": "pump_fun" },
{ "rule": "liquidity_usd", "dealbreaker": false, "min": 10000 },
{ "rule": "market_cap", "dealbreaker": false, "max": 1500000 },
{ "rule": "has_website", "dealbreaker": false, "enabled": true },
{ "rule": "has_twitter", "dealbreaker": false, "enabled": true },
{ "rule": "website_content_validation_score", "dealbreaker": false, "min": 50 }
],
"matching": {
"enabled": true,
"minPercent": 80
},
"isActive": false
}'
Save strategy.id from the response for the next steps.
Step 3: Activate the strategy
export MP_STRATEGY_ID = "your-strategy-uuid"
curl -s -X POST " $MP_BASE_URL /strategies/ $MP_STRATEGY_ID /activate" \
-H "X-API-Key: $MP_API_KEY "
Step 4: Verify strategy state
curl -s " $MP_BASE_URL /strategies/ $MP_STRATEGY_ID " \
-H "X-API-Key: $MP_API_KEY "
Check:
isActive is true
alertCooldownMins is present
response contains internal dealbreakers and grouped rules mapped from your external rules[]
Step 5: Update strategy rules
Example update:
increase liquidity threshold
tighten cooldown window
keep excluding Pump.fun-origin launches
replace the full stored rules set with the new rules[] payload
curl -s -X PATCH " $MP_BASE_URL /strategies/ $MP_STRATEGY_ID " \
-H "X-API-Key: $MP_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"alertCooldownMins": 45,
"rules": [
{ "rule": "is_honeypot", "dealbreaker": true, "enabled": true },
{ "rule": "risk_level", "dealbreaker": true, "value": "LOW" },
{ "rule": "launch_platform", "dealbreaker": false, "operator": "not_equals", "value": "pump_fun" },
{ "rule": "liquidity_usd", "dealbreaker": false, "min": 15000 },
{ "rule": "has_twitter", "dealbreaker": false, "enabled": true }
]
}'
To fully clear existing rules, use replacement semantics with an empty list:
curl -s -X PATCH " $MP_BASE_URL /strategies/ $MP_STRATEGY_ID " \
-H "X-API-Key: $MP_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"rules": []
}'
Trigger updates follow the same replacement behavior: if you send triggers, the full trigger set is replaced; if omitted, existing triggers stay unchanged.
Step 6: Optional backtest before going live
Run a backtest when you want to replay a Strategy against recent stored token observations before relying on it in production.
PRO users can run 25 backtests per UTC day with a 7-day lookback. DEGEN
users have unlimited daily backtests with a 14-day lookback.
Create a backtest job:
curl -s -X POST " $MP_BASE_URL /backtests" \
-H "X-API-Key: $MP_API_KEY " \
-H "Content-Type: application/json" \
-d "{
\" strategyId \" : \" $MP_STRATEGY_ID \" ,
\" from \" : \" 2026-05-16T00:00:00.000Z \" ,
\" to \" : \" 2026-05-23T00:00:00.000Z \" ,
\" labelDefinition \" : {
\" threshold \" : 2
},
\" options \" : {
\" eventType \" : \" new_token_created \" ,
\" strictOverride \" : true
}
}"
Save the returned id as your backtest job ID, then poll job status:
export MP_BACKTEST_ID = "backtest-job-id"
curl -s " $MP_BASE_URL /backtests/ $MP_BACKTEST_ID " \
-H "X-API-Key: $MP_API_KEY "
List filtered results:
curl -s " $MP_BASE_URL /backtests/ $MP_BACKTEST_ID /results?page=1&pageSize=50&winnersInWindow=true&sortBy=multiple&sortDir=desc" \
-H "X-API-Key: $MP_API_KEY "
Backtest results include stored positive rows only: matched tokens and missed winners. currentMultiple is computed from the effective snapshot window, not a live market lookup. The results total is the stored-row count; use the job metrics.tested value for the full evaluated-token count.
Get tracked twitter handles:
curl -s " $MP_BASE_URL /twitter/handles?status=active&sortBy=addedAt&sortOrder=desc" \
-H "X-API-Key: $MP_API_KEY "
Get twitter tags (all scopes by default):
curl -s " $MP_BASE_URL /twitter/tags?scope=all&includeCounts=true" \
-H "X-API-Key: $MP_API_KEY "
Get followed developers:
curl -s " $MP_BASE_URL /devs/my?page=1&limit=20&isActive=true" \
-H "X-API-Key: $MP_API_KEY "
For twitter trigger strategies (twitter_mention_direct / tweet_metadata_match), include triggerConfigs.<eventType>.tagId in create/update payloads.
Step 8: Read notifications programmatically
List recent notifications:
curl -s " $MP_BASE_URL /notifications?page=1&limit=20&strategyId= $MP_STRATEGY_ID " \
-H "X-API-Key: $MP_API_KEY "
Read one notification in detail:
export MP_NOTIFICATION_ID = "your-notification-uuid"
curl -s " $MP_BASE_URL /notifications/ $MP_NOTIFICATION_ID " \
-H "X-API-Key: $MP_API_KEY "
Synchronous summary:
curl -s " $MP_BASE_URL /notifications/performance?range=daily&strategyId= $MP_STRATEGY_ID " \
-H "X-API-Key: $MP_API_KEY "
Asynchronous flow for larger workloads:
curl -s -X POST " $MP_BASE_URL /notifications/performance/jobs?range=daily&strategyId= $MP_STRATEGY_ID " \
-H "X-API-Key: $MP_API_KEY "
Then poll:
export MP_JOB_ID = "job-id-from-previous-response"
curl -s " $MP_BASE_URL /notifications/performance/jobs/ $MP_JOB_ID " \
-H "X-API-Key: $MP_API_KEY "
Check current config:
curl -s " $MP_BASE_URL /webhook" \
-H "X-API-Key: $MP_API_KEY "
Set webhook endpoint:
curl -s -X PUT " $MP_BASE_URL /webhook" \
-H "X-API-Key: $MP_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"url": "https://your-domain.com/memeperfect/webhook"
}'
Use returned fields:
hasSecret
secret (when generated/rotated)
verifiedAt
verificationError (if verification failed)
Step 11: Deactivate strategy
curl -s -X POST " $MP_BASE_URL /strategies/ $MP_STRATEGY_ID /deactivate" \
-H "X-API-Key: $MP_API_KEY "
Step 12: Optional cleanup
curl -s -X DELETE " $MP_BASE_URL /strategies/ $MP_STRATEGY_ID " \
-H "X-API-Key: $MP_API_KEY "
Practical implementation checklist
Keep API key server-side only.
Persist strategy IDs in your own DB.
Use idempotent update logic in your integration.
Handle 429 throttling with retry/backoff.
Validate rule payloads with the Strategy Rules Spec before sending.
APIs Full endpoint reference and payload examples.
Strategy Rules Spec Rule schema, operators, and supported rule types.