fix test exception codes
This commit is contained in:
@@ -9,6 +9,7 @@ export const API_ERROR_CODE = {
|
|||||||
INSUFFICIENT_BALANCE: '40754',
|
INSUFFICIENT_BALANCE: '40754',
|
||||||
QTY_GREATER_THAN_MAX_OPEN: '40762',
|
QTY_GREATER_THAN_MAX_OPEN: '40762',
|
||||||
FUTURES_ORDER_CANCEL_NOT_FOUND: '40768',
|
FUTURES_ORDER_CANCEL_NOT_FOUND: '40768',
|
||||||
|
FUTURES_INSUFFICIENT_POSITION_NO_TPSL: '40891',
|
||||||
QTY_LESS_THAN_MINIMUM: '43006',
|
QTY_LESS_THAN_MINIMUM: '43006',
|
||||||
/** Parameter verification exception margin mode == FIXED */
|
/** Parameter verification exception margin mode == FIXED */
|
||||||
PARAMETER_EXCEPTION: '40808',
|
PARAMETER_EXCEPTION: '40808',
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
|||||||
data: {},
|
data: {},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(`submitOrder() exception: `, e.body);
|
// console.log(`submitOrder() exception: `, e.body);
|
||||||
expect(e.body).toMatchObject({
|
expect(e.body).toMatchObject({
|
||||||
// seems to be the new "insufficient balance" error, informed bitget on 7th feb
|
// seems to be the new "insufficient balance" error, informed bitget on 7th feb
|
||||||
code: API_ERROR_CODE.QTY_GREATER_THAN_MAX_OPEN,
|
code: API_ERROR_CODE.QTY_GREATER_THAN_MAX_OPEN,
|
||||||
@@ -235,8 +235,9 @@ describe('Private Futures REST API POST Endpoints', () => {
|
|||||||
data: {},
|
data: {},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
// console.log(e.body);
|
||||||
expect(e.body).toMatchObject({
|
expect(e.body).toMatchObject({
|
||||||
code: API_ERROR_CODE.FUTURES_POSITION_DIRECTION_EMPTY,
|
code: API_ERROR_CODE.FUTURES_INSUFFICIENT_POSITION_NO_TPSL,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user