diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-18 19:46:16 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-18 19:46:16 +0800 |
commit | e6fe728bcbbab0c500fc7adee1439505282e8eca (patch) | |
tree | d7c4d43725b460776857ff421397d6c4b8c30603 /packages/asset-buyer/src/types.ts | |
parent | 6c7f4c13fa3de20c554e9c031f272d0f66842580 (diff) | |
parent | bef30e4209b26c8d4f443f8672e9acb9471c6a37 (diff) | |
download | dexon-sol-tools-e6fe728bcbbab0c500fc7adee1439505282e8eca.tar dexon-sol-tools-e6fe728bcbbab0c500fc7adee1439505282e8eca.tar.gz dexon-sol-tools-e6fe728bcbbab0c500fc7adee1439505282e8eca.tar.bz2 dexon-sol-tools-e6fe728bcbbab0c500fc7adee1439505282e8eca.tar.lz dexon-sol-tools-e6fe728bcbbab0c500fc7adee1439505282e8eca.tar.xz dexon-sol-tools-e6fe728bcbbab0c500fc7adee1439505282e8eca.tar.zst dexon-sol-tools-e6fe728bcbbab0c500fc7adee1439505282e8eca.zip |
Merge development
Diffstat (limited to 'packages/asset-buyer/src/types.ts')
-rw-r--r-- | packages/asset-buyer/src/types.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/asset-buyer/src/types.ts b/packages/asset-buyer/src/types.ts index d5d6be695..46a2338ce 100644 --- a/packages/asset-buyer/src/types.ts +++ b/packages/asset-buyer/src/types.ts @@ -75,6 +75,13 @@ export interface BuyQuoteRequestOpts { slippagePercentage: number; } +/* + * Options for checking liquidity + * + * shouldForceOrderRefresh: If set to true, new orders and state will be fetched instead of waiting for the next orderRefreshIntervalMs. Defaults to false. + */ +export type LiquidityRequestOpts = Pick<BuyQuoteRequestOpts, 'shouldForceOrderRefresh'>; + /** * ethAmount: The desired amount of eth to spend. Defaults to buyQuote.worstCaseQuoteInfo.totalEthAmount. * takerAddress: The address to perform the buy. Defaults to the first available address from the provider. @@ -117,7 +124,19 @@ export enum AssetBuyerError { TransactionValueTooLow = 'TRANSACTION_VALUE_TOO_LOW', } +/** + * orders: An array of signed orders + * remainingFillableMakerAssetAmounts: A list of fillable amounts for the signed orders. The index of an item in the array associates the amount with the corresponding order. + */ export interface OrdersAndFillableAmounts { orders: SignedOrder[]; remainingFillableMakerAssetAmounts: BigNumber[]; } + +/** + * Represents available liquidity for a given assetData + */ +export interface LiquidityForAssetData { + tokensAvailableInBaseUnits: BigNumber; + ethValueAvailableInWei: BigNumber; +} |