Skip to content

Commit 895e22c

Browse files
committed
fix command
1 parent f4cb6c2 commit 895e22c

2 files changed

Lines changed: 38 additions & 4 deletions

File tree

README.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ color=blueviolet 🔵q
1717

1818

1919

20-
2120
# Node Binance API
2221

2322
[![telegram](https://patrolavia.github.io/telegram-badge/chat.png)](https://t.me/nodebinanceapi) [![Yearly Downloads](https://img.shields.io/npm/dy/node-binance-api.svg)](https://www.npmjs.com/package/node-binance-api) [![jaggedsoft on X](https://img.shields.io/twitter/follow/jaggedsoft.svg?style=social)](https://x.com/jaggedsoft)
@@ -58,7 +57,7 @@ Actively maintained, typed, and safe SDK for the Binance REST APIs and Websocket
5857

5958
### Features
6059
- Spot, Margin, Futures and Delivery API
61-
- Portfolio Margin API *soon*
60+
- Portfolio Margin API *\*soon*\*
6261
- Testnet support
6362
- Proxy support (REST and WS)
6463
- Customizable HTTP headers
@@ -71,7 +70,7 @@ Actively maintained, typed, and safe SDK for the Binance REST APIs and Websocket
7170

7271
### Upgrading to v1.0.0+
7372

74-
The library was fully refactored to use modern and typed JavaScript/Typescript version, using the built-in await/async syntax and unifying some methods' signatures.
73+
The library was fully refactored to use modern and typed JavaScript/Typescript version, using the built-in await/async syntax and unifying some methods' signatures. Some important changes include the removal of callbacks as parameters of REST methods, adaptation of signatures to directly receive some important request values (symbol, orderId, ...), etc.
7574

7675
**We highly advise you to update from 0.0.X but minor adjustments might be needed.**
7776

@@ -232,6 +231,39 @@ console.info( await binance.privateFuturesRequest('v3/account') // custom future
232231
// Batch orders, remaining WebSocket streams, and better documentation will be come later
233232
```
234233
234+
### Proxy support
235+
236+
In some specific cases using a proxy is required, for example:
237+
- Exchange is not available in your location
238+
- You need to make a large amount of requests without getting blocked
239+
- ...
240+
241+
This package supports the following proxy types, `httpsProxy`, `proxyUrl` and `socksProxy`
242+
243+
#### httpsProxy
244+
245+
To set a real http(s) proxy for your scripts, you need to have an access to a remote http or https proxy, so calls will be made directly to the target exchange, tunneled through your proxy server:
246+
247+
```Js
248+
client.httpsProxy = 'http://1.2.3.4:8080/';
249+
```
250+
251+
#### proxyUrl
252+
253+
This property prepends an url to API requests. It might be useful for simple redirection or bypassing CORS browser restriction.
254+
255+
```Js
256+
client.proxyUrl = 'YOUR_PROXY_URL';
257+
```
258+
259+
#### socksProxy
260+
261+
Tou can also use socks proxy with the following format:
262+
263+
```Js
264+
client.socksProxy = 'socks5://1.2.3.4:8080/';
265+
```
266+
235267
#### Futures Historical Bulk Data Download API
236268
237269
##### Get Download ID
@@ -317,6 +349,8 @@ binance.futuresTerminate( 'btcusdt@kline_4h' );
317349
console.log( binance.futuresSubscriptions() );
318350
```
319351
352+
353+
320354
# Delivery API (Futures w/Expiration Date)
321355
```
322356
deliveryBuy

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"static-test": "mocha ./tests/static-tests.mjs",
2727
"ts-test-live": "mocha ./tests/binance-class-live.test.ts",
2828
"ts-test-static": "mocha ./tests/binance-class-static.test.ts",
29-
"test-cjs": "node ./tests/cjs-test.js",
29+
"test-cjs": "node ./tests/cjs-test.cjs",
3030
"test-debug": "mocha --inspect-brk",
3131
"lint": "eslint src/",
3232
"cover": "istanbul cover _mocha --report lcovonly",

0 commit comments

Comments
 (0)