Passer au contenu principal
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"
}
Soumettez une nouvelle transaction via le portefeuille d’un agent. La transaction passe par le moteur de politiques pour validation, puis est signee via MPC et diffusee sur la blockchain.

Corps de la requete

agent_id
string
requis
L’agent dont le portefeuille enverra la transaction.
direction
string
requis
Direction de la transaction. Actuellement, seul outbound est supporte.
type
string
requis
Type de transaction. Valeurs : transfer.
from_address
string
Adresse de l’expediteur. Si omise, l’adresse du portefeuille de l’agent est utilisee.
to_address
string
requis
Adresse on-chain du destinataire.
amount
string
requis
Montant a envoyer sous forme de chaine decimale (par ex., "10.5").
token
string
requis
Symbole du jeton (par ex., USDC, USDT, ETH).
chain
string
requis
Identifiant de chaine CAIP-2 (par ex., eip155:84532).
memo
string
Memo ou chaine de reference optionnel.

Reponse

Exemple

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"
}

Autorisations

X-API-Key
string
header
requis

API key authentication. Keys are prefixed with awx_.

Corps

application/json
agent_id
string
requis

The agent whose wallet will send the transaction.

direction
enum<string>
requis

Transaction direction. Currently only outbound is supported.

Options disponibles:
outbound
type
enum<string>
requis

Transaction type.

Options disponibles:
transfer
to_address
string
requis

Recipient on-chain address.

amount
string
requis

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

token
string
requis

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

chain
string
requis

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.

Réponse

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.

Options disponibles:
outbound
type
enum<string>

Transaction type.

Options disponibles:
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.

Options disponibles:
pending,
confirmed,
failed
memo
string

Optional memo string.

created_at
string<date-time>

ISO 8601 creation timestamp.