Skip to content

Commit 4d474a0

Browse files
authored
Merge pull request #488 from JJ-Cro/master
v2.13.19 feat(): added new endpoints, updated types
2 parents 1d64495 + 364911a commit 4d474a0

13 files changed

+629
-424
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ yarn-error.log
88
lib/*
99
testfile.ts
1010
privaterepotracker
11-
restClientRegex.ts
11+
restClientRegex.ts
12+
.DS_Store

docs/endpointFunctionList.md

Lines changed: 426 additions & 418 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { MainClient } = require('binance');
2+
3+
// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: sapi/v1/loan/vip/accruedInterest
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new MainClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.getVipLoanAccruedInterest(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { MainClient } = require('binance');
2+
3+
// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: sapi/v1/loan/vip/interestRateHistory
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new MainClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.getVipLoanInterestRateHistory(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { MainClient } = require('binance');
2+
3+
// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: sapi/v1/margin/order
6+
// METHOD: POST
7+
// PUBLIC: NO
8+
9+
const client = new MainClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.marginAccountNewOrder(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { MainClient } = require('binance');
2+
3+
// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: api/v3/order/cancelReplace
6+
// METHOD: POST
7+
// PUBLIC: NO
8+
9+
const client = new MainClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.replaceOrder(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { MainClient } = require('binance');
2+
3+
// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: api/v3/order
6+
// METHOD: POST
7+
// PUBLIC: NO
8+
9+
const client = new MainClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.submitNewOrder(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { MainClient } = require('binance');
2+
3+
// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: api/v3/orderList/oco
6+
// METHOD: POST
7+
// PUBLIC: NO
8+
9+
const client = new MainClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.submitNewOrderList(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { MainClient } = require('binance');
2+
3+
// This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
4+
// This Binance API SDK is available on npm via "npm install binance"
5+
// ENDPOINT: api/v3/order/test
6+
// METHOD: POST
7+
// PUBLIC: NO
8+
9+
const client = new MainClient({
10+
api_key: 'insert_api_key_here',
11+
api_secret: 'insert_api_secret_here',
12+
});
13+
14+
client.testNewOrder(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)