initial commit, add bitget rest api and websockets connector
This commit is contained in:
16
examples/rest-spot-public.ts
Normal file
16
examples/rest-spot-public.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { SpotClient } from '../src/index';
|
||||
|
||||
// or
|
||||
// import { SpotClient } from 'bitget-api';
|
||||
|
||||
const client = new SpotClient();
|
||||
|
||||
const symbol = 'BTCUSDT_SPBL';
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
console.log('getCandles: ', await client.getCandles(symbol, '1min'));
|
||||
} catch (e) {
|
||||
console.error('request failed: ', e);
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user