Connecting ByBit

This guide walks you through connecting your ByBit account to TradeStaq for futures trading.

Prerequisites

Before connecting ByBit:

  • A verified ByBit account
  • Unified Trading Account (UTA) enabled
  • API key with trading permissions

Note: ByBit's Unified Trading Account combines spot, derivatives, and options into one margin pool. If you haven't upgraded, go to ByBit → Account → Upgrade to Unified Account.

Creating API Keys on ByBit

Log into ByBit

Go to bybit.com and log into your account.

Navigate to API Management

  1. Click your profile icon in the top-right
  2. Select API
  3. Click Create New Key

Select API Key Type

Choose System-generated API Keys (recommended for security).

Configure Key Settings

  1. Name: TradeStaq Trading Bot
  2. Key Permissions:
    • ✅ Read-Write
  3. API Transaction:
    • ✅ Trade
    • ✅ Position (Derivatives)

Note: Do not enable Wallet or Withdraw permissions. TradeStaq doesn't need these.

Set IP Restrictions (Recommended)

  1. Enable Bind IP addresses
  2. Add TradeStaq server IPs (contact support for list)
  3. Leave blank for unrestricted access (less secure)

Complete Verification

  1. Complete 2FA verification
  2. Enter your email/SMS verification code
  3. Click Confirm

Save Your Credentials

Copy and store securely:

  • API Key
  • API Secret

Note: The API Secret is shown only once. Store it securely immediately.

Adding ByBit to TradeStaq

Open Exchange Wizard

  1. Navigate to Dashboard → Exchanges
  2. Click Add Exchange

Select ByBit

Choose ByBit from the exchange list.

Select Exchange Type

TypeDescription
FuturesTrade USDT perpetual contracts
Paper TradingSimulated trading with virtual funds

Enter API Credentials

For live trading:

  • API Key: Your ByBit API key
  • API Secret: Your ByBit secret key

Configure Settings

  • Exchange Name: Descriptive name (e.g., "ByBit Main")
  • Default Leverage: Your preferred leverage setting

Review and Create

Review settings and click Create Exchange.

ByBit-Specific Configuration

Unified Trading Account (UTA)

ByBit's UTA provides:

  • Combined margin across products
  • Portfolio margin mode option
  • Cross-asset collateral

Note: TradeStaq is optimized for UTA. Legacy accounts may have limited functionality.

Position Mode

ByBit supports two position modes:

ModeDescriptionRecommendation
One-WaySingle position per symbolSimple strategies
HedgeIndependent long/shortComplex strategies

To change position mode on ByBit:

  1. Go to Derivatives trading page
  2. Click the gear icon → Position Mode
  3. Select Hedge Mode (recommended)

Margin Mode

ModeDescriptionRisk
CrossShared margin poolLower liquidation risk
IsolatedSeparate margin per positionControlled risk

Common Issues

"API Key Invalid"

  • Verify the key is correct
  • Check the key hasn't expired or been deleted
  • Ensure Read-Write permission is enabled

"IP Not Allowed"

  • Add TradeStaq IPs to your API whitelist
  • Or remove IP restrictions temporarily for testing

"Insufficient Balance"

  • Transfer funds to your Unified Account
  • Ensure you have USDT for margin

"Permission Denied"

  • Check Trade permission is enabled
  • Verify Position (Derivatives) is enabled

ByBit Rate Limits

ByBit has API rate limits:

Endpoint TypeLimit
Order placement10 req/sec
Order query50 req/sec
Position query50 req/sec

Note: TradeStaq automatically handles rate limiting. If you hit limits, try reducing signal frequency.

Security Best Practices

  1. Enable 2FA on your ByBit account
  2. Use IP whitelisting for API keys
  3. Set API expiration (optional on ByBit)
  4. Monitor API activity in ByBit's API logs
  5. Don't share credentials with anyone

Next Steps


Start Trading

Ready to automate your trading on Bybit? Explore available trading pairs and strategies: