Skip to content

Commit

Permalink
Merge pull request #372 from t0chk/master
Browse files Browse the repository at this point in the history
Update futures rest-client
  • Loading branch information
tiagosiebler authored Nov 24, 2023
2 parents d7fea65 + 4c1ef70 commit 11e5f2d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "binance",
"version": "2.8.12",
"version": "2.8.13",
"description": "Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/coinm-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import {
OrderAmendment,
FuturesCoinMAccountBalance,
FuturesCoinMAccountInformation,
UserCommissionRate,
} from './types/futures';

import {
Expand Down Expand Up @@ -426,7 +427,7 @@ export class CoinMClient extends BaseRestClient {

getAccountComissionRate(
params: BasicSymbolParam,
): Promise<RebateDataOverview> {
): Promise<UserCommissionRate> {
return this.getPrivate('dapi/v1/commissionRate', params);
}

Expand Down
8 changes: 7 additions & 1 deletion src/types/futures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ export interface FuturesAccountInformation {
}

export interface FuturesCoinMAccountInformation {
assets: Omit<FuturesAccountAsset, 'marginAvailable' | 'updateTime'>[];
assets: Omit<FuturesAccountAsset, 'marginAvailable'>[];
positions: FuturesCoinMAccountPosition[];
canTrade: boolean;
canDeposit: boolean;
Expand Down Expand Up @@ -691,6 +691,12 @@ export interface SymbolLeverageBracketsResult {
brackets: SymbolLeverageBracket[];
}

export interface UserCommissionRate {
symbol: string;
makerCommissionRate: numberInString;
takerCommissionRate: numberInString;
}

export interface RebateDataOverview {
brokerId: string;
newTraderRebateCommission: numberInString;
Expand Down
5 changes: 3 additions & 2 deletions src/usdm-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import {
ChangeStats24hr,
MarkPrice,
HistoricOpenInterest,
UserCommissionRate,
} from './types/futures';

import {
Expand Down Expand Up @@ -381,7 +382,7 @@ export class USDMClient extends BaseRestClient {
}

getAccountTrades(
params: SymbolFromPaginatedRequestFromId,
params: SymbolFromPaginatedRequestFromId & { orderId?: number },
): Promise<FuturesPositionTrade[]> {
return this.getPrivate('fapi/v1/userTrades', params);
}
Expand Down Expand Up @@ -415,7 +416,7 @@ export class USDMClient extends BaseRestClient {

getAccountComissionRate(
params: BasicSymbolParam,
): Promise<RebateDataOverview> {
): Promise<UserCommissionRate> {
return this.getPrivate('fapi/v1/commissionRate', params);
}

Expand Down

0 comments on commit 11e5f2d

Please sign in to comment.