[原文网址](https://connect.spotware.com/docs/open_api_2/protobuf_messages_reference_v2/open_api_error_codes)
在这里,您可以找到API在各种场合发送的错误列表。 使用以下响应发送错误
* ProtoOAErrorRes.errorCode。 请求后的一般错误。
* ProtoOAExecutionEvent.errorCode。 订单验证失败时发送错误。
* ProtoOAOrderErrorEvent.errorCode。 订单通过验证时发送错误,但之后出现错误。
*
Here you can find a list of errors sent by the API in various occasions. Errors are sent using the following responses
* ProtoOAErrorRes.errorCode. General error following a request.
* ProtoOAExecutionEvent.errorCode. Error sent when order validation fails.
* ProtoOAOrderErrorEvent.errorCode. Error sent when order passes validation but error appears after.
**Common Errors**
| **Error** | **Description** |
| --- | --- |
| UNKNOWN\_ERROR | Generic error. |
| UNSUPPORTED\_MESSAGE | Message is not supported. Wrong message |
| INVALID\_REQUEST | Generic error. Usually used when input value is not correct. |
| TIMEOUT\_ERROR | Deal execution is reached timeout and rejected. |
| ENTITY\_NOT\_FOUND | Generic error for requests by id. |
| CANT\_ROUTE\_REQUEST | Connection to Server is lost or not supported. |
| FRAME\_TOO\_LONG | Message is too large. |
| MARKET\_CLOSED | Market is closed. |
| CONCURRENT\_MODIFICATION | Order is blocked (e.g. under execution) and change cannot be applied. |
| BLOCKED\_PAYLOAD\_TYPE | Message is blocked by server. |
**Authorization Errors**
| **Error** | **Description** |
| --- | --- |
| CH\_CLIENT\_AUTH\_FAILURE | Open API client is not activated or wrong client credentials. |
| CH\_CLIENT\_NOT\_AUTHENTICATED | When a command is sent for not authorized Open API client. |
| CH\_CLIENT\_ALREADY\_AUTHENTICATED | Client is trying to authenticate twice. |
| CH\_ACCESS\_TOKEN\_INVALID | Access token is invalid. |
| CH\_SERVER\_NOT\_REACHABLE | Trading service is not available. |
| CH\_CTID\_TRADER\_ACCOUNT\_NOT\_FOUND | Trading account is not found. |
| CH\_OA\_CLIENT\_NOT\_FOUND | Could not find this client id. |
**General Errors**
| **Error** | **Description** |
| --- | --- |
| REQUEST\_FREQUENCY\_EXCEEDED | Request frequency is reached. |
| SERVER\_IS\_UNDER\_MAINTENANCE | Server is under maintenance. |
| CHANNEL\_IS\_BLOCKED | Operations are not allowed for this account. |
| CONNECTIONS\_LIMIT\_EXCEEDED | Limit of connections is reached for this Open API client. |
**Pricing Errors**
| **Error** | **Description** |
| --- | --- |
| NOT\_SUBSCRIBED\_TO\_SPOTS | When trying to subscribe to depth, trendbars, etc. without spot subscription. |
| ALREADY\_SUBSCRIBED | When subscription is requested for an active. |
| SYMBOL\_NOT\_FOUND | Symbol not found. |
| UNKNOWN\_SYMBOL | Note: to be merged with SYMBOL\_NOT\_FOUND. |
| INCORRECT\_BOUNDARIES | When requested period (from,to) is too large or invalid values are set to from/to. |
**Trading Errors**
| **Error** | **Description** |
| --- | --- |
| NO\_QUOTES | Trading cannot be done as not quotes are available. |
| NOT\_ENOUGH\_MONEY | Not enough funds to allocate margin. |
| MAX\_EXPOSURE\_REACHED | Max exposure limit is reached for a {trader, symbol, side}. |
| POSITION\_NOT\_FOUND | Position not found. |
| ORDER\_NOT\_FOUND | Order not found. |
| POSITION\_NOT\_OPEN | When trying to close a position that it is not open. |
| POSITION\_LOCKED | Position in the state that does not allow to perform an operation. |
| TOO\_MANY\_POSITIONS | Trading account reached its limit for max number of open positions and orders. |
| TRADING\_BAD\_VOLUME | Invalid volume. |
| TRADING\_BAD\_STOPS | Invalid stop price. |
| TRADING\_BAD\_PRICES | Invalid price (e.g. negative). |
| TRADING\_BAD\_STAKE | Invalid stake volume (e.g. negative). |
| PROTECTION\_IS\_TOO\_CLOSE\_TO\_MARKET | Invalid protection prices. |
| TRADING\_BAD\_EXPIRATION\_DATE | Invalid expiration. |
| PENDING\_EXECUTION | Unable to apply changes as position has an order under execution. |
| TRADING\_DISABLED | Trading is blocked for the symbol. |
| TRADING\_NOT\_ALLOWED | Trading account is in read only mode. |
| UNABLE\_TO\_CANCEL\_ORDER | Unable to cancel order. |
| UNABLE\_TO\_AMEND\_ORDER | Unable to amend order. |
| SHORT\_SELLING\_NOT\_ALLOWED | Short selling is not allowed. |
- 空白目录
- API Reference 2.0
- Getting Started
- Open Authentication
- Protocol Buffers
- Protobuf Messages Reference
- Open API Messages
- Open API Model Messages
- Open API Error Codes
- Example Projects .NET
- Spotware Proxy Cloud
- Getting Started in C#
- Test Environment
- Playground
- Frequently Asked Questions
- Lesson 1. Your First App
- Lesson 2. Get Trading Data
- Lesson 3. Get Market Data
- Lesson 4. Using Trading API