import https from 'https';
import { Alpha, AlphaRestAPI } from '@binance/alpha';
const httpsAgent = new https.Agent({
rejectUnauthorized: true,
});
const configurationRestAPI = {
apiKey: 'your-api-key',
apiSecret: 'your-api-secret',
httpsAgent,
};
const client = new Alpha({ configurationRestAPI });
client.restAPI
.getExchangeInfo()
.then((res) => res.data())
.then((data: AlphaRestAPI.GetExchangeInfoResponse) => console.log(data))
.catch((err) => console.error(err));