This endpoint represents all trades for a given offer.
This endpoint can also be used in streaming mode, making it possible to listen for new trades for the given offer as they occur on the HCNet. If called in streaming mode aurora will start at the earliest known trade 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 trades created since your request time.
GET /offers/{offer_id}/trades{?cursor,limit,order}
Arguments
Name | Notes | Description | Example |
---|---|---|---|
offer_id | required, number | ID of an offer | 323223 |
?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 trades that consumed a given offer. See the trade resource for reference.
curl "https://network.paybito.com/offers/1/trades"
{
"_links" : {
"self" : {
"href" : "https://network.paybito.com/offers/1/trades?cursor=\u0026limit=10\u0026order=asc"
},
"next" : {
"href" : "https://network.paybito.com/offers/1/trades?cursor=63080184680449-0\u0026limit=10\u0026order=asc"
},
"prev" : {
"href" : "https://network.paybito.com/offers/1/trades?cursor=63080184680449-0\u0026limit=10\u0026order=desc"
}
},
"_embedded" : {
"records" : [
{
"_links" : {
"self" : {
"href" : ""
},
"base" : {
"href" : "https://network.paybito.com/accounts/GAJWKTWAE254DNPNDRDAZ5VBSLPMZXXUX7ZZBS2C7K2FAC4PTXC6WJQW"
},
"counter" : {
"href" : "https://network.paybito.com/accounts/GAUQV36N4BPFR4ELDTTIK5TXJLSRSR42XIROTBIK5QOCRTJMNP4A6J2B"
},
"operation" : {
"href" : "https://network.paybito.com/operations/63080184680449"
}
},
"id" : "63080184680449-0",
"paging_token" : "63080184680449-0",
"ledger_close_time" : "2018-12-20T11:53:14Z",
"offer_id" : "1",
"base_account" : "GAJWKTWAE254DNPNDRDAZ5VBSLPMZXXUX7ZZBS2C7K2FAC4PTXC6WJQW",
"base_amount" : "100.0000981",
"base_asset_type" : "credit_alphanum12",
"base_asset_code" : "USDBCH",
"base_asset_issuer" : "GAJWKTWAE254DNPNDRDAZ5VBSLPMZXXUX7ZZBS2C7K2FAC4PTXC6WJQW",
"counter_account" : "GAUQV36N4BPFR4ELDTTIK5TXJLSRSR42XIROTBIK5QOCRTJMNP4A6J2B",
"counter_amount" : "0.9999999",
"counter_asset_type" : "credit_alphanum12",
"counter_asset_code" : "BCHUSD",
"counter_asset_issuer" : "GAUQV36N4BPFR4ELDTTIK5TXJLSRSR42XIROTBIK5QOCRTJMNP4A6J2B",
"base_is_seller" : true,
"price" :{
"n" : 3120367,
"d" : 312037037
}
}
]
}
}
Support Agent
*Powered by HashCash