Binance TypeScript SDK example: rest-portfoliomargin-public.ts

Binance TypeScript SDK REST Portfolio Margin example for Binance/Rest/Portfolio Margin/rest-portfoliomargin-public.ts. Source code reference for exchange REST, WebSocket, and API integration patterns with links to matching Siebly SDK documentation.

Example Path

Binance/Rest/Portfolio Margin/rest-portfoliomargin-public.ts

Source Link

Repository source: https://github.com/sieblyio/crypto-api-examples/blob/master/examples/Binance/Rest/Portfolio Margin/rest-portfoliomargin-public.ts

Related SDK Docs

Example Source

import { PortfolioClient } from 'binance';

const client = new PortfolioClient({
  beautifyResponses: true,
});

(async () => {
  try {
    // const serverTime = await client.getServerTime();
    // console.log('serverTime: ', serverTime);

    const res = await client.testConnectivity();
    console.log('res', res);
  } catch (e) {
    console.error('request failed: ', e);
  }
})();