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
  • Overview
  • Limits
  • Query Weights
  • Archive (indexer) Weights
  • Execute Weights
  1. developer bros
  2. API

Rate limits

PreviousTradesNextErrors

Last updated 2 months ago

Overview

  • bro.trade uses a weight-based rate-limiting system across queries and executes. We limit based on IP address, Wallet address, and a global max # of orders per subaccount per market.

  • These limits equally apply to both http requests and Websocket messages.

  • Limits are applied on a 1 minute and 10 seconds basis.

Limits

  • IP addresses have a max weight limit of 2400 per minute or 400 every 10 seconds across both queries and executes.

  • Wallet addresses have a max weight limit of 600 per minute or 100 every 10 seconds applied only to executes.

  • Users can have up to 500 open orders per subaccount per market.

  • Orders have the following additional limits:

    • Place orders (with spot leverage): up to 600 per minute or 100 every 10 seconds across all markets.

    • Place orders (without spot leverage): up to 30 per minute or 5 every 10 seconds across all markets. Note: orders without spot leverage are 20x more expensive to place due to additional health checks needed.

    • Order cancellations: up to 600 per minute or 100 every 10 seconds.

Query Weights

Queries are rate-limited based on IP. The following weights are applied per query:

  • : IP weight = 1

  • : IP weight = 1

  • : IP weight = 2

  • : IP weight = 1

  • : IP weight = 2

  • : IP weight = 10

  • : IP weight = 1

  • : IP weight = 2

  • : IP weight = 5

  • : IP weight = 1

  • : IP weight = 5

  • : IP weight = 5

  • : IP weight = 50

  • : IP weight = 2

  • : IP weight = 5

  • : IP weight = 2

  • : IP weight = 2

  • : IP weight = 2

  • : IP weight = 1

  • : IP Weight = 5

Archive (indexer) Weights

  • Archive (indexer) queries are rate-limited based on IP.

  • IP addresses have a max weight limit of 2400 per minute or 400 every 10 seconds.

The following weights are applied per query:

Execute Weights

Executes are rate-limited based on Wallet address. The following weights are applied per execute:

  • Place order:

    • With spot leverage: Wallet weight = 1

    • Without spot leverage: Wallet weight = 20

  • Cancel orders:

    • When no digests are provided: Wallet weight = 1

    • When digests are provided: Wallet weight = total digests

  • Cancel Product Orders:

    • When no product Ids are provided: Wallet weight = 50

    • When product Ids are provided: Wallet weight = 5 * total product Ids

  • Cancel And Place:

    • The sum of Cancel orders + Place order limits

  • Withdraw Collateral:

    • With spot leverage: Wallet weight = 10

    • Without spot leverage: Wallet weight = 20

  • Liquidate Subaccount: Wallet weight = 20

  • Mint LP:

    • With spot leverage: Wallet weight = 10

    • Without spot leverage: Wallet weight = 20

  • Burn LP: Wallet weight = 10

  • Link Signer: Wallet weight = 50

    • Can only perform a max of 5 link signer requests every 7 days per subaccount.

  • Transfer Quote: Wallet weight = 10

    • Can only transfer to a max of 5 new recipients within 24hrs.

: IP Weight = 5

: IP Weight = 2 + limit / 10; where limit is a query param.

: IP Weight = 2 + limit / 10; where limit is a query param.

: IP Weight = 5

: IP Weight = 2 + limit / 10; where limit is a query param.

: IP Weight = 2

: IP Weight = 5

: IP Weight = 2

: IP Weight = 2

: IP Weight = 10

: IP Weight = 10

: IP Weight = 10

: IP Weight = 2

: IP Weight = 10

: IP Weight = 2

: IP Weight = 2

: IP Weight = 2

: IP Weight = 2 + len(digests) / 10; where digests is a query param.

: IP Weight = 2

: IP Weight = 2

Status
Contracts
Nonces
Order
Orders
Subaccount Info
Market Liquidity
Symbols
All Products
Market Prices
Max Order Size
Max Withdrawable
Max LP Mintable
Health Groups
Linked Signer
Insurance
Fee Rates
Assets
Orderbook
Min Deposit Rates
Orders
Matches
Events
Summary
Candlesticks
Funding Rate
Interest & funding payments
Oracle Price
Perp Prices
Product Snapshots
Market Snapshots
Maker Statistics
Merkle Proofs
Rewards
Referral Code
Liquidation Feed
Linked Signer Rate Limit
Signatures
Subaccounts
HONEY Price