> ## Documentation Index
> Fetch the complete documentation index at: https://whitebit-mintlify-seo-descriptions-1775434197.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# FAQ

> Find answers to common questions about WhiteBIT API rate limits, authentication, trading, and webhook integration.

export const RegionBaseUrl = ({className = "", showBaseUrl = true}) => {
  const [region, setRegionState] = useState(() => {
    if (typeof window !== 'undefined') {
      return localStorage.getItem("api-region-preference") || "com";
    }
    return "com";
  });
  const [mounted, setMounted] = useState(false);
  const observerRef = useRef(null);
  const isSyncingRef = useRef(false);
  const updateAllContentOnPage = targetRegion => {
    try {
      const domainFrom = targetRegion === "eu" ? "whitebit.com" : "whitebit.eu";
      const domainTo = targetRegion === "eu" ? "whitebit.eu" : "whitebit.com";
      const links = document.querySelectorAll('a');
      links.forEach(link => {
        let href = link.getAttribute('href');
        if (href && href.includes(domainFrom)) {
          link.setAttribute('href', href.replace(domainFrom, domainTo));
        }
      });
      const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, {
        acceptNode: node => {
          if (node.parentElement?.closest('.region-toggle-component')) {
            return NodeFilter.FILTER_REJECT;
          }
          return node.textContent.includes(domainFrom) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
        }
      });
      let currentNode;
      while (currentNode = walker.nextNode()) {
        currentNode.textContent = currentNode.textContent.replace(new RegExp(domainFrom, 'g'), domainTo);
      }
      console.log(`[RegionSync] Global content updated to ${domainTo}`);
    } catch (e) {
      console.error("[RegionSync] Error updating content:", e);
    }
  };
  const updateRegion = (newRegion, source) => {
    if (region === newRegion) return;
    console.log(`[RegionBaseUrl] Updating to "${newRegion}" (Source: ${source})`);
    if (source === 'observer') {
      isSyncingRef.current = true;
      setTimeout(() => isSyncingRef.current = false, 1000);
    }
    setRegionState(newRegion);
    localStorage.setItem("api-region-preference", newRegion);
    updateAllContentOnPage(newRegion);
    if (source === 'user-click') {
      window.dispatchEvent(new CustomEvent("regionChange", {
        detail: newRegion
      }));
      attemptToUpdateNativeDropdown(newRegion, 0);
      setTimeout(() => attemptToUpdateNativeDropdown(newRegion, 1), 500);
      setTimeout(() => attemptToUpdateNativeDropdown(newRegion, 2), 1500);
    }
  };
  const attemptToUpdateNativeDropdown = (targetRegion, attempt) => {
    if (isSyncingRef.current) return;
    try {
      const targetUrl = targetRegion === "eu" ? "https://whitebit.eu" : "https://whitebit.com";
      const targetDesc = targetRegion === "eu" ? "EU Server" : "Production Server";
      const selects = document.querySelectorAll('select');
      for (const select of selects) {
        if (select.innerHTML.includes('whitebit.com') || select.innerHTML.includes('whitebit.eu')) {
          select.value = targetUrl;
          select.dispatchEvent(new Event('change', {
            bubbles: true
          }));
          return;
        }
      }
      const buttons = Array.from(document.querySelectorAll('button, [role="combobox"]'));
      const serverSelector = buttons.find(btn => {
        if (btn.closest('a') || btn.closest('[class*="card"]') || btn.closest('nav')) {
          return false;
        }
        const txt = btn.textContent || "";
        const isServerDropdown = (txt.includes('Production Server') || txt.includes('EU Server') || txt.includes('WhiteBIT Global Server') || txt.includes('WhiteBIT EU Server')) && !txt.includes('Run') && !txt.includes('Send') || btn.getAttribute('role') === 'combobox';
        return isServerDropdown;
      });
      if (serverSelector) {
        const currentText = serverSelector.textContent || "";
        if (currentText.includes(targetDesc)) return;
        serverSelector.click();
        setTimeout(() => {
          const options = document.querySelectorAll('[role="option"], li, button');
          for (const opt of options) {
            const optText = opt.textContent || "";
            if (optText.includes(targetDesc) || optText.includes(targetUrl)) {
              opt.click();
              return;
            }
          }
        }, 100);
      }
    } catch (e) {
      console.error("[Sync] Error:", e);
    }
  };
  useEffect(() => {
    setMounted(true);
    updateAllContentOnPage(region);
    const handleStorageChange = e => {
      if (e.key === "api-region-preference" && e.newValue) {
        updateRegion(e.newValue, 'storage');
      }
    };
    const handleRegionChange = e => {
      if (e.detail !== region) {
        updateRegion(e.detail, 'event');
      }
    };
    window.addEventListener("storage", handleStorageChange);
    window.addEventListener("regionChange", handleRegionChange);
    observerRef.current = new MutationObserver(mutations => {
      if (isSyncingRef.current) return;
      updateAllContentOnPage(region);
      for (const mutation of mutations) {
        if (mutation.type !== 'childList' && mutation.type !== 'characterData') continue;
        const target = mutation.target;
        const el = target.nodeType === Node.TEXT_NODE ? target.parentElement : target;
        if (el && (el.getAttribute('role') === 'option' || el.closest('[role="listbox"]'))) continue;
        const text = target.textContent || "";
        if (text.includes('WhiteBIT EU Server') || text.includes('https://whitebit.eu') && text.includes('Server')) {
          if (el && el.tagName !== 'A' && !el.closest('.region-toggle-component')) {
            if (region !== 'eu') updateRegion('eu', 'observer');
          }
        } else if (text.includes('WhiteBIT Global Server') || text.includes('https://whitebit.com') && text.includes('Server')) {
          if (el && el.tagName !== 'A' && !el.closest('.region-toggle-component')) {
            if (region !== 'com') updateRegion('com', 'observer');
          }
        }
      }
    });
    observerRef.current.observe(document.body, {
      childList: true,
      subtree: true,
      characterData: true
    });
    if (typeof window !== 'undefined') {
      const current = localStorage.getItem("api-region-preference");
      if (current) attemptToUpdateNativeDropdown(current, 'init');
    }
    return () => {
      window.removeEventListener("storage", handleStorageChange);
      window.removeEventListener("regionChange", handleRegionChange);
      if (observerRef.current) observerRef.current.disconnect();
    };
  }, [region]);
  const apiBaseUrl = region === "eu" ? "https://whitebit.eu" : "https://whitebit.com";
  if (!mounted) return null;
  return <div className={`flex items-center gap-2 flex-wrap my-4 region-toggle-component ${className}`}>
            <span className="text-sm text-gray-500 dark:text-gray-400 font-mono">
                Base URL
            </span>
            <span className="text-sm text-gray-400">(</span>
            <div className="inline-flex bg-gray-100 dark:bg-gray-800 rounded-lg p-0.5 border border-gray-200 dark:border-gray-700">
                <button onClick={() => updateRegion("com", "user-click")} className={`px-2 py-0.5 text-xs font-medium rounded-md transition-all ${region === "com" ? "bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 shadow-sm" : "text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}`}>
                    .com
                </button>
                <button onClick={() => updateRegion("eu", "user-click")} className={`px-2 py-0.5 text-xs font-medium rounded-md transition-all ${region === "eu" ? "bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 shadow-sm" : "text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}`}>
                    .eu
                </button>
            </div>
            <span className="text-sm text-gray-400">)</span>
            {showBaseUrl && <>
                    <span className="text-sm text-gray-400">:</span>
                    <a href={apiBaseUrl} target="_blank" rel="noopener noreferrer" className="text-sm font-mono text-primary dark:text-primary-light hover:underline">
                        {apiBaseUrl}
                    </a>
                </>}
        </div>;
};

<RegionBaseUrl />

## Rate limits and errors

<AccordionGroup>
  <Accordion title="Rate limit 429 errors">
    Rate limit 429 errors occur when an endpoint exceeds the rate limit. To resolve:

    * Wait for the rate limit window to reset
    * Check the specific rate limit value in the endpoint documentation
    * Implement rate limiting in code

    For more details, see the [API v4 overview](/api-reference/market-data/overview).
  </Accordion>

  <Accordion title="CORS errors on ticker endpoint">
    CORS requests to the ticker endpoint are forbidden for security reasons. Make the request from a backend server instead of client-side code. For endpoint details, see the [Market activity endpoint](/api-reference/market-data/market-activity).
  </Accordion>

  <Accordion title="Nonce error troubleshooting">
    Nonce errors occur when timestamps or request ordering are invalid. To resolve:

    1. Debug the code implementation
    2. Recreate API keys
    3. Ensure system time is properly synchronized

    For details on nonce requirements, see the [Authentication guide](/api-reference/authentication).
  </Accordion>

  <Accordion title="Smartplan endpoint 403 access errors">
    Smartplan endpoints are restricted to B2B partner services only. To gain access:

    * Contact [support@whitebit.com](mailto:support@whitebit.com)
    * Request permissions for Smartplan endpoints
    * Provide use case details

    For endpoint details, see the [Crypto Lending documentation](/api-reference/account-wallet/get-plans).
  </Accordion>
</AccordionGroup>

## WebSocket

<AccordionGroup>
  <Accordion title="Multiple time periods in WebSocket Kline">
    Multiple time periods for pairs are available through multiple WebSocket connections or the HTTP method. Two solutions:

    1. Open multiple WebSocket connections
    2. Use the equivalent HTTP method instead

    For more details, see the [Kline documentation](/websocket/market-streams/kline).
  </Accordion>

  <Accordion title="Trade history limitations (24-hour window)">
    The system shows only the last 100 deals by default. To access more:

    * Subscribe to the WebSocket feed
    * Accumulate and store the data
    * Process the data as needed

    For more details, see the [Trades channel documentation](/websocket/market-streams/trades).
  </Accordion>
</AccordionGroup>

## Transfers and withdrawals

<AccordionGroup>
  <Accordion title="Transfer delays between balances">
    Transfers may take up to 2 seconds to complete. When making transfers and withdrawals:

    * Wait for transfers to complete (approximately 2 seconds)
    * Avoid initiating withdrawals before transfer completion
    * Implement proper error handling for transfer states

    For endpoint details, see the [Transfer between balances](/api-reference/account-wallet/transfer-between-balances) documentation.
  </Accordion>

  <Accordion title="Insufficient funds errors despite available balance">
    Insufficient funds errors occur when the withdrawal amount plus the fee exceeds available balance. Important considerations:

    * Account for withdrawal fees in calculations
    * Check the [fees documentation](/api-reference/account-wallet/get-fees)
    * Ensure sufficient balance for both amount and fees
  </Accordion>
</AccordionGroup>

## Webhooks

<AccordionGroup>
  <Accordion title="Webhook HTTPS requirements and port">
    HTTPS is required for Webhook API communication:

    * Communication occurs over port 443
    * SSL/TLS encryption is mandatory
    * HTTP connections are not supported

    For more details, see the [Webhook documentation](/platform/webhook).
  </Accordion>
</AccordionGroup>

## API and assets

<AccordionGroup>
  <Accordion title="Currency deposit and withdrawal availability">
    Check currency status through the assets endpoint:

    * URL: [https://whitebit.com/api/v4/public/assets](https://whitebit.com/api/v4/public/assets)
    * The endpoint provides real-time status of all currencies
    * Check the currency-specific enabled/disabled flags

    For endpoint details and response schema, see the [Asset status list](/api-reference/market-data/asset-status-list) documentation.
  </Accordion>
</AccordionGroup>

## Security and API keys

<AccordionGroup>
  <Accordion title="API key security best practices">
    Store API keys securely using environment variables, restrict IP access, and use minimum required permissions. Never commit keys to version control.

    For details, see the [Authentication guide](/api-reference/authentication).
  </Accordion>

  <Accordion title="Compromised API key response">
    Immediately delete the compromised key, review account activity for unauthorized actions, and create new API keys. Contact support if unauthorized activity is detected.

    For details, see the [Authentication guide](/api-reference/authentication).
  </Accordion>
</AccordionGroup>

## API usage

<AccordionGroup>
  <Accordion title="High-frequency trading API optimization">
    Use WebSocket for real-time data, batch requests when possible, implement proper rate limiting, and cache frequently accessed data.

    For details, see the [WebSocket API](/websocket/market-streams/overview).
  </Accordion>

  <Accordion title="API disconnection handling">
    Implement automatic reconnection with exponential backoff. Maintain local order state and set up monitoring and alerts for connection issues.

    For details, see the [WebSocket API](/websocket/market-streams/overview).
  </Accordion>
</AccordionGroup>
