APIドキュメント
サービスを自律的に発見・利用するAIエージェントを構築。
https://agentictrade.io/api/v1
クイックスタート
3ステップでエージェントからサービスを呼び出す:
APIキーを作成
curl -X POST https://agentictrade.io/api/v1/keys \
-H "Content-Type: application/json" \
-d '{"owner_id": "my-agent-001", "role": "buyer"}'
# Response:
# {"key_id": "acf_a1b2c3...", "secret": "Sp8vKq9w...", "role": "buyer"}
# Save the secret — it won't be shown again!
利用可能なサービスを閲覧
curl https://agentictrade.io/api/v1/discover
# Returns all active services with pricing, categories, and free tier info
サービスを呼び出す
curl -X POST https://agentictrade.io/api/v1/proxy/{service_id}/api/scan \
-H "Authorization: Bearer acf_a1b2c3:Sp8vKq9w..." \
-H "Content-Type: application/json"
# The marketplace handles payment automatically.
# Response headers include billing info:
# X-ACF-Amount: 0.50
# X-ACF-Free-Tier: true
認証
すべての認証付きエンドポイントはBearerトークン認証を使用します:
Authorization: Bearer {key_id}:{secret}
例:
Authorization: Bearer acf_a1b2c3d4e5f6g7h8:Sp8vKq9wRx2yZaA_B1C2D3E4F5G6H7
ロール
| ロール | 可能な操作 |
|---|---|
buyer | プロキシ経由でサービスを呼び出し、残高確認、利用状況の表示 |
provider | サービスの登録・管理、収益の表示 |
admin | プラットフォームの完全アクセス |
レート制限
| ティア | 制限 |
|---|---|
| デフォルト | 60リクエスト/分 |
| 最大 | 300リクエスト/分 |
利用可能なサービス
CoinSifter Demo — Sample Results
Free demo endpoint returning sample CoinSifter scan results. No Binance API key required. Test integration before upgrad...
758c1057-191e-405e-a352-7f52bcd97a82
Strategy Catalog — Browse Templates
Browse available trading strategy templates and their configurable parameters. Free to access.
0a7ab758-ee00-4141-afcd-d86d5fd1536b
AI Result Validator
Two-layer AI task validation API. Rule-based fast screening (<100ms) catches errors, empty claims, and missing evidence....
69517247-9a7d-45d7-8ba7-bee3b3cc130b
Test Echo API
A simple echo service for testing
517f8fff-cd14-483d-9f17-1262832b64a4
CoinSifter Pro API
Real-time crypto scanner — scans 600+ USDT pairs across exchanges, applies multi-strategy filtering with technical indic...
7ed931d1-57fb-4d97-8a27-8efd3dad04a4
CoinSifter — Crypto Market Scanner
AI-powered cryptocurrency market scanner. Scans Binance USDT pairs with customizable technical indicators (RSI, EMA, MAC...
6a9939cf-583b-4e6d-897f-360dcf200f59
Shorts Script Factory API
Turn one topic into a production-ready Shorts script — returned as usable JSON with hooks, scenes, visual prompts, CTA, ...
43d2d4ad-f1b2-43e4-b91c-ea366b307588
Strategy Backtest API
Run backtests with pre-built crypto trading strategies. 3 strategies: BB Squeeze (momentum), MACD Divergence (reversal),...
3c6734ed-3d9c-472c-a8dd-b190d1d4ac05
サービスディスカバリー
料金情報付きの全登録サービスを返します。認証不要。
クエリパラメータ
| パラメータ | 型 | 説明 |
|---|---|---|
category | string | カテゴリでフィルタ |
query | string | 名前/説明で検索 |
limit | int | 最大結果数(デフォルト:50) |
offset | int | ページネーションオフセット |
curl https://agentictrade.io/api/v1/services?category=crypto-analysis
フィルタリング、ソート、タグマッチングを備えた拡張ディスカバリー。
クエリパラメータ
| パラメータ | 型 | 説明 |
|---|---|---|
tags | string | カンマ区切りのタグフィルタ |
min_price | float | 呼び出しあたりの最小価格 |
max_price | float | 呼び出しあたりの最大価格 |
sort | string | ソート基準:price, name, created |
curl "https://agentictrade.io/api/v1/discover?tags=crypto&max_price=1.0&sort=price"
サービス数付きの利用可能なカテゴリを返します。
curl https://agentictrade.io/api/v1/discover/categories
プロキシ — サービス呼び出し
リクエストをサービスプロバイダーにプロキシします。GET、POST、PUT、PATCH、DELETEに対応。
パスパラメータ
| パラメータ | 説明 |
|---|---|
service_id | 対象サービスのUUID |
path | プロバイダーのAPIパス (e.g., api/scan) |
レスポンスヘッダー
| ヘッダー | 説明 |
|---|---|
X-ACF-Usage-Id | 一意の利用記録ID |
X-ACF-Amount | 課金額(USDC) |
X-ACF-Free-Tier | true 無料枠が使用された場合はtrue |
X-ACF-Latency-Ms | リクエストレイテンシ(ミリ秒) |
例:CoinSifter デモ(無料)
curl -H "Authorization: Bearer {key_id}:{secret}" \
"https://agentictrade.io/api/v1/proxy/758c1057-191e-405e-a352-7f52bcd97a82/api/demo"
# Returns real-time crypto scan results
例:CoinSifter スキャナー($0.50/呼び出し)
curl -X POST -H "Authorization: Bearer {key_id}:{secret}" \
"https://agentictrade.io/api/v1/proxy/6a9939cf-583b-4e6d-897f-360dcf200f59/api/scan"
# Triggers a full market scan with your strategy
例:ストラテジーバックテスト($2.00/呼び出し)
curl -X POST -H "Authorization: Bearer {key_id}:{secret}" \
-H "Content-Type: application/json" \
-d '{"symbol": "BTC/USDT", "strategy": "bb_squeeze", "timeframe": "4h"}' \
"https://agentictrade.io/api/v1/proxy/3c6734ed-3d9c-472c-a8dd-b190d1d4ac05/api/backtest"
# Returns win rate, profit factor, equity curve, trade list
認証済みバイヤーの合計呼び出し数、支出額、平均レイテンシを返します。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/usage/me
# {"buyer_id": "my-agent", "total_calls": 42, "total_spent_usd": "12.50", "avg_latency_ms": 35}
課金と入金
サービスは前払い制です。アカウントに入金してから、サービスを呼び出します。
curl https://agentictrade.io/api/v1/balance/my-agent-001
# {"buyer_id": "my-agent-001", "balance": 50.0, "total_deposited": 100.0, "total_spent": 50.0}
NOWPayments経由で暗号通貨決済インボイスを作成します。USDT、USDC、BTC、ETH、300種類以上の暗号通貨に対応。
curl -X POST https://agentictrade.io/api/v1/deposits \
-H "Content-Type: application/json" \
-d '{"buyer_id": "my-agent-001", "amount": 50}'
# {"deposit_id": "...", "amount": 50, "status": "pending",
# "checkout_url": "https://nowpayments.io/payment/?iid=...",
# "message": "Pay $50 at the checkout URL..."}
支払い確認後、IPN Webhook経由で残高が自動的にクレジットされます。
APIキー
リクエストボディ
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
owner_id | string | はい | エージェント/ユーザー識別子 |
role | string | いいえ | buyer(デフォルト)またはprovider |
curl -X POST https://agentictrade.io/api/v1/keys \
-H "Content-Type: application/json" \
-d '{"owner_id": "my-trading-bot", "role": "buyer"}'
# {"key_id": "acf_...", "secret": "...", "role": "buyer", "rate_limit": 60}
# IMPORTANT: Save the secret! It cannot be retrieved later.
プロバイダー
サービスプロバイダーがサービス管理、収益確認、稼働状況を追跡するためのエンドポイント。すべてプロバイダーロールの認証が必要です。
認証済みプロバイダーのサービス数、合計呼び出し数、収益、精算状況を返します。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/provider/dashboard
認証済みプロバイダーが所有するすべてのサービスを利用統計付きで返します。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/provider/services
特定サービスの詳細分析:合計呼び出し数、収益、成功率、日別内訳。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/provider/services/{service_id}/analytics
総収益、精算済み、未精算の金額、精算履歴を返します。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/provider/earnings
レイテンシ、エラー率、稼働率に基づくすべてのサービスのヘルススコアを返します。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/provider/health
サービスエンドポイントへの接続をテスト。到達可能性、レイテンシ、ステータスコードを返します。
curl -X POST -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/provider/services/{service_id}/test
オンボーディング進捗を追跡:APIキー作成、サービス登録、初回トラフィック、初回精算。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/provider/onboarding
精算
プロバイダーへの支払いを管理する管理者エンドポイント。
プロバイダーの新しい精算を作成します。管理者ロールが必要です。
curl -X POST -H "Authorization: Bearer {key_id}:{secret}" \
-H "Content-Type: application/json" \
-d '{"provider_id": "prov-001", "period_start": "2026-01-01", "period_end": "2026-02-01"}' \
https://agentictrade.io/api/v1/settlements
すべての精算を一覧表示。プロバイダーまたはステータスでフィルタリング可能。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/settlements
精算を支払い済みとしてマークし、オンチェーン転送をトリガーします。
curl -X PATCH -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/settlements/{settlement_id}/pay
リファラル
リファラルコードの生成と追跡のためのプログラムエンドポイント。
認証済みユーザーの一意のリファラルコードを生成します。
curl -X POST -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/referrals/code
登録時にリファラルコードを適用してアカウントをリンクします。
curl -X POST -H "Content-Type: application/json" \
-d '{"code": "REF-ABC123"}' \
https://agentictrade.io/api/v1/referrals/apply
認証済みユーザーが行ったすべてのリファラルを一覧表示します。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/referrals
リファラル統計の集計:合計リファラル数、コンバージョン率、収益。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/referrals/stats
Webhook
リアルタイムイベント通知をサブスクライブします。
イベント通知を受信する新しいWebhookエンドポイントを登録します。
リクエストボディ
| フィールド | 型 | 説明 |
|---|---|---|
url | string | イベントを受信するHTTPSエンドポイント |
events | array | サブスクライブするイベントタイプ: usage.created, settlement.completed, etc. |
curl -X POST -H "Authorization: Bearer {key_id}:{secret}" \
-H "Content-Type: application/json" \
-d '{"url": "https://myapp.com/webhooks", "events": ["usage.created"]}' \
https://agentictrade.io/api/v1/webhooks
アカウントに登録されたすべてのWebhookを一覧表示します。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/webhooks
Webhookサブスクリプションを削除します。
curl -X DELETE -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/webhooks/{webhook_id}
監査
プラットフォームのアクティビティを追跡するセキュリティ監査エンドポイント。管理者ロールが必要です。
フィルタリングオプション付きのセキュリティ監査ログを返します。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/admin/audit
監査統計の集計:タイプ別・期間別のイベント数。
curl -H "Authorization: Bearer {key_id}:{secret}" \
https://agentictrade.io/api/v1/admin/audit/summary
エラーレスポンス
すべてのAPIエラーは、適切なHTTPステータスコードとともに一貫したJSON構造を返します。
一般的なステータスコード
| ステータスコード | 意味 | 説明 |
|---|---|---|
400 | Bad Request | 無効なパラメータまたは不正なリクエストボディです。 |
401 | Unauthorized | APIキーが不足しているか無効です。 |
403 | Forbidden | リクエストされたリソースに対する権限が不足しています。 |
404 | Not Found | リクエストされたリソースが存在しません。 |
429 | Too Many Requests | レート制限を超過しました。しばらく待ってから再試行してください。 |
500 | Internal Server Error | 予期しないサーバーエラーです。継続する場合はサポートに連絡してください。 |
エラーレスポンス形式
すべてのエラーレスポンスには、エラーコード、人間が読めるメッセージ、HTTPステータスが含まれます:
{
"error": "unauthorized",
"message": "Invalid API key. Check your key_id and secret.",
"status": 401
}
フィールド:
| フィールド | 型 | 説明 |
|---|---|---|
error | string | 機械可読なエラーコード(例:"unauthorized"、"bad_request"、"rate_limited")。 |
message | string | 人間が読めるエラーの説明。 |
status | int | HTTPステータスコード(レスポンスステータスと一致)。 |
レート制限ヘッダー
すべてのレスポンスにはレート制限ヘッダーが含まれており、エージェントがリクエストを事前に制御できます:
| ヘッダー | 説明 | 例 |
|---|---|---|
X-RateLimit-Limit | ウィンドウごとに許可されるリクエストの最大数。 | 60 |
X-RateLimit-Remaining | 現在のウィンドウで残っているリクエスト数。 | 42 |
X-RateLimit-Reset | レート制限ウィンドウがリセットされるUnixタイムスタンプ(秒)。 | 1711324800 |
429レスポンスが返された場合、これらのヘッダーを使用してリトライのタイミングを判断してください:
# Example 429 response headers HTTP/1.1 429 Too Many Requests X-RateLimit-Limit: 60 X-RateLimit-Remaining: 0 X-RateLimit-Reset: 1711324800 Content-Type: application/json { "error": "rate_limited", "message": "Rate limit exceeded. Retry after 1711324800.", "status": 429 }
Python SDK
SDKをインストール:
# Install from PyPI
pip install agentictrade
同梱SDKでシームレスに統合:
from sdk.client import ACFClient client = ACFClient( base_url="https://agentictrade.io", api_key="acf_xxx:secret_yyy", ) # Discover services services = client.list_services(category="crypto-analysis") # Call a service through the proxy result = client.proxy( service_id="6a9939cf-583b-4e6d-897f-360dcf200f59", path="api/scan", method="POST", ) print(result["results"])
エージェント統合ガイド
自律エージェントがAgenticTradeを利用する方法:
エージェントが利用可能なサービスを発見
GET /api/v1/discover — タスクに合ったサービスを検索。
エージェントが残高を確認
GET /api/v1/balance/{buyer_id} — 十分な残高があることを確認。
エージェントがサービスを呼び出す
POST /api/v1/proxy/{service_id}/{path} — マーケットプレイスが決済を処理。
エージェントがレスポンスを処理
プロバイダーからのレスポンスボディとマーケットプレイスからの課金ヘッダー。
料金プラン
| サービス | 価格 | 無料枠 | 決済 |
|---|---|---|---|
| CoinSifter Demo — Sample Results | 無料 | 常に無料 | 暗号通貨(100種類以上) |
| Strategy Catalog — Browse Templates | 無料 | 常に無料 | 暗号通貨(100種類以上) |
| AI Result Validator | $0.01 USDC | 20 呼び出し | 暗号通貨(100種類以上) |
| Test Echo API | $0.01 USDC | 10 呼び出し | 暗号通貨(100種類以上) |
| CoinSifter Pro API | $0.1 USDC | 10 呼び出し | 暗号通貨(100種類以上) |
| CoinSifter — Crypto Market Scanner | $0.5 USDC | 5 呼び出し | 暗号通貨(100種類以上) |
| Shorts Script Factory API | $0.79 USDC | 常に無料 | 暗号通貨(100種類以上) |
| Strategy Backtest API | $2.0 USDC | 3 呼び出し | 暗号通貨(100種類以上) |