Retrieve a List of Transactions
Allows to query list of transactions for desired SEP. This api supports pagination, and it’s possible (and recommended) to make multiple requests to query transactions. The last page is reached when the number of elements returned by the endpoint is smaller than provided page_size.
curl --request GET \
--url https://platform-server.exampleanchor.com/transactionsimport requests
url = "https://platform-server.exampleanchor.com/transactions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://platform-server.exampleanchor.com/transactions', 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://platform-server.exampleanchor.com/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://platform-server.exampleanchor.com/transactions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform-server.exampleanchor.com/transactions")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-server.exampleanchor.com/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"records": [
{
"id": "<string>",
"sep": "6",
"kind": "deposit",
"status": "incomplete",
"started_at": "2023-11-07T05:31:56Z",
"type": "<string>",
"amount_expected": {
"amount": "<string>",
"asset": "<string>"
},
"amount_in": {
"amount": "<string>",
"asset": "<string>"
},
"amount_out": {
"amount": "<string>",
"asset": "<string>"
},
"fee_details": {
"total": "<string>",
"asset": "<string>",
"details": [
{
"name": "<string>",
"amount": "<string>",
"description": "<string>"
}
]
},
"quote_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"transfer_received_at": "2023-11-07T05:31:56Z",
"user_action_required_by": "2023-11-07T05:31:56Z",
"message": "<string>",
"refunds": {
"amount_refunded": {
"amount": "<string>",
"asset": "<string>"
},
"amount_fee": {
"amount": "<string>",
"asset": "<string>"
},
"payments": [
{
"id": "<string>",
"id_type": "stellar",
"amount": {
"amount": "<string>",
"asset": "<string>"
},
"fee": {
"amount": "<string>",
"asset": "<string>"
},
"requested_at": "2023-11-07T05:31:56Z",
"refunded_at": "2023-11-07T05:31:56Z"
}
]
},
"stellar_transactions": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"envelope": "<string>",
"payments": [
{
"id": "<string>",
"payment_type": "payment",
"source_account": "<string>",
"destination_account": "<string>",
"amount": {
"amount": "<string>",
"asset": "<string>"
}
}
],
"memo": "<string>",
"memo_type": "text"
}
],
"source_account": "<string>",
"destination_account": "<string>",
"external_transaction_id": "<string>",
"memo": "<string>",
"memo_type": "text id hash",
"refund_memo": "<string>",
"refund_memo_type": "text id hash",
"client_domain": "<string>",
"client_name": "<string>",
"customers": {
"sender": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
},
"receiver": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
},
"creator": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
}
]
}{
"error": "<string>",
"id": "<string>"
}{
"error": "<string>",
"id": "<string>"
}Query Parameters
Specifies field that transactions will be ordered by. Note, that secondary sort is transaction id in ascending value. I.e. when timestamps for 2 or more transactions is identical, they will be sorted by id.
created_at, transfer_received_at, user_action_required_by Specifies order. Note, that when the field is null, all transactions with null value will be last, regardless of soring order (NULLS LAST).
For example, transfer time may not be specified for some transactions, resulting into transfer_received_at being null. If so, transactions with non-null values will be sorted and returned first, followed by all transactions with null timestamps.
asc, desc Filters transactions for specified array of statuses. If not provided, filtering is disabled (default behavior)
Possible status values for all transactions
incomplete, completed, refunded, expired, error, pending_stellar, pending_external, pending_user_transfer_start, pending_user_transfer_complete, pending_anchor, pending_trust, pending_user, no_market, too_small, too_large, pending_sender, pending_receiver, pending_transaction_info_update, pending_customer_info_update Was this page helpful?
curl --request GET \
--url https://platform-server.exampleanchor.com/transactionsimport requests
url = "https://platform-server.exampleanchor.com/transactions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://platform-server.exampleanchor.com/transactions', 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://platform-server.exampleanchor.com/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://platform-server.exampleanchor.com/transactions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://platform-server.exampleanchor.com/transactions")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-server.exampleanchor.com/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"records": [
{
"id": "<string>",
"sep": "6",
"kind": "deposit",
"status": "incomplete",
"started_at": "2023-11-07T05:31:56Z",
"type": "<string>",
"amount_expected": {
"amount": "<string>",
"asset": "<string>"
},
"amount_in": {
"amount": "<string>",
"asset": "<string>"
},
"amount_out": {
"amount": "<string>",
"asset": "<string>"
},
"fee_details": {
"total": "<string>",
"asset": "<string>",
"details": [
{
"name": "<string>",
"amount": "<string>",
"description": "<string>"
}
]
},
"quote_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"transfer_received_at": "2023-11-07T05:31:56Z",
"user_action_required_by": "2023-11-07T05:31:56Z",
"message": "<string>",
"refunds": {
"amount_refunded": {
"amount": "<string>",
"asset": "<string>"
},
"amount_fee": {
"amount": "<string>",
"asset": "<string>"
},
"payments": [
{
"id": "<string>",
"id_type": "stellar",
"amount": {
"amount": "<string>",
"asset": "<string>"
},
"fee": {
"amount": "<string>",
"asset": "<string>"
},
"requested_at": "2023-11-07T05:31:56Z",
"refunded_at": "2023-11-07T05:31:56Z"
}
]
},
"stellar_transactions": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"envelope": "<string>",
"payments": [
{
"id": "<string>",
"payment_type": "payment",
"source_account": "<string>",
"destination_account": "<string>",
"amount": {
"amount": "<string>",
"asset": "<string>"
}
}
],
"memo": "<string>",
"memo_type": "text"
}
],
"source_account": "<string>",
"destination_account": "<string>",
"external_transaction_id": "<string>",
"memo": "<string>",
"memo_type": "text id hash",
"refund_memo": "<string>",
"refund_memo_type": "text id hash",
"client_domain": "<string>",
"client_name": "<string>",
"customers": {
"sender": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
},
"receiver": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
},
"creator": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
}
]
}{
"error": "<string>",
"id": "<string>"
}{
"error": "<string>",
"id": "<string>"
}