Skip to content

Commit 3b39b28

Browse files
authored
Merge pull request #473 from JJ-Cro/Update041124
feat(): updated latest changes per release notes - as of 03-11-2024
2 parents f51c614 + 65d4e80 commit 3b39b28

19 files changed

+897
-571
lines changed

docs/endpointFunctionList.md

+528-518
Large diffs are not rendered by default.

examples/apidoc/CoinMClient/getAccountComissionRate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const client = new CoinMClient({
1111
apiSecret: 'insert_api_secret_here',
1212
});
1313

14-
client.getAccountCommissionRate(params)
14+
client.getAccountComissionRate(params)
1515
.then((response) => {
1616
console.log(response);
1717
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { CoinMClient } = 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: dapi/v1/commissionRate
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new CoinMClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getAccountCommissionRate(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { CoinMClient } = 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: dapi/v1/order/asyn
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new CoinMClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getDownloadIdForFuturesOrderHistory(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { CoinMClient } = 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: dapi/v1/trade/asyn
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new CoinMClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getDownloadIdForFuturesTradeHistory(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { CoinMClient } = 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: dapi/v1/income/asyn
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new CoinMClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getDownloadIdForFuturesTransactionHistory(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { CoinMClient } = 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: dapi/v1/order/asyn/id
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new CoinMClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getFuturesOrderHistoryDownloadLink(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { CoinMClient } = 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: dapi/v1/trade/asyn/id
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new CoinMClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getFuturesTradeHistoryDownloadLink(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { CoinMClient } = 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: dapi/v1/income/asyn/id
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new CoinMClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getFuturesTransactionHistoryDownloadLink(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
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/portfolio/balance
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new MainClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getPortfolioMarginProAccountBalance(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});
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/v2/portfolio/account
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new MainClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getPortfolioMarginProSpanAccountInfo(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});

examples/apidoc/USDMClient/getAccountComissionRate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const client = new USDMClient({
1111
apiSecret: 'insert_api_secret_here',
1212
});
1313

14-
client.getAccountCommissionRate(params)
14+
client.getAccountComissionRate(params)
1515
.then((response) => {
1616
console.log(response);
1717
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const { USDMClient } = 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: fapi/v1/commissionRate
6+
// METHOD: GET
7+
// PUBLIC: NO
8+
9+
const client = new USDMClient({
10+
apiKey: 'insert_api_key_here',
11+
apiSecret: 'insert_api_secret_here',
12+
});
13+
14+
client.getAccountCommissionRate(params)
15+
.then((response) => {
16+
console.log(response);
17+
})
18+
.catch((error) => {
19+
console.error(error);
20+
});

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "binance",
3-
"version": "2.13.12",
3+
"version": "2.13.13",
44
"description": "Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

src/coinm-client.ts

+49
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
CoinMPositionTrade,
88
CoinMSymbolOrderBookTicker,
99
FundingRate,
10+
FuturesTransactionHistoryDownloadLink,
1011
GetClassicPortfolioMarginNotionalLimitParams,
1112
PositionRisk,
1213
SymbolOrPair,
@@ -480,6 +481,54 @@ export class CoinMClient extends BaseRestClient {
480481
return this.getPrivate('dapi/v1/income', params);
481482
}
482483

484+
getDownloadIdForFuturesTransactionHistory(params: {
485+
startTime: number;
486+
endTime: number;
487+
}): Promise<{
488+
avgCostTimestampOfLast30d: number;
489+
downloadId: string;
490+
}> {
491+
return this.getPrivate('dapi/v1/income/asyn', params);
492+
}
493+
494+
getFuturesTransactionHistoryDownloadLink(params: {
495+
downloadId: string;
496+
}): Promise<FuturesTransactionHistoryDownloadLink> {
497+
return this.getPrivate('dapi/v1/income/asyn/id', params);
498+
}
499+
500+
getDownloadIdForFuturesOrderHistory(params: {
501+
startTime: number;
502+
endTime: number;
503+
}): Promise<{
504+
avgCostTimestampOfLast30d: number;
505+
downloadId: string;
506+
}> {
507+
return this.getPrivate('dapi/v1/order/asyn', params);
508+
}
509+
510+
getFuturesOrderHistoryDownloadLink(params: {
511+
downloadId: string;
512+
}): Promise<FuturesTransactionHistoryDownloadLink> {
513+
return this.getPrivate('dapi/v1/order/asyn/id', params);
514+
}
515+
516+
getDownloadIdForFuturesTradeHistory(params: {
517+
startTime: number;
518+
endTime: number;
519+
}): Promise<{
520+
avgCostTimestampOfLast30d: number;
521+
downloadId: string;
522+
}> {
523+
return this.getPrivate('dapi/v1/trade/asyn', params);
524+
}
525+
526+
getFuturesTradeHistoryDownloadLink(params: {
527+
downloadId: string;
528+
}): Promise<FuturesTransactionHistoryDownloadLink> {
529+
return this.getPrivate('dapi/v1/trade/asyn/id', params);
530+
}
531+
483532
/**
484533
*
485534
* Portfolio Margin Endpoints

0 commit comments

Comments
 (0)