@loopring-web/loopring-sdk / Exports / UserAPI

Class: UserAPI

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new UserAPI(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

SetReferrer

SetReferrer<R>(request, eddsaKey): Promise<{ raw_data: R ; result: any }>

Type parameters

Name
R

Parameters

Name Type
request SetReferrerRequest
eddsaKey string

Returns

Promise<{ raw_data: R ; result: any }>

Defined in

api/user_api.ts:1918


cancelMultiOrdersByCreditOrderId

cancelMultiOrdersByCreditOrderId<R>(request, PrivateKey, apiKey): Promise<{ raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request CancelMultiOrdersByClientOrderIdRequest
PrivateKey string
apiKey string

Returns

Promise<{ raw_data: R }>

Defined in

api/user_api.ts:314


cancelMultiOrdersByHash

cancelMultiOrdersByHash<R>(request, PrivateKey, apiKey): Promise<{ raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request CancelMultiOrdersByHashRequest
PrivateKey string
apiKey string

Returns

Promise<{ raw_data: R }>

Defined in

api/user_api.ts:280


cancelOrder

cancelOrder<R>(request, PrivateKey, apiKey): Promise<{ raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request CancelOrderRequest
PrivateKey string
apiKey string

Returns

Promise<{ raw_data: R }>

Defined in

api/user_api.ts:242


genErr

genErr(err): RESULT_INFO

Parameters

Name Type
err Error

Returns

RESULT_INFO

Inherited from

BaseAPI.genErr

Defined in

api/base_api.ts:39


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


getMinimumTokenAmt

getMinimumTokenAmt<R>(request, apiKey): Promise<{ amountMap: LoopringMap<TokenAmount> ; amounts: [TokenAmount, TokenAmount] ; cacheOverdueAt: any ; gasPrice: number ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request GetMinimumTokenAmtRequest
apiKey string

Returns

Promise<{ amountMap: LoopringMap<TokenAmount> ; amounts: [TokenAmount, TokenAmount] ; cacheOverdueAt: any ; gasPrice: number ; raw_data: R }>

Defined in

api/user_api.ts:716


getNFTOffchainFeeAmt

getNFTOffchainFeeAmt<R>(request, apiKey): Promise<{ fees: LoopringMap<OffchainFeeInfo> ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request GetNFTOffchainFeeAmtRequest
apiKey string

Returns

Promise<{ fees: LoopringMap<OffchainFeeInfo> ; raw_data: R }>

Defined in

api/user_api.ts:807


getNextStorageId

getNextStorageId<R>(request, apiKey): Promise<{ offchainId: number ; orderId: number ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request GetNextStorageIdRequest
apiKey string

Returns

Promise<{ offchainId: number ; orderId: number ; raw_data: R }>

Defined in

api/user_api.ts:106


getOffchainFeeAmt

getOffchainFeeAmt<R>(request, apiKey): Promise<{ fees: LoopringMap<OffchainFeeInfo> ; gasPrice: number ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request GetOffchainFeeAmtRequest
apiKey string

Returns

Promise<{ fees: LoopringMap<OffchainFeeInfo> ; gasPrice: number ; raw_data: R }>

Defined in

api/user_api.ts:765


getOrderDetails

getOrderDetails<R>(request, apiKey): Promise<{ orderDetail: OrderDetail ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request GetOrderDetailsRequest
apiKey string

Returns

Promise<{ orderDetail: OrderDetail ; raw_data: R }>

Defined in

api/user_api.ts:135


getOrders

getOrders<R>(request, apiKey): Promise<{ orders: OrderDetail[] ; raw_data: R ; totalNum: number }>

Type parameters

Name
R

Parameters

Name Type
request GetOrdersRequest
apiKey string

Returns

Promise<{ orders: OrderDetail[] ; raw_data: R ; totalNum: number }>

Defined in

api/user_api.ts:160


getUserApiKey

getUserApiKey<R>(request, eddsaKey): Promise<{ apiKey: string ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request GetUserApiKeyRequest
eddsaKey string

Returns

Promise<{ apiKey: string ; raw_data: R }>

Defined in

api/user_api.ts:29


getUserBalances

getUserBalances<R>(request, apiKey): Promise<{ raw_data: R ; userBalances: LoopringMap<UserBalanceInfo> }>

Type parameters

Name
R

Parameters

Name Type
request GetUserBalancesRequest
apiKey string

Returns

Promise<{ raw_data: R ; userBalances: LoopringMap<UserBalanceInfo> }>

Defined in

api/user_api.ts:415


getUserDepositHistory

getUserDepositHistory<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userDepositHistory: UserDepositHistoryTx[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserDepositHistoryRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userDepositHistory: UserDepositHistoryTx[] }>

Defined in

api/user_api.ts:454


getUserFeeRate

getUserFeeRate<R>(request, apiKey): Promise<{ raw_data: R ; userFreeRateMap: LoopringMap<UserFeeRateInfo> }>

Type parameters

Name
R

Parameters

Name Type
request GetUserFeeRateRequest
apiKey string

Returns

Promise<{ raw_data: R ; userFreeRateMap: LoopringMap<UserFeeRateInfo> }>

Defined in

api/user_api.ts:642


getUserNFTBalances

getUserNFTBalances<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userNFTBalances: UserNFTBalanceInfo<NFT_IMAGE_SIZES>[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserNFTBalancesRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userNFTBalances: UserNFTBalanceInfo<NFT_IMAGE_SIZES>[] }>

Defined in

api/user_api.ts:1955


getUserNFTDepositHistory

getUserNFTDepositHistory<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userNFTDepositHistory: UserNFTDepositHistoryTx[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserNFTDepositHistoryRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userNFTDepositHistory: UserNFTDepositHistoryTx[] }>

Defined in

api/user_api.ts:1629


getUserNFTMintHistory

getUserNFTMintHistory<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userNFTMints: UserNFTMintHistoryTx[] }>

Get user NFTAction Mint list.

Type parameters

Name
R

Parameters

Name Type
request GetUserNFTMintHistoryRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userNFTMints: UserNFTMintHistoryTx[] }>

Defined in

api/user_api.ts:1730


getUserNFTTransactionHistory

getUserNFTTransactionHistory<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userNFTTxs: UserNFTTxsHistory[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserNFTTxsRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userNFTTxs: UserNFTTxsHistory[] }>

Defined in

api/user_api.ts:1762


getUserNFTTransferHistory

getUserNFTTransferHistory<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userNFTTransfers: UserNFTTransferHistoryTx[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserNFTTransferHistoryRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userNFTTransfers: UserNFTTransferHistoryTx[] }>

Defined in

api/user_api.ts:1695


getUserNFTWithdrawalHistory

getUserNFTWithdrawalHistory<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userNFTWithdrawalHistory: UserNFTWithdrawalHistoryTx[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserNFTWithdrawalHistoryRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userNFTWithdrawalHistory: UserNFTWithdrawalHistoryTx[] }>

Defined in

api/user_api.ts:1662


getUserOnchainWithdrawalHistory

getUserOnchainWithdrawalHistory<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userOnchainWithdrawalHistory: UserOnchainWithdrawalHistoryTx[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserOnchainWithdrawalHistoryRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userOnchainWithdrawalHistory: UserOnchainWithdrawalHistoryTx[] }>

Defined in

api/user_api.ts:487


getUserOrderFeeRate

getUserOrderFeeRate<R>(request, apiKey): Promise<{ feeRate: FeeRateInfo ; gasPrice: number ; raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request GetUserOrderFeeRateRequest
apiKey string

Returns

Promise<{ feeRate: FeeRateInfo ; gasPrice: number ; raw_data: R }>

Defined in

api/user_api.ts:682


getUserPwdResetTxs

getUserPwdResetTxs<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userPwdResetTxs: UserRegTx[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserPwdResetTxsRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userPwdResetTxs: UserRegTx[] }>

Defined in

api/user_api.ts:381


getUserRegTxs

getUserRegTxs<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userRegTxs: UserRegTx[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserRegTxsRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userRegTxs: UserRegTx[] }>

Defined in

api/user_api.ts:348


getUserTrades

getUserTrades<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userTrades: MarketTradeInfo[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserTradesRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userTrades: MarketTradeInfo[] }>

Defined in

api/user_api.ts:593


getUserTransferList

getUserTransferList<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userTransfers: UserTransferRecord[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserTransferListRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userTransfers: UserTransferRecord[] }>

Defined in

api/user_api.ts:520


getUserTxs

getUserTxs<R>(request, apiKey): Promise<{ raw_data: R ; totalNum: number ; userTxs: UserTx[] }>

Type parameters

Name
R

Parameters

Name Type
request GetUserTxsRequest
apiKey string

Returns

Promise<{ raw_data: R ; totalNum: number ; userTxs: UserTx[] }>

Defined in

api/user_api.ts:553


getUserVIPAssets

getUserVIPAssets<R>(request): Promise<{ raw_data: { data: R } ; vipAsset: R }>

Type parameters

Name
R

Parameters

Name Type
request getUserVIPAssetsRequest

Returns

Promise<{ raw_data: { data: R } ; vipAsset: R }>

Defined in

api/user_api.ts:2015


getUserVIPInfo

getUserVIPInfo<R>(request, apiKey): Promise<{ raw_data: R ; vipInfo: { createdAt: number ; org: any ; validTo: string ; vipTag: any } }>

Type parameters

Name
R

Parameters

Name Type
request GetUserVIPInfoRequest
apiKey string

Returns

Promise<{ raw_data: R ; vipInfo: { createdAt: number ; org: any ; validTo: string ; vipTag: any } }>

Defined in

api/user_api.ts:2037


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


submitDeployNFT

submitDeployNFT<T>(req, options?): Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
req OriginDeployNFTRequestV3WithPatch
options? Object
options.accountId? number
options.counterFactualInfo? any

Returns

Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Defined in

api/user_api.ts:1075


submitInternalTransfer

submitInternalTransfer<T>(req, options?): Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
req OriginTransferRequestV3WithPatch
options? Object
options.accountId? number
options.counterFactualInfo? any

Returns

Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Defined in

api/user_api.ts:958


submitNFTInTransfer

submitNFTInTransfer<T>(req, options?): Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
req OriginNFTTransferRequestV3WithPatch
options? Object
options.accountId? number
options.counterFactualInfo? any

Returns

Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Defined in

api/user_api.ts:1207


submitNFTMint

submitNFTMint<T>(req, options?): Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
req OriginNFTMINTRequestV3WithPatch
options? Object
options.accountId? number
options.counterFactualInfo? any

Returns

Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Defined in

api/user_api.ts:1437


submitNFTTrade

submitNFTTrade<T>(req): Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
req OriginNFTTradeRequestV3WithPatch

Returns

Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Defined in

api/user_api.ts:1594


submitNFTValidateOrder

submitNFTValidateOrder<T>(req): Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
req OriginNFTValidateOrderRequestV3WithPatch

Returns

Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Defined in

api/user_api.ts:1568


submitNFTWithdraw

submitNFTWithdraw<T>(req, options?): Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
req OriginNFTWithdrawRequestV3WithPatch
options? Object
options.accountId? number
options.counterFactualInfo? any

Returns

Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Defined in

api/user_api.ts:1322


submitOffchainWithdraw

submitOffchainWithdraw<T>(req, options?): Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
req OffChainWithdrawalRequestV3WithPatch
options? Object
options.accountId? number
options.counterFactualInfo? any

Returns

Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Defined in

api/user_api.ts:846


submitOrder

submitOrder(orderRequest, PrivateKey, apiKey): Promise<RESULT_INFO | Omit<any, "resultInfo"> & { raw_data: Omit<any, "resultInfo"> }>

Parameters

Name Type
orderRequest SubmitOrderRequestV3
PrivateKey string
apiKey string

Returns

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

Defined in

api/user_api.ts:198


updateAccount

updateAccount<T>(req, options?): Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Type parameters

Name Type
T extends TX_HASH_API

Parameters

Name Type
req UpdateAccountRequestV3WithPatch
options? Object
options.accountId? number
options.counterFactualInfo? any

Returns

Promise<RESULT_INFO | TX_HASH_RESULT<T>>

Defined in

api/user_api.ts:1825


updateUserApiKey

updateUserApiKey<R>(request, apiKey, eddsaKey): Promise<{ raw_data: R }>

Type parameters

Name
R

Parameters

Name Type
request UpdateUserApiKeyRequest
apiKey string
eddsaKey string

Returns

Promise<{ raw_data: R }>

Defined in

api/user_api.ts:68

results matching ""

    No results matching ""