Skip to content

Commit

Permalink
chore: removed fetchBorrowRate(s)(PerSymbol)
Browse files Browse the repository at this point in the history
  • Loading branch information
samgermain committed Apr 25, 2024
1 parent 7c80b76 commit bd99a05
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 43 deletions.
6 changes: 4 additions & 2 deletions build/transpile.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,10 @@ class Transpiler {
[ /\.urlencodeWithArrayRepeat\s/g, '.urlencode_with_array_repeat' ],
[ /\.call\s*\(this, /g, '(' ],
[ /\.getSupportedMapping\s/g, '.get_supported_mapping'],
[ /\.fetchBorrowRates\s/g, '.fetch_borrow_rates'],
[ /\.fetchBorrowRate\s/g, '.fetch_borrow_rate'],
[ /\.fetchCrossBorrowRates\s/g, '.fetch_cross_borrow_rates'],
[ /\.fetchCrossBorrowRate\s/g, '.fetch_cross_borrow_rate'],
[ /\.fetchIsolatedBorrowRates\s/g, '.fetch_isolated_borrow_rates'],
[ /\.fetchIsolatedBorrowRate\s/g, '.fetch_isolated_borrow_rate'],
[ /\.handleMarketTypeAndParams\s/g, '.handle_market_type_and_params'],
[ /\.checkOrderArguments\s/g, '.check_order_arguments'],
[ /\.isPostOnly\s/g, '.is_post_only'],
Expand Down
11 changes: 2 additions & 9 deletions ts/src/base/Exchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,8 @@ export default class Exchange {
'fetchBalanceWs': undefined,
'fetchBidsAsks': undefined,
'fetchBorrowInterest': undefined,
'fetchBorrowRate': undefined,
'fetchBorrowRateHistories': undefined,
'fetchBorrowRateHistory': undefined,
'fetchBorrowRates': undefined,
'fetchBorrowRatesPerSymbol': undefined,
'fetchCanceledAndClosedOrders': undefined,
'fetchCanceledOrders': undefined,
'fetchClosedOrder': undefined,
Expand Down Expand Up @@ -3422,10 +3419,6 @@ export default class Exchange {
});
}

async fetchBorrowRate (code: string, amount, params = {}): Promise<{}> {
throw new NotSupported (this.id + ' fetchBorrowRate is deprecated, please use fetchCrossBorrowRate or fetchIsolatedBorrowRate instead');
}

async repayCrossMargin (code: string, amount, params = {}): Promise<{}> {
throw new NotSupported (this.id + ' repayCrossMargin is not support yet');
}
Expand Down Expand Up @@ -4457,7 +4450,7 @@ export default class Exchange {

async fetchCrossBorrowRate (code: string, params = {}): Promise<{}> {
await this.loadMarkets ();
if (!this.has['fetchBorrowRates']) {
if (!this.has['fetchCrossBorrowRates']) {
throw new NotSupported (this.id + ' fetchCrossBorrowRate() is not supported yet');
}
const borrowRates = await this.fetchCrossBorrowRates (params);
Expand All @@ -4470,7 +4463,7 @@ export default class Exchange {

async fetchIsolatedBorrowRate (symbol: string, params = {}): Promise<{}> {
await this.loadMarkets ();
if (!this.has['fetchBorrowRates']) {
if (!this.has['fetchIsolatedBorrowRates']) {
throw new NotSupported (this.id + ' fetchIsolatedBorrowRate() is not supported yet');
}
const borrowRates = await this.fetchIsolatedBorrowRates (params);
Expand Down
3 changes: 0 additions & 3 deletions ts/src/binanceus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,8 @@ export default class binanceus extends binance {
'closePosition': false,
'createReduceOnlyOrder': false,
'fetchBorrowInterest': false,
'fetchBorrowRate': false,
'fetchBorrowRateHistories': false,
'fetchBorrowRateHistory': false,
'fetchBorrowRates': false,
'fetchBorrowRatesPerSymbol': false,
'fetchFundingHistory': false,
'fetchFundingRate': false,
'fetchFundingRateHistory': false,
Expand Down
3 changes: 0 additions & 3 deletions ts/src/bitfinex2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ export default class bitfinex2 extends Exchange {
'editOrder': true,
'fetchBalance': true,
'fetchBorrowInterest': false,
'fetchBorrowRate': false,
'fetchBorrowRateHistories': false,
'fetchBorrowRateHistory': false,
'fetchBorrowRates': false,
'fetchBorrowRatesPerSymbol': false,
'fetchClosedOrder': true,
'fetchClosedOrders': true,
'fetchCrossBorrowRate': false,
Expand Down
3 changes: 0 additions & 3 deletions ts/src/okcoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@ export default class okcoin extends Exchange {
'createOrder': true,
'fetchBalance': true,
'fetchBorrowInterest': false,
'fetchBorrowRate': false,
'fetchBorrowRateHistories': false,
'fetchBorrowRateHistory': false,
'fetchBorrowRates': false,
'fetchBorrowRatesPerSymbol': false,
'fetchClosedOrders': true,
'fetchCurrencies': true, // see below
'fetchDepositAddress': true,
Expand Down
22 changes: 0 additions & 22 deletions ts/src/test/Exchange/base/test.borrowRate.ts

This file was deleted.

1 change: 0 additions & 1 deletion wiki/Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -2813,7 +2813,6 @@ Data on the borrow rate for a currency can be retrieved using
- `fetchCrossBorrowRates ()` for all currencies borrow rates
- `fetchIsolatedBorrowRate ()` for a trading pairs borrow rate
- `fetchIsolatedBorrowRates ()` for all trading pairs borrow rates
- `fetchBorrowRatesPerSymbol ()` for the borrow rates of currencies in individual markets

```javascript
fetchCrossBorrowRate (code, params = {})
Expand Down

0 comments on commit bd99a05

Please sign in to comment.