add e2e tests for v5 REST client. Fix competing tests.

This commit is contained in:
tiagosiebler
2023-02-20 16:19:56 +00:00
parent 9e2e105961
commit eeb0d63f0d
10 changed files with 498 additions and 27 deletions

View File

@@ -44,9 +44,20 @@ export const API_ERROR_CODE = {
POSITION_MODE_NOT_MODIFIED: 30083,
ISOLATED_NOT_MODIFIED: 30084,
RISK_LIMIT_NOT_EXISTS: 30090,
SUB_USER_ALREADY_EXISTS: 31005,
LEVERAGE_NOT_MODIFIED: 34036,
SAME_SLTP_MODE: 37002,
COPY_TRADE_NOT_OPEN_ORDER: 39426,
V5_ORDER_NOT_FOUND: 110001,
V5_INSUFFICIENT_BALANCE: 110007,
V5_API_KEY_PERMISSION_DENIED: 10005,
V5_CROSS_ISOLATED_MARGIN_NOT_CHANGED: 110026,
V5_LEVERAGE_NOT_CHANGED: 110043,
V5_MARGIN_MODE_NOT_CHANGED: 110073,
V5_TPSL_NOT_CHANGED: 10001,
V5_RISK_ID_NOT_CHANGED: 10001,
V5_AUTO_ADD_MARGIN_NOT_CHANGED: 10001,
V5_TPSL_ERROR_NO_POSITION: 10001,
QTY_EXCEEDS_MAX_LIMIT: 130006,
ORDER_NOT_FOUND_OR_TOO_LATE_LINEAR: 130010,
ORDER_COST_NOT_AVAILABLE: 130021,
@@ -56,6 +67,7 @@ export const API_ERROR_CODE = {
AUTO_ADD_MARGIN_NOT_MODIFIED: 130060,
INSUFFICIENT_BALANCE_FOR_ORDER_COST_LINEAR: 130080,
SAME_SLTP_MODE_LINEAR: 130150,
TRANSFER_ID_EXISTS: 131214,
RISK_ID_NOT_MODIFIED: 134026,
CONTRACT_ORDER_NOT_EXISTS: 140001,
CONTRACT_INSUFFICIENT_BALANCE: 140007,
@@ -63,7 +75,10 @@ export const API_ERROR_CODE = {
CONTRACT_MARGIN_MODE_NOT_MODIFIED: 140026,
CONTRACT_RISK_LIMIT_INFO_NOT_EXISTS: 140031,
CONTRACT_SET_LEVERAGE_NOT_MODIFIED: 140043,
SUB_USER_NOT_FOUND: 141009,
SPOT_LEVERAGE_TOKEN_ORDER_NOT_FOUND: 175007,
SPOT_MARGIN_NOT_ENABLED: 176008,
SPOT_MARGIN_QUESTIONNAIRE_NOT_SUBMIT: 176037,
/** E.g. USDC Options trading, trying to access a symbol that is no longer active */
CONTRACT_NAME_NOT_EXIST: 3100111,
ORDER_NOT_EXIST: 3100136,