Stellar — Liquidity pools, Offers, Operations
API reference for Stellar. All methods ->
GET /liquidity_pools/{liquidity_pool_id}/transactions
Retrieves transactions of a particular liquidity pool.
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_id(any; path; required): a unique identifier for this liquidity pool.cursor(integer; query): a number that points to a specific location in a collection of responses and is pulled from thepaging_tokenvalue of a record.order(string; query): a designation of the order in which records should appear. Options includeasc(ascending) ordesc(descending). If this argument isn’t set, it defaults toasc.limit(integer; query): the maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.include_failed(boolean; query): set totrueto include failed operations in results. Options includetrueandfalse.
Returns
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
}
},
"_embedded": {
"records": [
{
"memo": "string",
"_links": {
"self": {
"href": "string",
"templated": true
},
"account": {
"href": "string",
"templated": true
},
"ledger": {
"href": "string",
"templated": true
},
"operations": {
"href": "string",
"templated": true
},
"effects": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
},
"succeeds": {
"href": "string",
"templated": true
},
"transaction": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"successful": true,
"hash": "string",
"ledger": 0,
"created_at": "string",
"source_account": "string",
"account_muxed": "string",
"account_muxed_id": "string",
"source_account_sequence": "string",
"fee_account": "string",
"fee_account_muxed": "string",
"fee_account_muxed_id": "string",
"fee_charged": "string",
"max_fee": "string",
"operation_count": 0,
"envelope_xdr": "string",
"result_xdr": "string",
"result_meta_xdr": "string",
"fee_meta_xdr": "string",
"memo_type": "string",
"signatures": [
"string"
],
"valid_after": "string",
"valid_before": "string",
"preconditions": {
"timebounds": {
"min_time": "string",
"max_time": "string"
},
"ledgerbounds": {
"min_ledger": "string",
"max_ledger": "string"
},
"min_account_sequence": "string",
"min_account_sequence_age": "string",
"min_account_sequence_ledger_gap": 0,
"extra_signers": [
"string"
]
},
"fee_bump_transaction": {
"hash": "string",
"signatures": [
"string"
]
},
"inner_transaction": {
"hash": "string",
"signatures": [
"string"
],
"max_fee": "string"
}
}
]
}
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/liquidity_pools/{liquidity_pool_id}/transactions{?cursor,order,limit,include_failed}
curl https://rpc.ankr.com/http/stellar_horizon/liquidity_pools/{liquidity_pool_id}/transactions{?cursor,order,limit,include_failed} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/liquidity_pools/3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4/transactions?cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/liquidity_pools/3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4/transactions?cursor=212026605370699776\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/liquidity_pools/3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4/transactions?cursor=212026605370699776\u0026limit=1\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/transactions/f2c93ecfb152ad5a42114296518751781d44a5513833ab855f29122e93f3bb6d"
},
"account": {
"href": "https://rpc.ankr.com/accounts/GBEI3CDPMFUKZCJ3EFJNGO7UNQSFTKGGCFH6HUXGHLMJ4ML3H7P4Y7R6"
},
"ledger": {
"href": "https://rpc.ankr.com/ledgers/49366291"
},
"operations": {
"href": "https://rpc.ankr.com/transactions/f2c93ecfb152ad5a42114296518751781d44a5513833ab855f29122e93f3bb6d/operations{?cursor,limit,order}",
"templated": true
},
"effects": {
"href": "https://rpc.ankr.com/transactions/f2c93ecfb152ad5a42114296518751781d44a5513833ab855f29122e93f3bb6d/effects{?cursor,limit,order}",
"templated": true
},
"precedes": {
"href": "https://rpc.ankr.com/transactions?order=asc\u0026cursor=212026605370699776"
},
"succeeds": {
"href": "https://rpc.ankr.com/transactions?order=desc\u0026cursor=212026605370699776"
},
"transaction": {
"href": "https://rpc.ankr.com/transactions/f2c93ecfb152ad5a42114296518751781d44a5513833ab855f29122e93f3bb6d"
}
},
"id": "f2c93ecfb152ad5a42114296518751781d44a5513833ab855f29122e93f3bb6d",
"paging_token": "212026605370699776",
"successful": true,
"hash": "f2c93ecfb152ad5a42114296518751781d44a5513833ab855f29122e93f3bb6d",
"ledger": 49366291,
"created_at": "2023-12-08T09:16:26Z",
"source_account": "GBEI3CDPMFUKZCJ3EFJNGO7UNQSFTKGGCFH6HUXGHLMJ4ML3H7P4Y7R6",
"source_account_sequence": "158971643161494781",
"fee_account": "GBEI3CDPMFUKZCJ3EFJNGO7UNQSFTKGGCFH6HUXGHLMJ4ML3H7P4Y7R6",
"fee_charged": "200",
"max_fee": "200000",
"operation_count": 2,
"envelope_xdr": "AAAAAgAAAABIjYhvYWisiTshUtM79GwkWajGEU/j0uY62J4xez/fzAADDUACNMfeAABE/QAAAAAAAAAAAAAAAgAAAAEAAAAASI2Ib2ForIk7IVLTO/RsJFmoxhFP49LmOtieMXs/38wAAAANAAAAAAAAAAAF6IcIAAAAAEiNiG9haKyJOyFS0zv0bCRZqMYRT+PS5jrYnjF7P9/MAAAAAVZaVAAAAAAASNxfIyljpPC8GHeHhCBmucnfDpoc6kEdGGe3KpTmU6YAAAAD7BWrawAAAAAAAAABAAAAAEiNiG9haKyJOyFS0zv0bCRZqMYRT+PS5jrYnjF7P9/MAAAADQAAAAAAAAAAAA1Z+AAAAAAC90wBFo+lH6oihgg4xRmby+YL5+1WH3WX9GYUSm43zgAAAAJ5VVNEQwAAAAAAAAAAAAAAzTraTOMNLk/59bkX2cI5NI9EZRILk0tjcD212hOLct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N0ci5jbwAAAAEAAAAAAAAAAAAAAQAAACYNvdxGAAAAAACYln8AAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAC8UULAAAAAGVy3rkAAAAA",
"memo_type": "none",
"signatures": [
"9O2yimZGibf2Zc2CNW9PcfRlAaHQBpDUlKtCkx3IQSKlIp0F/rozUFUMqgdeyiuvH8n7Pg23g25f7x5n/EaYAA=="
]
}
]
}
}
GET /liquidity_pools/{liquidity_pool_id}/operations
Retrieves operations of a particular liquidity pool.
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_id(any; path; required): a unique identifier for this liquidity pool.cursor(integer; query): a number that points to a specific location in a collection of responses and is pulled from thepaging_tokenvalue of a record.order(string; query): a designation of the order in which records should appear. Options includeasc(ascending) ordesc(descending). If this argument isn’t set, it defaults toasc.limit(integer; query): the maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.include_failed(boolean; query): set totrueto include failed operations in results. Options includetrueandfalse.join(any; query): set totransactionsto include the transactions which created each of the operations in the response.
Returns
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
},
"effects": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
},
"succeds": {
"href": "string",
"templated": true
},
"transaction": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"type_i": 0,
"type": "create_account"
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/liquidity_pools/{liquidity_pool_id}/operations{?cursor,order,limit,include_failed,join}
curl https://rpc.ankr.com/http/stellar_horizon/liquidity_pools/{liquidity_pool_id}/operations{?cursor,order,limit,include_failed,join} \
-H 'Accept: text/event-stream'
Response parameters
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/liquidity_pools/67260c4c1807b262ff851b0a3fe141194936bb0215b2f77447f1df11998eabb9/operations?cursor=&limit=3&order=asc"
},
"next": {
"href": "https://rpc.ankr.com/liquidity_pools/67260c4c1807b262ff851b0a3fe141194936bb0215b2f77447f1df11998eabb9/operations?cursor=120192452165550081&limit=3&order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/liquidity_pools/67260c4c1807b262ff851b0a3fe141194936bb0215b2f77447f1df11998eabb9/operations?cursor=120192344791343105&limit=3&order=desc"
}
},
"_embedded": {
"records": [
{
"id": "3697472920621057",
"paging_token": "3697472920621057",
"transaction_successful": true,
"source_account": "GBB4JST32UWKOLGYYSCEYBHBCOFL2TGBHDVOMZP462ET4ZRD4ULA7S2L",
"type": "liquidity_pool_withdraw",
"type_i": 23,
"created_at": "2021-11-18T03:47:47Z",
"transaction_hash": "43ed5ce19190822ec080b67c3ccbab36a56bc34102b1a21d3ee690ed3bc23378",
"liquidity_pool_id": "67260c4c1807b262ff851b0a3fe141194936bb0215b2f77447f1df11998eabb9",
"reserves_min": [
{
"asset": "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S",
"min": "1000.0000005"
},
{
"asset": "PHP:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S",
"min": "3000.0000005"
}
],
"shares": "200",
"reserves_received": [
{
"asset": "EURT:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S",
"amount": "993.0000005"
},
{
"asset": "PHP:GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S",
"amount": "2478.0000005"
}
]
},
{
"id": "157639717969326081",
"paging_token": "157639717969326081",
"transaction_successful": true,
"source_account": "GBBWI7TEVQBPEUXKYNGI3GBAH7EHFEREONKK3UK56ZSLJIDIYHQJCVSG",
"type": "change_trust",
"type_i": 6,
"created_at": "2021-08-04T20:01:24Z",
"transaction_hash": "941f2fa2101d1265696a3c7d35e7688cd210324114e96b64a386ab55f65e488f",
"asset_type": "liquidity_pool_shares",
"liquidity_pool_id": "67260c4c1807b262ff851b0a3fe141194936bb0215b2f77447f1df11998eabb9",
"limit": "1000",
"trustor": "GBBWI7TEVQBPEUXKYNGI3GBAH7EHFEREONKK3UK56ZSLJIDIYHQJCVSG"
}
]
}
}
Offers
Offers are statements about how much of an asset an account wants to buy or sell.
GET /offers
Lists 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
sponsor(string; query): an account ID of the sponsor. Every account in the response will either be sponsored by the given account ID or have a sub-entry (trustline, offer, or data entry) which is sponsored by the given account ID.seller(any; query): the account ID of the offer creator.selling_asset_type(string; query): the type for the selling asset. Eithernative,credit_alphanum4, orcredit_alphanum12.selling_asset_issuer(any; query): the Stellar address of the selling asset’s issuer.selling_asset_code(any; query): the code for the selling asset.buying_asset_type(string; query): the type for the buying asset. Eithernative,credit_alphanum4, orcredit_alphanum12.buying_asset_issuer(any; query): the Stellar address of the buying asset’s issuer.buying_asset_code(any; query): the code for the buying asset.cursor(integer; query): a number that points to a specific location in a collection of responses and is pulled from thepaging_tokenvalue of a record.order(string; query): a designation of the order in which records should appear. Options includeasc(ascending) ordesc(descending). If this argument isn’t set, it defaults toasc.limit(integer; query): the maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.
Returns
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
}
},
"_embedded": {
"records": [
{
"_links": {
"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
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/offers{?selling,buying,seller,sponsor,cursor,limit,order}
curl https://rpc.ankr.com/http/stellar_horizon/offers{?selling,buying,seller,sponsor,cursor,limit,order} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/offers?cursor=\u0026limit=3\u0026order=asc\u0026selling_asset_code=USD\u0026selling_asset_issuer=GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX\u0026selling_asset_type=credit_alphanum4"
},
"next": {
"href": "https://rpc.ankr.com/offers?cursor=126423127\u0026limit=3\u0026order=asc\u0026selling_asset_code=USD\u0026selling_asset_issuer=GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX\u0026selling_asset_type=credit_alphanum4"
},
"prev": {
"href": "https://rpc.ankr.com/offers?cursor=71673427\u0026limit=3\u0026order=desc\u0026selling_asset_code=USD\u0026selling_asset_issuer=GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX\u0026selling_asset_type=credit_alphanum4"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/offers/71673427"
},
"offer_maker": {
"href": "https://rpc.ankr.com/accounts/GBJPWEIFX6KO4H52BF3QJDYRCLXB2P3Z3QTKWUGFOOFH5MSRZV4WLRZ7"
}
},
"id": "71673427",
"paging_token": "71673427",
"seller": "GBJPWEIFX6KO4H52BF3QJDYRCLXB2P3Z3QTKWUGFOOFH5MSRZV4WLRZ7",
"selling": {
"asset_type": "credit_alphanum4",
"asset_code": "USD",
"asset_issuer": "GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX"
},
"buying": {
"asset_type": "credit_alphanum4",
"asset_code": "BTC",
"asset_issuer": "GAUTUYY2THLF7SGITDFMXJVYH3LHDSMGEAKSBU267M2K7A3W543CKUEF"
},
"amount": "25.6545775",
"price_r": {
"n": 289696073,
"d": 25654776
},
"price": "11.2920913",
"last_modified_ledger": 26981646,
"last_modified_time": null
}
]
}
}
GET /offers/{offer_id}
Retrieves a particular offer.
The single offer endpoint provides information on a specific offer.
Parameters
offer_id(any; path; required): a unique identifier for this offer.
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
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/offers/{offer_id}
curl https://rpc.ankr.com/http/stellar_horizon/offers/{offer_id} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/offers/165563085"
},
"offer_maker": {
"href": "https://rpc.ankr.com/accounts/GCM4PT6XDZBWOOENDS6FOU22GJQLJPV2GC7VRVII4TFGZBA3ZXNM55SV"
}
},
"id": 165563085,
"paging_token": "165563085",
"seller": "GCM4PT6XDZBWOOENDS6FOU22GJQLJPV2GC7VRVII4TFGZBA3ZXNM55SV",
"selling": {
"asset_type": "credit_alphanum4",
"asset_code": "USD",
"asset_issuer": "GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX"
},
"buying": {
"asset_type": "native"
},
"amount": "26.1075388",
"price_r": {
"n": 1449156725,
"d": 84642346
},
"price": "17.1209423",
"last_modified_ledger": 28412042,
"last_modified_time": null
}
GET /offers/{offer_id}/trades
Retrieves all trades of a particular offer.
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_id(any; path; required): a unique identifier for this offer.cursor(integer; query): a number that points to a specific location in a collection of responses and is pulled from thepaging_tokenvalue of a record.order(string; query): a designation of the order in which records should appear. Options includeasc(ascending) ordesc(descending). If this argument isn’t set, it defaults toasc.limit(integer; query): the maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.
Returns
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"base": {
"href": "string",
"templated": true
},
"counter": {
"href": "string",
"templated": true
},
"operation": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"ledger_close_time": "string",
"offer_id": "string",
"trade_type": "string",
"liquidity_pool_fee_bp": 0,
"base_liquidity_pool_id": "string",
"base_offer_id": "string",
"base_account": "string",
"base_amount": "string",
"base_asset_type": "string",
"base_asset_code": "string",
"base_asset_issuer": "string",
"counter_liquidity_pool_id": "string",
"counter_offer_id": "string",
"counter_account": "string",
"counter_amount": "string",
"counter_asset_type": "string",
"counter_asset_code": "string",
"counter_asset_issuer": "string",
"base_is_seller": true,
"price": {
"n": "string",
"d": "string"
}
}
]
}
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/offers/{offer_id}/trades{?cursor,limit,order}
curl https://rpc.ankr.com/http/stellar_horizon/offers/{offer_id}/trades{?cursor,limit,order} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/offers/104078276/trades?cursor=&limit=3&order=asc"
},
"next": {
"href": "https://rpc.ankr.com/offers/104078276/trades?cursor=107449584845914113-0&limit=3&order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/offers/104078276/trades?cursor=107449468881756161-0&limit=3&order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": ""
},
"base": {
"href": "https://rpc.ankr.com/accounts/GCO7OW5P2PP7WDN6YUDXUUOPAR4ZHJSDDCZTIAQRTRZHKQWV45WUPBWX"
},
"counter": {
"href": "https://rpc.ankr.com/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K"
},
"operation": {
"href": "https://rpc.ankr.com/operations/107449468881756161"
}
},
"id": "107449468881756161-0",
"paging_token": "107449468881756161-0",
"ledger_close_time": "2019-07-26T09:17:02Z",
"offer_id": "104078276",
"base_offer_id": "104078276",
"base_account": "GCO7OW5P2PP7WDN6YUDXUUOPAR4ZHJSDDCZTIAQRTRZHKQWV45WUPBWX",
"base_amount": "4433.2000000",
"base_asset_type": "native",
"counter_offer_id": "4719135487309144065",
"counter_account": "GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K",
"counter_amount": "443.3200000",
"counter_asset_type": "credit_alphanum4",
"counter_asset_code": "BB1",
"counter_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN",
"base_is_seller": true,
"price": {
"n": 1,
"d": 10
}
}
]
}
}
Operations
Operations are objects that represent a desired change to the ledger: payments, offers to exchange currency, changes made to account options, etc. Operations are submitted to the Stellar network grouped in a Transaction.
GET /operations
Lists 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
cursor(integer; query): a number that points to a specific location in a collection of responses and is pulled from thepaging_tokenvalue of a record.order(string; query): a designation of the order in which records should appear. Options includeasc(ascending) ordesc(descending). If this argument isn’t set, it defaults toasc.limit(integer; query): the maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.include_failed(boolean; query): set to true to include failed operations in results. Options includetrueandfalse.join(any; query): set 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
},
"effects": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
},
"succeds": {
"href": "string",
"templated": true
},
"transaction": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"type_i": 0,
"type": "create_account"
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/operations{?cursor,limit,order,include_failed,join}
curl https://rpc.ankr.com/http/stellar_horizon/operations{?cursor,limit,order,include_failed,join} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/operations?cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/operations?cursor=211459450643419137\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/operations?cursor=211459450643419137\u0026limit=1\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/operations/211459450643419137"
},
"transaction": {
"href": "https://rpc.ankr.com/transactions/f6ae066da1fa185c4c610b44499d7263b2cc14e33725c83bd2f0ff2e364be7ba"
},
"effects": {
"href": "https://rpc.ankr.com/operations/211459450643419137/effects"
},
"succeeds": {
"href": "https://rpc.ankr.com/effects?order=desc\u0026cursor=211459450643419137"
},
"precedes": {
"href": "https://rpc.ankr.com/effects?order=asc\u0026cursor=211459450643419137"
}
},
"id": "211459450643419137",
"paging_token": "211459450643419137",
"transaction_successful": true,
"source_account": "GBIAUMQXLF2LHKWCUPWJX7YWSA33DZMTZ42HJCIBE2OBDU23XCEQF6TA",
"type": "manage_buy_offer",
"type_i": 12,
"created_at": "2023-11-29T10:37:29Z",
"transaction_hash": "f6ae066da1fa185c4c610b44499d7263b2cc14e33725c83bd2f0ff2e364be7ba",
"amount": "0.0500000",
"price": "2050.3600000",
"price_r": {
"n": 51259,
"d": 25
},
"buying_asset_type": "credit_alphanum12",
"buying_asset_code": "aeETH",
"buying_asset_issuer": "GALLBRBQHAPW5FOVXXHYWR6J4ZDAQ35BMSNADYGBW25VOUHUYRZM4XIL",
"selling_asset_type": "credit_alphanum4",
"selling_asset_code": "USDC",
"selling_asset_issuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"offer_id": "1413266664"
}
]
}
}
GET /operations/{id}
Retrieves a particular operation.
The single operation endpoint provides information about a specific operation.
Parameters
id(string; path; required): the ID number for this operation.join(any; query): set totransactionsto include the transactions which created each of the operations in the response.
Returns
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
},
"effects": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
},
"succeds": {
"href": "string",
"templated": true
},
"transaction": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"type_i": 0,
"type": "create_account"
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/operations/{id}{?join}
curl https://rpc.ankr.com/http/stellar_horizon/operations/{id}{?join} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/operations/121692259040116737"
},
"transaction": {
"href": "https://rpc.ankr.com/transactions/f92a9648c1084d1de0fd786faac5d5e1637d4127c60841d2366c70d2e7f77b85"
},
"effects": {
"href": "https://rpc.ankr.com/operations/121692259040116737/effects"
},
"succeeds": {
"href": "https://rpc.ankr.com/effects?order=desc\u0026cursor=121692259040116737"
},
"precedes": {
"href": "https://rpc.ankr.com/effects?order=asc\u0026cursor=121692259040116737"
}
},
"id": "121692259040116737",
"paging_token": "121692259040116737",
"transaction_successful": true,
"source_account": "GBDVKE33GVVMBXX73OHIBRP6RAHKHHW2P4PQVV6UNOKQCOXU7GNUM4QI",
"type": "manage_sell_offer",
"type_i": 3,
"created_at": "2020-02-21T20:10:21Z",
"transaction_hash": "f92a9648c1084d1de0fd786faac5d5e1637d4127c60841d2366c70d2e7f77b85",
"amount": "10000.0000000",
"price": "0.0704336",
"price_r": {
"n": 44021,
"d": 625000
},
"buying_asset_type": "credit_alphanum4",
"buying_asset_code": "USD",
"buying_asset_issuer": "GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX",
"selling_asset_type": "native",
"offer_id": "161536436"
}
GET /operations/{id}/effects
Retrieves all effects of a particular operation.
This endpoint returns the effects of a specific operation.
Parameters
id(string; path; required): the ID number for this operation.order(string; query): a designation of the order in which records should appear. Options includeasc(ascending) ordesc(descending). If this argument isn’t set, it defaults toasc.limit(integer; query): the maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.include_failed(boolean; query): set to true to include failed operations in results. Options includetrueandfalse.
Returns
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
}
},
"_embedded": {
"records": [
{
"_links": {
"operation": {
"href": "string",
"templated": true
},
"succeeds": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"account": "string",
"type": "Account Created",
"type_i": 1,
"created_at": "string"
}
]
}
}
Request example
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/operations/{id}/effects{?order,limit,cursor}
curl https://rpc.ankr.com/http/stellar_horizon/operations/{id}/effects{?order,limit,cursor} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/operations/121693057904021505/effects?cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/operations/121693057904021505/effects?cursor=121693057904021505-1\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/operations/121693057904021505/effects?cursor=121693057904021505-1\u0026limit=1\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"operation": {
"href": "https://rpc.ankr.com/operations/121693057904021505"
},
"succeeds": {
"href": "https://rpc.ankr.com/effects?order=desc\u0026cursor=121693057904021505-1"
},
"precedes": {
"href": "https://rpc.ankr.com/effects?order=asc\u0026cursor=121693057904021505-1"
}
},
"id": "0121693057904021505-0000000001",
"paging_token": "121693057904021505-1",
"account": "GALSPNVKGNRJ3VIOQ26QKPZBDCTVJK7XPLSPF3UVZV3JJXCKVCHNSPCK",
"type": "account_credited",
"type_i": 2,
"created_at": "2020-02-21T20:27:30Z",
"asset_type": "credit_alphanum4",
"asset_code": "NODL",
"asset_issuer": "GB2Y3AWXVROM2BHFQKQPTWKIOI3TZEBBD3LTKTVQTKEPXGOBE742NODL",
"amount": "0.0000027"
}
]
}
}
GET /payments
Lists 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
cursor(integer; query): a number that points to a specific location in a collection of responses and is pulled from thepaging_tokenvalue of a record.order(string; query): a designation of the order in which records should appear. Options includeasc(ascending) ordesc(descending). If this argument isn’t set, it defaults toasc.limit(integer; query): the maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.include_failed(boolean; query): set to true to include failed operations in results. Options includetrueandfalse.join(any; query): set totransactionsto include the transactions which created each of the operations in the response.
Returns
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
},
"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
- Standard
- Streaming
curl https://rpc.ankr.com/http/stellar_horizon/payments{?curson,order,limit,include_failed,join}
curl https://rpc.ankr.com/http/stellar_horizon/payments{?curson,order,limit,include_failed,join} \
-H 'Accept: text/event-stream'
Response example
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/payments?cursor=\u0026limit=1\u0026order=asc"
},
"next": {
"href": "https://rpc.ankr.com/payments?cursor=211459450643517441\u0026limit=1\u0026order=asc"
},
"prev": {
"href": "https://rpc.ankr.com/payments?cursor=211459450643517441\u0026limit=1\u0026order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://rpc.ankr.com/operations/211459450643517441"
},
"transaction": {
"href": "https://rpc.ankr.com/transactions/4dc95da8e9ecb3b7e4f33e8d2ab0b817bea718932b793336f7a35b388999168f"
},
"effects": {
"href": "https://rpc.ankr.com/operations/211459450643517441/effects"
},
"succeeds": {
"href": "https://rpc.ankr.com/effects?order=desc\u0026cursor=211459450643517441"
},
"precedes": {
"href": "https://rpc.ankr.com/effects?order=asc\u0026cursor=211459450643517441"
}
},
"id": "211459450643517441",
"paging_token": "211459450643517441",
"transaction_successful": true,
"source_account": "GCV7NQTKV3ZZGC366FYVH2XOSZBOTQIOTHG7JJFJJP2XKCLGEYUZHRRR",
"type": "path_payment_strict_receive",
"type_i": 2,
"created_at": "2023-11-29T10:37:29Z",
"transaction_hash": "4dc95da8e9ecb3b7e4f33e8d2ab0b817bea718932b793336f7a35b388999168f",
"asset_type": "native",
"from": "GCV7NQTKV3ZZGC366FYVH2XOSZBOTQIOTHG7JJFJJP2XKCLGEYUZHRRR",
"to": "GCV7NQTKV3ZZGC366FYVH2XOSZBOTQIOTHG7JJFJJP2XKCLGEYUZHRRR",
"amount": "0.0251621",
"path": [
{
"asset_type": "credit_alphanum4",
"asset_code": "yXLM",
"asset_issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55"
},
{
"asset_type": "credit_alphanum4",
"asset_code": "MKR",
"asset_issuer": "GD67CI2DXVTTVK5NJK3LBBUEZAZKCVZ3MSDUV656XNYRLHJOLZ5LHUMB"
},
{
"asset_type": "credit_alphanum4",
"asset_code": "ETX",
"asset_issuer": "GCEFMSNWXTALXQPRQFIXOMWJHZFDEQJBM26RGEDZUDFMU32JB6WJGRJX"
},
{
"asset_type": "credit_alphanum4",
"asset_code": "SLVR",
"asset_issuer": "GBZVELEQD3WBN3R3VAG64HVBDOZ76ZL6QPLSFGKWPFED33Q3234NSLVR"
}
],
"source_amount": "0.0237050",
"source_max": "0.0251621",
"source_asset_type": "native"
}
]
}
}