Skip to content

Errors, limits and retries

Every common refusal of the Prow API with its meaning and what to do, the rate limits, and how to retry a call safely with an idempotency key.

On this page

The shape of an error

Every refusal is one plain sentence with a stable code. Relay the sentence as it is worded and act on the code.

Over REST the body is:

json
{ "error": { "code": "invalid_settings", "message": "These settings are not valid: Minimum investment for these settings: 25. Fix them and try again.", "details": { "errors": [ { "code": "order_below_min", "field": "investment", "message": "Minimum investment for these settings: 25" } ] }, "request_id": "req_abc123" } }

Over MCP a refusal of a tool is a tool result with isError: true and HTTP 200, with the same codes as REST. What comes back depends on the protocol version, so read the text when in doubt:

  • content[0].text always has the sentence, then one key: value line per piece of information that matters, then request_id: <id> last. The lines are code: <code>, retry_after_s: <seconds> when there is a wait, one error: <reason code> (<field>): <sentence> line for each problem of a draft, and the plain values of details such as min_investment: 780.63, min_investment_currency: USDT, fix_url: https://... or open_in_prow: https://.... A client that reads text alone loses nothing.
  • structuredContent is on every protocol version, whatever MCP-Protocol-Version header you send. It is { "error": { "code", "message", "request_id", "details"?, "retry_after_s"? } }, the same object as the REST body. A successful call has the same object as the text JSON in structuredContent.

A request that is not a valid tool call (an unknown tool, bad framing) is a JSON-RPC error instead. So is every refusal that comes before the tool runs: a wrong key (HTTP 401), a rate limit (HTTP 429 with Retry-After) or a paused API (HTTP 503). Its body is { "jsonrpc": "2.0", "id": ..., "error": { "code": -32000, "message": "...", "data": { "code": "rate_limited", "request_id": "...", "retry_after_s": 12 } } }, the same code as REST. Quote the request_id when you ask Prow for help.

Refusals and what to do

This table is generated from the codes the API itself answers, so it lists every one and cannot fall behind. The status is the HTTP status over REST.

CodeStatusWhat it meansWhat to do
ambiguous_key400Two different keys were sentSend one
bad_request400An argument is missing, unknown or the wrong typeFix the call. The sentence names the argument
key_in_query400The key was sent in the addressSend it in the x-api-key header
key_revoked401The key was revokedMake a new key in Settings
unauthorized401The key is missing or wrongSend it in the x-api-key header, never in the address
bots_not_available403Bots are not available on this accountNothing to change on your side
consent_outdated403The key was made before the text it needs existed (building, editing or copying bots)Make a new key: the sentence says which
key_expired403The key has expiredMake a new key in Settings
key_suspended403Prow paused the keyOpen Prow for the reason
not_available403The API or this feature is not available for this accountNothing to change on your side
origin_not_allowed403A browser page called the APICall it from a script or an assistant, not from a web page
scope_missing403The key does not have the permission this tool needsMake a key with Build, pause and stop your bots
funding_unavailable404Funding bots are switched offlist_bot_types shows what is on
hedge_unavailable404The spot hedge is switched offlist_bot_types shows what is on
not_found404No such bot, draft or market (also for another user's id)Check the id with list_bots or list_bot_drafts
type_not_available404That bot type is switched off in Prow right nowlist_bot_types shows what is on
unknown_market404No such market on that venue (a spot pair such as @107 needs kind: spot)Name the market as list_markets names it, or add kind spot and use a pair from list_spot_markets
unknown_tool404There is no such tooltools/list shows the tools
method_not_allowed405The route does not accept this methodUse the method the answer names
account_not_unified409A Funding bot needs the Hyperliquid account on unified balanceSwitch the account to unified balance in Prow
account_portfolio_margin409A Funding bot runs on unified balance, not portfolio marginUse an account on unified balance
bot_state409The bot is in a state that does not allow this (for example editing a stopped bot)Check get_bot. A draft is changed with update_bot_draft
combo_unavailable409Ladder bots are switched offUse grid or dca
idempotency_conflict409This idempotency key was used with different argumentsUse a new key for a different request
idempotency_key_reused409The key was used for another request, or too long agoUse a new key
market_busy409duplicate_bot was asked to copy a bot that is still running on that market and account (Prow runs one bot per market and account)Stop the bot first (its position is closed), wait until it is stopped, then copy. A copy to another market or exchange needs no stop
market_not_available409Bots are not open on that market, although it is listed (list_markets shows bots: false)Choose a market with bots true
not_ready409The pause is still being appliedWait a few seconds and try again
payload_too_large413The request body is too largeSend less
unsupported_media_type415The body is not JSONSend it as application/json
account_required422You have more than one account on that venueSend account_id with one of the accounts the answer lists
amount_too_small422The amount is below what the setting needsRaise it to the minimum the answer names
arb_unavailable422Arbitrage bots are switched offlist_bot_types shows what is on
edit_not_supported422Arbitrage and Funding bots keep the settings they were signed withStop the bot and make a new one
idempotency_mismatch422The former code of idempotency_conflict (renamed; a script that matched it should match idempotency_conflict, 409)Use idempotency_conflict
invalid_settings422The settings did not pass Prow's checkRead details.errors, fix each field, call again. The reasons are listed below
invalid_value422A value of edit_bot is outside the allowed range, has the wrong type, or the result would break a rule of the draft (a trailing take profit needs a take profit)Use a value the sentence allows
market_unsupported422The market or kind is not offered (for example Aster spot while it is off)Choose another market, or use futures
needs_new_signature422The setting is signed when a bot starts, so nobody can change it on a running botStop the bot (its position is closed), wait until it is stopped, duplicate_bot, change the copy, start it in Prow
needs_owner422A key may only make a running bot safer, and this change would loosen it, remove a protection or set a distance too smallMake the change in Prow: details.open_in_prow links to the bot. details.key_may_change says what a key may do
needs_trade_key422Reading this venue's account needs a key that can trade, which Prow does not offer for itUse Hyperliquid, or read it in Prow
network_mismatch422The account is on another network than Prow runs bots onUse an account on the network Prow runs
no_account422No account on that venue is connectedConnect it in Prow
not_enough_history422The market is too new to check settings against its past pricesChoose a market that has traded for longer
not_for_this_bot422The setting does not apply to this kind of bot (for example a range exit on a DCA bot)details and the sentence list what a key may change on this bot
not_paused_by_this_key422Only the key that paused a bot can resume itResume it in Prow
starts_a_trade422startDeal opens a position, so a key cannot send itStart the deal in Prow
too_few_coins422This account already holds too many of the coins on spot for a hedgePick at least 3 coins it does not hold
too_many_drafts422You have 50 unstarted drafts, the most Prow keeps, and a copy never deletes anyDelete drafts you do not need with delete_bot_draft, then try again
type_change422A draft keeps the bot type it was made withMake a new draft of the other type
unknown_setting422That is not a setting of a botget_bot shows the settings and edit_rules says which a key may change
venue_mismatch422The account is on another venue than the one you namedUse an account on the venue you named
venue_not_served422That venue is not served right nowUse another venue
bot_cooldown429The bot was paused or resumed a moment agoWait the seconds the answer names
rate_limited429Too many calls this minute, more than 20 bot changes in a minute, the hourly bot builder budget used up, a trailing take profit changed again within 10 minutes, or a wrong key sent too oftenWait retry_after_s seconds (the Retry-After header). The builder budget is in get_key_limits as build_budget. See the limits below
venue_busy429Prow's reads from the venue are at their limitWait Retry-After seconds
bot_load_failed500Prow could not load the botTry again; quote the request_id if it repeats
draft_create_failed500The draft could not be savedTry again; quote the request_id if it repeats
draft_delete_failed500The draft could not be deletedTry again; quote the request_id if it repeats
draft_update_failed500The draft could not be changedTry again; quote the request_id if it repeats
internal500Something went wrong at ProwTry again; quote the request_id if it repeats
output_too_large502The answer was too large to returnAsk for fewer rows with limit
venue_unreachable502The venue could not be reachedTry again in a moment
api_halted503The API is paused by ProwTry again later
api_misconfigured503The API is not available right nowTry again later
audit_unavailable503Prow's call log is unavailable, so changes are paused (reading still works)Try again in a minute
auth_unavailable503Prow could not check your key right nowTry again in a moment
busy503Prow's settings checker is busyTry again in a few seconds
data_unavailable503Prow could not load your dataTry again in a moment
degraded503Prow's call counters are recovering, so changes are paused (reading still works)Try again in a minute
sync_stale503Prow could not refresh its list of keys, so changes are paused (reading still works)Try again in a few minutes
usage_unavailable503The list of recent calls is not availableTry again in a minute
venue_unavailable503The venue could not be reachedTry again in a moment
backtest_timeout504Checking the settings took too longTry again, or use fewer levels

Which code to expect from edit_bot

edit_bot changes a running bot only. On a draft it answers bot_state (409): a draft is changed with update_bot_draft. The field codes needs_owner, needs_new_signature, not_for_this_bot and unknown_setting (and starts_a_trade and invalid_value) are answers about the settings of a running bot: they say whether a key may make that change and which way. A paused bot answers needs_owner.

Reasons inside invalid_settings

Each item of details.errors has a code, the field and a sentence. This table is generated from the checks Prow runs, so it lists every code and cannot fall behind.

Errors

These make the settings invalid: the call is refused until you fix them.

CodeWhat it meansWhat to do
invalidA field has the wrong type or is outside its allowed range, or an unknown field was sentFix the field named in the field of the error; the settings reference lists every field and range
market_closedThe market is not tradingChoose another market
market_not_availableBots are not open on this marketChoose another market (list_markets, list_spot_markets)
combo_unavailableLadder bots are off in Prow right nowUse grid or DCA (list_bot_types shows what is on)
bot_tp_unavailableA take profit for the whole bot is not available yetUse takeProfitPct (grid) or tpPct (DCA)
market_busyAnother bot of yours already runs on this market and account (Prow runs one per market and account)Stop it first, or use another market or account
leverage_too_highLeverage is above the market's maximum or above 5Lower leverage
advanced_top_onlyShort and neutral grids, and leverage above 3, run only on the deepest marketsUse a long grid, leverage 3 or less, or one of the deepest markets
max_loss_too_highThe loss limit is larger than the positionLower maxLossUsd, or raise investment or leverage
rangeThe upper price is not above the lower priceSwap or fix lower and upper
range_too_narrowThe range is narrower than the minimum (2 percent, 4 for a Ladder)Widen the range
too_many_gridsMore levels than the venue allows (150 on Hyperliquid, 100 on Aster)Lower count
stop_requiredThe stop loss is missing: slLow for long and neutral, slHigh for short and neutral, slPct for DCAAdd the stop
stop_inside_rangeThe stop loss sits inside the range (or inside the trailing limit)Put slLow below lower and slHigh above upper
trailing_spot_longtrailingUp is for spot gridsRemove trailingUp on futures
trailing_spot_onlytrailingDown is for spot gridsRemove trailingDown on futures
trailing_limitThe trailing limit is on the wrong side of the rangePut the up limit above upper and the down limit below lower
trigger_at_priceThe trigger price is the price nowPick another trigger price or leave it out
price_beyond_stopThe price now is already past the stop lossMove the stop or wait for the price
trailing_tp_needs_tpA trailing take profit needs a take profitSet takeProfitPct too
neutral_side_over_capAt the top of its range a Neutral grid would hold more on its sell side than on its buy side, more than the investment allowsUse more grids or a narrower range
grid_levelsToo few levels are left after rounding to the venue's price ticksLower count or widen the range
step_below_fee_floorThe smallest grid step is below what fees and slippage takeLower count or widen the range
order_below_minAn order is below the venue's minimumRaise investment or lower count; the sentence gives the minimum
profit_per_gridThe profit per grid after fees is not positiveLower count or widen the range
liq_before_stopThe liquidation price comes before the stop lossLower leverage or move the stop closer
combo_futures_onlyLadder bots run on futures onlyUse a futures market
combo_directionA Ladder is long or shortSet direction long or short
combo_levelsA Ladder has 6 to 40 levelsSet count between 6 and 40
combo_triggerA Ladder starts at the price now: no trigger priceLeave trigger out
combo_range_exitA Ladder has no range exitLeave rangeExit as off
combo_take_on_crossA Ladder does not take crossed levels at marketLeave takeOnCross false
combo_price_outsideA Ladder needs levels on both sides of the price nowMove the range around the price
qfl_long_onlyA QFL start buys a crack under a base: long onlySet direction long
max_activeMore extra orders resting at once than extra ordersLower maxActiveSafety
trailing_tpThe trailing take profit is not below the take profitSet trailingTpPct below tpPct
tp_targets_trailingSeveral take profits do not go with a trailing take profitUse one of them
tp_targets_orderEach take profit target must be further than the one beforeOrder tpTargets by pct, ascending
tp_targets_shareThe target shares do not add up to 100Make the shares add up to 100
tp_target_below_minThe smallest target's share of the base order is below the venue's minimum orderRaise baseOrder or give the smallest target a bigger share
breakeven_needs_targetsBreakeven needs two or more take profit targetsAdd tpTargets or turn breakeven off
breakeven_target_closeWith breakeven on, the first target must be far enough to cover feesRaise the first target's pct
stop_inside_ladderThe DCA stop sits inside the safety order ladder: it must be beyond the last safety orderRaise slPct above stop_loss_must_exceed_pct, or use fewer or closer safety orders
ladder_too_deepThe extra buys would go below zeroLower safetyCount, deviationPct or stepScale
investment_too_smallThe investment cannot pay for the base and extra ordersRaise investment, or lower the order sizes or leverage

Warnings

These come back next to a valid check, in warnings. They do not refuse the call.

CodeWhat it meansWhat to do
negative_returnThe scanner reads the return of this coin and strategy after costs as negative right nowChoose a coin the scanner shows with after_costs_pct_a_year above zero (list_arbitrage_opportunities), or expect the bot to wait
stop_liftedThe orders are so small that the stop loss is placed with a little extra size so the exchange accepts it; it can only reduce the positionRaise the order sizes (investment or baseOrder) if you want the stop to match the position exactly
max_loss_before_stopThe loss limit would close the bot before its stop loss is reachedRaise maxLossUsd or move the stop closer
direction_riskShort and neutral bots lose when the price keeps moving against themCheck the direction is what you want
price_outside_rangeThe price is outside your range: the bot buys or sells its whole investment at the start, or waits on one sideMove the range around the price, or set a trigger price
levels_mergedSome levels merged after rounding to the venue's ticksLower count
small_stepSteps under 0.15 percent: most of each trade goes to feesLower count or widen the range
martingaleEach extra order is bigger than the last: losses grow fast if the price keeps goingLower volumeScale
bot_tp_below_feesThe bot-level take profit is below what fees costRaise botTpPct

Rate limits

LimitValue
Reads120 a minute per key and 240 a minute per user across keys
Writes30 a minute per key and 60 a minute per user
Changing bots (edit, pause, stop, drafts)20 a minute per key
Building bots60 points an hour per key (the builder budget, below)

Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. X-RateLimit-Reset is the moment the current one-minute window ends, as Unix time in seconds (UTC, for example 1796122860). Retry-After is different: it is a number of seconds from now. A 429 or 503 carries Retry-After. Wait that long, then retry. Do not retry faster: a key that keeps hitting the limit is slowed down. A wrong key sent again and again from one place is blocked for a few minutes.

The bot builder budget

The tools that check, save, change, copy and delete drafts and hand over links, and edit_bot, share one hourly budget of 60 points per key. What a call costs:

CallPoints
validate_bot_config, validate_two_leg_bot_config, edit_bot1
check_bot_config, create_bot_draft, update_bot_draft, duplicate_bot, create_two_leg_bot_link2
list_bot_drafts, delete_bot_drafta quarter
Any of the above that is refused (bad settings, a draft that is not there, a busy limit)a quarter, whatever its price
A call repeated with the same idempotency keynothing

A refused call costs almost nothing, so a wrong guess is cheap, but a loop of refused calls still runs out. The hour starts at the first call and the budget is back to full when it ends.

You can always see it. get_key_limits returns build_budget with limit_points_per_hour, remaining_points and resets_at. Every answer of a builder tool carries the headers X-Build-Budget-Limit, X-Build-Budget-Remaining and X-Build-Budget-Reset (Unix seconds). When it is used up the answer is rate_limited (429) with retry_after_s, a Retry-After header and details.limit_points_per_hour, details.remaining_points and details.resets_at.

How fast a key starts and stops working

A new key is known to the API within seconds: the first call with a key the API has not seen yet makes it look again at once. Allow up to a minute. A revoked or expired key, and an owner's kill switch, stop working at the latest when the API's list of keys is next refreshed: normally within 30 seconds, never later than 60 seconds. This is deliberate: the list is read from the core database every 10 seconds at most, through a shared cache, so many instances share one read.

Retry safely with an idempotency key

Every tool that changes something takes an idempotency key: idempotency_key over MCP, the Idempotency-Key header over REST. It is 8 to 80 characters, letters, digits, - and _. Make a new one for every action you mean to do once, and send the same one again when you retry the same action after a timeout or an error you could not read.

  • The same key with the same arguments returns the first answer again, marked replayed: true, and does nothing a second time.
  • The same key with different arguments is refused with idempotency_conflict (409). Over REST the key is the Idempotency-Key header: 8 to 80 characters, letters, digits, - and _ (a bad one is refused with a sentence that names the header). This code replaces idempotency_mismatch (422), which Prow used before: a script that matched the old code or status should match the new one. For a pause, stop, resume or edit this holds on every server instance, because Prow keeps a fingerprint of the arguments with the command.
  • A key is remembered for 10 minutes.

A pause, resume, stop or edit is a request: it returns 202 and Prow applies it within seconds. Confirm with get_bot. Do not send it again until you have looked.

Last updated