Connect Bybit

How to connect Bybit with a read-only API key, what Viktury imports from it, and how to upload a CSV instead.

  • BybitAutomatic read-only syncCSV import

Bybit connects to Viktury with a read-only API key, or with a CSV export of your spot trades. The key is the fuller of the two: it brings in your perpetuals with their funding and your deposits and withdrawals, and it keeps syncing on its own. It can read your history and nothing else, so it cannot trade and it cannot withdraw.

The Bybit trading journal page shows what Viktury builds from it: round trips matched from open to close, with fees and funding on every trade and R-multiples on every trade you give a stop.

What you need

A read-only key from bybit.com, on a Unified Trading Account. Make sure you are on bybit.com and not bybit.eu, because the two sites have separate accounts and separate keys. If your account is still a classic account, upgrade it to a Unified Trading Account in Bybit first. Viktury tells you when a key belongs to a classic account.

Create the key

  1. Sign in at bybit.com and open API from your profile menu.
  2. Choose Create New Key, then System-generated API Keys.
  3. Under "API Key Usage" choose "API Transaction", and under "API Key Permissions" choose "Read-Only". Bind the key to our IP while you are here (see below).
  4. Tick every box in the permissions table: "Trade" under Unified Trading, then "Account Transfer", "Subaccount Transfer" and "Bybit Convert, Conversion History" under Assets.
  5. Click Submit and complete the security check. Copy the API Key and the API Secret. Bybit shows the secret only once, so paste both into the Add account form straight away.

Bind the key to our IP

The Add account form shows an IP address. On the key screen, choose "Only IPs with permissions granted are allowed to access the OpenAPI" and add that address. Bybit expires a key with no IP restriction after three months, and a bound key does not expire.

What we import

  • Spot trades.
  • USDT and USDC perpetuals, each trade with its own fees and funding. A USDC perpetual settles every 8 hours, and those settlements add up into the one trade.
  • Crypto deposits and withdrawals, and transfers between your Bybit wallets.
  • Converts.
  • Bonuses, coupons, airdrops and other rewards.

The first sync reads up to two years of history. After that, each sync reads only what is new.

Inverse contracts and options are not turned into trades yet. Their cash is still counted, so your balances stay right.

Bybit does not let a read-only key see Earn balances. If your account has used Earn, the account card says so and does not show balances for it, because they could be missing the coins held in Earn. Your trades and transfers still import.

If we find activity we cannot name yet, the account card says some activity could not be imported, and your balances may differ until it can.

Import from a CSV instead

If you would rather not create a key, a CSV brings in your spot trades. Bybit exports are made in a desktop browser.

  1. Open Orders, then Unified Trading Order, and go to the Spot Trade History tab.
  2. Click Export, pick a range of up to 6 months and click Export Now. Repeat it for older periods.
  3. Download the file when it is ready (it can take a while) and keep it as Bybit produced it. Re-saving it through a spreadsheet app can change the date format or column order.
  4. On the Add account screen, choose Bybit, open the Upload CSV tab and select the file. Viktury shows you a preview, with duplicates flagged, before anything is saved.

To bring in newer trades later, export the new range and upload it again: the duplicate check keeps overlapping rows from counting twice.

A CSV account cannot be switched to an API key. To use the key, add it as a new account.

Troubleshooting

  • The key is rejected. Check that it came from bybit.com, that you copied the full key and secret, and that it has not been deleted or expired on Bybit.
  • Sync stopped after about three months. The key had no IP restriction. Create a new key and add the IP shown in the form.
  • Columns look misread. Make sure the CSV is the raw Bybit export and not a re-saved spreadsheet file.
  • Everything shows as duplicate. That range is already imported. Upload only the newer trades you are missing.