Get Transaction
curl --request GET \
--url https://api.agentwallex.com/api/v1/transactions/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.agentwallex.com/api/v1/transactions/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.agentwallex.com/api/v1/transactions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.agentwallex.com/api/v1/transactions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.agentwallex.com/api/v1/transactions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.agentwallex.com/api/v1/transactions/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentwallex.com/api/v1/transactions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"hash": "<string>",
"agent_id": "<string>",
"direction": "outbound",
"type": "transfer",
"from_address": "<string>",
"to_address": "<string>",
"amount": "<string>",
"token": "<string>",
"chain": "<string>",
"fee": "<string>",
"memo": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"code": "authentication_failed",
"type": "authentication_error",
"message": "The provided API key is invalid or expired."
}{
"code": "insufficient_permissions",
"type": "authorization_error",
"message": "You do not have permission to perform this action."
}{
"code": "resource_not_found",
"type": "not_found_error",
"message": "The requested resource was not found."
}{
"code": "rate_limit_exceeded",
"type": "rate_limit_error",
"message": "Too many requests. Please retry after a short delay."
}{
"code": "server_error",
"type": "internal_error",
"message": "An unexpected error occurred. Please try again later."
}交易
获取交易
通过 ID 获取单笔交易,包括链上哈希和确认状态。
GET
/
api
/
v1
/
transactions
/
{id}
Get Transaction
curl --request GET \
--url https://api.agentwallex.com/api/v1/transactions/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.agentwallex.com/api/v1/transactions/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.agentwallex.com/api/v1/transactions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.agentwallex.com/api/v1/transactions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.agentwallex.com/api/v1/transactions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.agentwallex.com/api/v1/transactions/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentwallex.com/api/v1/transactions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"hash": "<string>",
"agent_id": "<string>",
"direction": "outbound",
"type": "transfer",
"from_address": "<string>",
"to_address": "<string>",
"amount": "<string>",
"token": "<string>",
"chain": "<string>",
"fee": "<string>",
"memo": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"code": "authentication_failed",
"type": "authentication_error",
"message": "The provided API key is invalid or expired."
}{
"code": "insufficient_permissions",
"type": "authorization_error",
"message": "You do not have permission to perform this action."
}{
"code": "resource_not_found",
"type": "not_found_error",
"message": "The requested resource was not found."
}{
"code": "rate_limit_exceeded",
"type": "rate_limit_error",
"message": "Too many requests. Please retry after a short delay."
}{
"code": "server_error",
"type": "internal_error",
"message": "An unexpected error occurred. Please try again later."
}获取单笔交易的完整详情,包括链上哈希、金额、代币、费用和当前状态。
路径参数
string
必填
唯一交易标识符(例如
tx_xyz789)。响应
显示 响应字段
显示 响应字段
示例
curl -X GET https://api.agentwallex.com/api/v1/transactions/tx_xyz789 \
-H "X-API-Key: awx_your_api_key"
const tx = await aw.payments.get("tx_xyz789");
tx = await aw.payments.get("tx_xyz789")
Response
{
"id": "tx_xyz789",
"hash": "0xabc123def456789abc123def456789abc123def456789abc123def456789abcd",
"agent_id": "agent_abc123",
"direction": "outbound",
"type": "transfer",
"from_address": "0x1234567890abcdef1234567890abcdef12345678",
"to_address": "0xabcdef1234567890abcdef1234567890abcdef12",
"amount": "10.5",
"token": "USDC",
"chain": "eip155:84532",
"fee": "0.001",
"status": "confirmed",
"memo": "service payment",
"created_at": "2025-06-15T14:30:00Z"
}
授权
ApiKeyAuthBearerAuth
API key authentication. Keys are prefixed with awx_.
路径参数
The unique transaction identifier (e.g., tx_xyz789).
响应
Transaction details.
An on-chain transaction submitted through an agent's wallet.
Unique transaction identifier.
On-chain transaction hash (available after broadcast).
Agent that initiated the transaction.
Transaction direction.
可用选项:
outbound Transaction type.
可用选项:
transfer Sender address.
Recipient address.
Amount sent as a decimal string.
Token symbol (e.g., USDC, USDT, ETH).
CAIP-2 chain identifier.
Network gas fee paid.
Transaction status.
可用选项:
pending, confirmed, failed Optional memo string.
ISO 8601 creation timestamp.
⌘I