Skip to content

API Errors

When communicating with exchanges, various API errors can occur. This guide explains common error codes and how to resolve them.

HTTP Status Codes

401 — Unauthorized

Meaning: Your API credentials are invalid or expired.

Common causes:

  • API key was deleted on the exchange
  • API key expired (some exchanges have expiration dates)
  • Secret key or passphrase is incorrect
  • System clock is significantly out of sync

Solution:

  1. Verify the API key exists on your exchange
  2. Create a new API key if needed
  3. Update credentials in Settings → API Keys

403 — Forbidden

Meaning: Your API key doesn't have permission for the requested action.

Common causes:

  • Missing trade permission when trying to place orders
  • IP restriction blocking the request
  • Account-level restrictions on the exchange

Solution:

  1. Check API key permissions on your exchange
  2. Verify IP whitelist settings (if any)
  3. Check for any account restrictions

429 — Rate Limited

Meaning: Too many requests sent to the exchange API.

Common causes:

  • Multiple applications using the same API key
  • Rapid manual refreshing
  • Temporary spike in API calls

Solution:

  • Wait 60 seconds before retrying
  • Avoid rapid manual refreshing
  • Use a dedicated API key for Crodl

Crodl does not silently retry a rate-limited request behind your back — a 429 surfaces so you can see it happened. The one place Crodl backs off automatically is chart layout autosave, which honours the Retry-After header before trying again. Everywhere else, wait and repeat the action yourself.

500+ — Server Error

Meaning: The exchange is experiencing internal issues.

Common causes:

  • Exchange maintenance
  • High load on the exchange
  • Temporary outage

Solution:

  • Wait and retry — these are usually temporary
  • Check the exchange's status page
  • Crodl surfaces the error and recovers on the next refresh cycle — server errors are not blindly retried

Crodl Trade Guard Errors

These errors happen inside Crodl before the order is submitted to the exchange.

Error CodeMeaningSolution
max_notional_breachedThe open trigger's final computed position notional exceeded max_notional_usd and guard_action was rejectIncrease max_notional_usd, reduce quantity_amount, or use guard_action: "clamp"
max_notional_clamp_below_min_sizeCrodl tried to clamp the order to max_notional_usd, but the resulting size was below the exchange minimum order sizeIncrease max_notional_usd or send a larger valid order size

Trade guard errors only apply when an open trigger includes max_notional_usd. If the guard fields are omitted, Crodl does not enforce a notional cap.

Exchange-Specific Errors

Blofin

Error CodeMeaningSolution
50001Invalid parameterCheck order parameters
50004API key suspendedReactivate on Blofin
51008Insufficient marginAdd funds or reduce size

Bybit

Error CodeMeaningSolution
10003Invalid API keyRegenerate key
10005Permission deniedCheck key permissions
110007Insufficient balanceAdd funds

Bitget

Error CodeMeaningSolution
40014Invalid API keyRegenerate key
40015Invalid passphraseRe-enter passphrase
43011Insufficient marginAdd funds

OKX

Error CodeMeaningSolution
50011Rate limit exceededWait and retry; reduce rapid refreshes
50113Invalid signature or credentialsRe-check API key, secret, and passphrase
51008Insufficient marginAdd funds or reduce size

Bitunix

Error CodeMeaningSolution
1001Invalid parameterCheck request format
1002Authentication failedVerify credentials

Hyperliquid

Hyperliquid returns plain-text error messages rather than numeric error codes. Common ones relate to an unknown or mistyped wallet address and insufficient collateral for the requested order — check your Master/Agent addresses in Settings → API Keys and your deposited margin on Hyperliquid.

Error Handling in Crodl

Crodl handles API errors automatically:

  • Session recovery — a 401 refreshes your session and retries the request once, so an expired token does not surface as an error
  • In-flight deduplication — prevents duplicate requests
  • Granular error messages — specific messages for each error type
  • Abort on unmount — prevents stale requests from affecting the UI
  • Layout autosave backoff — chart layout saves respect Retry-After on a 429 instead of hot-looping

If you see persistent errors across multiple refreshes, the issue is likely with your API key configuration. Try removing and re-adding your exchange connection.