Binance Portfolio Margin REST portfoliomargin public JavaScript example. Review the source code and SDK calls, then browse related integration examples.
We use environment variables in our examples for API keys. It is your responsibility to manage and secure your keys appropriately.
binance instead of hand-written HTTP request plumbing.Binance/REST/Portfolio Margin/rest-portfoliomargin-public.ts.PortfolioClient.getServerTime(), testConnectivity().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); }})(); We use essential cookies and optional analytics. Read the Privacy Policy.
Essential cookies stay on. Toggle analytics if you want to share anonymous usage insights. You can revisit this anytime via Cookie Settings in the footer.