LogoLogo
Join DiscordFollow on XBridge FundsLong $BERA
  • Doc Bros v1
    • Overview
    • Key Features
      • Speed & Liquidity is Key
      • Bropetual Markets
      • A Hub for Berachain DeFi
    • Proof-of-Liquidity
      • Reward Vault
    • Power of Points
    • Partners & Integrations
    • Campaigns
      • bro.trade Em Up
  • bullish bros
    • SuperBros NFT
  • Technicals
    • What is Proof-of-Liquidity?
    • One-Click Trading
    • Funding Rates
  • Liquidations & Insurance Fund
  • Vertex Edge Sequencer
  • Fees
  • PnL Settlements
  • Withdrawals
  • Pricing (Oracles)
  • links & resources
    • bro.trade Links
      • Website
      • Trade Bropetuals
      • Discord
      • X (Twitter)
      • Medium
      • Swap on OogaBooga
    • Berachain Links
      • Berachain.com
      • Official Bridge
      • BeraHub
      • Berascan
      • Bera Discord
      • Berachain X (Twitter)
      • Berachain Docs
    • FAQ
  • developer bros
    • API
      • Gateway
        • Executes
          • Place Order
          • Cancel Order
          • Cancel and Place
          • Cancel Product Order
          • Withdraw Colleteral
          • Transfer Quote
          • Liquidate Subaccount
          • Mint LP
          • Burn LP
          • Link Signer
        • Queries
          • All Products
          • Contracts
          • Fee Rates
          • Health Groups
          • Insurance
          • Linked Signer
          • Market Liquidity
          • Market Prices
          • Max Lp Mintable
          • Max Order Size
          • Max Withdrawable
          • Min Deposit Rates
          • Nonces
          • Order
          • Orders
          • Status
          • Subaccount Info
          • Symbols
        • Signing
          • Examples
          • Q A
      • Subscriptions
        • Authentication
        • Streams
        • Events
        • Rate Limits
      • Archive (indexer)
        • Candlesticks
        • Events
        • Funding Rate
        • Interest Funding Payments
        • Linked Signer Rate Limit
        • Liquidation Feed
        • Maker Statistics
        • Market Snapshots
        • Matches
        • Merkle Proofs
        • Oracle Price
        • Orders
        • Perp Prices
        • Product Snapshots
        • Rewards
        • Signatures
        • Subaccounts
        • Summary
        • HONEY Price
      • Trigger
        • Executes
          • Place Order
          • Cancel Orders
          • Cancel Product Orders
        • Queries
          • List Trigger Orders
      • V2
        • Apr
        • Assets
        • Contracts
        • Orderbook
        • Pairs
        • Tickers
        • Trades
      • Rate limits
      • Errors
      • Symbols
      • Depositing
      • Withdrawing (on-chain)
      • Integrate via Smart Contracts
      • Definitions / Formulas
    • On-Chain Contracts
Powered by GitBook
On this page
  • Rate limits
  • Request
  • Request Parameters
  • Response
  • Response Fields
  1. developer bros
  2. API
  3. Archive (indexer)

Orders

PreviousOracle PriceNextPerp Prices

Last updated 2 months ago

Rate limits

  • 480 requests/min or 80 requests/10secs per IP address. (weight = 5)

See more details in .

Request

Query subaccount matched orders, ordered by submission index desc.

POST [ARCHIVE_ENDPOINT]

Body

{
  "orders": {
    "product_ids": [
      1,
      2,
      3,
      4
    ],
    "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b664656661756c740000000000",
    "max_time": 1679728762,
    "limit": 5
  }
}

Query orders by digests.

POST [ARCHIVE_ENDPOINT]

Body

{
  "orders": {
    "digests": [
      "0xf4f7a8767faf0c7f72251a1f9e5da590f708fd9842bf8fcdeacbaa0237958fff",
      "0x0495a88fb3b1c9bed9b643b8e264a391d04cdd48890d81cd7c4006473f28e361"
    ]
  }
}

Request Parameters

Parameter
Type
Required
Description

subaccount

string

Conditional

A bytes32 sent as a hex string; includes the address and the subaccount identifier. Must be provided when querying by subaccount.

product_ids

number[]

No

When provided, only return orders for the specified product IDs; return orders for all products otherwise.

idx

number / string

No

When provided, only return orders with submission_idx <= idx.

max_time

number / string

No

When idx is not provided, max_time (Unix epoch in seconds) can be used to only return orders created <= max_time.

digests

string[]

Conditional

Must be provided when querying by digests. Only return orders matching the specified digests. Note: Cannot specify digests alongside subaccount, product_ids, or max_time.

limit

number

No

Max number of orders to return. Defaults to 100, with a max possible of 500. Note: When querying by digests, limit must be <= total digests provided.

Response

{
    "orders": [
        {
            "digest": "0xf4f7a8767faf0c7f72251a1f9e5da590f708fd9842bf8fcdeacbaa0237958fff",
            "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b664656661756c740000000000",
            "product_id": 4,
            "submission_idx": "563024",
            "last_fill_submission_idx": "563024",
            "amount": "20000000000000000000",
            "price_x18": "1751900000000000000000",
            "base_filled": "2320000000000000000",
            "quote_filled": "-4064898974794958991797",
            "fee": "812974794958991797",
            "expiration": "4611686020107120163",
            "nonce": "1761323164913106944"
        },
        {
            "digest": "0x0495a88fb3b1c9bed9b643b8e264a391d04cdd48890d81cd7c4006473f28e361",
            "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b664656661756c740000000000",
            "product_id": 3,
            "submission_idx": "563019",
            "last_fill_submission_idx": "563019",
            "amount": "-20000000000000000000",
            "price_x18": "1750800000000000000000",
            "base_filled": "-1159999999999999999",
            "quote_filled": "2030293721599999999999",
            "fee": "609278400000000000",
            "expiration": "4611686020107119905",
            "nonce": "1761322893628669952"
        },
        {
            "digest": "0x29078702ad95615f0040eafdccc85cbf92569bf9656be928f9f17c5ccbb52041",
            "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b664656661756c740000000000",
            "product_id": 4,
            "submission_idx": "563018",
            "last_fill_submission_idx": "563018",
            "amount": "-20000000000000000000",
            "price_x18": "1750700000000000000000",
            "base_filled": "-1160000000000000000",
            "quote_filled": "2030380837600000000000",
            "fee": "406162400000000000",
            "expiration": "4611686020107119880",
            "nonce": "1761322865074896896"
        },
    ]
}

Response Fields

Field Name
Description

digest

The unique hash of the order.

subaccount

The subaccount that placed the order.

product_id

The ID of the product the order was executed for.

submission_idx

Used to uniquely identify the blockchain transaction that generated the order. For multi-fill orders, this is the submission_idx of the first fill.

last_fill_submission_idx

For multi-fill orders, this is the submission_idx of the last fill. For single-fill orders, it has the same value as submission_idx.

amount

The original amount of base to buy or sell.

price_x18

The original order price.

base_filled

The total amount of base (e.g., BTC) filled on this order.

quote_filled

The total amount of quote (e.g., HONEY) filled on this order.

fee

The total amount of fee paid on this order.

expiration

The original order expiration.

nonce

The original order nonce.

API Rate limits