LogoLogo
  • Welcome
  • Where to Start
    • Introduction
    • list of Operations
    • Bantu Stack
  • Tutorials
    • Create Account
    • Send and Receive Payments
    • Follow Received Payments
    • Securing Web-based Projects
  • Issue Assets
    • Overview
    • Anatomy of an Asset
    • Issue an Asset
    • Publish Information About an Asset
    • Control Access to an Asset
  • Building Apps
    • Overview
    • Project Setup
    • Key Management Basics
    • Create a Basic Wallet
    • Make XBN Payments
    • Handle Custom Assets
  • Run a Core Node
    • index
    • running-node
    • network-upgrades
    • tier-1-orgs
    • installation
    • prerequisites
    • configuring
    • publishing history archives
    • commands
    • monitoring
  • Run API Server
    • prerequisites
    • quickstart
    • index
    • installing
    • monitoring
    • Running
    • configuring
  • Software and SDKs
    • index
  • Glossary
    • scp
    • Claimable Balance
    • XDR
    • Assets
    • BUDS
    • Inflation
    • Miscellaneous Core Objects
    • Testnet
    • Accounts
    • Network Passphrase
    • Ledger
    • Versioning
    • Sponsored Reserves
    • Operations
    • Decentralized Exchange
    • Fees
    • XBN Supply
    • Fee Bumps
    • Channels
    • Transactions
    • Minimum Balance
    • Multisig
  • Docs
    • Index
  • API
    • Introduction
      • Index
      • Response Format
      • Streaming
      • Rate Limiting
      • XDR
      • Pagination
        • Index
        • Page Arguments
    • Resources
      • Untitled
      • Overview
      • Ledgers
        • index
        • Object
        • Single
        • Transactions
        • Operations
        • Payments
        • Effects
        • List
      • Transactions
        • Index
        • Object
        • Single
        • Operations
        • Effects
        • List
      • Operations
        • Index
        • Object
          • Index
          • Create Account
          • Payment
          • Path Payment Strict Send
          • Path Payment Strict Receive
          • Sell Offer
          • Buy Offer
          • Passive Sell Offer
          • Set Options
          • Change Trust
          • Allow Trust
          • Account Merge
          • Manage Data
          • Bump Sequence
          • Create Claimable Balance
          • Claim Claimable Balance
          • Begin Sponsoring Future Reserves
          • End Sponsoring Future Reserves
          • Revoke Sponsorship
        • Single
        • Effects
        • List
        • List Payments
      • Effects
        • Index
        • Types
        • List
      • Accounts
        • Index
        • Object
        • Transactions
        • List
        • Single
        • Operations
        • Payments
        • Effects
        • Offers
        • Trades
        • Data
      • Offers
        • Index
        • Object
        • Single
        • List
      • Trades
        • Index
        • Object
        • List
      • Assets
        • Index
        • Object
        • List
      • Claimable Balances
        • Index
        • Object
        • Single
        • List
    • Aggregations
      • Index
      • Order Books
        • Index
        • object
        • Single
      • Paths
        • Index
        • Object
        • Strict Receive
        • Strict Send
      • Trade Aggregations
        • Index
        • Object
        • List
      • Fee Stats
        • Index
        • Object
        • Single
    • Errors
      • Index
      • Response
      • HTTP Status Codes
        • Index
        • Standard
        • Expansion Specific
          • Index
          • Transaction Failed
          • Transaction Malformed
          • Before History
          • Stale History
          • Timeout
      • Result Codes
        • Index
        • Transactions
        • Operations
        • Operation Specific
          • Index
          • Create Account
          • Payment
          • Path Payment Strict Receive
          • Path Payment Strict Send
          • Manage Sell Offer
          • Manage Buy Offer
          • Create Passive Sell Offer
          • Set Options
          • Change Trust
          • Allow Trust
          • Account Merge
          • Manage Data
          • Bump Sequence
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. Aggregations
  3. Trade Aggregations

Object

When Horizon returns information about a trade aggregation, it uses the following format:

- ATTRIBUTE -

  • timestamp string

    Start time for this trade aggregation. Represented as milliseconds since epoch.

  • trade_count integer

    Total number of trades aggregated.

  • base_volume string

    Total volume of base asset.

  • counter_volume string

    Total volume of counter asset.

  • avg string

    Weighted average price of counter asset in terms of base asset.

  • high string

    The highest price for this time period.

  • high_r object

    The highest price for this time period as a rational number.Hide child attributes

    • n number

      The numerator.

    • d number

      The denominator.

  • low string

    The lowest price for this time period.

  • low_robject

    The lowest price for this time period as a rational number.Hide child attributes

    • n number

      The numerator.

    • p number

      The denominator.

  • open string

    The price as seen on first trade aggregated.

  • open_r object

    The price as seen on first trade aggregated as a rational number. Hide child attributes

    • n number

      The numerator.

    • p number

      The denominator.

  • close string

    The price as seen on last trade aggregated.

  • close_r object

    The price as seen on last trade aggregated as a rational number. Hide child attributes

    • n number

      The numerator.

    • p number

      The denominator.

{
  "_links": {
    "self": {
      "href": "https://expansion-testnet.bantu.network/trade_aggregations?base_asset_type=native\u0026counter_asset_code=NGNT\u0026counter_asset_issuer=GAWODAROMJ33V5YDFY3NPYTHVYQG7MJXVJ2ND3AOGIHYRWINES6ACCPD\u0026counter_asset_type=credit_alphanum4\u0026limit=200\u0026order=asc\u0026resolution=3600000\u0026start_time=1582156800000\u0026end_time=1582178400000"
    },
    "next": {
      "href": "https://expansion-testnet.bantu.network/trade_aggregations?base_asset_type=native\u0026counter_asset_code=NGNT\u0026counter_asset_issuer=GAWODAROMJ33V5YDFY3NPYTHVYQG7MJXVJ2ND3AOGIHYRWINES6ACCPD\u0026counter_asset_type=credit_alphanum4\u0026end_time=1582178400000\u0026limit=200\u0026order=asc\u0026resolution=3600000\u0026start_time=1582178400000"
    },
    "prev": {
      "href": ""
    }
  },
  "_embedded": {
    "records": [
      {
        "timestamp": 1582156800000,
        "trade_count": 9,
        "base_volume": "3487.4699458",
        "counter_volume": "88675.3982178",
        "avg": "25.4268566",
        "high": "25.7603393",
        "high_r": {
          "N": 257603393,
          "D": 10000000
        },
        "low": "25.3804530",
        "low_r": {
          "N": 25380453,
          "D": 1000000
        },
        "open": "25.3990186",
        "open_r": {
          "N": 2500000,
          "D": 98429
        },
        "close": "25.7090558",
        "close_r": {
          "N": 1250000,
          "D": 48621
        }
      },
      {
        "timestamp": 1582160400000,
        "trade_count": 1,
        "base_volume": "0.1058787",
        "counter_volume": "2.7155348",
        "avg": "25.6476024",
        "high": "25.6476019",
        "high_r": {
          "N": 100000,
          "D": 3899
        },
        "low": "25.6476019",
        "low_r": {
          "N": 100000,
          "D": 3899
        },
        "open": "25.6476019",
        "open_r": {
          "N": 100000,
          "D": 3899
        },
        "close": "25.6476019",
        "close_r": {
          "N": 100000,
          "D": 3899
        }
      },
      {
        "timestamp": 1582164000000,
        "trade_count": 15,
        "base_volume": "3992.1321821",
        "counter_volume": "99702.0620798",
        "avg": "24.9746395",
        "high": "25.6764460",
        "high_r": {
          "N": 5000000,
          "D": 194731
        },
        "low": "24.9291379",
        "low_r": {
          "N": 249291379,
          "D": 10000000
        },
        "open": "25.6764460",
        "open_r": {
          "N": 5000000,
          "D": 194731
        },
        "close": "25.0055050",
        "close_r": {
          "N": 5001101,
          "D": 200000
        }
      },
      {
        "timestamp": 1582167600000,
        "trade_count": 4,
        "base_volume": "278.4950271",
        "counter_volume": "7047.6740325",
        "avg": "25.3062832",
        "high": "25.3844475",
        "high_r": {
          "N": 5000000,
          "D": 196971
        },
        "low": "25.2923181",
        "low_r": {
          "N": 252923181,
          "D": 10000000
        },
        "open": "25.2923181",
        "open_r": {
          "N": 252923181,
          "D": 10000000
        },
        "close": "25.3844475",
        "close_r": {
          "N": 5000000,
          "D": 196971
        }
      },
      {
        "timestamp": 1582174800000,
        "trade_count": 1,
        "base_volume": "9.9379734",
        "counter_volume": "252.7685174",
        "avg": "25.4346140",
        "high": "25.4346140",
        "high_r": {
          "N": 254346140,
          "D": 10000000
        },
        "low": "25.4346140",
        "low_r": {
          "N": 254346140,
          "D": 10000000
        },
        "open": "25.4346140",
        "open_r": {
          "N": 254346140,
          "D": 10000000
        },
        "close": "25.4346140",
        "close_r": {
          "N": 254346140,
          "D": 10000000
        }
      }
    ]
  }
}
PreviousIndexNextList

Last updated 4 years ago

Was this helpful?