Skip to main content

Error Codes

All REST responses follow the same error shape:

  • success: boolean
  • errorCode: integer (only present when success=false)
  • errorMsgKey: string message key (only present when success=false)
  • data: object (may be empty)

Error codes are defined in the Java backend as RequestError (ethgas-trade-common/src/main/java/ethgas/exception/RequestError.java).

Common errors (errorCode 0-5)

errorCodeerrorMsgKeyMeaning
1error.permissionDenyPermission denied
2error.account.notExistAccount does not exist
3error.market.notExistMarket does not exist
4error.market.expiredMarket expired
5error.account.inactiveAccount inactive

System errors (errorCode 20-26)

errorCodeerrorMsgKeyMeaning
20error.system.busySystem busy
21error.system.internalInternal/unknown error
22error.system.timeoutTimeout
23error.system.validationValidation error
24error.httpMethod.unsupportedUnsupported HTTP method
25error.contentType.unsupportedUnsupported content type
26error.system.unavailableService unavailable

Trade engine errors (operation-specific)

Create order (errorCode 50-73)

errorCodeerrorMsgKey
50error.price.required
51error.price.min
52error.price.max
53error.price.step
54error.quantity.required
55error.quantity.min
56error.quantity.max
57error.quantity.step
58error.clientOrderId.duplicate
59error.orderLimit
60error.insufficientFund
61error.position.insufficient
62error.collateral.insufficient
63error.liquidity.insufficient
64error.clientOrderId.required
65error.clientOrderId.format
66error.accountId.required
67error.orderType.invalid
68error.orderType.fok.passive
69error.quantity.nonPositive
70error.market.required
71error.price.nonPositive
72error.side.required
73error.accountId.notPreconfAccount

Cancel order (errorCode 90-96)

errorCodeerrorMsgKey
90error.order.notExist
91error.accountId.required
92error.instrumentId.required
93error.orderId.required
94error.orderId.notBoth
95error.clientOrderId.invalid
96error.batchSize.max

Bundle submission (errorCode 190-194)

errorCodeerrorMsgKey
190error.bundleSubmission.market.expired
191error.bundleSubmission.preconf.insufficient
192error.bundleSubmission.preconf.max
193error.bundleSubmission.bundle.empty
194error.bundleSubmission.bundle.invalid

Account transfer (errorCode 250-253)

errorCodeerrorMsgKey
250error.insufficientFund
251error.token.unsupported
252error.fromAccountId.equals.toAccountId
253error.invalid.accountId

Owner update market (errorCode 430)

errorCodeerrorMsgKey
430error.reservedPreconf.position.insufficient

Withdraw (errorCode 310-317)

errorCodeerrorMsgKey
310error.quantity.min
311error.chain.unsupported
312error.token.unsupported
313error.insufficientFund
314error.token.daily.withdraw.capacity.exceeded
315error.withdraw.requests.empty
316error.withdraw.requestIds.empty
317error.withdraw.fee.update.quantity.invalid

API-level errors (errorCode >= 100000)

errorCodeerrorMsgKey
100000error.pendingOrDone
100001error.quantity.nonPositive
100002error.publicKey.invalid
100003error.signature.invalid
100004error.collateralPerSlot.negative
100005error.builder.notExists
100006error.validators.max
100007error.collateralPerSlot.max
100008error.builders.max
100009error.slot.invalid
100010error.login.signature.invalid
100011error.login.address.invalid
100012error.login.error.nonce.used
100013error.login.error.nonce.notExists
100014error.login.user.notExists
100015error.login.user.exists
100016error.login.refreshToken.required
100017error.login.refreshToken.conflict
100018error.login.refreshToken.invalid
100019error.login.session.notFound
100020error.validator.signature.invalid
100021error.validator.registered
100022error.validator.signature.sizeNotMatch
100023error.validator.signature.max
100024error.builder.signature.sizeNotMatch
100025error.builder.signature.max
100026error.account.id.invalid
100027error.bundle.rejection.empty
100030error.ssv.validators.required
100032error.ssv.validators.invalid
100040error.ssv.operator.signature.invalid
100041error.ssv.operator.registered
100042error.ssv.operator.address.invalid
100043error.ssv.operator.notRegistered
100044error.ssv.operator.verification.tx.invalid
100045error.ssv.operator.verification.tx.notFound
100050error.obol.validators.required
100052error.obol.validators.invalid
100060error.obol.operator.signature.invalid
100061error.obol.operator.registered
100062error.obol.operator.address.invalid
100063error.obol.operator.notRegistered
100064error.obol.operator.invalid
100070error.address.invalid

Response Codes

CodeDescription
200OK
403Forbidden
500Internal Server Error or Invalid Response
503Service Unavailable