Skip to main content

Retrieve an Account Trades REST API Endpoint

Retrieves trade records associated with a specific account using its account ID

Updated on
Oct 4, 2023

Retrieve an Account Trades REST API Endpoint

Please note that this method can be used in streaming mode. Streaming mode allows you to listen for trades for this account as they are added to the Stellar ledger.

Path Parameters

account_id
string
REQUIRED
The account id to retrieve transaction records

Query Parameters

cursor
integer
The position of the data set to retrieve
order
string
The order in which transactions are retrieved. The possible values include ascending and descending order
limit
integer
The maximum number of transactions to retrieve in a single request

Returns

_links
object
The links related to the account data
self
object
The self-reference link
href
string
The URL for self-reference
templated
boolean
A boolean value that indicates whether the link is templated or not
next
object
The link to the next set of data
href
string
The URL for next set of data
templated
boolean
A boolean value that indicates whether the link is templated or not
prev
object
The link to the previous set of data
href
string
The URL for previous set of data
templated
boolean
A boolean value that indicates whether the link is templated or not
_embedded
object
Embedded operation object which contains the following fields:
records
array
An array containing individual trades records that match the query parameters
_links
object
Links to related resources associated with the specific trades
operation
object
The operation link object which contains the following field:
href
string
A link to the operation associated with the trade
self
object
The self link object which contains the following field:
href
string
A link to the detailed information about the self link object with the trade
counter
object
The counter link object which contains the following field:
href
string
A link to the account of the entity that received the counter asset in the trade
base
object
The counter link object which contains the following field:
href
string
A link to the account of the entity that provided the base asset for the offer
id
string
A unique identifier for the trade record
paging_token
string
The paging token for the offer record, aiding in navigation
ledger_close_time
string
An ISO 8601 formatted string of when the ledger with this trade was closed
offer_id
string
The identifier for the offer that initiated the trade
trade_type
string
The type of trade, which can take on one of three values: all, orderbook, or liquidity_pools
base_offer_id
string
The ID of the offer that provided the base asset for the trade
base_account
string
The account ID associated with the base asset in the trade
base_amount
string
The amount of the base asset that was traded
base_asset_type
string
The type of the base asset
base_asset_code
string
The code of the base asset if it's a custom asset
base_asset_issuer
string
The issuer of the base asset if it's a custom asset
counter_offer_id
string
The ID of the offer that provided the counter asset for the trade
counter_account
string
The account ID associated with the counter asset in the trade
counter_amount
string
The amount of the counter asset that was traded
counter_asset_type
string
The type of the counter asset
counter_asset_code
string
The code of the counter asset if it's a custom asset
counter_asset_issuer
string
The address of the issuer of the counter asset if it's a custom asset
base_is_seller
boolean
A boolean indicating whether the base account is the seller in the trade
price
object
An object with the following fields:
n
string
The numerator of the price fraction
d
string
The denominator of the price fraction
Request
1
curl -L -X GET 'https://docs-demo.stellar-mainnet.quiknode.pro/accounts/GATRERJBSQH5C7S5FPMG4Q2NXVRR6NF25NKTO7PAXUR7UFOE7CTPB2R6/trades' \
2
-H 'Accept: application/json'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free