Open the app

Errors

Every error the agora program can refuse a transaction with, its code, its message and the instructions that raise it.

A refused instruction fails the whole transaction and moves nothing. The program's errors are Anchor custom errors, numbered from 6000. In a failed transaction's logs, the code belongs to the first Program AwiCVSwQj1KaBBfyNmpkMhB2Dj6LdKdhaSqzd47NNsmw failed line; the API reports it by name in programError.name (a refused build) or error.program.name (a failed transaction), and the app shows the name beside what failed.

CodeHexNameMessageRaised by
60000x1770OverflowAn amount exceeds the register's numeric range.deposit, withdraw, issue, post_offer, cancel_offer, take_offer, post_repo_offer, cancel_repo_offer, take_repo_offer, repay_repo, settle_default, pay_income, claim_income
60010x1771ZeroAmountThe amount must be positive.deposit, withdraw, issue, post_offer, take_offer, post_repo_offer, take_repo_offer, pay_income
60020x1772InsufficientFreeUnitsThe account has insufficient free units.post_offer, take_offer, take_repo_offer
60030x1773InsufficientFreeCashThe account has insufficient free cash.deposit, withdraw, post_offer, take_offer, post_repo_offer, repay_repo, pay_income
60040x1774InsufficientLockedCashThe account has insufficient locked cash.cancel_offer, take_offer, cancel_repo_offer, take_repo_offer
60050x1775InsufficientLockedUnitsThe account has insufficient locked units.cancel_offer, take_offer
60060x1776InsufficientPledgedUnitsThe account has insufficient pledged units.repay_repo, settle_default
60070x1777SelfTradeThe maker cannot take their own offer.take_offer, take_repo_offer
60080x1778OfferTooSmallThe requested fill exceeds the available offer.take_offer, take_repo_offer
60090x1779WrongAccountThe account does not belong to this operation.deposit, withdraw, issue, post_offer, cancel_offer, take_offer, post_repo_offer, cancel_repo_offer, take_repo_offer, repay_repo, settle_default, claim_income
60100x177aNotAdmittedThis wallet needs an admitted member account.deposit, withdraw, list_instrument, post_offer, take_offer, post_repo_offer, take_repo_offer
60110x177bInvalidIdThe offer or repo ID differs from the member counter.post_offer, post_repo_offer, take_repo_offer
60120x177cInvalidFeeAccountThe fee destination must be the recipient's cash ATA.take_offer
60130x177dTermOutOfRangeRepo terms run from one hour to 365 days.post_repo_offer
60140x177eRepoNotMaturedThe repo has not reached maturity.settle_default
60150x177fRepoMaturedThe repo has reached maturity.repay_repo
60160x1780RepoNotActiveThe repo is no longer active.repay_repo, settle_default
60170x1781InvalidRepoAmountThe available cash must cover at least one collateral unit.post_repo_offer
60180x1782FeeAboveCapThe settlement fee exceeds 50 basis points.update_config
60190x1783WrongUpgradeAuthorityThe signer must be the program upgrade authority.initialize
60200x1784WrongAdminThe signer must be the ledger admin.update_config
60210x1785WrongOperatorThe admission needs the ledger operator's signature.admit
60220x1786WrongRoleThe member must hold the issuer role.list_instrument
60230x1787NotIssuerOnly the instrument's issuer may perform this action.issue, pay_income
60240x1788BadCodeInstrument codes must contain 1 to 12 uppercase letters or digits.list_instrument
60250x1789BadNameNames must contain text and fit in 80 UTF-8 bytes.admit, list_instrument
60260x178aBadMaturityBond maturity must be in the future.list_instrument
60270x178bBadCashMintCash must use a six-decimal SPL mint.initialize
60280x178cNoUnitsOutstandingThe instrument has no units outstanding.pay_income
60290x178dNothingToClaimThe position has no whole cash atoms to claim.claim_income
60300x178eInvalidCashAccountThe wallet cash account must be its associated token account.deposit, withdraw
60310x178fUnsetAddressAuthority and fee recipient addresses must be set.initialize, update_config

What to do

ErrorWhat to do
NotAdmittedGet admitted first.
InsufficientFreeCash, InsufficientFreeUnitsFree the balance: deposit, or cancel an offer that locks it. Locked and pledged balances don't count.
InsufficientLockedCash, InsufficientLockedUnits, InsufficientPledgedUnitsThe register no longer matches the offer or repo built against. Read it again and rebuild.
OfferTooSmallSomeone filled or took part of the offer. Read the book or repo offers again.
InvalidIdAnother offer or repo of yours landed first. Build again; the API reads the new counter. A stale id can also fail as "already in use" in the System program.
SelfTradeTake someone else's offer.
RepoMaturedThe repo can only be defaulted now.
RepoNotMaturedWait for maturity; the time left is on the repo.
NothingToClaimNo whole cash atom has accrued since the last claim.
WrongRole, NotIssuerThe action is the instrument issuer's.
BadCode, BadName, BadMaturity, TermOutOfRange, InvalidRepoAmount, ZeroAmountFix the input named in the message.

Refusals only the API makes

A few builds are refused by the API before the program could see them. They arrive as CHAIN_REFUSED with the name in programError.name:

NameMeaning
AdmissionNotApprovedThe operator must approve this admission request before the wallet builds it.
InstrumentAlreadyListedThe register already has an instrument under this code.

An offer, repo offer or repo the API can't find is NOT_FOUND, with no program error.

Other errors

Errors from Anchor's account checks, the System program and SPL Token come before these: see Framework errors. The API's own error codes, for requests refused before a transaction exists, are in API errors.