Error codes
Your code while it runs5
| Code | What it means | Kind | Where you see it |
|---|---|---|---|
| COMPUTE_FAILED | compute() raised an error. | Runtime | Runs |
| COMPUTE_NOT_PURE | compute() changed the strategy's own attributes or the data it was given. | Runtime | Runs |
| HOOK_FAILED | A hook raised an error during the run. | Runtime | Runs |
| PASS_HOOK_FAILED | score, accept or report raised an error or returned a value Forge cannot use. | Runtime | Runs |
| SIGNALS_INVALID | compute() returned signals Forge cannot use. | Runtime | Runs |
When Forge loads your file56
| Code | What it means | Kind | Where you see it |
|---|---|---|---|
| ASSET_NOT_BUNDLED | A declared asset was not provided with the source. | Compile | The editor |
| BAD_ASSET | A declared asset path or file is refused. | Compile | The editor |
| BAD_ATTRIBUTE | symbols, direction, order_mode or warmup has a value Forge does not accept. | Compile | The editor |
| BAD_BARS | The bars declaration is invalid. | Compile | The editor |
| BAD_CONSTRAINT | A constraint is not a function of the settings that returns True or False. | Compile | The editor |
| BAD_EXPORTS | A library's __all__ is not a list of names the file defines. | Compile | The editor |
| BAD_META | meta or the class docstring is invalid. | Compile | The editor |
| BAD_OBJECTIVE | objective names a way to rank results that Forge does not have, or custom without a score method. | Compile | The editor |
| BAD_SCHEDULE | A scheduled method is declared wrongly. | Compile | The editor |
| BAD_SETTING | A setting declaration is invalid. | Compile | The editor |
| CHART_ONLY_CALL | A strategy uses fg.draw or fg.alert. Strategies draw through plots and ctx.plot. | Compile | The editor |
| CLASS_CHECKED | The strategy was loaded from a class, so the checks that read the file have not run yet. | Compile | The editor |
| CONSTRAINT_NEEDS_CODE | A constraint is not a plain comparison of number settings, so only running the strategy checks it. | Compile | The editor |
| DEFAULTS_REJECTED | The default settings break a constraint. | Compile | The editor |
| DEPRECATED | The file uses a Forge name that is deprecated. | Compile | The editor |
| DYNAMIC_SERIES | A series is chosen in a way Forge cannot read before the run. | Compile | The editor |
| FORGE_API_INVALID | FORGE_API is not a supported whole number, or is set more than once. | Compile | The editor |
| FORGE_API_LATE | FORGE_API comes after the first class or function. | Compile | The editor |
| FORGE_API_MISSING | The file has no FORGE_API line. | Compile | The editor |
| FORGE_API_OLD | The file's FORGE_API level has a newer one after it and has a date after which it is retired. | Compile | The editor |
| FORGE_API_RETIRED | The file's FORGE_API level is retired. Saved versions still open and run. | Compile | The editor |
| FORGE_API_RETIRED_SAVE | A new version cannot be saved at a retired FORGE_API level. | Compile | The editor |
| HOOK_NAME_CLOSE | A method name is close to a hook name, so Forge never calls it. | Compile | The editor |
| HOOK_RETURN | A hook's return annotation does not match what Forge expects. | Compile | The editor |
| HOOK_SIGNATURE | A hook takes the wrong arguments, or is not a plain method. | Compile | The editor |
| IMPURE_COMPUTE | compute() reads the clock or uses randomness. | Compile | The editor |
| INTERNAL_IMPORT | The file imports btpro. Developer code imports forge only. | Compile | The editor |
| LATER_HOOK | The hook is not available at this FORGE_API level. | Compile | The editor |
| LINT_CENTRED_WINDOW | A centred window reads bars after the one it is placed on. | Compile | The editor |
| LINT_FIT_FULL_HISTORY | A model is fitted on the whole history inside compute(), so early bars learn from later ones. | Compile | The editor |
| LINT_LAST_ROW_IN_COMPUTE | Code in compute() reads the last bar of the whole history. | Compile | The editor |
| LINT_MODE_BRANCH | The code depends on the run mode, so a backtest and a live run can trade differently. | Compile | The editor |
| LINT_MODULE_STATE | A module-level name is changed by strategy code, so results depend on what ran before. | Compile | The editor |
| LINT_NEGATIVE_SHIFT | A negative shift moves a later bar's value onto an earlier bar. | Compile | The editor |
| LINT_REVERSED_SERIES | A series is reversed before a running calculation, so early bars read later ones. | Compile | The editor |
| LINT_UNSEEDED_RANDOM | A random source is not seeded, so two runs of the same file differ. | Compile | The editor |
| LINT_WHOLE_SERIES_AGGREGATE | A calculation in compute() uses every bar, including later ones. | Compile | The editor |
| LOAD_FAILED | Running the top level of the file raised an error. | Compile | The editor |
| MANY_PROGRAMS | The file defines more than one strategy class, or more than one indicator class. | Compile | The editor |
| MIXED_PROGRAM | The file defines both a strategy and an indicator. | Compile | The editor |
| NAMING | A class or function name does not follow Forge's naming style. | Compile | The editor |
| NO_PROGRAM | The file defines no strategy class and no library names in __all__. | Compile | The editor |
| PROP_AUTOMATION_BANNED | The firm behind the chosen rule preset does not allow automated trading. | Compile | The editor |
| PROP_PRESET_UNKNOWN | The rule preset the file names is not one Forge has. | Compile | The editor |
| PROP_RULES_OLD | The rule preset was last checked a while ago, and the firm may have changed its rules. | Compile | The editor |
| RANGE_MERGED | A whole-number setting on a log scale gives fewer values than its step implies. | Compile | The editor |
| RANGE_WITHOUT_STEP | A number setting has min and max but no step or values, so a sweep keeps it at its default. | Compile | The editor |
| REMOVED_NAME | The file uses a Forge name that was removed at its FORGE_API level. | Compile | The editor |
| RESERVED_OVERRIDE | The strategy replaces a method Forge relies on, such as __init__. | Compile | The editor |
| RUN_SETTING_IN_CODE | A class attribute is named like a run setting, which the Tester sets for each run. | Compile | The editor |
| SYNTAX_ERROR | The file is not valid Python, or not UTF-8 text. | Compile | The editor |
| UNDECLARED_SYMBOL | The strategy reads a symbol it does not list in symbols. | Compile | The editor |
| UNGROUPED_AND_OR | An expression mixes & and | without brackets. | Compile | The editor |
| UNKNOWN_HOOK | A method whose name starts with on_ is not a Forge hook. | Compile | The editor |
| UNSAFE_LOAD | The file reads data in a way that can run code hidden in it, such as pickle. | Compile | The editor |
| WRONG_KIND | The file is an indicator where a strategy or a library was expected. | Compile | The editor |
Before a test starts14
| Code | What it means | Kind | Where you see it |
|---|---|---|---|
| CAL_COVERAGE_SHORT | The news calendar does not cover the run's full date range. | Data | Runs |
| CAL_NO_TZ | The news calendar has no time zone Forge can resolve. | Data | Runs |
| CAL_UNKNOWN | The news calendar the run points to is not on file. | Data | Runs |
| CLOCK_DISAGREE | The run's instruments were measured on broker clocks too far apart for one offset. | Data | Runs |
| CLOCK_INDETERMINATE | Forge cannot work out the broker's time offset for any instrument in the run. | Data | Runs |
| CONV_SIDE_UNAVAILABLE | Forge has no exchange rate to convert an instrument into the account currency. | Data | Runs |
| EM_FIELD_INVALID | A value in the run's execution settings is not one Forge recognises. | Runtime | Runs |
| EM_LEAF_UNSUPPORTED | An execution setting is not available yet on either engine. | Runtime | Runs |
| EM_VERSION_AHEAD | The run's execution settings are newer than this engine can read. | Runtime | Runs |
| KERNEL_V2_DONCHIAN | A Donchian edge cannot run on the engine the execution settings select. | Runtime | Runs |
| PROFILE_FIELD_ABSENT | The selected broker profile lacks a figure the run needs. | Data | Runs |
| QUOTES_PARTIAL | Buy and sell prices cover only part of the run's date range. | Data | Runs |
| RULE_PROFILE_INVALID | The rules profile attached to the run failed its own checks. | Runtime | Runs |
| SEED_REQUIRED | Random slippage is on without a fixed seed, so the result could not be repeated. | Runtime | Runs |
Tests, strategies and your allowance49
| Code | What it means | Kind | Where you see it |
|---|---|---|---|
| batch_cap_exceeded | One request already stored the most runs a single request may store. | Limit | Runs |
| broker_profile_required | Stop and target distances are in points, and no broker profile says what a point is. | Data | Runs |
| combo_cap_exceeded | The run asks for more combinations than one run may test. | Limit | Runs |
| credits_exhausted | The run stopped because the account ran out of credits while it was running. | Allowance | Runs |
| daily_run_limit | An account on the free allowance can start only so many runs in one UTC day. | Allowance | Runs |
| devcode_import_cooldown | Your code timed out while loading three times in a row, so runs that use it are paused. | Runtime | Runs, The editor |
| forge_code_cooldown | Runs that use your own code are paused for a while after repeated resource or rule breaches. | Runtime | Runs, The editor |
| forge_compute_suspended | Forge compute is suspended on the account after repeated runs broke the usage rules. | Access | Runs |
| gate_off | Forge cloud is switched off at the platform level, for every account. | Access | Runs, Strategies, Custom indicators |
| insufficient_credits | There are not enough credits to hold what this run or upload needs. | Allowance | Runs, Data uploads |
| listing_platform_account_missing | Forge could not start the test of a published strategy. | Runtime | |
| listing_platform_strategy_limit | Forge has no room to take on another strategy for testing. | Runtime | |
| listing_setup_data_missing | Forge does not hold the licensed market data the test of this strategy needs. | Data | |
| listing_setup_invalid | The standard setup for the strategy's market is missing or cannot be run. | Runtime | |
| listing_verdict_budget_reached | Forge has run as many strategy tests as it runs in one day. | Allowance | |
| listing_version_not_runnable | The published version of the strategy cannot be tested. | Publish | |
| max_agents | Your account already has the most paired machines it may. | Allowance | |
| no_combos_produced | The settings produce no combinations to test, so nothing ran. | Runtime | Runs |
| not_leased | The run is not currently held by the machine that reported on it. | Runtime | Runs |
| pair_failed | The pairing code is wrong, has expired or was already used. | Access | |
| payload_too_large | The request body is larger than the route accepts. | Limit | Runs, Strategies, Data uploads, Custom indicators, Charts |
| preset_limit | You already have the most saved setups your account may hold. | Allowance | Strategies |
| preset_name_taken | A saved setup already has this name. | Publish | Strategies |
| preset_not_found | That saved setup does not exist or is not yours. | Access | Strategies |
| published_cap_exceeded | Your account already stores the most published runs it may. | Publish | |
| quota_exhausted | An account allowance is full: custom indicators, their versions, or unfinished indicator chats. | Allowance | Custom indicators |
| spend_cap_raise_first | Resuming paused runs needs a higher cap first, because the month's spending is already at it. | Allowance | |
| spend_cap_reached | This run does not fit under your monthly spending cap. | Allowance | Runs |
| strategy_check_bad_format | A check's report is exported as json or csv, and the request named another format. | Compile | Strategies |
| strategy_check_code_only | Checks run on code versions, and this version is a Studio version. | Compile | Strategies |
| strategy_check_not_finished | The check is still running, so its report cannot be exported yet. | Runtime | Strategies |
| strategy_check_not_found | That check does not exist for this version. | Access | Strategies |
| strategy_check_not_ready | The version has not passed its file check yet, so the full check cannot start. | Compile | Strategies |
| strategy_conflict | The strategy was changed somewhere else after the copy your save was based on. | Publish | Strategies |
| strategy_limit | You already have the most active strategies your account may hold. | Allowance | Strategies |
| strategy_not_checked | That version of a code strategy has not passed its check yet. | Compile | Runs, The editor |
| strategy_not_declarative | The strategy uses code the Studio has no block for. | Compile | Strategies, The editor |
| strategy_not_found | That strategy does not exist, is archived, or is not yours. | Access | Strategies, Runs |
| strategy_revision_not_found | The strategy has no version with that number. | Access | Runs |
| strategy_spec_invalid | The Strategy Spec does not follow its schema. | Compile | Strategies |
| strategy_spec_legacy | The Strategy Spec has no forge_api, so it is in the older Studio format. | Compile | Strategies |
| strategy_spec_level_unsupported | The Strategy Spec was saved for a FORGE_API level this version of Forge does not run. | Compile | Strategies |
| strategy_to_spec_busy | Reading the code for the Studio took too long, or the service that reads it was busy. | Runtime | Strategies, The editor |
| strategy_version_limit | The strategy already holds the most saved versions one strategy may have. | Allowance | Strategies |
| strategy_version_not_code | Only a code version that passed its check can be opened in the Studio. | Compile | Strategies, The editor |
| strategy_version_not_found | That saved version does not exist, or the strategy is not yours. | Access | Strategies |
| tier_required | The route you called belongs to a feature that is part of the Paid plan. | Access | |
| too_many_queued | You already have the most runs waiting or running at one time. | Allowance | Runs |
| unknown_agent | The machine is not paired with your account, or its pairing was revoked. | Access |
Price data and uploads20
| Code | What it means | Kind | Where you see it |
|---|---|---|---|
| broker_profile_invalid | The broker profile saved with the run could not be read. | Data | Runs |
| conversion_pair_missing | A currency-conversion dataset for your account currency is missing. | Data | Runs |
| dataset_bad_symbol | The symbol is not 2 to 20 capital letters and digits. | Data | Data uploads |
| dataset_empty_file | The dataset record declares a size of zero bytes. | Data | Data uploads |
| dataset_exists | You already have data for this symbol. | Data | Data uploads |
| dataset_in_use | A queued or running run uses this dataset, so it cannot be deleted yet. | Data | Data uploads |
| dataset_ingesting | The dataset is still being processed, so it cannot be deleted yet. | Data | Data uploads |
| dataset_not_ready | A symbol the run names has no dataset that is ready. | Data | Runs, Data uploads |
| dataset_too_large | The plan for sending the file in parts is outside what is accepted. | Limit | Data uploads |
| digest_mismatch | The uploaded parts do not add up to the checksum expected for the whole file. | Data | Data uploads |
| forge_upstream_unconfigured | Uploads are not available because the upload service is not set up. | Data | Data uploads |
| ingest_dispatch_uncertain | Processing has very likely started, but Forge lost the confirmation. | Data | Data uploads |
| ingest_scratch_insufficient | The file is larger than the processing service can hold while it works on it. | Limit | Data uploads |
| part_digest_mismatch | A part of the upload does not match the checksum sent with it. | Data | Data uploads |
| part_plan_inconsistent | The number of parts does not match the file size and the part size. | Data | Data uploads |
| parts_missing | Some parts of the upload have not been received. | Data | Data uploads |
| parts_unavailable | Storage did not answer in time. | Data | Data uploads |
| storage_frozen | Your storage is frozen until the storage balance is paid. | Allowance | Data uploads |
| storage_quota_exceeded | The file does not fit in the storage your plan includes. | Allowance | Data uploads |
| ticket_budget_exhausted | The upload link has been used for as many requests as it allows. | Limit | Data uploads |
Custom indicators18
| Code | What it means | Kind | Where you see it |
|---|---|---|---|
| custom_indicator_not_available | A custom indicator in the run does not exist, is not yours, or has not passed its checks. | Access | Runs |
| custom_indicators_not_publishable | A run cannot be published because a custom indicator it used is no longer available. | Publish | |
| description_too_short | The description is too short to build an indicator from. | Data | Custom indicators |
| duplicate_indicator_name | You already have an indicator with that name. | Publish | Custom indicators |
| duplicate_indicator_versions | The run names two versions of the same custom indicator. | Data | Runs |
| expert_advisor_not_supported | The file places trades, so it is an Expert Advisor and not an indicator. | Compile | Custom indicators |
| file_too_large | The file is larger than the limit for an indicator's source. | Limit | Custom indicators |
| indicator_deleted | The indicator was deleted, so its chat cannot continue. | Access | Custom indicators |
| invalid_primary_output | The indicator has several outputs and no main one. | Compile | Custom indicators |
| model_pricing_unconfigured | The assistant is not fully set up, so the turn was not started. | Runtime | Custom indicators |
| model_unavailable | The assistant's model could not be found, so the turn was not started. | Runtime | Custom indicators |
| no_executor_available | No machine is available to check or build indicators right now. | Runtime | Custom indicators |
| rights_not_confirmed | A conversion needs your confirmation that you own the code or may convert it. | Access | Custom indicators |
| source_too_large_for_model | The conversation and source are too long for the assistant to read in one turn. | Limit | Custom indicators |
| state_conflict | The chat moved on, or is not ready for that action. | Publish | Custom indicators |
| too_many_files | The source bundle already holds the most files it may. | Limit | Custom indicators |
| unresolved_translation | Some parts of the source could not be translated, and each needs your decision. | Compile | Custom indicators |
| unsupported_file | The file is not a kind that can be converted. | Compile | Custom indicators |
The code sandbox15
| Code | What it means | Kind | Where you see it |
|---|---|---|---|
| bad_request | The request is not valid: a field is missing, malformed, or over a size the service accepts. | Runtime | The editor, Charts |
| cap_cpu | The script used more CPU time than allowed. | Limit | The editor, Charts, Runs |
| cap_disk | The script wrote more scratch data than allowed. | Limit | Runs |
| cap_drawings | The script produced more drawings than allowed. | Limit | The editor, Charts, Runs |
| cap_idle | The script stopped making progress, so it was ended. | Limit | Runs |
| cap_import | The script took too long to load. | Limit | Runs |
| cap_memory | The script used more memory than allowed. | Limit | The editor, Charts, Runs |
| cap_outputs | The script produced more output than allowed. | Limit | The editor, Charts, Runs |
| cap_processes | The script started more processes than allowed. | Limit | Runs |
| cap_wall | The script ran longer than allowed. | Limit | The editor, Charts, Runs |
| forbidden_call | The script made a call the sandbox does not allow. | Compile | The editor, Charts, Runs |
| forge_api_unsupported | The script targets a Forge API level this engine does not support. | Compile | The editor, Charts, Runs |
| internal | Something went wrong on Forge's side, not in your code or your request. | Runtime | The editor, Charts, Runs |
| sandbox_unavailable | The code sandbox is not available right now. Try again in a few minutes. | Runtime | The editor, Charts, Runs |
| user_exception | The script raised an error. | Runtime | The editor, Charts, Runs |
When Forge refuses a request33
| Code | What it means | Kind | Where you see it |
|---|---|---|---|
| ACCOUNT_PENDING_DELETION | The account is scheduled for deletion. | Access | |
| MFA_REQUIRED | The session needs two-step verification before it can use this route. | Access | |
| account_on_hold | Forge is paused on the account. | Access | Runs, The editor |
| agent_upgrade_required | The machine that took the run is older than the run needs. | Runtime | Runs |
| auth_unavailable | Sign-in could not be checked right now. | Access | |
| code_on_hold | Running your own code is paused on the account. Built-in strategies still run. | Access | Runs, The editor |
| code_paused | Running developer code is paused on Forge for everyone. Built-in strategies still run. | Runtime | Runs, The editor |
| code_status_unavailable | Forge could not confirm that your code may run, so it did not start it. | Runtime | Runs, The editor |
| combo_axis_over_budget | One setting in the run has too many values to test. | Limit | Runs |
| custom_indicator_unavailable | A custom indicator the run uses could not be installed on the machine. | Runtime | Runs |
| data_load_failed | The machine could not load the data the run needs. | Data | Runs |
| dataset_quality_rejected | A dataset the run needs failed the data-quality check. | Data | Runs |
| dispatch_unavailable | No machine could be started for the run. | Runtime | Runs |
| forge_paused | Testing is paused for maintenance. | Runtime | Runs |
| idempotency_key_required | Starting a run needs an Idempotency-Key header. | Data | |
| idempotency_key_reused | The Idempotency-Key was already used for a different request. | Data | |
| max_claims_exhausted | The run was restarted too many times and was stopped. | Runtime | Runs |
| middleware_order | A fault on Forge's side: a check ran before the sign-in check. | Runtime | |
| not_found | There is nothing at the address. | Data | |
| queue_ttl_expired | The run waited in the queue too long and was not started. | Runtime | Runs |
| rate_limited | Too many requests came from this account or address in a short time. | Limit | |
| request_failed | The request was refused, with no more specific reason. | Runtime | |
| request_timeout | The request took longer than the service allows to answer. | Runtime | |
| run_already_finished | The run has finished, so it cannot be stopped. | Data | |
| run_failed | The run stopped with an error that has no more specific code. | Runtime | Runs |
| run_not_found | No run with that id exists, or it is not yours. | Access | |
| service_unavailable | The service is busy and could not take the request. | Runtime | |
| strategy_needs_hosted | The run uses your own code, which runs only on Oathra's cloud runner. | Runtime | Runs |
| strategy_source_unavailable | The saved strategy version the run names can no longer be read. | Runtime | Runs |
| token_expired | The access token has expired. | Access | |
| token_invalid | The access token is not valid. | Access | |
| token_required | The request has no access token. | Access | |
| unexpected_error | The machine hit an error it was not written to expect. | Runtime | Runs |