메인 콘텐츠로 건너뛰기
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.5").
token
string
필수
토큰 심볼 (예: USDC, USDT, ETH).
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.