SEP-6 SEP-24 SEP-31
Query a list of transactions by SEP, transaction status or other criteria.
Params (5)
Please note that parameter structure within the request must contain named parameters as a by-name object, and not as positional arguments in a by-position array
integer
required
Sep of the transaction belongs toProtocol of the transaction.Available options:
6, 24, 31string
Specifies field that transactions will be ordered by. Note, that secondary sort is transaction id in ascending value.The order by string used to sort the results.Available options:
created_at, transfer_received_at, user_action_required_byDefault: "created_at"array
The statuses of the transaction to filter by.Available options:
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_updateinteger
The number of records to return in each page.Default:
20integer
Page number to use for continuous search. Page count beings at 0.Default:
0Result
(get_transactionResponse)object[]
Show items
Show items
string
A unique transaction identifier.
integer
Protocol of the transaction.Available options:
6, 24, 31string
The kind of transaction that is desired.Available options:
undefined, receive, deposit, deposit-exchange, withdrawal, withdrawal-exchangestring
Processing status of the transaction.Available options:
pending_anchor, pending_trust, pending_user, pending_user_transfer_start, pending_user_transfer_complete, incomplete, no_market, too_small, too_large, pending_sender, pending_receiver, pending_transaction_info_update, pending_customer_info_update, completed, refunded, expired, error, pending_external, pending_stellarstring
Funding method used for transferring or settling assets.
string
DEPRECATED in favor of funding_method. Type of deposit, withdrawal or receive.
object
object
object
object
string
The id returned from a SEP-38 POST /quote response
string
Start date and time of transaction.
string
The date and time of transaction reaching the current status.
string
The date and time of transaction reaching completed or refunded status.
string
The date and time of receiving transfer.
string
Time and date by which user action is required.
string
Human readable explanation of transaction status
object
An object describing any on or offchain refund associated with this transaction.
Show properties
Show properties
object
object
object[]
A list of objects containing information on the individual payments made back as refunds.
Show items
Show items
string
The Stellar transaction hash.
string
object
object
string
The date and time of requesting refund.
string
The date and time of making refund.
object[]
Show items
Show items
string
required
The Stellar transaction hash.
string
string
The memo type of the transaction in the Stellar network. Should be present if memo is not null.Available options:
id, hash, textstring
required
The date and time when the transaction is created.
string
The transaction envelope, containing all the transaction information.
object[]
required
Show items
Show items
string
required
The ID of the payment in the Stellar Network.
string
required
The ID of the payment in the Stellar Network.Available options:
payment, path_paymentDefault: "payment"string
required
The account being debited in the Stellar Network.
string
required
The account being credited in the Stellar Network.
string
The account being debited in the Stellar Network.
string
The account being credited in the Stellar Network.
string
A unique transaction identifier.
string
string
The memo type of the transaction in the Stellar network. Should be present if memo is not null.Available options:
id, hash, textstring
string
The memo type of the transaction in the Stellar network. Should be present if memo is not null.Available options:
id, hash, textstring
The domain of the client.
string
The IP address of the client requesting the transaction.
object
The Identification info of the sending and receiving customers. If they were created through SEP-12,
this object should contain the SEP-12 customer
id. Otherwise, the account address of the customer.Show properties
Show properties
object
A object that identify end-user.
For a SEP-12 customer, the
id field should be sufficient to fully identify the customer in the business’ Backend.
For a SEP-31 Sending Anchor, the account and memo fields should be used.
For a SEP-6 or SEP-24 Anchor, the account and memo fields should be used.object
A object that identify end-user.
For a SEP-12 customer, the
id field should be sufficient to fully identify the customer in the business’ Backend.
For a SEP-31 Sending Anchor, the account and memo fields should be used.
For a SEP-6 or SEP-24 Anchor, the account and memo fields should be used.object
A object that identify end-user.
For a SEP-12 customer, the
id field should be sufficient to fully identify the customer in the business’ Backend.
For a SEP-31 Sending Anchor, the account and memo fields should be used.
For a SEP-6 or SEP-24 Anchor, the account and memo fields should be used.Example
Example request to theget_transactions method.
Request
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 8675309,
"method": "get_transactions",
"params": {
"sep": "31",
"order_by": "created_at",
"statuses": [
"completed"
]
}
}' \
https://platform-server.exampleanchor.com | jq
let requestBody = {
jsonrpc: "2.0",
id: 8675309,
method: "get_transactions",
params: {
sep: "31",
order_by: "created_at",
statuses: ["completed"],
},
};
let res = await fetch("https://platform-server.exampleanchor.com", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(requestBody),
});
let json = await res.json();
console.log(json);
import json, requests
res = requests.post("https://platform-server.exampleanchor.com", json={
"jsonrpc": "2.0",
"id": 8675309,
"method": "get_transactions",
"params": {
"sep": "31",
"order_by": "created_at",
"statuses": [
"completed"
]
}
})
print(json.dumps(res.json(), indent=4))
{
"jsonrpc": "2.0",
"id": 8675309,
"method": "get_transactions",
"params": {
"sep": "31",
"order_by": "created_at",
"statuses": ["completed"]
}
}
{
"jsonrpc": "2.0",
"id": 8675309,
"result": {
"records": [
{
"id": "1c186184-09ee-486c-82a7-aa7a0ab1119d",
"sep": "31",
"kind": "receive",
"status": "completed",
"funding_method": "SWIFT",
"amount_expected": {
"amount": "100",
"asset": "iso4217:USD"
},
"amount_in": {
"amount": "100.0000",
"asset": "iso4217:USD"
},
"amount_out": {
"amount": "98.0000000",
"asset": "stellar:USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5"
},
"fee_details": {
"total": "2.0000",
"asset": "iso4217:USD"
},
"quote_id": "quote-id",
"message": "Please don't forget to foo bar",
"refunds": {
"amount_refunded": {
"amount": "90.0000",
"asset": "iso4217:USD"
},
"amount_fee": {
"amount": "8.0000",
"asset": "iso4217:USD"
},
"payments": [
{
"id": "1111",
"id_type": "stellar",
"amount": {
"amount": "50.0000",
"asset": "iso4217:USD"
},
"fee": {
"amount": "4.0000",
"asset": "iso4217:USD"
}
},
{
"id": "2222",
"id_type": "stellar",
"amount": {
"amount": "40.0000",
"asset": "iso4217:USD"
},
"fee": {
"amount": "4.0000",
"asset": "iso4217:USD"
}
}
]
},
"stellar_transactions": [
{
"id": "stellar-tx-id",
"memo": "my-memo",
"memo_type": "text",
"envelope": "here_comes_the_envelope",
"payments": [
{
"id": "payment-id",
"amount": {
"amount": "100.0000",
"asset": "iso4217:USD"
},
"payment_type": "payment",
"source_account": "GB4GJAV4Q7DPGU7WI3H5TMVKEYZJ4JFLFEF3O3TRJKDPXK7NAMRBXWFL",
"destination_account": "GDIN5ZULIOT5YPBIXJXFGNH4TCNTDKIA4ZF6QQE3S2P5P44BHCQQJNDC"
}
]
}
],
"external_transaction_id": "external-tx-id",
"customers": {
"sender": {
"id": "sender-id"
},
"receiver": {
"id": "receiver-id"
}
},
"creator": {
"id": "creator-id"
}
}
]
}
}