bybit/ret_code.rs
1//! Frequent Bybit `retCode` values, as found in [`Error::Api`](crate::Error::Api).
2//!
3//! See <https://bybit-exchange.github.io/docs/v5/error> for the full list.
4
5/// Invalid request parameters.
6pub const PARAMS_ERROR: i64 = 10001;
7/// The request timestamp is outside `recv_window` (see
8/// [`http::Client::sync_time`](crate::http::Client::sync_time)).
9pub const TIMESTAMP_OUT_OF_WINDOW: i64 = 10002;
10/// The API key is invalid or belongs to another environment (mainnet,
11/// testnet, demo).
12pub const INVALID_API_KEY: i64 = 10003;
13/// The signature does not match.
14pub const INVALID_SIGNATURE: i64 = 10004;
15/// The API key lacks the permission for this endpoint.
16pub const PERMISSION_DENIED: i64 = 10005;
17/// Too many requests: the per-UID rate limit was exceeded.
18pub const RATE_LIMITED: i64 = 10006;
19/// User authentication failed.
20pub const AUTHENTICATION_FAILED: i64 = 10007;
21/// The request IP is not bound to the API key.
22pub const IP_NOT_ALLOWED: i64 = 10010;
23/// Internal server error or service restarting.
24pub const SERVER_ERROR: i64 = 10016;
25/// Route not found.
26pub const ROUTE_NOT_FOUND: i64 = 10017;
27/// Too many requests: the per-IP rate limit was exceeded.
28pub const IP_RATE_LIMITED: i64 = 10018;
29/// Trading is banned for the account.
30pub const TRADING_BANNED: i64 = 10027;
31/// The symbol is not in the API key's symbol whitelist.
32pub const SYMBOL_NOT_ALLOWED: i64 = 10029;
33/// The order does not exist (derivatives).
34pub const ORDER_NOT_FOUND: i64 = 110001;
35/// The wallet balance is insufficient (derivatives).
36pub const INSUFFICIENT_WALLET_BALANCE: i64 = 110004;
37/// The available balance is insufficient (derivatives).
38pub const INSUFFICIENT_AVAILABLE_BALANCE: i64 = 110007;
39/// The position mode is already the requested one.
40pub const POSITION_MODE_NOT_MODIFIED: i64 = 110025;
41/// The leverage is already the requested one.
42pub const LEVERAGE_NOT_MODIFIED: i64 = 110043;
43/// The balance is insufficient (spot).
44pub const SPOT_INSUFFICIENT_BALANCE: i64 = 170131;
45/// The order does not exist (spot).
46pub const SPOT_ORDER_NOT_FOUND: i64 = 170213;