Treasury API
When applicable, data queried on our Treasury API can be filtered using the filter=<FILTER>
query argument.
The value for this filter must be compatible with AIP-160.
Example: Query all accounts of variant internal
.
curl localhost:8777/v1/accounts -G --data-urlencode 'filter=variant = "internal"'
Example: Query all accounts with note "description" of value "desc1".
curl localhost:8777/v1/accounts -G --data-urlencode 'filter=notes.description = "desc1"'
Oracle API
Various endpoints on oracle.cordialapis.com
support filtering and ordering.
Depending on the resource, the following fields typically can be targetted:
create_time
update_time
block.time
block.height
block.hash
block.chain_id
confirmations
failed
asset_id
to_id
balance
Examples:
- Filter by chain:
filter='block.chain_id="SOL"'
- Filter by confirmations:
filter='block.confirmations < 10'
Ordering
Values in order_by
should be a comma separated list of fields, with an optional " desc" or " asc" suffix. Default ordering is descending (" desc").
Examples:
- Sort by block height:
order_by="block.height"
- Sort by confirmations:
order_by="confirmations asc"