From 7669c037c826bd0c1b178b500e9de89482131a7d Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Fri, 17 Feb 2023 12:26:19 +0000 Subject: [PATCH] comment on example & fix failing test --- examples/rest-raw-v3sign.ts | 3 ++- test/contract/private.read.test.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/rest-raw-v3sign.ts b/examples/rest-raw-v3sign.ts index 2a2af56..0ba7679 100644 --- a/examples/rest-raw-v3sign.ts +++ b/examples/rest-raw-v3sign.ts @@ -16,7 +16,8 @@ const client = new ContractClient({ try { /** * You can make raw HTTP requests without the per-endpoint abstraction, - * e.g. if an endpoint is missing and you're blocked (but please raise an issue if you're missing an endpoint) + * The REST ContractClient uses bybit's v3 signature mechanism, so it can be used for raw calls to any v3-supporting endpoints (incl the V5 APIs). + * e.g. if an endpoint is missing and you desperately need it (but please raise an issue or PR if you're missing an endpoint) */ const rawCall = await client.getPrivate('/v5/order/realtime', { category: 'linear', diff --git a/test/contract/private.read.test.ts b/test/contract/private.read.test.ts index 9ab08d8..7777495 100644 --- a/test/contract/private.read.test.ts +++ b/test/contract/private.read.test.ts @@ -30,7 +30,9 @@ describe('Private Contract REST API GET Endpoints', () => { expect( await api.getHistoricOrders({ symbol, cursor, limit: 1 }) ).toMatchObject({ - retCode: API_ERROR_CODE.DB_ERROR_WRONG_CURSOR, + // retCode: API_ERROR_CODE.DB_ERROR_WRONG_CURSOR, + ...successResponseObjectV3(), + retMsg: 'OK', }); });