Example: rest-usdm-private-get.ts
Static snapshot for Binance/Rest/Futures/rest-usdm-private-get.ts.
Example Path
Binance/Rest/Futures/rest-usdm-private-get.ts
Source Link
Repository source: https://github.com/sieblyio/crypto-api-examples/blob/master/examples/Binance/Rest/Futures/rest-usdm-private-get.ts
Code Snapshot
import { USDMClient } from 'binance';
// import axios from 'axios';
const key = process.env.API_KEY_COM || 'APIKEY';
const secret = process.env.API_SECRET_COM || 'APISECRET';
const client = new USDMClient({
api_key: key,
api_secret: secret,
beautifyResponses: true,
disableTimeSync: true,
});
(async () => {
try {
const allNotionalBrackets = await client.getNotionalAndLeverageBrackets();
console.log('allNotionalBrackets: ', allNotionalBrackets);
const btcNotionalBrackets = await client.getNotionalAndLeverageBrackets({
symbol: 'BTCUSDT',
});
console.log(
'btcNotionalBrackets: ',
JSON.stringify(btcNotionalBrackets, null, 2),
);
} catch (e) {
console.error('request failed: ', e);
}
})();
This is a static, crawlable snapshot. The interactive app loads after JavaScript starts and can refresh live data.