v3.3.4: fix optional param in contract client, add js/ts samples for contract client, fix e2e open interest limit test, update readme

This commit is contained in:
tiagosiebler
2022-11-29 08:59:16 +00:00
parent f7fb1a560c
commit 84b71f5c13
8 changed files with 50 additions and 6 deletions

View File

@@ -71,11 +71,11 @@ describe('Private Contract REST API GET Endpoints', () => {
);
});
// Doesn't work on e2e test account, something about account state. Investigating with bybit.
it.skip('getOpenInterestLimitInfo()', async () => {
// Doesn't work on e2e test account. This endpoint throws this error if the account never opened a position before.
it('getOpenInterestLimitInfo()', async () => {
expect(await api.getOpenInterestLimitInfo('ETHUSDT')).toMatchObject({
...successResponseObjectV3(),
retMsg: 'ok',
retCode: API_ERROR_CODE.PARAMS_MISSING_OR_WRONG,
retMsg: expect.stringMatching(/OI group don't exist/gim),
});
});

View File

@@ -31,6 +31,7 @@ export function successResponseObjectV3() {
return {
result: expect.any(Object),
...successEmptyResponseObjectV3(),
// retMsg: 'ok',
};
}