Cardiv
Market maker programme

Errors and retries

Every error code the API returns, and what to do about each one.

Branch on error.code, never on the message text: codes are stable and messages are not.

CodeHTTPWhat it means and what to do
MISSING_API_KEY401No key in the request. Send Authorization: Bearer or X-API-Key.
INVALID_API_KEY401The key is not recognised. Check you are on the right environment.
API_KEY_REVOKED401The key was revoked. Move to the current one, or request a new key.
API_KEY_EXPIRED401The key has expired. Request a new key.
MARKET_MAKER_SUSPENDED403Cardiv suspended the account. Resting orders are unaffected; contact support.
PAIR_NOT_ALLOWED403The pair is not on your account. Check limits.allowedPairs.
INVALID_CLIENT_ORDER_ID400The clientOrderId is missing your account prefix. error.expectedPrefix carries the required value.
VALIDATION_ERROR400Malformed request, or the order is below the minimum size. Not retryable unchanged.
INSUFFICIENT_BALANCE400Nothing spendable in the token this order spends, either none at all or all of it already committed to resting orders.
LEDGER_COMMAND_REJECTED400The command was refused, and this code also covers a submission timeout. Check GET /orders/{orderId} before you retry.
MAX_OPEN_ORDERS429You are at your open order cap. Cancel something, or ask for a higher cap.
RATE_LIMITED429Past your per-minute limit. The body carries the limit. Back off.
CACHE_EXPIRED410Past the five minute prepared-transaction deadline. Prepare again.
CONTRACT_NOT_FOUND404A stale identifier, or the order is no longer active. Re-read GET /orders.
ORDER_ALREADY_FILLED409The order filled before your cancellation was processed.

Retry policy

  • 4xx is not retryable unchanged. Fix the request first.
  • Prepare, on 5xx or timeout, is retryable with the same clientOrderId. Placement is idempotent on that value, so a retry cannot double your exposure.
  • Submission, on 5xx or timeout, is never retried blind. Check GET /orders/{orderId} first: the transaction may have committed despite the failed response, and re-preparing an order that is already resting doubles your position.

One known limitation

Calden currently collapses submission failures into a single generic 502, so a degraded network and a rejected signature look the same from the response alone. On an unexplained 502, check GET /orders/{orderId}, then contact Cardiv support with the correlationId and ask for the server-side cause.

Need help

Write to support@wolfedgelabs.com and include your party ID.

On this page

Need help

Write to support@wolfedgelabs.com and include your party ID.