Stellar — Assets, Claimable balances, Effects, Ledgers (3/3)
API reference for Stellar. All methods ->
Effects
Effects represent specific changes that occur in the ledger as a result of successful operations, but are not necessarily directly reflected in the ledger or history, as transactions and operations are.
GET /effects
Lists all effects.
This endpoint lists all effects and can be used in streaming mode. Streaming mode allows you to listen for new effects as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known effect unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream effects created since your request time.
Parameters
cursor(integer; query): a number that points to a specific location in a collection of responses and is pulled from thepaging_tokenvalue of a record.order(string; query): a designation of the order in which records should appear. Options includeasc(ascending) ordesc(descending). If this argument isn’t set, it defaults toasc.limit(integer; query): the maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.
Returns
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
}
},
"_embedded": {
"records": [
{
"_links": {
"operation": {
"href": "string",
"templated": true
},
"succeeds": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"account": "string",
"type": "Account Created",
"type_i": 1,
"created_at": "string"
}
]
}
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/effects{?curson,order,limit}
curl https://rpc.ankr.com/http/stellar_horizon/effects{?curson,order,limit} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/effects?cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/effects?cursor=211459450643517441-1\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/effects?cursor=211459450643517441-1\u0026limit=1\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"operation": {
"href": "https://rpc.ankr.com/operations/211459450643517441"
},
"succeeds": {
"href": "https://rpc.ankr.com/effects?order=desc\u0026cursor=211459450643517441-1"
},
"precedes": {
"href": "https://rpc.ankr.com/effects?order=asc\u0026cursor=211459450643517441-1"
}
},
"id": "0211459450643517441-0000000001",
"paging_token": "211459450643517441-1",
"account": "GCV7NQTKV3ZZGC366FYVH2XOSZBOTQIOTHG7JJFJJP2XKCLGEYUZHRRR",
"type": "account_credited",
"type_i": 2,
"created_at": "2023-11-29T10:37:29Z",
"asset_type": "native",
"amount": "0.0251621"
}
]
}
}
Ledgers
Each ledger stores the state of the network at a point in time and contains all the changes - transactions, operations, effects, etc. - to that state.
GET /ledgers
List all ledgers.
This endpoint lists all ledgers and can be used in streaming mode. Streaming mode allows you to listen for new ledgers as they close. If called in streaming mode, Horizon will start at the earliest known ledger unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream ledgers since your request time.
Parameters
cursor(integer; query): a number that points to a specific location in a collection of responses and is pulled from thepaging_tokenvalue of a record.order(string; query): a designation of the order in which records should appear. Options includeasc(ascending) ordesc(descending). If this argument isn’t set, it defaults toasc.limit(integer; query): the maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.
Returns
{
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"transactions": {
"href": "string",
"templated": true
},
"operations": {
"href": "string",
"templated": true
},
"payments": {
"href": "string",
"templated": true
},
"effects": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"hash": "string",
"pre_hash": "string",
"sequence": 0,
"successful_transaction_count": 0,
"failed_transaction_count": 0,
"operation_count": 0,
"tx_set_operation_count": 0,
"closed_at": "string",
"total_coins": "string",
"fee_pool": "string",
"base_fee_in_stroops": 0,
"base_reserve_in_stroops": 0,
"max_tx_set_size": 0,
"protocol_version": 0,
"header_xdr": "string"
}
]
}
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/ledgers{?curson,order,limit}
curl https://rpc.ankr.com/http/stellar_horizon/ledgers{?curson,order,limit} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/ledgers?cursor=\u0026limit=2\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/ledgers?cursor=211459454938382336\u0026limit=2\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/ledgers?cursor=211459450643415040\u0026limit=2\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/ledgers/49234240"
},
"transactions": {
"href": "https://rpc.ankr.com/ledgers/49234240/transactions{?cursor,limit,order}",
"templated": true
},
"operations": {
"href": "https://rpc.ankr.com/ledgers/49234240/operations{?cursor,limit,order}",
"templated": true
},
"payments": {
"href": "https://rpc.ankr.com/ledgers/49234240/payments{?cursor,limit,order}",
"templated": true
},
"effects": {
"href": "https://rpc.ankr.com/ledgers/49234240/effects{?cursor,limit,order}",
"templated": true
}
},
"id": "5265a451c307cfca00bca3931a0abce38c34010a88260c52b0569881ef820d45",
"paging_token": "211459450643415040",
"hash": "5265a451c307cfca00bca3931a0abce38c34010a88260c52b0569881ef820d45",
"prev_hash": "f0aac2ec4af61e88481b1b47c79d346041fe1a09d6a43c24bcaf416acd937f75",
"sequence": 49234240,
"successful_transaction_count": 153,
"failed_transaction_count": 47,
"operation_count": 494,
"tx_set_operation_count": 673,
"closed_at": "2023-11-29T10:37:29Z",
"total_coins": "105443902087.3472865",
"fee_pool": "4270449.1081721",
"base_fee_in_stroops": 100,
"base_reserve_in_stroops": 5000000,
"max_tx_set_size": 1000,
"protocol_version": 19,
"header_xdr": "AAAAE/CqwuxK9h6ISBsbR8edNGBB/hoJ1qQ8JLyvQWrNk391dpkM53++2Odc2P3uwVpsimH3sW1rfHemGyOle94syIIAAAAAZWcUaQAAAAAAAAABAAAAAFMKIvR3Lya8FJ+cNeaJjXTX3wCSqBxw3WYftnPvFVHeAAAAQHDQ+BSiecIZ2eYWRwR+r8v3rUXz1IpU32/kosKtPS/zStlrBvqi6moxShcT4mHzqyov8VA2FIhzSqznIoLsyQvFjIxal5BMXIRP6LE2pVbuhI3iJ5iGbOy1s90z0Cfu1/Lz1I1vlBmRsfKzQc8JP2pkawR/gktVJgRTbNaIMTwTAu9BQA6iHrPseVthAAAm1uoFb/kAAAEWAAAAAFREgMsAAABkAExLQAAAA+jiy/A54/0RJsdgB3p3iG4xmmfch6G208T/VI/BFUv4ERjxmfiAnjFIK14tlbcrLvvGX9DEM6kTlFV7U3tfHISPWobdcbkpe4hlTxt+iUMnU6fqMLuFDMYBLwL7kvSbsnWSMMEe8/r7pDlxCuKa1eY4rqGQf8oaUCJcZ4Og+zrIwQAAAAA="
},
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/ledgers/49234241"
},
"transactions": {
"href": "https://rpc.ankr.com/ledgers/49234241/transactions{?cursor,limit,order}",
"templated": true
},
"operations": {
"href": "https://rpc.ankr.com/ledgers/49234241/operations{?cursor,limit,order}",
"templated": true
},
"payments": {
"href": "https://rpc.ankr.com/ledgers/49234241/payments{?cursor,limit,order}",
"templated": true
},
"effects": {
"href": "https://rpc.ankr.com/ledgers/49234241/effects{?cursor,limit,order}",
"templated": true
}
},
"id": "a3f6611d47eb0303cd0352a7b6bcecfe540d3c82d4ea85b7c3d0d494ea89d260",
"paging_token": "211459454938382336",
"hash": "a3f6611d47eb0303cd0352a7b6bcecfe540d3c82d4ea85b7c3d0d494ea89d260",
"prev_hash": "5265a451c307cfca00bca3931a0abce38c34010a88260c52b0569881ef820d45",
"sequence": 49234241,
"successful_transaction_count": 174,
"failed_transaction_count": 50,
"operation_count": 452,
"tx_set_operation_count": 874,
"closed_at": "2023-11-29T10:37:35Z",
"total_coins": "105443902087.3472865",
"fee_pool": "4270449.1171621",
"base_fee_in_stroops": 100,
"base_reserve_in_stroops": 5000000,
"max_tx_set_size": 1000,
"protocol_version": 19,
"header_xdr": "AAAAE1JlpFHDB8/KALyjkxoKvOOMNAEKiCYMUrBWmIHvgg1FALlcFm56tDS2cb0ia8B+N6yLaiJXuQLWsWa74aQmM0wAAAAAZWcUbwAAAAAAAAABAAAAAALFJZ5Gu3RxX6evZlFupBENfCKbFy8HGJOsqYaXrFMrAAAAQLrU3H1O/MbfNJ7vmCQY0fRXyDtdaYnBqOATsrPsiMbrRU80fmRMEIGZgb58GPEaZdpZXxHcVPirZQf3VvNvQwyWO71I7+SuPAtJRllRAeexSnqrFApXvxsS0uatsDbtJ+uZq+JZS9bso557+bjqki7e5+7EyGZ7sDxzoZEqSqBlAu9BQQ6iHrPseVthAAAm1uoGzyUAAAEWAAAAAFREgU0AAABkAExLQAAAA+jiy/A54/0RJsdgB3p3iG4xmmfch6G208T/VI/BFUv4ERjxmfiAnjFIK14tlbcrLvvGX9DEM6kTlFV7U3tfHISPWobdcbkpe4hlTxt+iUMnU6fqMLuFDMYBLwL7kvSbsnWSMMEe8/r7pDlxCuKa1eY4rqGQf8oaUCJcZ4Og+zrIwQAAAAA="
}
]
}
}
GET /ledgers/{sequence}
Retrieves a particular ledger.
The single ledger endpoint provides information on a specific ledger.
Parameters
sequence(integer; path; required): the sequence number of a specific ledger.
Returns
{
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"transactions": {
"href": "string",
"templated": true
},
"operations": {
"href": "string",
"templated": true
},
"payments": {
"href": "string",
"templated": true
},
"effects": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"hash": "string",
"pre_hash": "string",
"sequence": 0,
"successful_transaction_count": 0,
"failed_transaction_count": 0,
"operation_count": 0,
"tx_set_operation_count": 0,
"closed_at": "string",
"total_coins": "string",
"fee_pool": "string",
"base_fee_in_stroops": 0,
"base_reserve_in_stroops": 0,
"max_tx_set_size": 0,
"protocol_version": 0,
"header_xdr": "string"
}
]
}
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/ledgers/{sequence}
curl https://rpc.ankr.com/http/stellar_horizon/ledgers/{sequence} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/ledgers/27146933"
},
"transactions": {
"href": "https://rpc.ankr.com/ledgers/27146933/transactions{?cursor,limit,order}",
"templated": true
},
"operations": {
"href": "https://rpc.ankr.com/ledgers/27146933/operations{?cursor,limit,order}",
"templated": true
},
"payments": {
"href": "https://rpc.ankr.com/ledgers/27146933/payments{?cursor,limit,order}",
"templated": true
},
"effects": {
"href": "https://rpc.ankr.com/ledgers/27146933/effects{?cursor,limit,order}",
"templated": true
}
},
"id": "e1218a337cecda05526fba902c61d3d7130baa58d8db41f544bf563f779b6329",
"paging_token": "116595189421703168",
"hash": "e1218a337cecda05526fba902c61d3d7130baa58d8db41f544bf563f779b6329",
"prev_hash": "9eac16fecd885147067b58b7684f60d216f931b813f651265bbc97de4cea313d",
"sequence": 27146933,
"successful_transaction_count": 26,
"failed_transaction_count": 9,
"operation_count": 67,
"closed_at": "2019-12-06T22:39:32Z",
"total_coins": "105443902087.3472865",
"fee_pool": "1807264.7509661",
"base_fee_in_stroops": 100,
"base_reserve_in_stroops": 5000000,
"max_tx_set_size": 1000,
"protocol_version": 12,
"header_xdr": "AAAADJ6sFv7NiFFHBntYt2hPYNIW+TG4E/ZRJlu8l95M6jE9bsvzId+Gtul2mNMW4UZQ+KqSb/nbN8F1CTxAfQsyUy8AAAAAXerYpAAAAAAAAAAAXQNpS8daKGZUeY5quYUcIiJZBMB7LiLsZJsEx9qw79fx99Bu/lk+sIePNUNcuOC2euthzfhLuWJ1nZBuoQFDjgGeOrUOoh6z7HlbYQAAEG/dvCadAAABFgAAAAAIOwAqAAAAZABMS0AAAAPooSNtHXJNJKKWlBtgkAM1LBxzlzYjIlS0xwpjP+uCi76fQj59wgTy0+xtx7O1qTb+W6zcI2zWZnrUU/8v8RZHFBfoo20QYKh95+wWr348yZAexZpdrjhyCxbChxlVTZOX6nZfIgcYBMnZRkOTCLdPO76yeqpDhqu9KrPe3YPTO3wAAAAA"
}