Transactions For Account

Transactions for Account

This endpoint represents successful transactions that affected a given account. This endpoint can also be used in streaming mode so it is possible to use it to listen for new transactions that affect a given account as they get made in the HCNet. If called in streaming mode will start at the earliest known transaction unless a cursor is set. In that case it will start from the cursor. You can also set cursor value to now to only stream transaction created since your request time.

Request:-

GET /accounts/{account_id}/transactions{?cursor,limit,order}

Arguments

Name Notes Description Example
account_id required, string ID of an account GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ
?cursor optional, any, default null A paging token, specifying where to start returning records from. When streaming this can be set to nowto stream object created since your request time. 12884905984
?order optional, string, default asc The order in which to return rows, “asc” or “desc”. asc
?limit optional, number, default: 10 Maximum number of records to return. 200

Response

This endpoint responds with a list of transactions that changed a given account’s state. See transaction resource for reference.

Example Streaming Event

{

"_links" : {

"account" : {

"href" : "/accounts/GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K"

},

"effects" : {

"href" : "/transactions/fa78cb43d72171fdb2c6376be12d57daa787b1fa1a9fdd0e9453e1f41ee5f15a/effects{?cursor,limit,order}",

"templated" : true

},

"ledger" : {

"href" : "/ledgers/146970"

},

"operations" : {

"href" : "/transactions/fa78cb43d72171fdb2c6376be12d57daa787b1fa1a9fdd0e9453e1f41ee5f15a/operations{?cursor,limit,order}",

"templated" : true

},

"precedes" : {

"href" : "/transactions?cursor=631231343497216\u0026order=asc"

},

"self" : {

"href" : "/transactions/fa78cb43d72171fdb2c6376be12d57daa787b1fa1a9fdd0e9453e1f41ee5f15a"

},

"succeeds" : {

"href" : "/transactions?cursor=631231343497216\u0026order=desc"

},

"id" : "fa78cb43d72171fdb2c6376be12d57daa787b1fa1a9fdd0e9453e1f41ee5f15a",

"paging_token" : "631231343497216",

"hash" : "fa78cb43d72171fdb2c6376be12d57daa787b1fa1a9fdd0e9453e1f41ee5f15a",

"ledger" : 146970,

"created_at" : "2015-09-24T10:07:09Z",

"account" : "GBS43BF24ENNS3KPACUZVKK2VYPOZVBQO2CISGZ777RYGOPYC2FT6S3K",

"account_sequence" : 279172874343,

"max_fee" : 0,

"fee_paid" : 0,

"operation_count" : 1,

"envelope_xdr" : "AAAAAGXNhLrhGtltTwCpmqlarh7s1DB2hIkbP//jgzn4Fos/AAAACgAAAEEAAABnAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAA2ddmTOFAgr21Crs2RXRGLhiAKxicZb/IERyEZL/Y2kUAAAAXSHboAAAAAAAAAAAB+BaLPwAAAECDEEZmzbgBr5fc3mfJsCjWPDtL6H8/vf16me121CC09ONyWJZnw0PUvp4qusmRwC6ZKfLDdk8F3Rq41s+yOgQD",

"result_xdr" : "AAAAAAAAAAoAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=",

"result_meta_xdr" : "AAAAAAAAAAEAAAACAAAAAAACPhoAAAAAAAAAANnXZkzhQIK9tQq7NkV0Ri4YgCsYnGW/yBEchGS/2NpFAAAAF0h26AAAAj4aAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAQACPhoAAAAAAAAAAGXNhLrhGtltTwCpmqlarh7s1DB2hIkbP//jgzn4Fos/AABT8kS2c/oAAABBAAAAZwAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAA"

}

curl "https://network.paybito.com/accounts/GB55ZCH6WXZLJRUP3J36NHZSMIPNW24LZNGAOOLMFTJTIRZCCSUTY7XW/transactions?limit=1"

{

"_embedded" : {

"records" : [

{

"_links" : {

"account" : {

"href" : "https://network.paybito.com/transactions/6558ca87a30140492eaa8a88572d45fb2728ebbc1eccf48f2dc6ddfe8cae2d79"

},

"effects" : {

"href" : "https://network.paybito.com/transactions/6558ca87a30140492eaa8a88572d45fb2728ebbc1eccf48f2dc6ddfe8cae2d79/effects{?cursor,limit,order}",

"templated" : true

},

"ledger" : {

"href" : "https://network.paybito.com/ledgers/10986"

},

"operations" : {

"href" : "https://network.paybito.com/transactions/6558ca87a30140492eaa8a88572d45fb2728ebbc1eccf48f2dc6ddfe8cae2d79/operations{?cursor,limit,order}",

"templated" : true

},

"precedes" : {

"href" : "https://network.paybito.com/transactions?order=asc\u0026cursor=47184510717952"

},

"self" : {

"href" : "https://network.paybito.com/transactions/6558ca87a30140492eaa8a88572d45fb2728ebbc1eccf48f2dc6ddfe8cae2d79"

},

"succeeds" : {

"href" : "https://network.paybito.com/transactions?order=desc\u0026cursor=47184510717952"

},

"id" : "6558ca87a30140492eaa8a88572d45fb2728ebbc1eccf48f2dc6ddfe8cae2d79",

"paging_token" : "47184510717952",

"hash" : "6558ca87a30140492eaa8a88572d45fb2728ebbc1eccf48f2dc6ddfe8cae2d79",

"ledger" : 10986,

"created_at" : "2018-12-20T06:44:24Z",

"source_account" : "GBXVKIPRDNPTXA6R6OREEY3GDFDUUR6MTY7XKBO62QVXRG4ZQBAMWMEO",

"source_account_sequence" : 1,

"max_fee" : 0,

"fee_paid" : 100,

"operation_count" : 1,

"envelope_xdr" : "AAAAAG9VIfEbXzuD0fOiQmNmGUdKR8yeP3UF3tQreJuZgEDLAAAAZAAAAAAAAAABAAAAAAAAAAEAAAAJQ3JlYXRlQWNjAAAAAAAAAQAAAAAAAAAAAAAAAHvciP618rTGj9p35p8yYh7ba4vLTAc5bCzTNEciFKk8AAAA6NSlEAAAAAAAAAAAAZmAQMsAAABA0X0pg4TCpmBYgW8w5Q7k9+zwf434OXcz/esDhij+z3uTvZs1NBZC/zXgyPf13b/PbpEYPurXTw1k/SrCBE+GDg==",

"result_xdr" : "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=",

"result_meta_xdr" : "AAAAAQAAAAAAAAABAAAAAgAAAAAAACrqAAAAAAAAAAB73Ij+tfK0xo/ad+afMmIe22uLy0wHOWws0zRHIhSpPAAAAOjUpRAAAAAq6gAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAACrqAAAAAAAAAABvVSHxG187g9HzokJjZhlHSkfMnj91Bd7UK3ibmYBAyw3gtcrSvu+cAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA=="

}

]

},

"_links" : {

"next" : {

"href" : "https://network.paybito.com/accounts/GB55ZCH6WXZLJRUP3J36NHZSMIPNW24LZNGAOOLMFTJTIRZCCSUTY7XW/transactions?cursor=47184510717952\u0026limit=1\u0026order=asc"

},

"prev" : {

"href" : "https://network.paybito.com/accounts/GB55ZCH6WXZLJRUP3J36NHZSMIPNW24LZNGAOOLMFTJTIRZCCSUTY7XW/transactions?cursor=47184510717952\u0026limit=1\u0026order=desc"

},

"self" : {

"href" : "https://network.paybito.com/accounts/GB55ZCH6WXZLJRUP3J36NHZSMIPNW24LZNGAOOLMFTJTIRZCCSUTY7XW/transactions?cursor=\u0026limit=1\u0026order=asc"

}

}

}