feat(#186): add proxy & rate limits example. Misc doc updates.

This commit is contained in:
tiagosiebler
2023-12-22 11:47:54 +00:00
parent 923b1b02e0
commit 48eaa4785d
17 changed files with 216 additions and 68 deletions

View File

@@ -0,0 +1,21 @@
/**
* This is the pure javascript version of the `rest-contract-public.ts` sample
*/
// To use a local build (testing with the repo directly), make sure to `npm run build` first from the repo root
// const { ContractClient } = require('../dist');
// or, use the version installed with npm
const { ContractClient } = require('bybit-api');
(async () => {
const client = new ContractClient();
try {
const orderbookResult = await client.getOrderBook('BTCUSDT', 'linear');
console.log('orderbook result: ', orderbookResult);
} catch (e) {
console.error('request failed: ', e);
}
})();