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. Order Books

object

When Horizon returns information about an order book, it uses the following format:

- ATTRIBUTE -

  • bids object

    The prices and amounts for the buyside of the asset pair.Hide child attributes

    • price_robject

      A precise representation of the bid price of the asset pair.Hide child attributes

      • nnumber

        The numerator.

      • dnumber

        The denominator.

    • price string

      The bid price of the base asset denominated in the counter asset. A number representing the decimal form of price_r.

    • amount string

      The amount of counter asset that the account making this offer is willing to buy at this price.

  • asks object

    The prices and amounts for the sellside of the asset pair.Hide child attributes

    • price_robject

      A precise representation of the ask price of the asset pair.Hide child attributes

      • nnumber

        The numerator.

      • dnumber

        The denominator.

    • price string

      The ask price of the base asset denominated in the counter asset. A number representing the decimal form of price_r.

    • amount string

      The amount of counter asset that the account making this offer is willing to sell at this price.

  • base object

    Details about the base asset. Hide child attributes

    • asset_type string

      The type for the base asset. Either native, credit_alphanum4, or credit_alphanum12.

    • asset_code string

      The code for the base asset.

    • asset_issuer string

      The Stellar address of the base asset’s issuer.

  • counter object

    Details about the counter asset. Hide child attributes

    • asset_type string

      The type for the counter asset. Either native, credit_alphanum4, or credit_alphanum12.

    • asset_code string

      The code for the counter asset.

    • asset_issuer string

      The Stellar address of the counter asset’s issuer.

{
  "bids": [
    {
      "price_r": {
        "n": 6014600,
        "d": 102275119
      },
      "price": "0.0588080",
      "amount": "0.1722469"
    },
    {
      "price_r": {
        "n": 1250000,
        "d": 21831117
      },
      "price": "0.0572577",
      "amount": "0.2991796"
    }
  ],
  "asks": [
    {
      "price_r": {
        "n": 118163,
        "d": 2000000
      },
      "price": "0.0590815",
      "amount": "8057.2710223"
    },
    {
      "price_r": {
        "n": 60627,
        "d": 1000000
      },
      "price": "0.0606270",
      "amount": "10000.0000000"
    }
  ],
  "base": {
    "asset_type": "native"
  },
  "counter": {
    "asset_type": "credit_alphanum4",
    "asset_code": "USD",
    "asset_issuer": "GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX"
  }
}
PreviousIndexNextSingle

Last updated 4 years ago

Was this helpful?