Error Codes
All REST responses follow the same error shape:
success: booleanerrorCode: integer (only present whensuccess=false)errorMsgKey: string message key (only present whensuccess=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)
| errorCode | errorMsgKey | Meaning |
|---|---|---|
| 1 | error.permissionDeny | Permission denied |
| 2 | error.account.notExist | Account does not exist |
| 3 | error.market.notExist | Market does not exist |
| 4 | error.market.expired | Market expired |
| 5 | error.account.inactive | Account inactive |
System errors (errorCode 20-26)
| errorCode | errorMsgKey | Meaning |
|---|---|---|
| 20 | error.system.busy | System busy |
| 21 | error.system.internal | Internal/unknown error |
| 22 | error.system.timeout | Timeout |
| 23 | error.system.validation | Validation error |
| 24 | error.httpMethod.unsupported | Unsupported HTTP method |
| 25 | error.contentType.unsupported | Unsupported content type |
| 26 | error.system.unavailable | Service unavailable |
Trade engine errors (operation-specific)
Create order (errorCode 50-73)
| errorCode | errorMsgKey |
|---|---|
| 50 | error.price.required |
| 51 | error.price.min |
| 52 | error.price.max |
| 53 | error.price.step |
| 54 | error.quantity.required |
| 55 | error.quantity.min |
| 56 | error.quantity.max |
| 57 | error.quantity.step |
| 58 | error.clientOrderId.duplicate |
| 59 | error.orderLimit |
| 60 | error.insufficientFund |
| 61 | error.position.insufficient |
| 62 | error.collateral.insufficient |
| 63 | error.liquidity.insufficient |
| 64 | error.clientOrderId.required |
| 65 | error.clientOrderId.format |
| 66 | error.accountId.required |
| 67 | error.orderType.invalid |
| 68 | error.orderType.fok.passive |
| 69 | error.quantity.nonPositive |
| 70 | error.market.required |
| 71 | error.price.nonPositive |
| 72 | error.side.required |
| 73 | error.accountId.notPreconfAccount |
Cancel order (errorCode 90-96)
| errorCode | errorMsgKey |
|---|---|
| 90 | error.order.notExist |
| 91 | error.accountId.required |
| 92 | error.instrumentId.required |
| 93 | error.orderId.required |
| 94 | error.orderId.notBoth |
| 95 | error.clientOrderId.invalid |
| 96 | error.batchSize.max |
Bundle submission (errorCode 190-194)
| errorCode | errorMsgKey |
|---|---|
| 190 | error.bundleSubmission.market.expired |
| 191 | error.bundleSubmission.preconf.insufficient |
| 192 | error.bundleSubmission.preconf.max |
| 193 | error.bundleSubmission.bundle.empty |
| 194 | error.bundleSubmission.bundle.invalid |
Account transfer (errorCode 250-253)
| errorCode | errorMsgKey |
|---|---|
| 250 | error.insufficientFund |
| 251 | error.token.unsupported |
| 252 | error.fromAccountId.equals.toAccountId |
| 253 | error.invalid.accountId |
Owner update market (errorCode 430)
| errorCode | errorMsgKey |
|---|---|
| 430 | error.reservedPreconf.position.insufficient |
Withdraw (errorCode 310-317)
| errorCode | errorMsgKey |
|---|---|
| 310 | error.quantity.min |
| 311 | error.chain.unsupported |
| 312 | error.token.unsupported |
| 313 | error.insufficientFund |
| 314 | error.token.daily.withdraw.capacity.exceeded |
| 315 | error.withdraw.requests.empty |
| 316 | error.withdraw.requestIds.empty |
| 317 | error.withdraw.fee.update.quantity.invalid |
API-level errors (errorCode >= 100000)
| errorCode | errorMsgKey |
|---|---|
| 100000 | error.pendingOrDone |
| 100001 | error.quantity.nonPositive |
| 100002 | error.publicKey.invalid |
| 100003 | error.signature.invalid |
| 100004 | error.collateralPerSlot.negative |
| 100005 | error.builder.notExists |
| 100006 | error.validators.max |
| 100007 | error.collateralPerSlot.max |
| 100008 | error.builders.max |
| 100009 | error.slot.invalid |
| 100010 | error.login.signature.invalid |
| 100011 | error.login.address.invalid |
| 100012 | error.login.error.nonce.used |
| 100013 | error.login.error.nonce.notExists |
| 100014 | error.login.user.notExists |
| 100015 | error.login.user.exists |
| 100016 | error.login.refreshToken.required |
| 100017 | error.login.refreshToken.conflict |
| 100018 | error.login.refreshToken.invalid |
| 100019 | error.login.session.notFound |
| 100020 | error.validator.signature.invalid |
| 100021 | error.validator.registered |
| 100022 | error.validator.signature.sizeNotMatch |
| 100023 | error.validator.signature.max |
| 100024 | error.builder.signature.sizeNotMatch |
| 100025 | error.builder.signature.max |
| 100026 | error.account.id.invalid |
| 100027 | error.bundle.rejection.empty |
| 100030 | error.ssv.validators.required |
| 100032 | error.ssv.validators.invalid |
| 100040 | error.ssv.operator.signature.invalid |
| 100041 | error.ssv.operator.registered |
| 100042 | error.ssv.operator.address.invalid |
| 100043 | error.ssv.operator.notRegistered |
| 100044 | error.ssv.operator.verification.tx.invalid |
| 100045 | error.ssv.operator.verification.tx.notFound |
| 100050 | error.obol.validators.required |
| 100052 | error.obol.validators.invalid |
| 100060 | error.obol.operator.signature.invalid |
| 100061 | error.obol.operator.registered |
| 100062 | error.obol.operator.address.invalid |
| 100063 | error.obol.operator.notRegistered |
| 100064 | error.obol.operator.invalid |
| 100070 | error.address.invalid |
Response Codes
| Code | Description |
|---|---|
| 200 | OK |
| 403 | Forbidden |
| 500 | Internal Server Error or Invalid Response |
| 503 | Service Unavailable |