pub const DEFAULT_LIMITS_TOML: &str = "# Bybit API V5 rate limits for brokapi-bybit.\n#\n# Source: the page \"Rate Limit Rules\" of the Bybit documentation (checked 2026-10-23).\n# * Per user (UID) and endpoint, per second: placing, amending, cancelling, cancelling all and the batch methods of\n# category linear 10/s; the reads (/v5/order/realtime, /v5/order/history, /v5/execution/list, /v5/position/list,\n# /v5/account/wallet-balance) 50/s. The demo contour has the default limits and they cannot be raised.\n# * Per IP address: 600 requests in a 5 second window for api.bybit.com. Beyond that HTTP 403 and a ban of 10 minutes.\n# The market data reads have no limit of their own, they spend the address limit.\n# * WebSocket: no more than 500 connections in 5 minutes per IP, no more than 1000 connections per IP for market\n# data. The number of subscriptions of a futures connection is not limited in the documentation.\n#\n# What is NOT verified against a live account: that the demo contour counts the same way, and the headers\n# X-Bapi-Limit-Status that the exchange sends with every answer are not read (the limiter keeps its own count).\n#\n# One bucket per documented endpoint limit, so a flood of placements can never use the budget of cancels, plus one\n# bucket for the address that every request spends. 100 a second with a burst of 100 keeps the address inside 600 in 5\n# seconds even with another program on the same address.\n\n[bybit.buckets.ip]\nrate = 100\nper = \"1s\"\nburst = 100\n\n[bybit.buckets.create]\nrate = 10\nper = \"1s\"\nburst = 10\n\n[bybit.buckets.amend]\nrate = 10\nper = \"1s\"\nburst = 10\n\n[bybit.buckets.cancel]\nrate = 10\nper = \"1s\"\nburst = 10\n\n[bybit.buckets.cancel_all]\nrate = 10\nper = \"1s\"\nburst = 10\n\n[bybit.buckets.trade_read]\nrate = 50\nper = \"1s\"\nburst = 50\n\n[bybit.buckets.account_read]\nrate = 50\nper = \"1s\"\nburst = 50\n\n[bybit.route]\n# \"*\" = any method with no route below (raw() calls). It spends the address limit, so a call is never free.\n\"*\" = [\"ip\"]\nPlaceOrder = [\"ip\", \"create\"]\nPlaceStopOrder = [\"ip\", \"create\"]\nReplaceOrder = [\"ip\", \"amend\"]\nCancelOrder = [\"ip\", \"cancel\"]\nCancelStopOrder = [\"ip\", \"cancel\"]\nCancelAll = [\"ip\", \"cancel_all\"]\nGetOrder = [\"ip\", \"trade_read\"]\nGetOrders = [\"ip\", \"trade_read\"]\nGetOrderHistory = [\"ip\", \"trade_read\"]\nGetExecutions = [\"ip\", \"trade_read\"]\nGetPositions = [\"ip\", \"trade_read\"]\nReconcile = [\"ip\", \"trade_read\"]\nGetWallet = [\"ip\", \"account_read\"]\nGetOrderBook = [\"ip\"]\nGetTickers = [\"ip\"]\nGetLastTrades = [\"ip\"]\nGetCandles = [\"ip\"]\nGetInstruments = [\"ip\"]\nGetServerTime = [\"ip\"]\n\n[bybit.conns]\n# One connection for the public data and one for the private streams of a login. Bybit allows far more, this keeps\n# a runaway loop from reconnecting in a storm.\nmax_conns = 4\nmax_subs_per_conn = 500\nsupports_multiplex = true\n";Expand description
The text of the bundled limits file limits.toml, compiled into the crate.
Parse it with limits_from_toml_str, or take the result directly from default_limits.