ByBit

Track your Bybit balance and open positions right in chat

Connect ByBit to the AI agent: wallet balance, open positions, orders, candles and tickers. The agent reports PnL and breaks trades down by symbol.

How the agent works with ByBit

The agent works with the unified v5 Bybit API: market tickers and candles for the pairs you care about, wallet balance, open positions with their current PnL, active orders and the executed trade history. From that it calculates the realised result for a period broken down by symbol and trade side, the change in balance between dates and the list of orders still sitting unfilled — all for the account the connected key belongs to.

In Bybit almost every request has to name a market category: spot, perpetual contracts and options are separate ledgers, and a position in one is invisible in another. The agent queries the categories separately and never merges them into a single total. One more subtlety: the PnL on an open position is a mark-to-market figure that moves every second, so in reports the agent keeps it apart from the realised result of actual trades.

Reading matters more here than writing. Balances, positions, orders, history and scheduled summaries are assembled by reading alone: the connector moves no funds and asks for no withdrawal rights. Trading rights appear only if you granted them to the key on the exchange side; without them the agent counts and shows, but places and cancels nothing, and an attempt comes back as a refusal from the exchange rather than silence.

The connection runs on an API Key and Secret pair: every request is signed with HMAC-SHA256 together with a timestamp, so the agent keeps its clock in step with the exchange — otherwise the signature is rejected as stale. Bybit hands over trade history in date windows and cursor pages, so a long period is walked in parts and added up by the agent itself. It holds the request rate on its own, and an expired or revoked key is reported directly instead of an empty table.

Integration scenarios

Balance and open positions

The agent shows your wallet balance and every open position with its current PnL in a single answer, without you flipping between exchange tabs.

Trades and realised PnL

The agent collects executed trades for a period and breaks the realised result down by symbol and by trade side.

Tickers and candles

The agent pulls tickers and candles for the pairs you care about and works out how the price moved over the period you choose.

Scheduled summary

The agent sends a summary on schedule: prices for your pairs, the change in balance and the orders still sitting unfilled.

Spot and futures kept apart

The agent queries spot, perpetuals and options as separate categories and shows balance and positions for each, never rolling different ledgers into one total.

Check the key before a report

The agent runs a test ticker request and tells you whether the key is alive: expired after 90 days, revoked or a rejected signature — a reason, not an empty table.

ByBit examples

ByBit
Frozen chats — click a question
Покажи открытые позиции

Три позиции открыто, суммарный нереализованный PnL +1 842 $.

  • BTCUSDT, long: +2 310 $
  • ETHUSDT, long: +415 $
  • SOLUSDT, short: −883 $

Баланс кошелька — 24 760 $. Ещё висит неисполненный лимитный ордер по ETHUSDT.

Открытые позиции

How to connect

Before you connect

  • A Bybit account that actually holds the funds
  • A static IP address if the key must not expire after 90 days
  1. 1

    Open “API Management” in your Bybit account

    Sign in with the account that holds the funds and open www.bybit.com/app/user/api-management. A sub-account key sees only that sub-account's balance.

  2. 2

    Create a “System-generated” key

    Click “Create New Key” and pick “System-generated API Keys”. A self-generated RSA key will not work: requests are signed with HMAC-SHA256.

  3. 3

    Set the key permissions to Read-Only

    Set the key permissions to “Read-Only” — enough for balances, positions, orders, candles and trade history. The Wallet withdrawal group is not needed.

  4. 4

    Without a static IP keep No IP restriction

    A key with no IP whitelist expires in 90 days; one bound to addresses does not. Without a static IP leave “No IP restriction” and set a reminder.

FAQ

With an API key: in your Bybit account open API Management, then Create New Key, and pick the System-generated API Keys type — an RSA key will not work. Paste the API Key and Secret; the API address can stay at its default. Read-Only level is enough for balance, positions and history.

Market tickers and candles, wallet balance, open positions, orders and the executed trade history of whichever account the key belongs to.

Not by default: a Read-Only key covers all the analytics, and the connector never needs withdrawal rights at all. Trading permissions are granted only by your own decision on the exchange side.

Without an IP allowlist a Bybit key expires after 90 days: the API starts refusing requests and the key has to be reissued under API Management.

Related integrations

Category
Banks
Connection
API key
Documentation
ByBit

Connect ByBit

Connecting takes a couple of minutes, and your data stays in your own systems.

Connect