Trades for Account  [Go SDK]

This endpoint represents all trades that affect a given account.

This endpoint can also be used in streaming mode, making it possible to listen for new trades that affect the given account as they occur on the DigitalBits network. If called in streaming mode Frontier 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 /accounts/{account_id}/trades{?cursor,limit,order}


name notes description example
account_id required, string ID of an account GDFOHLMYCXVZD2CDXZLMW6W6TMU4YO27XFF2IBAFAV66MSTPDDSK2LAY
?cursor optional, any, default null A paging token, specifying where to start returning records from. When streaming this can be set to now to stream object created since your request time. 1623820974
?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

curl Example Request

curl ""

JavaScript Example Request

var DigitalBitsSdk = require('xdb-digitalbits-sdk');
var server = new DigitalBitsSdk.Server('');

  .then(function (accountResult) {
  .catch(function (err) {


This endpoint responds with a list of trades that changed a given account’s state. See the trade resource for reference.

Example Response

  "records": [
      "_links": {
        "self": {
          "href": ""
        "base": {
          "href": ""
        "counter": {
          "href": ""
        "operation": {
          "href": ""
      "id": "4185647493419009-0",
      "paging_token": "4185647493419009-0",
      "ledger_close_time": "2021-06-17T11:54:15Z",
      "offer_id": "7",
      "base_offer_id": "4615871665920806913",
      "base_amount": "1.0000000",
      "base_asset_type": "native",
      "counter_offer_id": "7",
      "counter_amount": "1.0000000",
      "counter_asset_type": "credit_alphanum4",
      "counter_asset_code": "USD",
      "base_is_seller": false,
      "price": {
        "n": 1,
        "d": 1

Possible Errors

  • The standard errors.
  • not_found: A not_found error will be returned if there is no account whose ID matches the account_id argument.

Edit this doc in GitHub


Stay up to date on the latest happenings at DigitalBits. Get the latest news.