@loopring-web/loopring-sdk / Exports / AmmpoolAPI

Class: AmmpoolAPI

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AmmpoolAPI(param, timeout?)

Parameters

Name Type Default value
param InitParam undefined
timeout number 3000

Inherited from

BaseAPI.constructor

Defined in

api/base_api.ts:86

Properties

baseUrl

Protected baseUrl: string = ""

Inherited from

BaseAPI.baseUrl

Defined in

api/base_api.ts:37


chainId

Protected chainId: ChainId = ChainId.MAINNET

Inherited from

BaseAPI.chainId

Defined in

api/base_api.ts:38


KEY_MESSAGE

Static KEY_MESSAGE: string = KEY_MESSAGE

Inherited from

BaseAPI.KEY_MESSAGE

Defined in

api/base_api.ts:36

Methods

exitAmmPool

exitAmmPool<R>(request, patch, apiKey): Promise<{ exitAmmPoolResult: ExitAmmPoolResult ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request ExitAmmPoolRequest
patch AmmPoolRequestPatch
apiKey string

Returns

Promise<{ exitAmmPoolResult: ExitAmmPoolResult ; raw_data: R }>

Defined in

api/ammpool_api.ts:681


genErr

genErr(err): RESULT_INFO

Parameters

Name Type
err Error

Returns

RESULT_INFO

Inherited from

BaseAPI.genErr

Defined in

api/base_api.ts:39


getAmmAssetHistory

getAmmAssetHistory<R>(request): Promise<{ dataSeries: any ; market: string ; poolAddress: string ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request GetAmmAssetRequest

Returns

Promise<{ dataSeries: any ; market: string ; poolAddress: string ; raw_data: R }>

Defined in

api/ammpool_api.ts:350


getAmmPoolActivityRules

getAmmPoolActivityRules<R>(): Promise<{ activityDateMap: LoopringMap<{ AMM_MINING?: LoopringMap<AmmPoolActivityRule> ; ORDERBOOK_MINING?: LoopringMap<AmmPoolActivityRule> ; SWAP_VOLUME_RANKING?: LoopringMap<AmmPoolActivityRule> }> ; activityInProgressRules: LoopringMap<AmmPoolInProgressActivityRule> ; groupByActivityStatus: LoopringMap<AmmPoolActivityRule[]> ; groupByRuleType: LoopringMap<AmmPoolActivityRule[]> ; groupByRuleTypeAndStatus: LoopringMap<LoopringMap<AmmPoolActivityRule[]>> ; raw_data: R }>

Type parameters

Name
R

Returns

Promise<{ activityDateMap: LoopringMap<{ AMM_MINING?: LoopringMap<AmmPoolActivityRule> ; ORDERBOOK_MINING?: LoopringMap<AmmPoolActivityRule> ; SWAP_VOLUME_RANKING?: LoopringMap<AmmPoolActivityRule> }> ; activityInProgressRules: LoopringMap<AmmPoolInProgressActivityRule> ; groupByActivityStatus: LoopringMap<AmmPoolActivityRule[]> ; groupByRuleType: LoopringMap<AmmPoolActivityRule[]> ; groupByRuleTypeAndStatus: LoopringMap<LoopringMap<AmmPoolActivityRule[]>> ; raw_data: R }>

Defined in

api/ammpool_api.ts:230


getAmmPoolBalances

getAmmPoolBalances<R>(): Promise<{ ammpoolsbalances: LoopringMap<AmmPoolBalance> ; raw_data: R }>

Type parameters

Name
R

Returns

Promise<{ ammpoolsbalances: LoopringMap<AmmPoolBalance> ; raw_data: R }>

Defined in

api/ammpool_api.ts:445


getAmmPoolConf

getAmmPoolConf<R>(): Promise<{ ammpools: LoopringMap<AmmPoolInfoV3> ; pairs: LoopringMap<TokenRelatedInfo> ; raw_data: R }>

Type parameters

Name
R

Returns

Promise<{ ammpools: LoopringMap<AmmPoolInfoV3> ; pairs: LoopringMap<TokenRelatedInfo> ; raw_data: R }>

Defined in

api/ammpool_api.ts:49


getAmmPoolGameRank

getAmmPoolGameRank<R>(request): Promise<{ raw_data: R ; totalRewards: TokenVolumeV3[] ; userRankList: GameRankInfo[] }>

Type parameters

Name
R

Parameters

Name Type
request GetAmmPoolGameRankRequest

Returns

Promise<{ raw_data: R ; totalRewards: TokenVolumeV3[] ; userRankList: GameRankInfo[] }>

Defined in

api/ammpool_api.ts:152


getAmmPoolGameUserRank

getAmmPoolGameUserRank<R>(request, apiKey): Promise<{ raw_data: R ; userRank: GameRankInfo }>

Type parameters

Name
R

Parameters

Name Type
request GetAmmPoolGameUserRankRequest
apiKey string

Returns

Promise<{ raw_data: R ; userRank: GameRankInfo }>

Defined in

api/ammpool_api.ts:189


getAmmPoolSnapshot

getAmmPoolSnapshot<R>(request): Promise<{ ammPoolSnapshot: AmmPoolSnapshot ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request GetAmmPoolSnapshotRequest

Returns

Promise<{ ammPoolSnapshot: AmmPoolSnapshot ; raw_data: R }>

Defined in

api/ammpool_api.ts:415


getAmmPoolStats

getAmmPoolStats<R>(): Promise<{ ammPoolStats: LoopringMap<AmmPoolStat> ; raw_data: R }>

Type parameters

Name
R

Returns

Promise<{ ammPoolStats: LoopringMap<AmmPoolStat> ; raw_data: R }>

Defined in

api/ammpool_api.ts:383


getAmmPoolTrades

getAmmPoolTrades<R>(request): Promise<{ ammPoolTrades: AmmPoolTrade[] ; raw_data: R ; totalNum: number }>

Type parameters

Name
R

Parameters

Name Type
request GetAmmPoolTradesRequest

Returns

Promise<{ ammPoolTrades: AmmPoolTrade[] ; raw_data: R ; totalNum: number }>

Defined in

api/ammpool_api.ts:618


getAmmPoolTxs

getAmmPoolTxs<R>(request): Promise<{ raw_data: R ; totalNum: number ; transactions: AmmPoolTx[] }>

Type parameters

Name
R

Parameters

Name Type
request GetAmmPoolTxsRequest

Returns

Promise<{ raw_data: R ; totalNum: number ; transactions: AmmPoolTx[] }>

Defined in

api/ammpool_api.ts:583


getAmmPoolUserRewards

getAmmPoolUserRewards<R>(request): Promise<{ ammUserRewardMap: AmmUserRewardMap ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request GetAmmUserRewardsRequest

Returns

Promise<{ ammUserRewardMap: AmmUserRewardMap ; raw_data: R }>

Defined in

api/ammpool_api.ts:115


getAvailableBroker

getAvailableBroker(): Promise<{ broker: string }>

Returns

Promise<{ broker: string }>

Inherited from

BaseAPI.getAvailableBroker

Defined in

api/base_api.ts:97


getCounterFactualInfo

getCounterFactualInfo<T>(request): Promise<{ counterFactualInfo: undefined | CounterFactualInfo ; error?: RESULT_INFO ; raw_data: T }>

Type parameters

Name Type
T extends unknown

Parameters

Name Type
request GetCounterFactualInfoRequest

Returns

Promise<{ counterFactualInfo: undefined | CounterFactualInfo ; error?: RESULT_INFO ; raw_data: T }>

Inherited from

BaseAPI.getCounterFactualInfo

Defined in

api/base_api.ts:108


getLiquidityMining

getLiquidityMining<R>(request, apiKey): Promise<{ raw_data: R ; rewards: RewardItem[] }>

Type parameters

Name
R

Parameters

Name Type
request GetLiquidityMiningRequest
apiKey string

Returns

Promise<{ raw_data: R ; rewards: RewardItem[] }>

Defined in

api/ammpool_api.ts:492


getLiquidityMiningUserHistory

getLiquidityMiningUserHistory<R>(request): Promise<{ raw_data: R ; userMiningInfos: UserMiningInfo[] }>

Type parameters

Name
R

Parameters

Name Type
request GetLiquidityMiningUserHistoryRequest

Returns

Promise<{ raw_data: R ; userMiningInfos: UserMiningInfo[] }>

Defined in

api/ammpool_api.ts:522


getOrderList

Private getOrderList(lst, order): AmmPoolActivityRule[]

Parameters

Name Type
lst AmmPoolActivityRule[]
order SortOrder

Returns

AmmPoolActivityRule[]

Defined in

api/ammpool_api.ts:218


getUserAmmPoolTxs

getUserAmmPoolTxs<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userAmmPoolTxs: UserAmmPoolTx[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserAmmPoolTxsRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userAmmPoolTxs: UserAmmPoolTx[] }>

Defined in

api/ammpool_api.ts:551


joinAmmPool

joinAmmPool<R>(request, patch, apiKey): Promise<{ joinAmmPoolResult: JoinAmmPoolResult ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request JoinAmmPoolRequest
patch AmmPoolRequestPatch
apiKey string

Returns

Promise<{ joinAmmPoolResult: JoinAmmPoolResult ; raw_data: R }>

Defined in

api/ammpool_api.ts:645


makeReq

Protected makeReq(): Request

Returns

Request

Inherited from

BaseAPI.makeReq

Defined in

api/base_api.ts:151


returnTxHash

Protected returnTxHash<T>(raw_data): RESULT_INFO | Omit<T, "resultInfo"> & { raw_data: Omit<T, "resultInfo"> }

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
raw_data T

Returns

RESULT_INFO | Omit<T, "resultInfo"> & { raw_data: Omit<T, "resultInfo"> }

Inherited from

BaseAPI.returnTxHash

Defined in

api/base_api.ts:66


setBaseUrl

setBaseUrl(baseUrl): void

Parameters

Name Type
baseUrl string

Returns

void

Inherited from

BaseAPI.setBaseUrl

Defined in

api/base_api.ts:147


setChainId

setChainId(chainId): void

Parameters

Name Type
chainId ChainId

Returns

void

Inherited from

BaseAPI.setChainId

Defined in

api/base_api.ts:142

results matching ""

    No results matching ""