API Permissions Guide

Understanding and configuring the correct API permissions is crucial for security and functionality. This guide explains what permissions TradeStaq needs and why.

Overview

API keys allow TradeStaq to interact with your exchange account. Each permission level grants specific capabilities:

PermissionPurposeRequired?
ReadView balances, positions, orders✅ Yes
TradePlace and cancel orders✅ Yes
WithdrawTransfer funds out❌ Never

Note: Never enable withdrawal permissions for TradeStaq API keys. TradeStaq never needs to withdraw funds and enabling this permission is a significant security risk.

Required Permissions by Exchange

Binance

PermissionRequiredPurpose
Enable ReadingView balances, positions
Enable Spot & Margin Trading✅*Execute spot trades
Enable Futures✅*Execute futures trades
Enable WithdrawalsNever enable

*Enable based on your trading type (spot, futures, or both)

ByBit

PermissionRequiredPurpose
ReadView account data
TradeExecute trades
Position (Derivatives)Manage positions
WalletNot needed
WithdrawNever enable

OKX

PermissionRequiredPurpose
ReadView account data
TradeExecute trades
WithdrawNever enable

Bitget

PermissionRequiredPurpose
Read OnlyView account data
TradeExecute trades
TransferNot needed
WithdrawNever enable

KuCoin

PermissionRequiredPurpose
GeneralView account data
TradeExecute trades
TransferNot needed

Hyperliquid

PermissionRequiredPurpose
ReadView positions
TradeExecute trades

IP Whitelisting

Most exchanges support IP whitelisting - restricting API access to specific IP addresses.

Benefits

  • Prevents unauthorized access even if keys are leaked
  • Adds an extra security layer
  • Required by some exchanges for trading permissions

How to Configure

  1. Get TradeStaq server IPs from hello@tradestaq.com
  2. Add these IPs to your exchange's API whitelist
  3. Save and verify the connection works

Note: IP whitelisting is highly recommended but optional. If you have issues, you can temporarily disable it for troubleshooting.

TradeStaq Server IPs

Contact hello@tradestaq.com for the current list of server IPs to whitelist.

Permission Errors

"Insufficient Permissions"

Cause: API key doesn't have required permissions.

Solution:

  1. Log into your exchange
  2. Go to API Management
  3. Edit the API key
  4. Enable missing permissions (Read, Trade)
  5. Save changes
  6. Try reconnecting in TradeStaq

"Read Only Key"

Cause: Only Read permission is enabled.

Solution:

  1. Enable Trade permission on your exchange
  2. For futures, enable Futures/Derivatives permission
  3. Save and reconnect

"IP Not Whitelisted"

Cause: Your API has IP restrictions that don't include TradeStaq servers.

Solution:

  1. Add TradeStaq server IPs to whitelist
  2. Or temporarily disable IP restrictions
  3. Reconnect the exchange

Security Best Practices

API Key Management

  1. One key per service - Don't share keys across platforms
  2. Descriptive labels - Name keys clearly (e.g., "TradeStaq Trading")
  3. Minimum permissions - Only enable what's needed
  4. Regular rotation - Change keys every 90 days
  5. Immediate revocation - Delete compromised keys immediately

Secret Key Storage

  • Never share your secret key with anyone
  • Don't store in plain text files
  • Don't commit to version control
  • Use password managers for storage

Monitoring

  1. Check API logs - Most exchanges show API activity
  2. Set up alerts - Enable email notifications for API usage
  3. Review regularly - Check for unauthorized activity
  4. Monitor balances - Watch for unexpected changes

What TradeStaq Does With Permissions

Read Permission

Used to:

  • Fetch account balances
  • Get open positions
  • Check order status
  • Sync trade history

Trade Permission

Used to:

  • Place market orders
  • Place limit orders
  • Set stop loss/take profit
  • Cancel pending orders
  • Close positions

Note: TradeStaq only executes trades when triggered by your configured signals or bot strategies. No trades are made without your explicit configuration.

Revoking Access

To remove TradeStaq's access to your exchange:

  1. In TradeStaq: Delete the exchange connection
  2. On Exchange: Delete or disable the API key
  3. Verify: Check that no new trades are executed

Note: Always delete API keys on the exchange itself. Deleting the exchange in TradeStaq doesn't revoke the API key.

FAQ

Why doesn't TradeStaq need withdrawal permission?

TradeStaq only needs to trade on your behalf. Withdrawals would move funds out of your exchange - something a trading bot should never do. This is a critical security boundary.

Can I use a key with withdrawal enabled?

Technically yes, but strongly discouraged. If your API key is ever compromised, a key with withdrawal permissions could result in total loss of funds.

What if I need to change permissions later?

Most exchanges allow editing API key permissions. Make changes on the exchange, then click "Sync" in TradeStaq to verify the connection still works.

Are my API credentials stored securely?

Yes. API credentials are encrypted at rest and in transit. They're never logged or exposed in plaintext. See our security documentation for details.