Skip to main content

List all Trades REST API Endpoint

Lists all trades.

Updated on
Oct 04, 2023
Please note that this method can be used in streaming mode. Streaming mode allows you to listen for new trades as they are added to the Stellar ledger.

Query Parameters

offer_id
string

The offer ID which serves as a filtering criterion to identify trades that originate from a particular offer

base_asset_type
string

The type of base asset, which can take on one of three values: native, credit_alphanum4, or credit_alphanum12

base_asset_issuer
string

The address of the base asset’s issuer

base_asset_code
string

The code for the base asset

counter_asset_type
string

The type of counter asset, which can take on one of three values: native, credit_alphanum4, or credit_alphanum12

counter_asset_issuer
string

The address of the counter asset’s issuer

counter_asset_code
string

The code for the counter asset

trade_type
string

The type of trade, which can take on one of three values: all, orderbook, or liquidity_pools

cursor
integer

A number that points to a specific location in a collection of responses which is pulled from the paging_token value of a record

order
string

The designation of the order of the records. It can be ascending or descending. By default it is set to ascending

limit
integer

The maximum number of records returned

Returns

_links
object

The link object which provides links to various related resources

self
object

The self link object which contains the following field:

href
string

A link that points to the current page of trades

next
object

The next link object which contains the following field:

href
string

A link to the next page of trades, allowing for pagination

prev
object

The prev link object which contains the following field:

href
string

A link to the previous page of trades, enabling navigation backward

_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 specific trade record

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 trade

id
string

A unique identifier for the trade record

paging_token
string

The paging token for the trade 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

base_offer_id
string

The base offer ID

base_account
string

The account ID of the base party for this trade

base_amount
string

The amount of the base asset involved in the trade

base_asset_type
string

The type of base asset, which can take on one of three values: native, credit_alphanum4, or credit_alphanum12

base_asset_issuer
string

The address of the base asset’s issuer

base_asset_code
string

The code for the base asset

counter_offer_id
string

The counter offer ID

counter_account
integer | string

The account ID of the base party for this trade

counter_amount
string

The amount of the counter asset involved in the trade

counter_asset_type
string

The type of counter asset, which can take on one of three values: native, credit_alphanum4, or credit_alphanum12

base_is_seller
boolean

A flag indicating whether the entity with the base account is the seller in the trade

price
object

The price of the trade, represented as a fraction with a numerator (n) and a denominator (d)

n
string

The numerator

d
string

The denominator

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free