diff --git a/src/constants/enum.ts b/src/constants/enum.ts index 68e4ec4..58ba6ad 100644 --- a/src/constants/enum.ts +++ b/src/constants/enum.ts @@ -69,6 +69,7 @@ export const API_ERROR_CODE = { NO_ACTIVE_ORDER: 3100205, /** E.g. USDC Options trading when the account hasn't been opened for USDC Options yet */ ACCOUNT_NOT_EXIST: 3200200, + SET_MARGIN_MODE_FAILED_USDC: 3400045, INCORRECT_MMP_PARAMETERS: 3500712, INSTITION_MMP_PROFILE_NOT_FOUND: 3500713, } as const; diff --git a/test/usdc/perpetual/private.write.test.ts b/test/usdc/perpetual/private.write.test.ts index ef13efc..9eaf4ba 100644 --- a/test/usdc/perpetual/private.write.test.ts +++ b/test/usdc/perpetual/private.write.test.ts @@ -71,7 +71,11 @@ describe('Private USDC Perp REST API POST Endpoints', () => { it('setMarginMode()', async () => { expect(await api.setMarginMode('REGULAR_MARGIN')).toMatchObject( - successResponseObjectV3() + { + retCode: API_ERROR_CODE.SET_MARGIN_MODE_FAILED_USDC, + retMsg: '', + } + // successResponseObjectV3() ); });