From 4b1a02e072a1291c4f8029e92a029e15f0c262f3 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Fri, 19 Apr 2024 00:14:43 -0400 Subject: [PATCH 01/14] chore: new type IsolatedBorrowRate --- build/transpile.js | 4 ++-- cs/ccxt/base/Exchange.Types.cs | 28 ++++++++++++++++++++++++++++ python/ccxt/base/types.py | 12 ++++++++++++ ts/src/base/types.ts | 12 ++++++++++++ 4 files changed, 54 insertions(+), 2 deletions(-) diff --git a/build/transpile.js b/build/transpile.js index fef117d81419..6c72758bc16f 100644 --- a/build/transpile.js +++ b/build/transpile.js @@ -997,7 +997,7 @@ class Transpiler { 'Greeks': /-> Greeks:/, 'IndexType': /: IndexType/, 'Int': /: Int =/, - 'Liquidation': /-> (?:List\[)?Liquidation/, + 'IsolatedBorrowRate': /: IsolatedBorrowRate/, 'LastPrice': /-> LastPrice:/, 'LastPrices': /-> LastPrices:/, 'Leverage': /-> Leverage:/, @@ -1679,7 +1679,7 @@ class Transpiler { 'Dictionary': 'array', 'Dict': 'array', } - const phpArrayRegex = /^(?:Market|Currency|Account|AccountStructure|BalanceAccount|object|OHLCV|Order|OrderBook|Tickers?|Trade|Transaction|Balances?|MarketInterface|TransferEntry|Leverages|Leverage|Greeks|MarginModes|MarginMode|MarginModification|LastPrice|LastPrices|TradingFeeInterface|Currencies|TradingFees)( \| undefined)?$|\w+\[\]/ + const phpArrayRegex = /^(?:Market|Currency|Account|AccountStructure|BalanceAccount|object|OHLCV|Order|OrderBook|Tickers?|Trade|Transaction|Balances?|MarketInterface|TransferEntry|Leverages|Leverage|Greeks|MarginModes|MarginMode|MarginModification|LastPrice|LastPrices|TradingFeeInterface|Currencies|TradingFees|IsolatedBorrowRate)( \| undefined)?$|\w+\[\]/ let phpArgs = args.map (x => { const parts = x.split (':') if (parts.length === 1) { diff --git a/cs/ccxt/base/Exchange.Types.cs b/cs/ccxt/base/Exchange.Types.cs index e22bf8a63e31..419b10c8f8f0 100644 --- a/cs/ccxt/base/Exchange.Types.cs +++ b/cs/ccxt/base/Exchange.Types.cs @@ -772,6 +772,34 @@ public BorrowRate(object borrowRate) } } +public struct IsolatedBorrowRate +{ + public string symbol; + // public string base; + public double? baseRate; + public string quote; + public double? quoteRate; + public double? rate; + public Int64? timestamp; + public string? datetime; + public Dictionary info; + + public IsolatedBorrowRate(object isolatedBorrowRate) + { + var isolatedBorrowRate2 = (Dictionary)isolatedBorrowRate; + symbol = Exchange.SafeString (isolatedBorrowRate2, "symbol"); + // base = Exchange.SafeString (isolatedBorrowRate2, "base"); + baseRate = Exchange.SafeFloat (isolatedBorrowRate2, "baseRate"); + quote = Exchange.SafeString (isolatedBorrowRate2, "quote"); + quoteRate = Exchange.SafeFloat (isolatedBorrowRate2, "quoteRate"); + rate = Exchange.SafeFloat(isolatedBorrowRate2, "rate"); + timestamp = Exchange.SafeInteger(isolatedBorrowRate2, "timestamp"); + datetime = Exchange.SafeString(isolatedBorrowRate2, "datetime"); + info = isolatedBorrowRate2.ContainsKey("info") ? (Dictionary)isolatedBorrowRate2["info"] : null; + } +} + + public struct BorrowInterest { public string? account; diff --git a/python/ccxt/base/types.py b/python/ccxt/base/types.py index 8cf8d5d82cdc..de2dbf1c708a 100644 --- a/python/ccxt/base/types.py +++ b/python/ccxt/base/types.py @@ -431,6 +431,18 @@ class MarginModification(TypedDict): datetime: Str +class IsolatedBorrowRate(TypedDict): + info: Dict[str, any] + symbol: str + base: str + baseRate: float + quote: str + quoteRate: float + period: Int + timestamp: Int + datetime: Str + + LastPrices = Dict[Str, LastPrice] Currencies = Dict[Str, CurrencyInterface] TradingFees = Dict[Str, TradingFeeInterface] diff --git a/ts/src/base/types.ts b/ts/src/base/types.ts index f61263f910b8..aacd22047e9e 100644 --- a/ts/src/base/types.ts +++ b/ts/src/base/types.ts @@ -396,6 +396,18 @@ export interface BorrowRate { info: any; } +export interface IsolatedBorrowRate { + info: any, + symbol: string, + base: string, + baseRate: number, + quote: string, + quoteRate: number, + period?: Int, + timestamp?: Int, + datetime?: Str, +} + export interface FundingRateHistory { info: any; symbol: string; From a780e5473f7c3da0baf16b99c34e07da9f7430b7 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Fri, 19 Apr 2024 00:21:44 -0400 Subject: [PATCH 02/14] refactor: changed BorrowRate type to CrossBorrowRate --- build/transpile.js | 3 ++- cs/ccxt/base/Exchange.Types.cs | 16 ++++++++-------- python/ccxt/base/types.py | 9 +++++++++ ts/src/base/Exchange.ts | 4 ++-- ts/src/base/types.ts | 6 +++--- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/build/transpile.js b/build/transpile.js index 6c72758bc16f..1c0b46b9d789 100644 --- a/build/transpile.js +++ b/build/transpile.js @@ -991,6 +991,7 @@ class Transpiler { 'Balances': /-> Balances:/, 'Bool': /: Bool =/, 'Conversion': /-> Conversion:/, + 'CrossBorrowRate': /: CrossBorrowRate/, 'Currencies': /-> Currencies:/, 'Currency': /(-> Currency:|: Currency)/, 'FundingHistory': /\[FundingHistory/, @@ -1679,7 +1680,7 @@ class Transpiler { 'Dictionary': 'array', 'Dict': 'array', } - const phpArrayRegex = /^(?:Market|Currency|Account|AccountStructure|BalanceAccount|object|OHLCV|Order|OrderBook|Tickers?|Trade|Transaction|Balances?|MarketInterface|TransferEntry|Leverages|Leverage|Greeks|MarginModes|MarginMode|MarginModification|LastPrice|LastPrices|TradingFeeInterface|Currencies|TradingFees|IsolatedBorrowRate)( \| undefined)?$|\w+\[\]/ + const phpArrayRegex = /^(?:Market|Currency|Account|AccountStructure|BalanceAccount|object|OHLCV|Order|OrderBook|Tickers?|Trade|Transaction|Balances?|MarketInterface|TransferEntry|Leverages|Leverage|Greeks|MarginModes|MarginMode|MarginModification|LastPrice|LastPrices|TradingFeeInterface|Currencies|TradingFees|CrossBorrowRate|IsolatedBorrowRate)( \| undefined)?$|\w+\[\]/ let phpArgs = args.map (x => { const parts = x.split (':') if (parts.length === 1) { diff --git a/cs/ccxt/base/Exchange.Types.cs b/cs/ccxt/base/Exchange.Types.cs index 419b10c8f8f0..95a44b17fe67 100644 --- a/cs/ccxt/base/Exchange.Types.cs +++ b/cs/ccxt/base/Exchange.Types.cs @@ -753,7 +753,7 @@ public DepositAddressResponse(object depositAddressResponse2) } } -public struct BorrowRate +public struct CrossBorrowRate { public string? currency; public double? rate; @@ -761,14 +761,14 @@ public struct BorrowRate public string? datetime; public Dictionary info; - public BorrowRate(object borrowRate) + public CrossBorrowRate(object crossBorrowRate) { - var borrowRate2 = (Dictionary)borrowRate; - currency = Exchange.SafeString(borrowRate2, "currency"); - rate = Exchange.SafeFloat(borrowRate2, "rate"); - timestamp = Exchange.SafeInteger(borrowRate2, "timestamp"); - datetime = Exchange.SafeString(borrowRate2, "datetime"); - info = borrowRate2.ContainsKey("info") ? (Dictionary)borrowRate2["info"] : null; + var crossBorrowRate2 = (Dictionary)crossBorrowRate; + currency = Exchange.SafeString(crossBorrowRate2, "currency"); + rate = Exchange.SafeFloat(crossBorrowRate2, "rate"); + timestamp = Exchange.SafeInteger(crossBorrowRate2, "timestamp"); + datetime = Exchange.SafeString(crossBorrowRate2, "datetime"); + info = crossBorrowRate2.ContainsKey("info") ? (Dictionary)crossBorrowRate2["info"] : null; } } diff --git a/python/ccxt/base/types.py b/python/ccxt/base/types.py index de2dbf1c708a..f5322847d6ad 100644 --- a/python/ccxt/base/types.py +++ b/python/ccxt/base/types.py @@ -431,6 +431,15 @@ class MarginModification(TypedDict): datetime: Str +class CrossBorrowRate(TypedDict): + info: Dict[str, any] + currency: Str + rate: float + period: Optional[float] + timestamp: Int + datetime: Str + + class IsolatedBorrowRate(TypedDict): info: Dict[str, any] symbol: str diff --git a/ts/src/base/Exchange.ts b/ts/src/base/Exchange.ts index 919872edcfa6..4e5dcda06d6a 100644 --- a/ts/src/base/Exchange.ts +++ b/ts/src/base/Exchange.ts @@ -146,10 +146,10 @@ import { OrderBook as WsOrderBook, IndexedOrderBook, CountedOrderBook } from './ // import { axolotl } from './functions/crypto.js'; // import types -import type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, BorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion } from './types.js'; +import type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, CrossBorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion } from './types.js'; // export {Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRateHistory, Liquidation, FundingHistory} from './types.js' // import { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, FundingHistory, MarginMode, Tickers, Greeks, Str, Num, MarketInterface, CurrencyInterface, Account } from './types.js'; -export type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, BorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, Conversion } from './types.js' +export type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, CrossBorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, Conversion } from './types.js' // ---------------------------------------------------------------------------- // move this elsewhere. diff --git a/ts/src/base/types.ts b/ts/src/base/types.ts index aacd22047e9e..9f7df1896721 100644 --- a/ts/src/base/types.ts +++ b/ts/src/base/types.ts @@ -387,13 +387,13 @@ export interface TransferEntry { status?: Str; } -export interface BorrowRate { +export interface CrossBorrowRate { + info: any; currency?: Str; - rate?: number; + rate: number; period?: number; timestamp?: number; datetime?: Str; - info: any; } export interface IsolatedBorrowRate { From 83dafa669ed0e3779a18c80508198209154dfb67 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Fri, 19 Apr 2024 00:26:54 -0400 Subject: [PATCH 03/14] feat(base/exchange): parseIsolatedBorrowRates, parseIsolatedBorrowRate --- ts/src/base/Exchange.ts | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/ts/src/base/Exchange.ts b/ts/src/base/Exchange.ts index 4e5dcda06d6a..c8f400882cb9 100644 --- a/ts/src/base/Exchange.ts +++ b/ts/src/base/Exchange.ts @@ -146,7 +146,7 @@ import { OrderBook as WsOrderBook, IndexedOrderBook, CountedOrderBook } from './ // import { axolotl } from './functions/crypto.js'; // import types -import type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, CrossBorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion } from './types.js'; +import type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, CrossBorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, IsolatedBorrowRate, IsolatedBorrowRates } from './types.js'; // export {Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRateHistory, Liquidation, FundingHistory} from './types.js' // import { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, FundingHistory, MarginMode, Tickers, Greeks, Str, Num, MarketInterface, CurrencyInterface, Account } from './types.js'; export type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, CrossBorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, Conversion } from './types.js' @@ -2315,7 +2315,7 @@ export default class Exchange { throw new NotSupported (this.id + ' fetchCrossBorrowRates() is not supported yet'); } - async fetchIsolatedBorrowRates (params = {}): Promise<{}> { + async fetchIsolatedBorrowRates (params = {}): Promise { throw new NotSupported (this.id + ' fetchIsolatedBorrowRates() is not supported yet'); } @@ -2339,6 +2339,10 @@ export default class Exchange { throw new NotSupported (this.id + ' parseBorrowInterest() is not supported yet'); } + parseIsolatedBorrowRate (info, market: Market = undefined): IsolatedBorrowRate { + throw new NotSupported (this.id + ' parseIsolatedBorrowRate() is not supported yet'); + } + parseWsTrade (trade, market: Market = undefined): Trade { throw new NotSupported (this.id + ' parseWsTrade() is not supported yet'); } @@ -4422,13 +4426,13 @@ export default class Exchange { return rate; } - async fetchIsolatedBorrowRate (symbol: string, params = {}): Promise<{}> { + async fetchIsolatedBorrowRate (symbol: string, params = {}): Promise { await this.loadMarkets (); if (!this.has['fetchBorrowRates']) { throw new NotSupported (this.id + ' fetchIsolatedBorrowRate() is not supported yet'); } const borrowRates = await this.fetchIsolatedBorrowRates (params); - const rate = this.safeDict (borrowRates, symbol); + const rate = this.safeDict (borrowRates, symbol) as IsolatedBorrowRate; if (rate === undefined) { throw new ExchangeError (this.id + ' fetchIsolatedBorrowRate() could not find the borrow rate for market symbol ' + symbol); } @@ -5512,6 +5516,17 @@ export default class Exchange { return interests; } + parseIsolatedBorrowRates (info: any): IsolatedBorrowRates { + const result = {}; + for (let i = 0; i < info.length; i++) { + const item = info[i]; + const borrowRate = this.parseIsolatedBorrowRate (item); + const symbol = this.safeString (borrowRate, 'symbol'); + result[symbol] = borrowRate; + } + return result as any; + } + parseFundingRateHistories (response, market = undefined, since: Int = undefined, limit: Int = undefined): FundingRateHistory[] { const rates = []; for (let i = 0; i < response.length; i++) { From c790c2d0446e172a2198b697795115f066be383b Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Fri, 19 Apr 2024 00:41:04 -0400 Subject: [PATCH 04/14] feat: new types - CrossBorrowRate, IsolatedBorrowRate --- build/transpile.js | 2 + cs/ccxt/base/Exchange.Types.cs | 78 ++++++++++++++++++++++++++++++++++ python/ccxt/base/types.py | 2 + ts/src/base/types.ts | 6 +++ 4 files changed, 88 insertions(+) diff --git a/build/transpile.js b/build/transpile.js index 1c0b46b9d789..2fea068e511b 100644 --- a/build/transpile.js +++ b/build/transpile.js @@ -992,6 +992,7 @@ class Transpiler { 'Bool': /: Bool =/, 'Conversion': /-> Conversion:/, 'CrossBorrowRate': /: CrossBorrowRate/, + 'CrossBorrowRates': /: CrossBorrowRates/, 'Currencies': /-> Currencies:/, 'Currency': /(-> Currency:|: Currency)/, 'FundingHistory': /\[FundingHistory/, @@ -999,6 +1000,7 @@ class Transpiler { 'IndexType': /: IndexType/, 'Int': /: Int =/, 'IsolatedBorrowRate': /: IsolatedBorrowRate/, + 'IsolatedBorrowRates': /: IsolatedBorrowRates/, 'LastPrice': /-> LastPrice:/, 'LastPrices': /-> LastPrices:/, 'Leverage': /-> Leverage:/, diff --git a/cs/ccxt/base/Exchange.Types.cs b/cs/ccxt/base/Exchange.Types.cs index 95a44b17fe67..0758f56f5b2a 100644 --- a/cs/ccxt/base/Exchange.Types.cs +++ b/cs/ccxt/base/Exchange.Types.cs @@ -772,6 +772,45 @@ public CrossBorrowRate(object crossBorrowRate) } } +public struct CrossBorrowRates +{ + public Dictionary info; + public Dictionary crossBorrowRates; + + public CrossBorrowRates(object crossBorrowRates2) + { + var crossBorrowRates = (Dictionary)crossBorrowRates2; + + info = crossBorrowRates.ContainsKey("info") ? (Dictionary)crossBorrowRates["info"] : null; + this.crossBorrowRates = new Dictionary(); + foreach (var crossBorrowRate in crossBorrowRates) + { + if (crossBorrowRate.Key != "info") + this.crossBorrowRates.Add(crossBorrowRate.Key, new CrossBorrowRate(crossBorrowRate.Value)); + } + } + + // Indexer + public CrossBorrowRate this[string key] + { + get + { + if (crossBorrowRates.ContainsKey(key)) + { + return crossBorrowRates[key]; + } + else + { + throw new KeyNotFoundException($"The key '{key}' was not found in the isolatedBorrowRates."); + } + } + set + { + crossBorrowRates[key] = value; + } + } +} + public struct IsolatedBorrowRate { public string symbol; @@ -799,6 +838,45 @@ public IsolatedBorrowRate(object isolatedBorrowRate) } } +public struct IsolatedBorrowRates +{ + public Dictionary info; + public Dictionary isolatedBorrowRates; + + public IsolatedBorrowRates(object isolatedBorrowRates2) + { + var isolatedBorrowRates = (Dictionary)isolatedBorrowRates2; + + info = isolatedBorrowRates.ContainsKey("info") ? (Dictionary)isolatedBorrowRates["info"] : null; + this.isolatedBorrowRates = new Dictionary(); + foreach (var isolatedBorrowRate in isolatedBorrowRates) + { + if (isolatedBorrowRate.Key != "info") + this.isolatedBorrowRates.Add(isolatedBorrowRate.Key, new IsolatedBorrowRate(isolatedBorrowRate.Value)); + } + } + + // Indexer + public IsolatedBorrowRate this[string key] + { + get + { + if (isolatedBorrowRates.ContainsKey(key)) + { + return isolatedBorrowRates[key]; + } + else + { + throw new KeyNotFoundException($"The key '{key}' was not found in the isolatedBorrowRates."); + } + } + set + { + isolatedBorrowRates[key] = value; + } + } +} + public struct BorrowInterest { diff --git a/python/ccxt/base/types.py b/python/ccxt/base/types.py index f5322847d6ad..c649da5e347d 100644 --- a/python/ccxt/base/types.py +++ b/python/ccxt/base/types.py @@ -455,6 +455,8 @@ class IsolatedBorrowRate(TypedDict): LastPrices = Dict[Str, LastPrice] Currencies = Dict[Str, CurrencyInterface] TradingFees = Dict[Str, TradingFeeInterface] +IsolatedBorrowRates = Dict[Str, IsolatedBorrowRate] +CrossBorrowRates = Dict[Str, CrossBorrowRate] Market = Optional[MarketInterface] Currency = Optional[CurrencyInterface] diff --git a/ts/src/base/types.ts b/ts/src/base/types.ts index 9f7df1896721..0748a75e165c 100644 --- a/ts/src/base/types.ts +++ b/ts/src/base/types.ts @@ -564,6 +564,12 @@ export interface MarginModes extends Dictionary { export interface OptionChain extends Dictionary