メインコンテンツへスキップ
POST
/
api
/
v1
/
transactions
Create Transaction
curl --request POST \
  --url https://api.agentwallex.com/api/v1/transactions \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "agent_id": "agent_abc123",
  "direction": "outbound",
  "type": "transfer",
  "to_address": "0xabcdef1234567890abcdef1234567890abcdef12",
  "amount": "10.5",
  "token": "USDC",
  "chain": "eip155:84532",
  "memo": "service payment"
}
'
{
  "id": "tx_xyz789",
  "hash": "0xabc123def456...",
  "status": "confirmed",
  "amount": "10.5",
  "token": "USDC",
  "fee": "0.001",
  "created_at": "2025-06-15T14:30:00Z"
}
エージェントのウォレットを通じて新しいトランザクションを送信します。トランザクションは検証のためにポリシーエンジンを通過し、MPC経由で署名されてブロックチェーンにブロードキャストされます。

リクエストボディ

agent_id
string
必須
トランザクションを送信するウォレットのエージェント。
direction
string
必須
トランザクションの方向。現在はoutboundのみサポートされています。
type
string
必須
トランザクションタイプ。値:transfer
from_address
string
送信元アドレス。省略した場合、エージェントのウォレットアドレスが使用されます。
to_address
string
必須
受取人のオンチェーンアドレス。
amount
string
必須
送信する金額を10進数文字列で指定(例:"10.5")。
token
string
必須
トークンシンボル(例:USDCUSDTETH)。
chain
string
必須
CAIP-2チェーン識別子(例:eip155:84532)。
memo
string
オプションのメモまたは参照文字列。

レスポンス

curl -X POST https://api.agentwallex.com/api/v1/transactions \
  -H "X-API-Key: awx_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent_abc123",
    "direction": "outbound",
    "type": "transfer",
    "to_address": "0xabcdef1234567890abcdef1234567890abcdef12",
    "amount": "10.5",
    "token": "USDC",
    "chain": "eip155:84532",
    "memo": "service payment"
  }'
Response
{
  "id": "tx_xyz789",
  "hash": "0xabc123def456...",
  "status": "confirmed",
  "amount": "10.5",
  "token": "USDC",
  "fee": "0.001",
  "created_at": "2025-06-15T14:30:00Z"
}

承認

X-API-Key
string
header
必須

API key authentication. Keys are prefixed with awx_.

ボディ

application/json
agent_id
string
必須

The agent whose wallet will send the transaction.

direction
enum<string>
必須

Transaction direction. Currently only outbound is supported.

利用可能なオプション:
outbound
type
enum<string>
必須

Transaction type.

利用可能なオプション:
transfer
to_address
string
必須

Recipient on-chain address.

amount
string
必須

Amount to send as a decimal string (e.g., "10.5").

token
string
必須

Token symbol (e.g., USDC, USDT, ETH).

chain
string
必須

CAIP-2 chain identifier (e.g., eip155:84532).

from_address
string

Sender address. If omitted, the agent's wallet address is used.

memo
string

Optional memo or reference string.

レスポンス

Transaction created and submitted.

An on-chain transaction submitted through an agent's wallet.

id
string

Unique transaction identifier.

hash
string

On-chain transaction hash (available after broadcast).

agent_id
string

Agent that initiated the transaction.

direction
enum<string>

Transaction direction.

利用可能なオプション:
outbound
type
enum<string>

Transaction type.

利用可能なオプション:
transfer
from_address
string

Sender address.

to_address
string

Recipient address.

amount
string

Amount sent as a decimal string.

token
string

Token symbol (e.g., USDC, USDT, ETH).

chain
string

CAIP-2 chain identifier.

fee
string

Network gas fee paid.

status
enum<string>

Transaction status.

利用可能なオプション:
pending,
confirmed,
failed
memo
string

Optional memo string.

created_at
string<date-time>

ISO 8601 creation timestamp.