UML
2021-10-11 17:16:24 0 举报
UML
作者其他创作
大纲/内容
聚合
MarkPrice
Converter
DataProvider
+ futureAssets+ symbol+ marginAsset+ currentLeverage+ currentMarkPrice+ firstBid+ firstAsk+ maxNotionalAtCurrentLeverage
+ getDataFromServer(params): Promise<T)
依赖
BatchAPI
+ marketInfo+ miniTicker+ markPrice
+batchAPI
OrderBookService
- dataProvider- placeOrderManager- calculator
+ init(params):PlaceOrderService+ placeOrder(params)+ change(params)+ getDataFromServer(params): Promise<T)
OrderBook
Calculator
+ roe(params): Decimal+ pnl(params): Decimal+ liquidationPrice(params): Decimal
API
PositionInteractor
- positionService- calculator
+ futureAssets+ symbol+ marginAsset+ currentLeverage+ currentMarkPrice+ orderbook+ maxNotionalAtCurrentLeverage+ futureAssets: [BinanceFutureAsset]+ brackets: [BinanceFutureBracket.FutureRiskBrackets]+ markPriceMap: [String: BinanceFutureRate]+ marketInfoMap: [String: FutureMarketInfo]
PlaceOrderService
- dataProvider- placeOrderManager- calculator- config: PlaceOrderConfig
+ init(params config):PlaceOrderService+ placeOrder(params)+ change(params)+ getDataFromServer(params): Promise<T)
关联
CrossCalculator
+ roe(params): Decimal+ pnl(params): Decimal+ liquidationPrice(params): Decimal+ maxAddMargin: Decimal+ maxRemoveMargin: Decimal
UserListenKey
PlaceOrderInteractor
- placeOrderService- placeOrderManager- calculator
泛化(继承)
实现
组合
UM
- config
PositionModule
+ availableBalance: Decimal
MiniTickers
DataCollector
+ mode+ inputPrice+ amount
+ placeOrder(params)+ change(params)
OnewayCalculator
+ availableBalance: Decimal+ maxBuy: Decimal+ maxSell: Decimal+ cost: Decimal
Header
HedgeCalculator
+ availableBalance: Decimal+ maxOpenShort: Decimal+ openShortCost: Decimal+ maxOpenLong: Decimal+ openLongCost: Decimal
PositoinService
EmegencyService
+ getEmegencyStatus()
可简化
待定
IsolatedCalculator
+ crossMargin(params): Decimal+ roe(params): Decimal+ pnl(params): Decimal+ liquidationPrice(params): Decimal
Switch Symbol
PlaceOrder
BusinessConfiguration?
+ var isOpenAccount+ var positionMode+ var baseUnit
+ refreshIsOpenAccount+ getPositionMode+ getBaseUnit+ changePositionMode+ changeBaseUnit
0 条评论
下一页