For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Stellar — Assets, Claimable balances, Effects, Ledgers

API reference for Stellar. All methods ->

Assets

Assets are representations of value issued on the Stellar network. An asset consists of a type, code, and issuer.

GET /assets

Lists all assets.

This endpoint lists all assets.

Parameters

  • asset_code (any; query): the code of the asset you would like to filter by.
  • asset_issuer (any; query): the Stellar address of the issuer for the asset you would like to filter by.
  • cursor (integer; query): a number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
  • order (string; query): a designation of the order in which records should appear. Options include asc (ascending) or desc (descending). If this argument isn’t set, it defaults to asc.
  • 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": {
"toml": {
"href": "string",
"templated": true
}
},
"asset_type": "string",
"asset_issuer": "string",
"paging_token": "string",
"accounts": {
"authorized": 0,
"authorized_to_maintain_liabilities": 0,
"unauthorized": 0
},
"num_claimable_balances": 0,
"num_contracts": 0,
"num_liquidity_pools": 0,
"balances": {
"authorized": "string",
"authorized_to_maintain_liabilities": "string",
"unauthorized": "string"
},
"claimable_balances_amount": "string",
"contracts_amount": "string",
"liquidity_pools_amount": "string",
"amount": "string",
"num_accounts": 0,
"flags": {
"auth_required": true,
"auth_revocable": true,
"auth_immutable": true
}
}
]
}
}

Request example

curl https://rpc.ankr.com/http/stellar_horizon/assets{?asset_code,asset_issuer,cursor,limit,order}

Response example

{
"_links": {
"self": {
"href": "https://rpc.ankr.com/assets?cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/assets?cursor=0_GBBJZOYEGLOCW32Q4ZGWRWQ7UKIGMMIQXIRBBBOVJVFJTZW7CR2VQKAT_credit_alphanum4\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/assets?cursor=0_GBBJZOYEGLOCW32Q4ZGWRWQ7UKIGMMIQXIRBBBOVJVFJTZW7CR2VQKAT_credit_alphanum4\u0026limit=1\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"toml": {
"href": "https://emily.stellarskull.io/.well-known/stellar.toml"
}
},
"asset_type": "credit_alphanum4",
"asset_code": "0",
"asset_issuer": "GBBJZOYEGLOCW32Q4ZGWRWQ7UKIGMMIQXIRBBBOVJVFJTZW7CR2VQKAT",
"paging_token": "0_GBBJZOYEGLOCW32Q4ZGWRWQ7UKIGMMIQXIRBBBOVJVFJTZW7CR2VQKAT_credit_alphanum4",
"num_accounts": 24,
"num_claimable_balances": 0,
"num_liquidity_pools": 0,
"amount": "998.9481303",
"accounts": {
"authorized": 24,
"authorized_to_maintain_liabilities": 0,
"unauthorized": 0
},
"claimable_balances_amount": "0.0000000",
"liquidity_pools_amount": "0.0000000",
"balances": {
"authorized": "998.9481303",
"authorized_to_maintain_liabilities": "0.0000000",
"unauthorized": "0.0000000"
},
"flags": {
"auth_required": false,
"auth_revocable": false,
"auth_immutable": false,
"auth_clawback_enabled": false
}
}
]
}
}

Claimable balances

A claimable balance represents the transfer of ownership of some amount of an asset. Claimable balances provide a mechanism for setting up a payment which can be claimed in the future. This allows you to make payments to accounts which are currently not able to accept them.

GET /claimable_balances

Lists all claimable balances.

This endpoint lists all available claimable balances.

Parameters

  • sponsor (string; query): an account ID of the sponsor. Every account in the response will either be sponsored by the given account ID or have a sub-entry (trustline, offer, or data entry) which is sponsored by the given account ID.
  • asset (any; query): an issued asset represented as “Code:IssuerAccountID”. Every account in the response will have a trustline for the given asset.
  • claimant (any; query): an account ID of the destination address. Only include claimable balances which can be claimed by the given account ID.
  • cursor (integer; query): a number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
  • order (string; query): a designation of the order in which records should appear. Options include asc (ascending) or desc (descending). If this argument isn’t set, it defaults to asc.
  • 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": {
"self": {
"href": "string",
"templated": true
},
"operations": {
"href": "string",
"templated": true
},
"transactions": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"asset": "string",
"amount": "string",
"sponsor": "string",
"last_modified_ledger": "string",
"last_modified_time": "string",
"claimants": [
{
"destination": "string",
"predicate": {
"and": [
{
"or": [
{
"relBefore": "string",
"absBefore": "string",
"absBeforeEpoch": "string"
}
],
"not": {
"unconditional": true,
"relBefore": "string",
"absBefore": "string",
"absBeforeEpoch": "string"
}
}
]
}
}
],
"flags": 0
}
]
}
}

Request example

curl https://rpc.ankr.com/http/stellar_horizon/claimable_balances{?asset,sponsor,claimant,cursor,limit,order}

Response example

{
"_links": {
"self": {
"href": "https://rpc.ankr.com/claimable_balances?asset=native\u0026cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/claimable_balances?asset=native\u0026cursor=33324106-00000000691787983bc3ea12361092fe49ae83cbbe37804ee1590fe2b9b3e3860fc8261f\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/claimable_balances?asset=native\u0026cursor=33324106-00000000691787983bc3ea12361092fe49ae83cbbe37804ee1590fe2b9b3e3860fc8261f\u0026limit=1\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/claimable_balances/00000000691787983bc3ea12361092fe49ae83cbbe37804ee1590fe2b9b3e3860fc8261f"
},
"transactions": {
"href": "https://rpc.ankr.com/claimable_balances/00000000691787983bc3ea12361092fe49ae83cbbe37804ee1590fe2b9b3e3860fc8261f/transactions{?cursor,limit,order}",
"templated": true
},
"operations": {
"href": "https://rpc.ankr.com/claimable_balances/00000000691787983bc3ea12361092fe49ae83cbbe37804ee1590fe2b9b3e3860fc8261f/operations{?cursor,limit,order}",
"templated": true
}
},
"id": "00000000691787983bc3ea12361092fe49ae83cbbe37804ee1590fe2b9b3e3860fc8261f",
"asset": "native",
"amount": "0.1000000",
"sponsor": "GDOZMXWISPB57FITUQIGTFH2KNNW7QTFESXF5DZEAMZK6QHE3KVO5TRT",
"last_modified_ledger": 33324106,
"last_modified_time": null,
"claimants": [
{
"destination": "GCD3T6UIQLYZPGRCYVSE7LKQB5HYYNVT7ENY6RCSFRFQYR5JTBDCECO3",
"predicate": {
"and": [
{
"abs_before": "2020-12-30T23:03:56Z",
"abs_before_epoch": "1609369436"
},
{
"not": {
"abs_before": "2020-12-30T23:05:56Z",
"abs_before_epoch": "1609369556"
}
}
]
}
}
],
"flags": {
"clawback_enabled": false
},
"paging_token": "33324106-00000000691787983bc3ea12361092fe49ae83cbbe37804ee1590fe2b9b3e3860fc8261f"
}
]
}
}

GET /claimable_balances/{claimable_balance_id}

Retrieves a particular claimable balance.

The single claimable balance endpoint provides information on a claimable balance.

Parameters

  • claimable_balance_id (string; path; required): a unique identifier for this claimable balance.

Returns

{
"_links": {
"self": {
"href": "string",
"templated": true
},
"operations": {
"href": "string",
"templated": true
},
"transactions": {
"href": "string",
"templated": true
}
},
"id": "string",
"asset": "string",
"amount": "string",
"sponsor": "string",
"last_modified_ledger": "string",
"last_modified_time": "string",
"claimants": [
{
"destination": "string",
"predicate": {
"and": [
{
"or": [
{
"relBefore": "string",
"absBefore": "string",
"absBeforeEpoch": "string"
}
],
"not": {
"unconditional": true,
"relBefore": "string",
"absBefore": "string",
"absBeforeEpoch": "string"
}
}
]
}
}
],
"flags": 0,
"paging_token": "string"
}

Request example

curl https://rpc.ankr.com/http/stellar_horizon/claimable_balances/{claimable_balance_id}

Response example

{
"_links": {
"self": {
"href": "https://rpc.ankr.com/claimable_balances/000000000102030000000000000000000000000000000000000000000000000000000000"
},
"operations": {
"href": "https://rpc.ankr.com/claimable_balances/000000000102030000000000000000000000000000000000000000000000000000000000/operations{?cursor,limit,order}",
"templated": true
},
"transactions": {
"href": "https://rpc.ankr.com/claimable_balances/000000000102030000000000000000000000000000000000000000000000000000000000/transactions{?cursor,limit,order}",
"templated": true
}
},
"id": "000000000102030000000000000000000000000000000000000000000000000000000000",
"paging_token": "000000000102030000000000000000000000000000000000000000000000000000000000",
"asset": "native",
"amount": "10.0000000",
"claimants": [
{
"destination": "GC3C4AKRBQLHOJ45U4XG35ESVWRDECWO5XLDGYADO6DPR3L7KIDVUMML",
"predicate": {
"and": [
{
"or": [
{
"relBefore": "12"
},
{
"absBefore": "2020-08-26T11:15:39Z",
"absBeforeEpoch": "1598440539"
}
]
},
{
"not": {
"unconditional": true
}
}
]
}
}
],
"last_modified_ledger": 28411995,
"last_modified_time": "2020-02-26T19:29:16Z"
}

GET /claimable_balances/{claimable_balance_id}/transactions

Retrieves transactions of a particular claimable balance.

This endpoint represents successful transactions referencing a given claimable balance and can be used in streaming mode. Streaming mode allows you to listen for new transactions referencing this claimable balance as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known transaction unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream transactions created since your request time.

Parameters

  • claimable_balance_id (string; path; required): a unique identifier for this claimable balance.
  • cursor (integer; query): a number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
  • order (string; query): a designation of the order in which records should appear. Options include asc (ascending) or desc (descending). If this argument isn’t set, it defaults to asc.
  • 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 include true and false.

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

curl https://rpc.ankr.com/http/stellar_horizon/claimable_balances/{claimable_balance_id}/transactions{?cursor,order,limit,include_failed}

Response

{
"_links": {
"self": {
"href": "https://rpc.ankr.com/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/transactions?cursor=&limit=2&order=asc"
},
"next": {
"href": "https://rpc.ankr.com/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/transactions?cursor=140648659841806336&limit=2&order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/transactions?cursor=140648659841806336&limit=2&order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/transactions/fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8"
},
"account": {
"href": "https://rpc.ankr.com/accounts/GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF"
},
"ledger": {
"href": "https://rpc.ankr.com/ledgers/32747318"
},
"operations": {
"href": "https://rpc.ankr.com/transactions/fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8/operations{?cursor,limit,order}",
"templated": true
},
"effects": {
"href": "https://rpc.ankr.com/transactions/fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8/effects{?cursor,limit,order}",
"templated": true
},
"precedes": {
"href": "https://rpc.ankr.com/transactions?order=asc&cursor=140648659841806336"
},
"succeeds": {
"href": "https://rpc.ankr.com/transactions?order=desc&cursor=140648659841806336"
},
"transaction": {
"href": "https://rpc.ankr.com/transactions/fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8"
}
},
"id": "fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8",
"paging_token": "140648659841806336",
"successful": true,
"hash": "fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8",
"ledger": 32747318,
"created_at": "2020-11-23T16:02:38Z",
"source_account": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"source_account_sequence": "140646847365513218",
"fee_account": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"fee_charged": "100",
"max_fee": "100",
"operation_count": 1,
"envelope_xdr": "AAAAAgAAAADElBx79rbhYaf3aUgLbVm0P2BNEN+aLisS3A/6YYRX4AAAAGQB862QAAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAADgAAAAJCT0RISQAAAAAAAAAAAAAAxJQce/a24WGn92lIC21ZtD9gTRDfmi4rEtwP+mGEV+AAAAAAAA9CQAAAAAEAAAAAAAAAAElBqA1BXzKd9k9nuPoodv0YBKY+Hgh6Uz/UxozgnvyzAAAAAAAAAAAAAAABYYRX4AAAAEDf41ykW+eq8IVpJNOc4iDaht5Beil8NpQB8WMHkOxW3rocUBF3EHKqUXDIsD9CzzY7Xr1PbzVk5FZ4iBKNF4MM",
"result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAOAAAAAAAAAAAXiCb7/jOeH1xTQXxv7f4sBei+wUMDFD7EaziYGwnD+QAAAAA=",
"result_meta_xdr": "AAAAAgAAAAIAAAADAfOvNgAAAAAAAAAAxJQce/a24WGn92lIC21ZtD9gTRDfmi4rEtwP+mGEV+AAAAAAAcnCVAHzrZAAAAABAAAAAAAAAAAAAAAAAAAAD2dpdmluZ2JvZGhpLm9yZwABAAAAAAAAAAAAAAAAAAAAAAAAAQHzrzYAAAAAAAAAAMSUHHv2tuFhp/dpSAttWbQ/YE0Q35ouKxLcD/phhFfgAAAAAAHJwlQB862QAAAAAgAAAAAAAAAAAAAAAAAAAA9naXZpbmdib2RoaS5vcmcAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAwHzrzYAAAAAAAAAAMSUHHv2tuFhp/dpSAttWbQ/YE0Q35ouKxLcD/phhFfgAAAAAAHJwlQB862QAAAAAgAAAAAAAAAAAAAAAAAAAA9naXZpbmdib2RoaS5vcmcAAQAAAAAAAAAAAAAAAAAAAAAAAAEB8682AAAAAAAAAADElBx79rbhYaf3aUgLbVm0P2BNEN+aLisS3A/6YYRX4AAAAAABycJUAfOtkAAAAAIAAAAAAAAAAAAAAAAAAAAPZ2l2aW5nYm9kaGkub3JnAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAfOvNgAAAAQAAAAAF4gm+/4znh9cU0F8b+3+LAXovsFDAxQ+xGs4mBsJw/kAAAABAAAAAAAAAABJQagNQV8ynfZPZ7j6KHb9GASmPh4IelM/1MaM4J78swAAAAAAAAACQk9ESEkAAAAAAAAAAAAAAMSUHHv2tuFhp/dpSAttWbQ/YE0Q35ouKxLcD/phhFfgAAAAAAAPQkAAAAAAAAAAAQAAAAEAAAAAxJQce/a24WGn92lIC21ZtD9gTRDfmi4rEtwP+mGEV+AAAAAAAAAAAA==",
"fee_meta_xdr": "AAAAAgAAAAMB866UAAAAAAAAAADElBx79rbhYaf3aUgLbVm0P2BNEN+aLisS3A/6YYRX4AAAAAABycK4AfOtkAAAAAEAAAAAAAAAAAAAAAAAAAAPZ2l2aW5nYm9kaGkub3JnAAEAAAAAAAAAAAAAAAAAAAAAAAABAfOvNgAAAAAAAAAAxJQce/a24WGn92lIC21ZtD9gTRDfmi4rEtwP+mGEV+AAAAAAAcnCVAHzrZAAAAABAAAAAAAAAAAAAAAAAAAAD2dpdmluZ2JvZGhpLm9yZwABAAAAAAAAAAAAAAAAAAAA",
"memo_type": "none",
"signatures": [
"3+NcpFvnqvCFaSTTnOIg2obeQXopfDaUAfFjB5DsVt66HFARdxByqlFwyLA/Qs82O169T281ZORWeIgSjReDDA=="
],
"valid_after": "1970-01-01T00:00:00Z",
"preconditions": {
"timebounds": {
"min_time": "0"
}
}
}
]
}
}

GET /claimable_balances/{claimable_balance_id}/operations

Retrieves operations of a particular claimable balance.

This endpoint represents successful operations referencing a given claimable balance and can be used in streaming mode. Streaming mode allows you to listen for new operations referencing this claimable balance as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known operation unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream operations created since your request time.

Parameters

  • claimable_balance_id (string; path; required): a unique identifier for this claimable balance.
  • cursor (integer; query): a number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
  • order (string; query): a designation of the order in which records should appear. Options include asc (ascending) or desc (descending). If this argument isn’t set, it defaults to asc.
  • 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 include true and false.
  • join (any; query): set to transactions to 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
},
"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": "create_account",
"type_i": 0,
"created_at": "string",
"transaction_hash": "string",
"starting_balance": "string",
"funder": "string",
"account": "string"
}

Request example

curl https://rpc.ankr.com/http/stellar_horizon/claimable_balances/{claimable_balance_id}/operations{?cursor,order,limit,include_failed,join}

Response example

{
"_links": {
"self": {
"href": "https://rpc.ankr.com/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations?cursor=&limit=3&order=asc"
},
"next": {
"href": "https://rpc.ankr.com/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations?cursor=140648659841806337&limit=3&order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations?cursor=140648659841806337&limit=3&order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/operations/140648659841806337"
},
"transaction": {
"href": "https://rpc.ankr.com/transactions/fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8"
},
"effects": {
"href": "https://rpc.ankr.com/operations/140648659841806337/effects"
},
"succeeds": {
"href": "https://rpc.ankr.com/effects?order=desc&cursor=140648659841806337"
},
"precedes": {
"href": "https://rpc.ankr.com/effects?order=asc&cursor=140648659841806337"
}
},
"id": "140648659841806337",
"paging_token": "140648659841806337",
"transaction_successful": true,
"source_account": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"type": "create_claimable_balance",
"type_i": 14,
"created_at": "2020-11-23T16:02:38Z",
"transaction_hash": "fc5a98fc3869df408ebd4ac1c2e3fefec8b0a858e82ff1d14e362676708b91e8",
"sponsor": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"asset": "BODHI:GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF",
"amount": "0.1000000",
"claimants": [
{
"destination": "GBEUDKANIFPTFHPWJ5T3R6RIO36RQBFGHYPAQ6STH7KMNDHAT36LHOLD",
"predicate": {
"unconditional": true
}
}
]
}
]
}
}

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 the paging_token value of a record.
  • order (string; query): a designation of the order in which records should appear. Options include asc (ascending) or desc (descending). If this argument isn’t set, it defaults to asc.
  • 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

curl https://rpc.ankr.com/http/stellar_horizon/effects{?curson,order,limit}

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 the paging_token value of a record.
  • order (string; query): a designation of the order in which records should appear. Options include asc (ascending) or desc (descending). If this argument isn’t set, it defaults to asc.
  • 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

curl https://rpc.ankr.com/http/stellar_horizon/ledgers{?curson,order,limit}

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

curl https://rpc.ankr.com/http/stellar_horizon/ledgers/{sequence}

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"
}