comment on example & fix failing test

This commit is contained in:
tiagosiebler
2023-02-17 12:26:19 +00:00
parent eeb7e2b9d3
commit 7669c037c8
2 changed files with 5 additions and 2 deletions

View File

@@ -16,7 +16,8 @@ const client = new ContractClient({
try { try {
/** /**
* You can make raw HTTP requests without the per-endpoint abstraction, * 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', { const rawCall = await client.getPrivate('/v5/order/realtime', {
category: 'linear', category: 'linear',

View File

@@ -30,7 +30,9 @@ describe('Private Contract REST API GET Endpoints', () => {
expect( expect(
await api.getHistoricOrders({ symbol, cursor, limit: 1 }) await api.getHistoricOrders({ symbol, cursor, limit: 1 })
).toMatchObject({ ).toMatchObject({
retCode: API_ERROR_CODE.DB_ERROR_WRONG_CURSOR, // retCode: API_ERROR_CODE.DB_ERROR_WRONG_CURSOR,
...successResponseObjectV3(),
retMsg: 'OK',
}); });
}); });