OKX Perpetual Futures Setup
Connect your OKX Futures account to SignalBee for automated perpetual contract trading. This guide walks you through creating API keys with OKX's three-value authentication system and configuring your unified account for automated signals.
Important: OKX requires three values for API authentication: API Key, Secret Key, AND Passphrase. You create the Passphrase yourself during API key setup—save all three immediately.
Prerequisites
Before you begin, make sure you have:
- Verified OKX account - Identity verification (KYC) completed
- 2FA enabled on OKX - Required for API key creation
- SignalBee account - Ready to connect an exchange
- Password manager - For storing your THREE API credentials securely
Good News: Unlike some exchanges, OKX uses a Unified Account system. You don't need to activate a separate Futures account or transfer funds between wallets—your balance is available for all trading types automatically.
About OKX Futures
OKX is a major global cryptocurrency exchange offering comprehensive perpetual contract trading:
| Feature | Details |
|---|---|
| Contract Types | USDT-margined, USDC-margined, and Coin-margined perpetual contracts |
| Leverage | Up to 125x (varies by symbol) |
| Order Types | Market, Limit, Stop-Loss, Take-Profit (full support) |
| Position Modes | One-way AND Hedge (both fully supported) |
| Margin Types | Cross (shared) or Isolated (per position) |
| Funding Rate | Every 8 hours |
| Account Type | Unified Account (single balance for Spot + Futures + Options) |
Order Type Support
SignalBee supports all OKX Futures order types:
| Order Type | Supported | OKX API Type | Description |
|---|---|---|---|
| Market | Yes | market | Immediate execution at current price |
| Limit | Yes | limit | Execute at specified price or better |
| Stop-Loss | Yes | conditional | Market order when stop price is reached |
| Stop-Loss Limit | Yes | conditional | Limit order when stop price is reached |
| Take-Profit | Yes | conditional | Market order when take-profit price is reached |
| Take-Profit Limit | Yes | conditional | Limit order when take-profit price is reached |
Note: OKX provides full stop-loss and take-profit support, unlike some other exchanges. Your signal provider's stop-loss orders will work natively on OKX.
Time in Force Options
| Option | API Value | Description |
|---|---|---|
| Good Till Canceled | gtc | Order remains until filled or canceled (default) |
| Immediate or Cancel | ioc | Fill immediately or cancel unfilled portion |
| Fill or Kill | fok | Fill entire order immediately or cancel completely |
| Post Only | post_only | Only maker orders (ensures no taker fees) |
Trading Fees
| Fee Type | Standard Rate |
|---|---|
| Maker | 0.02% |
| Taker | 0.05% |
Tip: Hold OKB (OKX's native token) in your account for trading fee discounts.
OKX's Three-Value API System
CRITICAL: Read this section carefully. OKX uses a three-value authentication system that differs from most exchanges.
Understanding the Three Values
Unlike exchanges like Binance (which only require API Key + Secret), OKX requires three separate values:
| Credential | Source | Purpose |
|---|---|---|
| API Key | Generated by OKX | Identifies your account |
| Secret Key | Generated by OKX | Used to sign requests |
| Passphrase | You create this yourself | Additional security layer |
Important Distinctions
| Passphrase IS | Passphrase IS NOT |
|---|---|
| A value YOU create during API key setup | Generated by OKX |
| Required every time you use the API | Optional or one-time |
| Specific to this API key | Your OKX login password |
| Case-sensitive and exact | Your OKX fund password |
Warning: If you forget your API Passphrase, there is no way to recover it. You must delete the API key and create a new one with a new passphrase.
Passphrase Guidelines
When creating your Passphrase:
- Use 8-32 characters for security
- Include letters, numbers, and symbols
- Make it unique to this API key (not reused from other services)
- Save it immediately before completing API creation
- Store it in your password manager
Why Three Values?
OKX's three-value system provides an extra layer of security:
- API Key - Identifies which key is making the request
- Secret Key - Proves you control the key (used to sign the request)
- Passphrase - Additional user-defined secret (sent with each request)
Even if an attacker obtained your API Key and Secret, they would also need your Passphrase to make requests.
OKX Unified Account
OKX uses a Unified Account system that differs from most exchanges. This makes setup simpler but requires understanding how it works.
What is a Unified Account?
| Feature | Traditional Exchanges | OKX Unified Account |
|---|---|---|
| Account Structure | Separate accounts (Spot, Futures, Options) | Single unified account |
| Fund Transfers | Must transfer between accounts | No transfers needed |
| Balance Access | Per-account balances | Shared balance pool |
| API Access | Different APIs per product | Single API for all products |
Benefits for SignalBee Users
- No fund transfers required - Your deposited funds are automatically available for futures trading
- Single API key - One key works for both spot and futures (permissions control access)
- Shared margin - Your entire account balance can serve as margin
Account Modes
OKX Unified Account supports different margin modes:
| Mode | Description | Best For |
|---|---|---|
| Simple | Separate margin per product | Beginners, isolated risk |
| Single-currency | Shared margin in one currency (e.g., USDT) | Most traders |
| Multi-currency | Cross-currency margin | Advanced traders |
| Portfolio | Advanced margin calculation | Institutional users |
Recommendation: Most SignalBee users should use Simple or Single-currency mode. These provide good balance between functionality and risk management.
Implications for API Keys
- A single API key can access spot, futures, and options trading
- Permissions on the API key determine what operations are allowed
- For SignalBee Futures, ensure your API key has Trade permission enabled
Creating Your API Key
Follow these steps carefully. Remember: you must save THREE values.
Step 1: Log In to OKX
- Go to www.okx.com
- Log in with your email/phone and password
- Complete 2FA verification (authenticator app or SMS)
Step 2: Navigate to API Management
- Click your profile icon in the top-right corner
- Select API from the dropdown menu
- You'll see a list of your existing API keys (if any)
Step 3: Create a New API Key
- Click the Create API Key button
- You may be prompted to complete 2FA verification
Step 4: Configure Your API Key
- API Key Name: Enter a descriptive label:
SignalBee Futures - Passphrase: Create a strong passphrase (8-32 characters)
- Use letters, numbers, and symbols
- Make it unique to this API key
- SAVE THIS IMMEDIATELY - you'll need it for SignalBee
Critical: The Passphrase is created by YOU, not generated by OKX. Write it down or save it in your password manager before proceeding. If you lose it, you must create a new API key.
Step 5: Set Permissions
Configure these specific permissions:
| Permission | Enable? | Why |
|---|---|---|
| Read | Yes | Allows SignalBee to view account info and positions |
| Trade | Yes - REQUIRED | Allows SignalBee to place orders (covers all trading types) |
| Permission | Enable? | Why |
|---|---|---|
| Withdraw | NEVER | SignalBee never needs this - serious security risk |
| Transfer | No | Not needed for SignalBee |
Note: OKX's Trade permission covers both Spot and Futures trading. You don't need to select a specific trading type.
Step 6: IP Binding (Optional)
You can restrict your API key to only work from specific IP addresses:
- Toggle IP Binding if desired
- Contact support@signalbee.trade for SignalBee's production IP addresses
- Add each IP address to the whitelist
If you skip this step, your API key will work from any IP address.
Step 7: Complete Security Verification
OKX requires verification:
- Enter your 2FA code from your authenticator app
- Complete email verification if prompted
- Enter your fund password if required
Step 8: Save ALL THREE Values Immediately
After verification, OKX displays your credentials:
| Credential | Can View Later? | Action Required |
|---|---|---|
| API Key | Yes | Copy and save |
| Secret Key | NO - Never shown again | Copy immediately! |
| Passphrase | NO - You created it | Make sure you saved it! |
Warning: If you close this page without copying your Secret Key, you'll need to delete this API key and create a new one. There is no way to recover a Secret Key. Similarly, if you didn't save your Passphrase, you'll need to start over.
Save all THREE values in your password manager now before proceeding.
Configuring Permissions
After creating your API key, verify the permissions are correct.
Required Permissions
| Permission | Enable? | Why |
|---|---|---|
| Read | Yes | Allows SignalBee to check your balances and positions |
| Trade | Yes - REQUIRED | Allows SignalBee to place and manage futures orders |
Never Enable These Permissions
| Permission | Enable? | Why |
|---|---|---|
| Withdraw | NEVER | SignalBee never needs withdrawal access. Enabling this is a serious security risk. |
| Transfer | No | Not required for SignalBee functionality |
Critical: The Trade permission is required. Without it, SignalBee cannot place futures orders even if your API key is valid.
How to Edit Permissions
- In API Management, find your SignalBee Futures API key
- Click Edit or the settings icon next to the key
- Modify the permission checkboxes as needed
- Click Confirm
- Complete 2FA verification
Adding to SignalBee
Now connect your OKX Futures API key to SignalBee.
Step 1: Go to Exchanges Page
- Log in to your SignalBee account
- Navigate to Exchanges in the main menu
Step 2: Add New Exchange
- Click the Add Exchange button
- Select OKX Perpetual from the exchange list
Critical: Make sure you select OKX Perpetual, NOT "OKX" (spot). These are different exchange connections with different symbol formats. Selecting the wrong one will cause connection failures.
Step 3: Enter Your Credentials
OKX Perpetual requires three fields:
| Field | Value |
|---|---|
| API Key | Your OKX API key |
| Secret Key | Your OKX Secret key |
| Passphrase | The passphrase YOU created during API key setup |
Remember: The Passphrase is NOT your OKX login password and NOT your fund password. It's the value you created specifically for this API key.
Step 4: Test the Connection
- Click Save and Test Connection
- Wait for SignalBee to verify your credentials
- Look for the success message
Step 5: Verify Your Setup
After successful connection:
- Your OKX Futures balances should appear in SignalBee
- Check that your balance matches what you see on OKX
- If balances don't match, verify you selected the correct exchange type
Tip: If balances don't appear or show incorrect values:
- Verify you selected "OKX Perpetual" (not "OKX")
- Confirm your API key has the Trade and Read permissions enabled
- Check that you have funds in your OKX account
OKX Futures-Specific Considerations
Ticker Format
OKX Perpetual uses a unique format with the -SWAP suffix:
| SignalBee Format | OKX Format | Notes |
|---|---|---|
| BTC-USDT | BTC-USDT-SWAP | USDT-margined perpetual |
| ETH-USDT | ETH-USDT-SWAP | Standard + SWAP suffix |
| SOL-USDT | SOL-USDT-SWAP | Automatic conversion |
| BTC-USD | BTC-USD-SWAP | Coin-margined perpetual |
Conversion Rules:
- Keep the hyphen format (BTC-USDT stays as BTC-USDT)
- Append
-SWAPsuffix for perpetual contracts
SignalBee handles this automatically—when configuring webhooks, use standard formats like BTC-USDT and SignalBee will convert to BTC-USDT-SWAP.
Contract Types
| Type | Margin Asset | Symbol Pattern | Example |
|---|---|---|---|
| USDT-M | USDT | ...-USDT-SWAP | BTC-USDT-SWAP |
| USDC-M | USDC | ...-USDC-SWAP | BTC-USDC-SWAP |
| Coin-M | Cryptocurrency | ...-USD-SWAP | BTC-USD-SWAP |
SignalBee primarily supports USDT-margined perpetual contracts.
Minimum Order Sizes
OKX enforces minimum order values per symbol. Check OKX's trading rules for current minimums.
API Rate Limits
- OKX imposes rate limits on API requests
- SignalBee handles rate limiting automatically with exponential backoff and jitter
- If you see rate limit errors, reduce your signal frequency
Position Mode Configuration
OKX Perpetual supports both position modes, giving you full flexibility.
One-way Mode (Net Mode)
| Aspect | Description |
|---|---|
| OKX Value | net_mode |
| Behavior | Single net position per symbol |
| Long + Short | Not simultaneous (position flips direction) |
| Best For | Simple directional trading, beginners |
Hedge Mode (Long/Short Mode)
| Aspect | Description |
|---|---|
| OKX Value | long_short_mode |
| Behavior | Separate long and short positions |
| Long + Short | Can hold both simultaneously |
| Best For | Advanced strategies, hedging, scalping |
OKX Advantage: Unlike KuCoin (which only supports one-way mode), OKX fully supports hedge mode. You can hold both long and short positions on the same symbol simultaneously.
How to Change Position Mode
- Go to OKX Futures trading page
- Click Settings (gear icon)
- Select Position Mode
- Choose Net Mode or Long/Short Mode
- Confirm the change
Important: You cannot change position mode while you have open positions or pending orders. Close all positions and cancel all orders first.
Leverage and Margin Configuration
Setting Leverage
Leverage is configured per trading pair on OKX:
- Open the trading page for your desired pair (e.g., BTC-USDT-SWAP)
- Click the leverage display (e.g., "10x")
- Use the slider to select your desired leverage (1x to 125x)
- Click Confirm
| Symbol Category | Typical Max Leverage |
|---|---|
| BTC, ETH | Up to 125x |
| Major Altcoins | Up to 75x |
| Smaller Altcoins | Up to 50x |
Recommendation: Start with 5x leverage or less until you're comfortable with futures trading. Higher leverage means faster liquidation.
Margin Types
| Type | Description | Best For |
|---|---|---|
| Cross Margin | Entire account balance as margin (default) | Avoiding liquidation, larger accounts |
| Isolated Margin | Only allocated margin at risk | Limiting losses per trade |
How to Switch Margin Type
- On the trading page, find the margin mode indicator
- Click to switch between Cross and Isolated
- For Isolated margin, set the specific margin amount per position
Tip: Isolated margin limits your maximum loss to the margin allocated to that position. Cross margin uses your entire available balance, which can help avoid liquidation but risks more capital.
Understanding Liquidation
When your position losses exceed your margin:
- Your position is automatically closed (liquidated)
- You lose the margin allocated to that position
- With cross margin, more of your account balance is at risk
Liquidation price is shown on each open position. Always know your liquidation price before entering a trade.
Troubleshooting
Common OKX Perpetual errors and solutions:
Authentication Errors
| Error | Code | Likely Cause | Solution |
|---|---|---|---|
| Invalid API Key | 50001 | Typo or deleted key | Re-copy API key carefully. Verify key exists in OKX. |
| Invalid Timestamp | 50102 | Clock sync issue | Usually temporary. SignalBee auto-retries with time sync. |
| Invalid Signature | 50103 | Wrong Secret Key | Re-copy Secret Key exactly. Check for extra spaces. |
| Invalid Passphrase | 50104 | Wrong passphrase | Must match exactly what you created. Case-sensitive. |
Trading Errors
| Error | Code | Likely Cause | Solution |
|---|---|---|---|
| Invalid Order Parameters | 51000 | Missing or invalid order details | Check all order parameters are correct. |
| Invalid Symbol | 51001 | Wrong symbol format | Use OKX format (e.g., BTC-USDT-SWAP). |
| Insufficient Balance | 51008 | Not enough funds | Deposit more funds to your OKX account. |
| Hedge Mode Not Supported | 51010 | Symbol doesn't support hedge mode | Use one-way mode for this symbol. |
| Position Doesn't Exist | 51020 | Trying to close non-existent position | Check your open positions first. |
| Leverage Setting Failed | 51021 | Invalid leverage for symbol | Check maximum leverage allowed for this symbol. |
| Insufficient Margin | 51024 | Not enough margin for order | Add margin or reduce position size. |
| Position Mode Change Failed | 51026 | Open positions exist | Close all positions and cancel orders first. |
| Margin Mode Change Failed | 51102 | Open positions on this symbol | Close position before changing margin type. |
| Quantity Too Small | 51104 | Order below minimum size | Increase order quantity. |
| Quantity Too Large | 51105 | Order above maximum size | Reduce order quantity. |
| Price Too Low | 51106 | Limit price below allowed range | Increase your limit price. |
| Price Too High | 51107 | Limit price above allowed range | Reduce your limit price. |
| Below Min Notional | 51120 | Order value too small | Increase order size (quantity x price). |
| Order Not Found | 51400 | Order already processed | Order may have been filled or canceled. |
| Order Already Filled | 51401 | Trying to cancel filled order | Cannot cancel orders that are already executed. |
System Errors
| Error | Code | Likely Cause | Solution |
|---|---|---|---|
| Exchange Unavailable | 50004 | OKX maintenance or outage | Retry later. Check OKX status page. |
| Rate Limit Exceeded | 50011 | Too many API requests | SignalBee auto-retries with backoff. Reduce signal frequency if persistent. |
Common Passphrase Confusion
The most common error is Invalid Passphrase (50104). Remember:
| What People Try | Correct? | What It Actually Is |
|---|---|---|
| OKX login password | No | Your website login |
| OKX fund password | No | For withdrawals/sensitive ops |
| API Passphrase | Yes | Value YOU created during API key setup |
If you can't remember your API Passphrase, you must:
- Delete the API key in OKX
- Create a new API key
- Create and carefully save a new passphrase
Connection Test Fails?
If your connection test fails in SignalBee:
- Verify exchange selection - Must be "OKX Perpetual", not "OKX"
- Triple-check all THREE values - API Key, Secret Key, AND Passphrase
- Check the Passphrase - Most common error. Case-sensitive, must match exactly.
- Verify Trade permission - API key needs Trade permission enabled
- Wait a few minutes - New API keys may take 1-2 minutes to activate
- Check IP binding - Disable IP restriction temporarily to test
Funds Show Incorrect Balance?
If SignalBee shows unexpected balance:
- Verify exchange type - "OKX Perpetual" vs "OKX" may show different views
- Check account mode - Unified Account shares balance across products
- Verify Read permission - API key needs Read permission enabled
For persistent issues, see our Error Codes Reference or contact support@signalbee.trade.
Risk Warnings
CRITICAL: Perpetual futures trading carries significant risk. Read this section carefully.
Leverage Amplifies Both Gains AND Losses
| Leverage | 10% Price Move Against You |
|---|---|
| 1x | 10% loss |
| 5x | 50% loss |
| 10x | 100% loss (liquidated) |
| 25x | Liquidated at 4% move |
| 50x | Liquidated at 2% move |
| 125x | Liquidated at 0.8% move |
Higher leverage = faster liquidation. A 1% adverse price movement with 100x leverage results in complete loss.
Liquidation is Automatic and Final
- When margin is depleted, your position is forcibly closed
- You lose the entire margin allocated to that position
- There is no way to recover from liquidation
- Liquidation fees apply on top of losses
Funding Rates Affect Position Costs
- Perpetual contracts have funding payments every 8 hours
- If you're long and funding is positive, you pay shorts
- If you're short and funding is positive, you receive payment
- Funding can significantly affect profitability of longer-term positions
Risk Management Best Practices
- Start with low leverage (5x or less) until experienced
- Always use stop-losses - OKX fully supports stop-loss orders
- Never trade with funds you can't afford to lose
- Size positions appropriately - don't risk entire account on one trade
- Understand your liquidation price before entering trades
- Monitor funding rates for positions held across funding times
- Consider isolated margin to limit maximum loss per trade
- Use hedge mode carefully - holding long + short increases complexity
Not Suitable For
Futures trading may not be appropriate if you:
- Are new to cryptocurrency trading
- Cannot afford to lose your entire investment
- Don't understand leverage and liquidation mechanics
- Are unable to monitor positions regularly
- Have high risk aversion
Security Best Practices
Follow this checklist to keep your OKX account secure:
OKX Account Security
- Enable 2FA with an authenticator app (Google Authenticator, Authy) - more secure than SMS
- Use a unique, strong password for OKX login (not reused from other sites)
- Set a strong fund password for sensitive operations
- Enable anti-phishing code - helps identify legitimate OKX communications
API Key Security
- Create a dedicated API key just for SignalBee Futures - don't reuse keys
- Use a strong, unique Passphrase (8-32 characters) - treat it like a password
- Never enable withdrawal permission - SignalBee never needs it
- Consider IP binding for maximum security
- Never share your Secret Key via email, chat, or screenshots
- Never share your Passphrase - it's as sensitive as your Secret Key
- Store ALL THREE credentials in a password manager (1Password, Bitwarden, etc.)
Ongoing Security
- Review your API keys periodically in OKX - delete any you don't recognize
- Rotate API keys every 90 days as a security habit
- Monitor trade and position history for any unauthorized activity
- Keep your email secure - it's used for OKX account recovery
Security Note: Even with all precautions, the most important protection is never enabling withdrawal permissions. Without this permission, your funds cannot be moved off the exchange even if everything else is compromised.
Comparison with Similar Exchanges
OKX shares some features with other exchanges that use passphrase authentication:
| Feature | OKX | KuCoin | Bitget |
|---|---|---|---|
| Passphrase Handling | Plain text in header | Signed (HMAC) | Signed (HMAC) |
| Hedge Mode | Yes | No | Yes |
| Stop-Loss Orders | Yes | No | Yes |
| Max Leverage | 125x | 100x | 125x |
| Account Type | Unified | Separate accounts | Unified |
| Fund Transfers | Not needed | Required | Not needed |
| Symbol Format | BTC-USDT-SWAP | XBTUSDTM | BTCUSDT_UMCBL |
Note: OKX sends the Passphrase in plain text in the header (as
OK-ACCESS-PASSPHRASE), while KuCoin signs the Passphrase as part of the HMAC signature. Both methods are secure over HTTPS.
Related Resources
- OKX Spot Setup - For spot trading on OKX (also uses three-value API)
- Bitget Perpetual Setup - Another exchange with passphrase and hedge mode support
- KuCoin Perpetual Setup - Passphrase exchange without hedge mode
- API Key Best Practices - General API key security guidance
- Security Overview - How SignalBee protects your data
- Error Codes Reference - Common error messages explained