feat(#99): introduce spot REST client

This commit is contained in:
tiagosiebler
2021-08-15 12:12:10 +01:00
parent 10ac2ec384
commit 72c7630a29
7 changed files with 449 additions and 7 deletions

View File

@@ -0,0 +1,18 @@
import { SpotClient } from '../src/index';
// or
// import { SpotClient } from 'bybit-api';
const client = new SpotClient();
const symbol = 'BTCUSDT';
(async () => {
try {
// console.log('getSymbols: ', await client.getSymbols());
// console.log('getOrderBook: ', await client.getOrderBook(symbol));
console.log('getOrderBook: ', await client.getOrderBook(symbol));
} catch (e) {
console.error('request failed: ', e);
}
})();