Stellar — Ledgers, Liquidity pools (1/2)
API reference for Stellar. All methods ->
Part 1 of 2: 1 · 2
GET /ledgers/{sequence}/transactions
Retrieves transactions of a particular ledger.
This endpoint represents successful transactions in a given ledger.
Parameters
sequence(integer; path; required): the sequence number of a specific ledger.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.include_failed(boolean; query): set to true to include failed operations in results. Options includetrueandfalse.
Returns
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
}
},
"_embedded": {
"records": [
{
"memo": "string",
"_links": {
"self": {
"href": "string",
"templated": true
},
"account": {
"href": "string",
"templated": true
},
"ledger": {
"href": "string",
"templated": true
},
"operations": {
"href": "string",
"templated": true
},
"effects": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
},
"succeeds": {
"href": "string",
"templated": true
},
"transaction": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"successful": true,
"hash": "string",
"ledger": 0,
"created_at": "string",
"source_account": "string",
"account_muxed": "string",
"account_muxed_id": "string",
"source_account_sequence": "string",
"fee_account": "string",
"fee_account_muxed": "string",
"fee_account_muxed_id": "string",
"fee_charged": "string",
"max_fee": "string",
"operation_count": 0,
"envelope_xdr": "string",
"result_xdr": "string",
"result_meta_xdr": "string",
"fee_meta_xdr": "string",
"memo_type": "string",
"signatures": [
"string"
],
"valid_after": "string",
"valid_before": "string",
"preconditions": {
"timebounds": {
"min_time": "string",
"max_time": "string"
},
"ledgerbounds": {
"min_ledger": "string",
"max_ledger": "string"
},
"min_account_sequence": "string",
"min_account_sequence_age": "string",
"min_account_sequence_ledger_gap": 0,
"extra_signers": [
"string"
]
},
"fee_bump_transaction": {
"hash": "string",
"signatures": [
"string"
]
},
"inner_transaction": {
"hash": "string",
"signatures": [
"string"
],
"max_fee": "string"
}
}
]
}
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/ledgers/{sequence}/transactions{?cursor,order,limit,include_failed}
curl https://rpc.ankr.com/http/stellar_horizon/ledgers/{sequence}/transactions{?cursor,order,limit,include_failed} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/ledgers/27147222/transactions?cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/ledgers/27147222/transactions?cursor=116596430667255808\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/ledgers/27147222/transactions?cursor=116596430667255808\u0026limit=1\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"memo": "FadBcV0owHrsLQif/V2TxZKGA2YiX+MoifI7oB/UjJM=",
"_links": {
"self": {
"href": "https://rpc.ankr.com/transactions/3a644389bbec63dd2b107a03c16711563fc549daa7b7f56f951a2e470f81f2e0"
},
"account": {
"href": "https://rpc.ankr.com/accounts/GBKTEASNXABG2NC4TY6N3IA5UFC6YW53Y4KTIKY3CUEKQ2W5EIYRMYVB"
},
"ledger": {
"href": "https://rpc.ankr.com/ledgers/27147222"
},
"operations": {
"href": "https://rpc.ankr.com/transactions/3a644389bbec63dd2b107a03c16711563fc549daa7b7f56f951a2e470f81f2e0/operations{?cursor,limit,order}",
"templated": true
},
"effects": {
"href": "https://rpc.ankr.com/transactions/3a644389bbec63dd2b107a03c16711563fc549daa7b7f56f951a2e470f81f2e0/effects{?cursor,limit,order}",
"templated": true
},
"precedes": {
"href": "https://rpc.ankr.com/transactions?order=asc\u0026cursor=116596430667255808"
},
"succeeds": {
"href": "https://rpc.ankr.com/transactions?order=desc\u0026cursor=116596430667255808"
},
"transaction": {
"href": "https://rpc.ankr.com/transactions/3a644389bbec63dd2b107a03c16711563fc549daa7b7f56f951a2e470f81f2e0"
}
},
"id": "3a644389bbec63dd2b107a03c16711563fc549daa7b7f56f951a2e470f81f2e0",
"paging_token": "116596430667255808",
"successful": true,
"hash": "3a644389bbec63dd2b107a03c16711563fc549daa7b7f56f951a2e470f81f2e0",
"ledger": 27147222,
"created_at": "2019-12-06T23:05:38Z",
"source_account": "GBKTEASNXABG2NC4TY6N3IA5UFC6YW53Y4KTIKY3CUEKQ2W5EIYRMYVB",
"source_account_sequence": "113943107245989112",
"fee_account": "GBKTEASNXABG2NC4TY6N3IA5UFC6YW53Y4KTIKY3CUEKQ2W5EIYRMYVB",
"fee_charged": "100",
"max_fee": "100",
"operation_count": 1,
"envelope_xdr": "AAAAAFUyAk24Am00XJ483aAdoUXsW7vHFTQrGxUIqGrdIjEWAAAAZAGUzqcAAFz4AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAADFadBcV0owHrsLQif/V2TxZKGA2YiX+MoifI7oB/UjJMAAAABAAAAAQAAAADhZHiqD/Q3uSTgjYEWGVRfCCHYvFmeqJU12G9SkzJYEQAAAAEAAAAAB77j4CQxLlm5aPrq/PDwFhGNs2ldqbdCZwkSfzXhUhYAAAABTk9ETAAAAAB1jYLXrFzNBOWCoPnZSHI3PJAhHtc1TrCaiPuZwSf5pgAAAAAAAABNAAAAAAAAAALw9Tl2AAAAQLSLnL3XT3F6dq5m2WHZ7tH3HBrK/e+p2G7Hrl3WXQToUsgxKIRH6bhHT/mIWwnrfLZ9nlVjMCFoZPqVKrI2lgLdIjEWAAAAQCrZ9IbjDAB408VgQaqNpwX8hXr/OUsoEexkWGkN9PjcBG2nf4bKWdbjiaqHZ+LrvM+DdmhxtA3L9bzmCie8NgA=",
"result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=",
"result_meta_xdr": "AAAAAgAAAAIAAAADAZ471gAAAAAAAAAAVTICTbgCbTRcnjzdoB2hRexbu8cVNCsbFQioat0iMRYAAAAAB5tToAGUzqcAAFz3A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cAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==",
"memo_type": "hash",
"signatures": [
"tIucvddPcXp2rmbZYdnu0fccGsr976nYbseuXdZdBOhSyDEohEfpuEdP+YhbCet8tn2eVWMwIWhk+pUqsjaWAg==",
"Ktn0huMMAHjTxWBBqo2nBfyFev85SygR7GRYaQ30+NwEbad/hspZ1uOJqodn4uu8z4N2aHG0Dcv1vOYKJ7w2AA=="
],
"valid_after": "1970-01-01T00:00:00Z",
"preconditions": {
"timebounds": {
"min_time": "0"
}
}
}
]
}
}
GET /ledgers/{sequence}/operations
Retrieves operations of a particular ledger.
This endpoint returns successful operations in a specific ledger.
Parameters
sequence(integer; path; required): the sequence number of a specific ledger.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.include_failed(boolean; query): set to true to include failed operations in results. Options includetrueandfalse.join(any; query): set totransactionsto include the transactions which created each of the operations in the response.
Returns
{
"_links": {
"effects": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
},
"self": {
"href": "string",
"templated": true
},
"succeds": {
"href": "string",
"templated": true
},
"transaction": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"type_i": 0,
"type": "create_account"
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/ledgers/{sequence}/operations{?cursor,order,limit,include_failed,join}
curl https://rpc.ankr.com/http/stellar_horizon/ledgers/{sequence}/operations{?cursor,order,limit,include_failed,join} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/ledgers/27147222/operations?cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/ledgers/27147222/operations?cursor=116596430667255809\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/ledgers/27147222/operations?cursor=116596430667255809\u0026limit=1\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/operations/116596430667255809"
},
"transaction": {
"href": "https://rpc.ankr.com/transactions/3a644389bbec63dd2b107a03c16711563fc549daa7b7f56f951a2e470f81f2e0"
},
"effects": {
"href": "https://rpc.ankr.com/operations/116596430667255809/effects"
},
"succeeds": {
"href": "https://rpc.ankr.com/effects?order=desc\u0026cursor=116596430667255809"
},
"precedes": {
"href": "https://rpc.ankr.com/effects?order=asc\u0026cursor=116596430667255809"
}
},
"id": "116596430667255809",
"paging_token": "116596430667255809",
"transaction_successful": true,
"source_account": "GDQWI6FKB72DPOJE4CGYCFQZKRPQQIOYXRMZ5KEVGXMG6UUTGJMBCASH",
"type": "payment",
"type_i": 1,
"created_at": "2019-12-06T23:05:38Z",
"transaction_hash": "3a644389bbec63dd2b107a03c16711563fc549daa7b7f56f951a2e470f81f2e0",
"asset_type": "credit_alphanum4",
"asset_code": "NODL",
"asset_issuer": "GB2Y3AWXVROM2BHFQKQPTWKIOI3TZEBBD3LTKTVQTKEPXGOBE742NODL",
"from": "GDQWI6FKB72DPOJE4CGYCFQZKRPQQIOYXRMZ5KEVGXMG6UUTGJMBCASH",
"to": "GAD35Y7AEQYS4WNZND5OV7HQ6ALBDDNTNFO2TN2CM4ERE7ZV4FJBNXZ6",
"amount": "0.0000077"
}
]
}
}
GET /ledgers/{sequence}/payments
Retrieves payments of a particular ledger.
This endpoint returns all payment-related operations in a specific ledger. Operation types that can be returned by this endpoint include: create_account, payment, path_payment, and account_merge.
Parameters
sequence(integer; path; required): the sequence number of a specific ledger.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.include_failed(boolean; query): set to true to include failed operations in results. Options includetrueandfalse.join(any; query): set totransactionsto include the transactions which created each of the operations in the response.
Returns
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"transaction": {
"href": "string",
"templated": true
},
"effects": {
"href": "string",
"templated": true
},
"succeeds": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"transaction_successful": true,
"source_account": "string",
"type": "payment",
"type_i": "string",
"created_at": "string",
"transaction_hash": "string",
"asset_type": "string",
"asset_issuer": "string",
"from": "string",
"to": "string",
"amount": "string"
}
]
}
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/ledgers/{sequence}/payments{?cursor,order,limit,include_failed,join}
curl https://rpc.ankr.com/http/stellar_horizon/ledgers/{sequence}/payments{?cursor,order,limit,include_failed,join} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/ledgers/27521176/payments?cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/ledgers/27521176/payments?cursor=118202550867476481\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/ledgers/27521176/payments?cursor=118202550867476481\u0026limit=1\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/operations/118202550867476481"
},
"transaction": {
"href": "https://rpc.ankr.com/transactions/971454b84a82baa38afa975e9eb4ff2632821b5a3e7f7993a7e20bbd9d7633ea"
},
"effects": {
"href": "https://rpc.ankr.com/operations/118202550867476481/effects"
},
"succeeds": {
"href": "https://rpc.ankr.com/effects?order=desc\u0026cursor=118202550867476481"
},
"precedes": {
"href": "https://rpc.ankr.com/effects?order=asc\u0026cursor=118202550867476481"
}
},
"id": "118202550867476481",
"paging_token": "118202550867476481",
"transaction_successful": true,
"source_account": "GDQWI6FKB72DPOJE4CGYCFQZKRPQQIOYXRMZ5KEVGXMG6UUTGJMBCASH",
"type": "payment",
"type_i": 1,
"created_at": "2019-12-30T22:35:49Z",
"transaction_hash": "971454b84a82baa38afa975e9eb4ff2632821b5a3e7f7993a7e20bbd9d7633ea",
"asset_type": "credit_alphanum4",
"asset_code": "NODL",
"asset_issuer": "GB2Y3AWXVROM2BHFQKQPTWKIOI3TZEBBD3LTKTVQTKEPXGOBE742NODL",
"from": "GDQWI6FKB72DPOJE4CGYCFQZKRPQQIOYXRMZ5KEVGXMG6UUTGJMBCASH",
"to": "GDGJS7AXAUFDZARIRDVZ5V7CFW6XY47WSBE2OVLCCGCDWOE7INKYN3PS",
"amount": "0.0000017"
}
]
}
}
GET /ledgers/{sequence}/effects
Retrieves all effects of a particular ledger.
This endpoint returns the effects of a specific ledger.
Parameters
sequence(integer; path; required): the sequence number of a specific ledger.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/ledgers/{sequence}/effects{?cursor,order,limit}
curl https://rpc.ankr.com/http/stellar_horizon/ledgers/{sequence}/effects{?cursor,order,limit} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/ledgers/0/effects?cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/ledgers/0/effects?cursor=211459450643517441-1\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/ledgers/0/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"
}
]
}
}