Horizon
v0.0.1https://xlm.nownodes.ioThe Testnet NetworkAuthentication
api-keyAuthapiKeyAPI Key: api-key in header
General
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.
List all Accounts
This endpoint lists accounts by one of four filters : signer, asset, liquidity pool or sponsor.
Parameters
sponserstringqueryAccount ID of the sponsor. Every account in the response will either be sponsored by the given account ID or have a subentry (trustline, offer, or data entry) which is sponsored by the given account ID.
assetstringqueryAn issued asset represented as “Code:IssuerAccountID”. Every account in the response will have a trustline for the given asset.
signerstringqueryAccount ID of the signer. Every account in the response will have the given account ID as a signer.
liqudity_poolstringqueryWith this parameter, the results will include only accounts which have trustlines to the specified liquidity pool.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Returns accounts based on provided filter: signer , asset, sponser or liquidity pool
Authorization
api-keyAuthapiKey in headerRetrieve an Account
The single account endpoint provides information on a specific account. The balances section in the response will also list all the trustlines this account has established, including trustlines that haven’t been authorized yet.
Parameters
account_idstringrequiredpathThis account’s public key encoded in a base32 string representation.
Response
Returns details like balances, sponserships etc. about an account.
Authorization
api-keyAuthapiKey in headerRetrieve an Account's Transactions
This endpoint represents successful transactions for a given account and can be used in streaming mode. Streaming mode allows you to listen for new transactions for this account 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
account_idstringrequiredpathThis account’s public key encoded in a base32 string representation.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve an Account's Operations
This 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_idstringrequiredpathThis account’s public key encoded in a base32 string representation.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
joinstringquerySet to transactions to include the transactions which created each of the operations in the response.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve 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_idstringrequiredpathThis account’s public key encoded in a base32 string representation.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
joinstringquerySet to transactions to include the transactions which created each of the operations in the response.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve 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_idstringrequiredpathThis account’s public key encoded in a base32 string representation.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve an Account's Offers
This endpoint represents all offers a given account has currently open and can be used in streaming mode. Streaming mode allows you to listen for new offers for this account as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known offer unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream offers created since your request time.
Parameters
account_idstringrequiredpathThis account’s public key encoded in a base32 string representation.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve 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_idstringrequiredpathThis account’s public key encoded in a base32 string representation.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve an Account's Data
This endpoint represents a single data for a given account.
Parameters
account_idstringrequiredpathThis account’s public key encoded in a base32 string representation.
keystringrequiredpathThe key name for this data.
Response
Success
Authorization
api-keyAuthapiKey in headerAssets
Assets are representations of value issued on the Stellar network. An asset consists of a type, code, and issuer.
List all Assets
This endpoint lists all assets.
Parameters
asset_codestringqueryThe code of the asset you would like to filter by.
asset_issuerstringqueryThe Stellar address of the issuer for the asset you would like to filter by.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerClaimable 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.
List All Claimable Balances
This endpoint lists all available claimable balances.
Parameters
sponserstringqueryAccount ID of the sponsor. Every account in the response will either be sponsored by the given account ID or have a subentry (trustline, offer, or data entry) which is sponsored by the given account ID.
assetstringqueryAn issued asset represented as “Code:IssuerAccountID”. Every account in the response will have a trustline for the given asset.
claimantstringqueryAccount ID of the destination address. Only include claimable balances which can be claimed by the given account ID.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve a Claimable Balance
The single claimable balance endpoint provides information on a claimable balance.
Parameters
claimable_balance_idstringrequiredpathA unique identifier for this claimable balance.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve Related Transactions
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_idstringrequiredpathA unique identifier for this claimable balance.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve Related Operations
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_idstringrequiredpathA unique identifier for this claimable balance.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
joinstringquerySet to transactions to include the transactions which created each of the operations in the response.
Response
Success
Authorization
api-keyAuthapiKey in headerEffects
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.
List 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
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerFee Stats
Fee stats are used to predict what fee to set for a transaction before submitting it to the network.
Retrieve Fee Stats
The fee stats endpoint provides information about per-operation fee stats over the last 5 ledgers.
Response
Success
Authorization
api-keyAuthapiKey in headerLiquidity Pools
Liquidity Pools provide a simple, non-interactive way to trade large amounts of capital and enable high volumes of trading.
List Liquidity Pools
This endpoint lists all available liquidity pools.
Parameters
reservesstringqueryComma-separated list of assets in canonical form (Code:IssuerAccountID), to only include liquidity pools which have reserves matching all listed assets.
accountstringqueryA Stellar account ID, to only include liquidity pools in which this account is participating in (i.e. holds pool shares to).
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve a Liquidity Pool
The single liquidity pool endpoint provides information on a liquidity pool.
Parameters
liquidity_pool_idstringrequiredpathA unique identifier for this liquidity pool.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve Related Effects
This endpoint represents effects referencing a given liquidity pool and can be used in streaming mode. Streaming mode allows you to listen for new effects referencing this liquidity pool 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
liquidity_pool_idstringrequiredpathA unique identifier for this liquidity pool.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve Related Trades
This endpoint represents successful trades fulfilled by the given liquidity pool and can be used in streaming mode. Streaming mode allows you to listen for new trades referencing this liquidity pool 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 trade created since your request time.
Parameters
liquidity_pool_idstringrequiredpathA unique identifier for this liquidity pool.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve Related Transactions
This endpoint represents successful transactions referencing a given liquidity pool and can be used in streaming mode. Streaming mode allows you to listen for new transactions referencing this liquidity pool 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
liquidity_pool_idstringrequiredpathA unique identifier for this liquidity pool.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve Related Operations
This endpoint represents successful operations referencing a given liquidity pool and can be used in streaming mode. Streaming mode allows you to listen for new operations referencing this liquidity pool 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
liquidity_pool_idstringrequiredpathA unique identifier for this liquidity pool.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
joinstringquerySet to transactions to include the transactions which created each of the operations in the response.
Response
Success
Authorization
api-keyAuthapiKey in headerLedgers
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.
Retrieve a Ledger
The single ledger endpoint provides information on a specific ledger.
Parameters
sequenceintegerrequiredpathThe sequence number of a specific ledger.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve a Ledger's Transactions
This endpoint represents successful transactions in a given ledger.
Parameters
sequenceintegerrequiredpathThe sequence number of a specific ledger.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve a Ledger's Payments
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
sequenceintegerrequiredpathThe sequence number of a specific ledger.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
joinstringquerySet to transactions to include the transactions which created each of the operations in the response.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve a Ledger's Operations
This endpoint returns successful operations in a specific ledger.
Parameters
sequenceintegerrequiredpathThe sequence number of a specific ledger.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
joinstringquerySet to transactions to include the transactions which created each of the operations in the response.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve a Ledgers's Effects
This endpoint returns the effects of a specific ledger.
Parameters
sequenceintegerrequiredpathThe sequence number of a specific ledger.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerList 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
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerOffers
Offers are statements about how much of an asset an account wants to buy or sell.
List All Offers
This endpoint lists all currently open offers and can be used in streaming mode. Streaming mode allows you to listen for new offers as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known offer unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream offers created since your request time. When filtering by buying or selling arguments, you must use a combination of selling_asset_type, selling_asset_issuer, and selling_asset_code for the selling asset, or a combination of buying_asset_type, buying_asset_issuer, and buying_asset_code for the buying asset.
Parameters
sponserstringqueryAccount ID of the sponsor. Every account in the response will either be sponsored by the given account ID or have a subentry (trustline, offer, or data entry) which is sponsored by the given account ID.
sellerstringqueryThe account ID of the offer creator.
selling_asset_typestringnativecredit_alphanum4credit_alphanum12queryThe type for the selling asset. Either native, credit_alphanum4, or credit_alphanum12.
selling_asset_issuerstringqueryThe Stellar address of the selling asset’s issuer.
selling_asset_codestringqueryThe code for the selling asset.
buying_asset_typestringnativecredit_alphanum4credit_alphanum12queryThe type for the buying asset. Either native, credit_alphanum4, or credit_alphanum12.
buying_asset_issuerstringqueryThe Stellar address of the buying asset’s issuer.
buying_asset_codestringqueryThe code for the buying asset.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve an Offer
The single offer endpoint provides information on a specific offer.
Parameters
offer_idstringrequiredpathA unique identifier for this offer.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve an Offer's Trades
This endpoint represents all trades for a given offer and can be used in streaming mode. Streaming mode allows you to listen for trades for this offer 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
offer_idstringrequiredpathA unique identifier for this offer.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerOrder Books
An order book is a collections of offers for a specific pair of assets.
Retrieve an Order Book
The order book endpoint provides an order book’s bids and asks and can be used in streaming mode. When filtering for a specific order book, you must use use all six of these arguments: base_asset_type, base_asset_issuer, base_asset_code, counter_asset_type, counter_asset_issuer, and counter_asset_code. If the base or counter asset is XLM, you only need to indicate the asset type as native and do not need to designate the code or the issuer.
Parameters
selling_asset_typestringnativecredit_alphanum4credit_alphanum12requiredpathThe type for the selling asset. Either native, credit_alphanum4, or credit_alphanum12.
selling_asset_issuerstringqueryThe Stellar address of the selling asset’s issuer.
selling_asset_codestringqueryThe code for the selling asset.
buying_asset_typestringnativecredit_alphanum4credit_alphanum12queryThe type for the buying asset. Either native, credit_alphanum4, or credit_alphanum12.
buying_asset_issuerstringqueryThe Stellar address of the buying asset’s issuer.
buying_asset_codestringqueryThe code for the buying asset.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerTrade Aggregations
A trade aggregation represents aggregated statistics on an asset pair (base and counter) for a specific time period. Trade aggregations are useful to developers of trading clients and provide historical trade data.
List Trade Aggregations
This endpoint displays trade data based on filters set in the arguments.This is done by dividing a given time range into segments and aggregating statistics, for a given asset pair (base, counter) over each of these segments. The duration of the segments is specified with the resolution parameter. The start and end of the time range are given by startTime and endTime respectively, which are both rounded to the nearest multiple of resolution since epoch. The individual segments are also aligned with multiples of resolution since epoch. If you want to change this alignment, the segments can be offset by specifying the offset parameter.
Parameters
start_timeinteger<long>queryThe lower time boundary represented as milliseconds since epoch.
end_timeinteger<long>queryThe upper time boundary represented as milliseconds since epoch.
resolutioninteger<long>queryThe segment duration represented as milliseconds. Supported values are 1 minute (60000), 5 minutes (300000), 15 minutes (900000), 1 hour (3600000), 1 day (86400000) and 1 week (604800000).
offsetnumber<long>querySegments can be offset using this parameter. Expressed in milliseconds. Can only be used if the resolution is greater than 1 hour. Value must be in whole hours, less than the provided resolution, and less than 24 hours.
base_asset_typestringnativecredit_alphanum4credit_alphanum12requiredpathThe type for the base asset. Either native, credit_alphanum4, or credit_alphanum12.
base_asset_issuerstringqueryThe Stellar address of the base asset’s issuer.
base_asset_codestringqueryThe code for the base asset.
counter_asset_typestringnativecredit_alphanum4credit_alphanum12requiredpathThe type for the counter asset. Either native, credit_alphanum4, or credit_alphanum12.
counter_asset_issuerstringqueryThe Stellar address of the counter asset’s issuer.
counter_asset_codestringqueryThe code for the counter asset.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerTrades
When an offer is fully or partially fulfilled, a trade happens. Trades can also be caused by successful path payments, because path payments involve fulfilling offers. A trade occurs between two parties—base and counter. Which is which is either arbitrary or determined by the calling query.
List All Trades
This endpoint lists all trades and can be used in streaming mode. Streaming mode allows you to listen for new trades 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. When filtering for a specific orderbook, you must use use all six of these arguments: base_asset_type, base_asset_issuer, base_asset_code, counter_asset_type, counter_asset_issuer, and counter_asset_code. If the base or counter asset is XLM, you only need to indicate the asset type as native and do not need to designate the code or the issuer.
Parameters
offer_idstringqueryThe offer ID. Used to filter for trades originating from a specific offer.
base_asset_typestringnativecredit_alphanum4credit_alphanum12queryThe type for the base asset. Either native, credit_alphanum4, or credit_alphanum12.
base_asset_issuerstringqueryThe Stellar address of the base asset’s issuer.
base_asset_codestringqueryThe code for the base asset.
counter_asset_typestringnativecredit_alphanum4credit_alphanum12queryThe type for the counter asset. Either native, credit_alphanum4, or credit_alphanum12.
counter_asset_issuerstringqueryThe Stellar address of the counter asset’s issuer.
counter_asset_codestringqueryThe code for the counter asset.
trade_typestringallorderbookliquidity_poolsqueryCan be set to all, orderbook, or liquidity_pools to filter only trades executed across a given mechanism.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerTransactions
Transactions are commands that modify the ledger state and consist of one or more operations.
Retrieve a Transaction
The single transaction endpoint provides information on a specific transaction.
Parameters
transaction_hashstringrequiredpathTransactions are commands that modify the ledger state and consist of one or more operations.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve a Transaction's Operations
This endpoint returns Successful operations for a specific transaction.
Parameters
transaction_hashstringrequiredpathTransactions are commands that modify the ledger state and consist of one or more operations.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
joinstringquerySet to transactions to include the transactions which created each of the operations in the response.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve a Transaction's Effects
This endpoint returns the effects of a specific transaction.
Parameters
transaction_hashstringrequiredpathTransactions are commands that modify the ledger state and consist of one or more operations.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerList All Transactions
This endpoint lists all Successful transactions and can be used in streaming mode. Streaming mode allows you to listen for new transactions 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
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
Response
Success
Authorization
api-keyAuthapiKey in headerSubmit a Transaction
This endpoint actually submits a transaction to the Stellar network. It only takes a single, required parameter: the signed transaction. Refer to the Transactions page for details on how to craft a proper one. If you submit a transaction that has already been included in a ledger, this endpoint will return the same response as would’ve been returned for the original transaction submission. This allows for safe resubmission of transactions in error scenarios, as highlighted in the error-handling guide.
Parameters
txstringrequiredqueryResponse
Success
Authorization
api-keyAuthapiKey in headerOperations
Retrieve an Operation
The single operation endpoint provides information about a specific operation.
Parameters
idstringrequiredpathThe ID number for this operation.
joinstringquerySet to transactions to include the transactions which created each of the operations in the response.
Response
Success
Authorization
api-keyAuthapiKey in headerRetrieve an Operation's Effects
This endpoint returns the effects of a specific operation.
Parameters
idstringrequiredpathThe ID number for this operation.
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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.
Response
Success
Authorization
api-keyAuthapiKey in headerList All Operations
This endpoint lists all Successful operations and can be used in streaming mode. Streaming mode allows you to listen for new operations 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
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
joinstringquerySet to transactions to include the transactions which created each of the operations in the response.
Response
Success
Authorization
api-keyAuthapiKey in headerList All Payments
This endpoint lists all Successful payment-related operations and can be used in streaming mode. Streaming mode allows you to listen for new payments 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. Operations that can be returned by this endpoint include: create_account, payment, path_payment_strict_recieve, path_payment_strict_send, and account_merge .
Parameters
cursorintegerqueryA number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
orderstringascdescqueryA 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.
limitintegerqueryThe 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_failedbooleantruefalsequerySet to true to include failed operations in results. Options include true and false.
joinstringquerySet to transactions to include the transactions which created each of the operations in the response.
Response
Success
Authorization
api-keyAuthapiKey in headerPaths
List Strict Receive Payment Paths
The strict receive payment path endpoint lists the paths a payment can take based on the amount of an asset you want the recipient to receive. The destination asset amount stays constant, and the type and amount of an asset sent varies based on offers in the order books. For this search, Horizon loads a list of assets available to the sender (based on source_account or source_assets) and displays the possible paths from the different source assets to the destination asset. Only paths that satisfy the destination_amount are returned.
Parameters
source_accountstringqueryThe Stellar address of the sender. Any returned path must start with an asset that the sender holds. Using either source_account or source_assets as an argument is required for strict receive path payments.
source_assetsstringqueryA comma-separated list of assets available to the sender. Any returned path must start with an asset in this list. Each asset is formatted as CODE:ISSUER_ACCOUNT. For example: USD:GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX. Using either source_account or source_assets as an argument is required for strict receive path payments.
destination_asset_typestringnativecredit_alphanum4credit_alphanum12requiredpathThe type for the destination asset. Either native, credit_alphanum4, or credit_alphanum12.
destination_asset_issuerstringqueryThe Stellar address of the issuer of the destination asset. Required if the destination_asset_type is not native.
destination_asset_codestringqueryThe code for the destination asset. Required if the destination_asset_type is not native.
destination_amountstringrequiredpathThe amount of the destination asset that should be received.
Response
Success
Authorization
api-keyAuthapiKey in headerList Strict Send Payment Paths
The strict send payment path endpoint lists the paths a payment can take based on the amount of an asset you want to send. The source asset amount stays constant, and the type and amount of an asset received varies based on offers in the order books. For this search, Horizon loads a list of assets that the recipient can recieve (based on destination_account or destination_assets) and displays the possible paths from the different source assets to the destination asset. Only paths that satisfy the source_amount are returned.
Parameters
source_accountstringqueryThe Stellar address of the sender. Any returned path must start with an asset that the sender holds. Using either source_account or source_assets as an argument is required for strict receive path payments.
source_assetsstringqueryA comma-separated list of assets available to the sender. Any returned path must start with an asset in this list. Each asset is formatted as CODE:ISSUER_ACCOUNT. For example: USD:GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX. Using either source_account or source_assets as an argument is required for strict receive path payments.
source_asset_typestringnativecredit_alphanum4credit_alphanum12requiredpathThe type for the source asset. Either native, credit_alphanum4, or credit_alphanum12.
source_asset_issuerstringqueryThe Stellar address of the issuer of the source asset. Required if the source_asset_type is not native.
source_asset_codestringqueryThe code for the source asset. Required if the source_asset_type is not native.
source_amountstringrequiredpathThe amount of the source asset that should be sent.
destination_accountstringqueryThe Stellar address of the reciever. Any returned path must end with an asset that the recipient can receive. Using either source_account or source_assets as an argument is required for strict send path payments.
destination_assetsArray<string>queryA comma-separated list of assets that the recipient can receive. Any returned path must end with an asset in this list. Each asset is formatted as CODE:ISSUER_ACCOUNT. For example: USD:GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX. Using either source_account or source_assets as an argument is required for strict send path payments.
Response
Success
Authorization
api-keyAuthapiKey in header