Node API
Supported Chains
API Reference
Stellar

Stellar

Stellar API is available on Web3 API platform (opens in a new tab).

Stellar is a layer-1 open-source, decentralized, peer-to-peer blockchain network that provides a framework for developers to create applications, issue assets, and connect to existing financial rails. Stellar is designed to enable creators, innovators, and developers to build projects on the network that can interoperate with each other.

For Stellar, we support blockchain interaction via the following methods:

Horizon REST methods

Accounts:

Assets:

Claimable Balances:

Effects:

Ledgers:

Liquidity Pools:

Offers:

Operations:

Trades:

Transactions:


Accounts

Users interact with the Stellar network through accounts. Everything else in the ledger—assets, offers, trustlines, etc.—are owned by accounts, and accounts must authorize all changes to the ledger through signed transactions.

GET /accounts

Retrieves all accounts matching a filter.

This endpoint lists accounts by one of four filters : signer, asset, liquidity pool or sponsor.

Parameters

  • sponsor (string; query): account ID of the sponsor. Every account in the response will either be sponsored by the given account ID or have a subentry (trust line, 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 trust line for the given asset.
  • signer (string; query): account ID of the signer. Every account in the response will have the given account ID as a signer.
  • liqudity_pool (any; query): with this parameter, the results will include only accounts which have trust lines to the specified liquidity pool.
  • 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): possible values: [asc, desc]. 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
          },
          "transactions": {
            "href": "string",
            "templated": true
          },
          "operations": {
            "href": "string",
            "templated": true
          },
          "payments": {
            "href": "string",
            "templated": true
          },
          "effects": {
            "href": "string",
            "templated": true
          },
          "offers": {
            "href": "string",
            "templated": true
          },
          "trades": {
            "href": "string",
            "templated": true
          },
          "data": {
            "href": "string",
            "templated": true
          }
        },
        "id": "string",
        "account_id": "string",
        "sequence": "string",
        "sequence_ledger": 0,
        "sequence_time": "string",
        "subentry_count": 0,
        "inflation_destination": "string",
        "home_domain": "string",
        "last_modified_ledger": 0,
        "last_modified_time": "string",
        "thresholds": {
          "low_threshold": 0,
          "med_threshold": 0,
          "high_threshold": 0
        },
        "flags": {
          "auth_required": true,
          "auth_revocable": true,
          "auth_immutable": true,
          "auth_clawback_enabled": true
        },
        "balances": [
          {
            "balance": "string",
            "liquidity_pool_id": "string",
            "limit": "string",
            "buying_liabilites": "string",
            "selling_liabilites": "string",
            "sponser": "string",
            "last_modified_ledger": 0,
            "is_authorized": true,
            "is_authorized_to_maintain_liabilites": true,
            "is_clawback_enabled": true,
            "asset_type": "native"
          },
          {
            "balance": "string",
            "limit": "string",
            "buying_liabilites": "string",
            "selling_liabilites": "string",
            "sponser": "string",
            "last_modified_ledger": 0,
            "is_authorized": true,
            "is_authorized_to_maintain_liabilites": true,
            "is_clawback_enabled": true,
            "asset_type": "native",
            "asset_code": "string",
            "asset_issuer": "string"
          },
          {
            "liquidity_pool_id": "string",
            "asset_type": "liquidity_pool_shares",
            "balance": "string",
            "limit": "string",
            "last_modified_ledger": 0,
            "sponser": "string",
            "is_authorized": true,
            "is_authorized_to_maintain_liabilites": true,
            "is_clawback_enabled": true
          }
        ],
        "signers": [
          {
            "key": "string",
            "weight": 0,
            "type": "ed25519_public_key",
            "sponser": "string"
          }
        ],
        "data": {},
        "num_sponsoring": 0,
        "num_sponsered": 0,
        "sponser": "string",
        "paging_token": "string"
      }
    ]
  }
}

Request example

curl https://rpc.ankr.com/http/stellar_horizon/accounts?cursor=&limit=1&order=asc&signer=GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U (opens in a new tab)

curl https://rpc.ankr.com/http/stellar_horizon/accounts{?signer,sponsor,asset,liquidity_pool,cursor,limit,order}

Response example

{
    "_links": {
        "self": {
            "href": "https://rpc.ankr.com/accounts?cursor=\u0026limit=2\u0026order=desc\u0026signer=GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U"
        },
        "next": {
            "href": "https://rpc.ankr.com/accounts?cursor=GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U\u0026limit=2\u0026order=desc\u0026signer=GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U"
        },
        "prev": {
            "href": "https://rpc.ankr.com/accounts?cursor=GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U\u0026limit=2\u0026order=asc\u0026signer=GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U"
        }
    },
    "_embedded": {
        "records": [
            {
                "_links": {
                    "self": {
                        "href": "https://rpc.ankr.com/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U"
                    },
                    "transactions": {
                        "href": "https://rpc.ankr.com/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/transactions{?cursor,limit,order}",
                        "templated": true
                    },
                    "operations": {
                        "href": "https://rpc.ankr.com/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/operations{?cursor,limit,order}",
                        "templated": true
                    },
                    "payments": {
                        "href": "https://rpc.ankr.com/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/payments{?cursor,limit,order}",
                        "templated": true
                    },
                    "effects": {
                        "href": "https://rpc.ankr.com/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/effects{?cursor,limit,order}",
                        "templated": true
                    },
                    "offers": {
                        "href": "https://rpc.ankr.com/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/offers{?cursor,limit,order}",
                        "templated": true
                    },
                    "trades": {
                        "href": "https://rpc.ankr.com/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/trades{?cursor,limit,order}",
                        "templated": true
                    },
                    "data": {
                        "href": "https://rpc.ankr.com/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/data/{key}",
                        "templated": true
                    }
                },
                "id": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U",
                "account_id": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U",
                "sequence": "24739097524306474",
                "subentry_count": 3,
                "inflation_destination": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U",
                "home_domain": "tempo.eu.com",
                "last_modified_ledger": 46469501,
                "last_modified_time": null,
                "thresholds": {
                    "low_threshold": 5,
                    "med_threshold": 0,
                    "high_threshold": 0
                },
                "flags": {
                    "auth_required": false,
                    "auth_revocable": true,
                    "auth_immutable": false,
                    "auth_clawback_enabled": false
                },
                "balances": [
                    {
                        "balance": "0.0000000",
                        "limit": "922337203685.4775807",
                        "buying_liabilities": "0.0000000",
                        "selling_liabilities": "0.0000000",
                        "last_modified_ledger": 40074670,
                        "is_authorized": true,
                        "is_authorized_to_maintain_liabilities": true,
                        "asset_type": "credit_alphanum4",
                        "asset_code": "EURT",
                        "asset_issuer": "GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S"
                    },
                    {
                        "balance": "0.0000000",
                        "limit": "922337203685.4775807",
                        "buying_liabilities": "0.0000000",
                        "selling_liabilities": "0.0000000",
                        "last_modified_ledger": 20213845,
                        "is_authorized": true,
                        "is_authorized_to_maintain_liabilities": true,
                        "asset_type": "credit_alphanum4",
                        "asset_code": "NGN",
                        "asset_issuer": "GCC4YLCR7DDWFCIPTROQM7EB2QMFD35XRWEQVIQYJQHVW6VE5MJZXIGW"
                    },
                    {
                        "balance": "0.0000000",
                        "limit": "922337203685.4775807",
                        "buying_liabilities": "0.0000000",
                        "selling_liabilities": "0.0000000",
                        "last_modified_ledger": 7877447,
                        "is_authorized": false,
                        "is_authorized_to_maintain_liabilities": false,
                        "asset_type": "credit_alphanum4",
                        "asset_code": "PHP",
                        "asset_issuer": "GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP"
                    },
                    {
                        "balance": "80.8945748",
                        "buying_liabilities": "0.0000000",
                        "selling_liabilities": "0.0000000",
                        "asset_type": "native"
                    }
                ],
                "signers": [
                    {
                        "weight": 10,
                        "key": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U",
                        "type": "ed25519_public_key"
                    }
                ],
                "data": {},
                "num_sponsoring": 0,
                "num_sponsored": 0,
                "paging_token": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U"
            }
        ]
    }
}

GET /accounts/{account_id}

Retrieves account info by account ID.

The single account endpoint provides information on a specific account. The balances section in the response will also list all the trust lines this account has established, including trust lines that haven’t been authorized yet.

Parameters

  • account_id (string; path; required): the account’s public key encoded in a base32 string representation.

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
          },
          "transactions": {
            "href": "string",
            "templated": true
          },
          "operations": {
            "href": "string",
            "templated": true
          },
          "payments": {
            "href": "string",
            "templated": true
          },
          "effects": {
            "href": "string",
            "templated": true
          },
          "offers": {
            "href": "string",
            "templated": true
          },
          "trades": {
            "href": "string",
            "templated": true
          },
          "data": {
            "href": "string",
            "templated": true
          }
        },
        "id": "string",
        "account_id": "string",
        "sequence": "string",
        "sequence_ledger": 0,
        "sequence_time": "string",
        "subentry_count": 0,
        "inflation_destination": "string",
        "home_domain": "string",
        "last_modified_ledger": 0,
        "last_modified_time": "string",
        "thresholds": {
          "low_threshold": 0,
          "med_threshold": 0,
          "high_threshold": 0
        },
        "flags": {
          "auth_required": true,
          "auth_revocable": true,
          "auth_immutable": true,
          "auth_clawback_enabled": true
        },
        "balances": [
          {
            "balance": "string",
            "liquidity_pool_id": "string",
            "limit": "string",
            "buying_liabilites": "string",
            "selling_liabilites": "string",
            "sponser": "string",
            "last_modified_ledger": 0,
            "is_authorized": true,
            "is_authorized_to_maintain_liabilites": true,
            "is_clawback_enabled": true,
            "asset_type": "native"
          },
          {
            "balance": "string",
            "limit": "string",
            "buying_liabilites": "string",
            "selling_liabilites": "string",
            "sponser": "string",
            "last_modified_ledger": 0,
            "is_authorized": true,
            "is_authorized_to_maintain_liabilites": true,
            "is_clawback_enabled": true,
            "asset_type": "native",
            "asset_code": "string",
            "asset_issuer": "string"
          },
          {
            "liquidity_pool_id": "string",
            "asset_type": "liquidity_pool_shares",
            "balance": "string",
            "limit": "string",
            "last_modified_ledger": 0,
            "sponser": "string",
            "is_authorized": true,
            "is_authorized_to_maintain_liabilites": true,
            "is_clawback_enabled": true
          }
        ],
        "signers": [
          {
            "key": "string",
            "weight": 0,
            "type": "ed25519_public_key",
            "sponser": "string"
          }
        ],
        "data": {},
        "num_sponsoring": 0,
        "num_sponsered": 0,
        "sponser": "string",
        "paging_token": "string"
      }
    ]
  }
}

Request example

curl https://rpc.ankr.com/http/stellar_horizon/accounts/{account_id}

Response example

{
    "_links": {
        "self": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA"
        },
        "transactions": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/transactions{?cursor,limit,order}",
            "templated": true
        },
        "operations": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/operations{?cursor,limit,order}",
            "templated": true
        },
        "payments": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/payments{?cursor,limit,order}",
            "templated": true
        },
        "effects": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/effects{?cursor,limit,order}",
            "templated": true
        },
        "offers": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/offers{?cursor,limit,order}",
            "templated": true
        },
        "trades": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/trades{?cursor,limit,order}",
            "templated": true
        },
        "data": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/data/{key}",
            "templated": true
        }
    },
    "id": "GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA",
    "account_id": "GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA",
    "sequence": "120192344968520093",
    "subentry_count": 6,
    "last_modified_ledger": 48375369,
    "last_modified_time": null,
    "thresholds": {
        "low_threshold": 0,
        "med_threshold": 0,
        "high_threshold": 0
    },
    "flags": {
        "auth_required": false,
        "auth_revocable": false,
        "auth_immutable": false,
        "auth_clawback_enabled": false
    },
    "balances": [
        {
            "balance": "1.0000000",
            "limit": "922337203685.4775807",
            "buying_liabilities": "0.0000000",
            "selling_liabilities": "0.0000000",
            "last_modified_ledger": 27984972,
            "is_authorized": true,
            "is_authorized_to_maintain_liabilities": true,
            "asset_type": "credit_alphanum4",
            "asset_code": "BB1",
            "asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN"
        },
        {
            "balance": "20.0000000",
            "limit": "922337203685.4775807",
            "buying_liabilities": "0.0000000",
            "selling_liabilities": "0.0000000",
            "last_modified_ledger": 27984988,
            "is_authorized": true,
            "is_authorized_to_maintain_liabilities": true,
            "asset_type": "credit_alphanum4",
            "asset_code": "CNY",
            "asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX"
        },
        {
            "balance": "3.0000008",
            "limit": "922337203685.4775807",
            "buying_liabilities": "0.0000000",
            "selling_liabilities": "0.0000000",
            "last_modified_ledger": 34781349,
            "is_authorized": true,
            "is_authorized_to_maintain_liabilities": true,
            "asset_type": "credit_alphanum4",
            "asset_code": "EURT",
            "asset_issuer": "GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S"
        },
        {
            "balance": "194.9999990",
            "limit": "922337203685.4775807",
            "buying_liabilities": "0.0000000",
            "selling_liabilities": "0.0000000",
            "last_modified_ledger": 28524340,
            "is_authorized": true,
            "is_authorized_to_maintain_liabilities": true,
            "asset_type": "credit_alphanum4",
            "asset_code": "NGNT",
            "asset_issuer": "GAWODAROMJ33V5YDFY3NPYTHVYQG7MJXVJ2ND3AOGIHYRWINES6ACCPD"
        },
        {
            "balance": "2.5000000",
            "limit": "922337203685.4775807",
            "buying_liabilities": "0.0000000",
            "selling_liabilities": "0.0000000",
            "last_modified_ledger": 29107236,
            "is_authorized": true,
            "is_authorized_to_maintain_liabilities": true,
            "asset_type": "credit_alphanum4",
            "asset_code": "USD",
            "asset_issuer": "GBNLJIYH34UWO5YZFA3A3HD3N76R6DOI33N4JONUOHEEYZYCAYTEJ5AK"
        },
        {
            "balance": "3.1200000",
            "limit": "922337203685.4775807",
            "buying_liabilities": "0.0000000",
            "selling_liabilities": "0.0000000",
            "last_modified_ledger": 29882476,
            "is_authorized": true,
            "is_authorized_to_maintain_liabilities": true,
            "asset_type": "credit_alphanum4",
            "asset_code": "USD",
            "asset_issuer": "GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX"
        },
        {
            "balance": "15.7298615",
            "buying_liabilities": "0.0000000",
            "selling_liabilities": "0.0000000",
            "asset_type": "native"
        }
    ],
    "signers": [
        {
            "weight": 1,
            "key": "GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA",
            "type": "ed25519_public_key"
        }
    ],
    "data": {},
    "num_sponsoring": 0,
    "num_sponsored": 0,
    "paging_token": "GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA"
}

GET /accounts/{account_id}/transactions

Parameters

  • account_id (string; path; required): the account’s public key encoded in a base32 string representation.
  • 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/accounts/{account_id}/transactions{?cursor,limit,order}

Response example

{
  "_links": {
    "self": {
      "href": "https://rpc.ankr.com/accounts/GBVFTZL5HIPT4PFQVTZVIWR77V7LWYCXU4CLYWWHHOEXB64XPG5LDMTU/transactions?cursor=\u0026limit=1\u0026order=asc"
    },
    "next": {
      "href": "https://rpc.ankr.com/accounts/GBVFTZL5HIPT4PFQVTZVIWR77V7LWYCXU4CLYWWHHOEXB64XPG5LDMTU/transactions?cursor=94658837230923776\u0026limit=1\u0026order=asc"
    },
    "prev": {
      "href": "https://rpc.ankr.com/accounts/GBVFTZL5HIPT4PFQVTZVIWR77V7LWYCXU4CLYWWHHOEXB64XPG5LDMTU/transactions?cursor=94658837230923776\u0026limit=1\u0026order=desc"
    }
  },
  "_embedded": {
    "records": [
      {
        "memo": "",
        "memo_bytes": "",
        "_links": {
          "self": {
            "href": "https://rpc.ankr.com/transactions/4826a3d41a5a795bf795767d0fb5e39c4abbcf695cf888b3578aa126b5b257ee"
          },
          "account": {
            "href": "https://rpc.ankr.com/accounts/GBYSOAM7D42RMUN4LCKCFYNXZU3F7TJVKD2NMR672J4372BCH6DE4BKR"
          },
          "ledger": {
            "href": "https://rpc.ankr.com/ledgers/22039478"
          },
          "operations": {
            "href": "https://rpc.ankr.com/transactions/4826a3d41a5a795bf795767d0fb5e39c4abbcf695cf888b3578aa126b5b257ee/operations{?cursor,limit,order}",
            "templated": true
          },
          "effects": {
            "href": "https://rpc.ankr.com/transactions/4826a3d41a5a795bf795767d0fb5e39c4abbcf695cf888b3578aa126b5b257ee/effects{?cursor,limit,order}",
            "templated": true
          },
          "precedes": {
            "href": "https://rpc.ankr.com/transactions?order=asc\u0026cursor=94658837230923776"
          },
          "succeeds": {
            "href": "https://rpc.ankr.com/transactions?order=desc\u0026cursor=94658837230923776"
          },
          "transaction": {
            "href": "https://rpc.ankr.com/transactions/4826a3d41a5a795bf795767d0fb5e39c4abbcf695cf888b3578aa126b5b257ee"
          }
        },
        "id": "4826a3d41a5a795bf795767d0fb5e39c4abbcf695cf888b3578aa126b5b257ee",
        "paging_token": "94658837230923776",
        "successful": true,
        "hash": "4826a3d41a5a795bf795767d0fb5e39c4abbcf695cf888b3578aa126b5b257ee",
        "ledger": 22039478,
        "created_at": "2019-01-18T14:40:47Z",
        "source_account": "GBYSOAM7D42RMUN4LCKCFYNXZU3F7TJVKD2NMR672J4372BCH6DE4BKR",
        "source_account_sequence": "90296735301107721",
        "fee_account": "GBYSOAM7D42RMUN4LCKCFYNXZU3F7TJVKD2NMR672J4372BCH6DE4BKR",
        "fee_charged": "100",
        "max_fee": "100",
        "operation_count": 1,
        "envelope_xdr": "AAAAAHEnAZ8fNRZRvFiUIuG3zTZfzTVQ9NZH39J5v+giP4ZOAAAAZAFAzGcAAAAJAAAAAQAAAAAAAAAAAAAAAFxB5cMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAABqWeV9Oh8+PLCs81RaP/1+u2BXpwS8Wsc7iXD7l3m6sQAAAAAC+vCAAAAAAAAAAAEiP4ZOAAAAQO421wcb/JYfBpnYEJzHpMyQnrM8rHd4PUoyHXpPlvQAUGzARqwbX8hcLSM4tlk51AwbuZOaZfWCaFQfzFZJuAA=",
        "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=",
        "result_meta_xdr": "AAAAAgAAAAIAAAADAVBLtgAAAAAAAAAAcScBnx81FlG8WJQi4bfNNl/NNVD01kff0nm/6CI/hk4AAAAAI9MEZAFAzGcAAAAIAAAAAAAAAAEAAAAA7Nxp7lmV7taqQfqoSP+tlqjOHWeANaQYFqhDkCQERZQAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAVBLtgAAAAAAAAAAcScBnx81FlG8WJQi4bfNNl/NNVD01kff0nm/6CI/hk4AAAAAI9MEZAFAzGcAAAAJAAAAAAAAAAEAAAAA7Nxp7lmV7taqQfqoSP+tlqjOHWeANaQYFqhDkCQERZQAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAMBUEu2AAAAAAAAAABxJwGfHzUWUbxYlCLht802X801UPTWR9/Seb/oIj+GTgAAAAAj0wRkAUDMZwAAAAkAAAAAAAAAAQAAAADs3GnuWZXu1qpB+qhI/62WqM4dZ4A1pBgWqEOQJARFlAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEBUEu2AAAAAAAAAABxJwGfHzUWUbxYlCLht802X801UPTWR9/Seb/oIj+GTgAAAAAg2BPkAUDMZwAAAAkAAAAAAAAAAQAAAADs3GnuWZXu1qpB+qhI/62WqM4dZ4A1pBgWqEOQJARFlAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABUEu2AAAAAAAAAABqWeV9Oh8+PLCs81RaP/1+u2BXpwS8Wsc7iXD7l3m6sQAAAAAC+vCAAVBLtgAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAA=",
        "fee_meta_xdr": "AAAAAgAAAAMBUCemAAAAAAAAAABxJwGfHzUWUbxYlCLht802X801UPTWR9/Seb/oIj+GTgAAAAAj0wTIAUDMZwAAAAgAAAAAAAAAAQAAAADs3GnuWZXu1qpB+qhI/62WqM4dZ4A1pBgWqEOQJARFlAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEBUEu2AAAAAAAAAABxJwGfHzUWUbxYlCLht802X801UPTWR9/Seb/oIj+GTgAAAAAj0wRkAUDMZwAAAAgAAAAAAAAAAQAAAADs3GnuWZXu1qpB+qhI/62WqM4dZ4A1pBgWqEOQJARFlAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==",
        "memo_type": "text",
        "signatures": [
          "7jbXBxv8lh8GmdgQnMekzJCeszysd3g9SjIdek+W9ABQbMBGrBtfyFwtIzi2WTnUDBu5k5pl9YJoVB/MVkm4AA=="
        ],
        "valid_after": "1970-01-01T00:00:00Z",
        "valid_before": "2019-01-18T14:42:11Z",
        "preconditions": {
          "timebounds": {
            "min_time": "0",
            "max_time": "1547822531"
          }
        }
      }
    ]
  }
}

GET /accounts/{account_id}/operations

Retrieves an account's operations.

The endpoint represents successful operations for a given account and can be used in streaming mode. Streaming mode allows you to listen for new operations for this account 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

  • account_id (string; path; required): the account’s public key encoded in a base32 string representation.
  • 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/accounts/{account_id}/operations

Response example

{
    "_links": {
        "self": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/operations?cursor=120194466505179137\u0026limit=10\u0026order=asc"
        },
        "next": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/operations?cursor=213638377747542068\u0026limit=10\u0026order=asc"
        },
        "prev": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/operations?cursor=213638377747542068\u0026limit=10\u0026order=desc"
        }
    },
    "_embedded": {
        "records": [
            {
                "_links": {
                    "self": {
                        "href": "https://rpc.ankr.com/operations/213638377747542068"
                    },
                    "transaction": {
                        "href": "https://rpc.ankr.com/transactions/64946c9e2ea9e30bf076bbc92068dcfdafcfaaf0fa77f4fee1060858751b9974"
                    },
                    "effects": {
                        "href": "https://rpc.ankr.com/operations/213638377747542068/effects"
                    },
                    "succeeds": {
                        "href": "https://rpc.ankr.com/effects?order=desc\u0026cursor=213638377747542068"
                    },
                    "precedes": {
                        "href": "https://rpc.ankr.com/effects?order=asc\u0026cursor=213638377747542068"
                    }
                },
                "id": "213638377747542068",
                "paging_token": "213638377747542068",
                "transaction_successful": true,
                "source_account": "GCAHDBWNRTRNYGE5CX4RDVC74BVW3DOZOP5U6NMH3HLWTV46QZBZPFH4",
                "type": "payment",
                "type_i": 1,
                "created_at": "2024-01-02T18:20:33Z",
                "transaction_hash": "64946c9e2ea9e30bf076bbc92068dcfdafcfaaf0fa77f4fee1060858751b9974",
                "asset_type": "native",
                "from": "GCAHDBWNRTRNYGE5CX4RDVC74BVW3DOZOP5U6NMH3HLWTV46QZBZPFH4",
                "to": "GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA",
                "amount": "0.0610489"
            }
        ]
    }
}

GET /accounts/{account_id}/payments

Retrieves an account's payments.

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

Parameters

  • account_id (string; path; required): the account’s public key encoded in a base32 string representation.
  • 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
    }
  },
  "_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

curl https://rpc.ankr.com/http/stellar_horizon/accounts/{account_id}/payments{?cursor,limit,order}

Response example

{
    "_links": {
        "self": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/payments?cursor=148289273518190684\u0026limit=10\u0026order=asc"
        },
        "next": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/payments?cursor=213638377747542068\u0026limit=10\u0026order=asc"
        },
        "prev": {
            "href": "https://rpc.ankr.com/accounts/GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA/payments?cursor=213638377747542068\u0026limit=10\u0026order=desc"
        }
    },
    "_embedded": {
        "records": [
            {
                "_links": {
                    "self": {
                        "href": "https://rpc.ankr.com/operations/213638377747542068"
                    },
                    "transaction": {
                        "href": "https://rpc.ankr.com/transactions/64946c9e2ea9e30bf076bbc92068dcfdafcfaaf0fa77f4fee1060858751b9974"
                    },
                    "effects": {
                        "href": "https://rpc.ankr.com/operations/213638377747542068/effects"
                    },
                    "succeeds": {
                        "href": "https://rpc.ankr.com/effects?order=desc\u0026cursor=213638377747542068"
                    },
                    "precedes": {
                        "href": "https://rpc.ankr.com/effects?order=asc\u0026cursor=213638377747542068"
                    }
                },
                "id": "213638377747542068",
                "paging_token": "213638377747542068",
                "transaction_successful": true,
                "source_account": "GCAHDBWNRTRNYGE5CX4RDVC74BVW3DOZOP5U6NMH3HLWTV46QZBZPFH4",
                "type": "payment",
                "type_i": 1,
                "created_at": "2024-01-02T18:20:33Z",
                "transaction_hash": "64946c9e2ea9e30bf076bbc92068dcfdafcfaaf0fa77f4fee1060858751b9974",
                "asset_type": "native",
                "from": "GCAHDBWNRTRNYGE5CX4RDVC74BVW3DOZOP5U6NMH3HLWTV46QZBZPFH4",
                "to": "GAYOLLLUIZE4DZMBB2ZBKGBUBZLIOYU6XFLW37GBP2VZD3ABNXCW4BVA",
                "amount": "0.0610489"
            }
        ]
    }
}

GET /accounts/{account_id}/effects

Retrieves an account's effects.

This endpoint returns the effects of a specific account and can be used in streaming mode. Streaming mode allows you to listen for new effects for this account 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

  • account_id (string; path; required): the account’s public key encoded in a base32 string representation.
  • 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
    },
    "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/accounts/{account_id}/effects{?cursor,limit,order}

Response example

{
    "_links": {
        "self": {
            "href": "https://rpc.ankr.com/accounts/GCNL55IJTH2HX26HLNIGYD2JIQLTBAQL3SVPNZA6PXK7NAVHU423WOTE/effects?cursor=\u0026limit=1\u0026order=asc"
        },
        "next": {
            "href": "https://rpc.ankr.com/accounts/GCNL55IJTH2HX26HLNIGYD2JIQLTBAQL3SVPNZA6PXK7NAVHU423WOTE/effects?cursor=110694007436259329-1\u0026limit=1\u0026order=asc"
        },
        "prev": {
            "href": "https://rpc.ankr.com/accounts/GCNL55IJTH2HX26HLNIGYD2JIQLTBAQL3SVPNZA6PXK7NAVHU423WOTE/effects?cursor=110694007436259329-1\u0026limit=1\u0026order=desc"
        }
    },
    "_embedded": {
        "records": [
            {
                "_links": {
                    "operation": {
                        "href": "https://rpc.ankr.com/operations/110694007436259329"
                    },
                    "succeeds": {
                        "href": "https://rpc.ankr.com/effects?order=desc\u0026cursor=110694007436259329-1"
                    },
                    "precedes": {
                        "href": "https://rpc.ankr.com/effects?order=asc\u0026cursor=110694007436259329-1"
                    }
                },
                "id": "0110694007436259329-0000000001",
                "paging_token": "110694007436259329-1",
                "account": "GCNL55IJTH2HX26HLNIGYD2JIQLTBAQL3SVPNZA6PXK7NAVHU423WOTE",
                "type": "account_created",
                "type_i": 0,
                "created_at": "2019-09-11T13:16:44Z",
                "starting_balance": "1.0000000"
            }
        ]
    }
}

GET /accounts/{account_id}/offers

Retrieves an account's offers.

Parameters

  • account_id (string; path; required): the account’s public key encoded in a base32 string representation.
  • 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
          },
          "offer_maker": {
            "href": "string",
            "templated": true
          }
        },
        "id": "string",
        "paging_token": "string",
        "seller": "string",
        "selling": {
          "asset_type": "string",
          "asset_code": "string",
          "asset_issuer": "string"
        },
        "buying": {
          "asset_type": "string",
          "asset_code": "string",
          "asset_issuer": "string"
        },
        "amount": "string",
        "price_r": {
          "n": 0,
          "d": 0
        },
        "price": "string",
        "last_modified_ledger": 0,
        "last_modified_time": "string",
        "sponser": "string"
      }
    ]
  }
}

Request example

curl https://rpc.ankr.com/http/stellar_horizon/accounts/{account_id}/offers{?cursor,limit,order}

Response example

{
    "_links": {
        "self": {
            "href": "https://rpc.ankr.com/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/offers?cursor=164943216\u0026limit=10\u0026order=asc"
        },
        "next": {
            "href": "https://rpc.ankr.com/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/offers?cursor=164943216\u0026limit=10\u0026order=asc"
        },
        "prev": {
            "href": "https://rpc.ankr.com/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/offers?cursor=164943216\u0026limit=10\u0026order=desc"
        }
    },
    "_embedded": {
        "records": []
    }
}

GET /accounts/{account_id}/trades

Retrieves an account's trades.

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

Parameters

  • account_id (string; path; required): the account’s public key encoded in a base32 string representation.
  • cursor (in