feat(#186): add proxy & rate limits example. Misc doc updates.
This commit is contained in:
23
examples/deprecated/rest-linear-public.ts
Normal file
23
examples/deprecated/rest-linear-public.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { LinearClient } from '../../src/index';
|
||||
|
||||
// or
|
||||
// import { LinearClient } from 'bybit-api';
|
||||
|
||||
const client = new LinearClient();
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
// console.log('getSymbols: ', await client.getSymbols());
|
||||
// console.log('getOrderBook: ', await client.getOrderBook(symbol));
|
||||
console.log(
|
||||
'getKline: ',
|
||||
await client.getKline({
|
||||
symbol: 'ETHUSDT',
|
||||
interval: 'D',
|
||||
from: 1,
|
||||
}),
|
||||
);
|
||||
} catch (e) {
|
||||
console.error('request failed: ', e);
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user