Binance Futures REST usdm public JavaScript example. Read the source code, review its SDK calls, and browse related exchange integration examples.
This example uses binance, the JavaScript and TypeScript SDK for Binance. Install it with npm install binance.
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/Futures/rest-usdm-public.ts.USDMClient.import { USDMClient } from 'binance'; const client = new USDMClient({ testnet: true, // keepAlive: true, // ... any other params,}); client .getRecentTrades({ symbol: 'BTCUSDT', limit: 2, }) .then((r) => console.log('results: ', r)) .catch((e) => console.error('exception: ', 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.