# Class: InsufficientAssetLiquidityError
Error class representing insufficient asset liquidity
## Constructors
\+ **new InsufficientAssetLiquidityError**(`amountAvailableToFill`: `BigNumber`): *[InsufficientAssetLiquidityError](#class-insufficientassetliquidityerror)*
*Defined in [asset-swapper/src/errors.ts:12](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/errors.ts#L12)*
**Parameters:**
Name | Type | Description |
------ | ------ | ------ |
`amountAvailableToFill` | `BigNumber` | The amount availabe to fill (in base units) factoring in slippage |
**Returns:** *[InsufficientAssetLiquidityError](#class-insufficientassetliquidityerror)*
## Properties
### amountAvailableToFill
• **amountAvailableToFill**: *`BigNumber`*
*Defined in [asset-swapper/src/errors.ts:12](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/errors.ts#L12)*
The amount availabe to fill (in base units) factoring in slippage.
___
### message
• **message**: *string*
___
### name
• **name**: *string*
___
### `Optional` stack
• **stack**? : *undefined | string*
*Overrides void*
___
### `Static` Error
▪ **Error**: *`ErrorConstructor`*
# Class: SwapQuoteConsumer
## Implements
* [SwapQuoteConsumerBase](#interface-swapquoteconsumerbase)‹*[SmartContractParams](#smartcontractparams)*›
## Constructors
\+ **new SwapQuoteConsumer**(`supportedProvider`: [SupportedProvider](#supportedprovider), `options`: `Partial`): *[SwapQuoteConsumer](#class-swapquoteconsumer)*
*Defined in [asset-swapper/src/quote_consumers/swap_quote_consumer.ts:38](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/quote_consumers/swap_quote_consumer.ts#L38)*
**Parameters:**
Name | Type | Default |
------ | ------ | ------ |
`supportedProvider` | [SupportedProvider](#supportedprovider) | - |
`options` | `Partial` | {} |
**Returns:** *[SwapQuoteConsumer](#class-swapquoteconsumer)*
## Properties
### chainId
• **chainId**: *number*
*Defined in [asset-swapper/src/quote_consumers/swap_quote_consumer.ts:27](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/quote_consumers/swap_quote_consumer.ts#L27)*
___
### provider
• **provider**: *`ZeroExProvider`*
*Defined in [asset-swapper/src/quote_consumers/swap_quote_consumer.ts:26](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/quote_consumers/swap_quote_consumer.ts#L26)*
## Methods
### executeSwapQuoteOrThrowAsync
▸ **executeSwapQuoteOrThrowAsync**(`quote`: [SwapQuote](#swapquote), `opts`: `Partial`): *`Promise`*
*Implementation of [SwapQuoteConsumerBase](#interface-swapquoteconsumerbase)*
*Defined in [asset-swapper/src/quote_consumers/swap_quote_consumer.ts:85](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/quote_consumers/swap_quote_consumer.ts#L85)*
Given a SwapQuote and desired rate (in takerAsset), attempt to execute the swap with 0x extension or exchange contract.
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`quote` | [SwapQuote](#swapquote) | - | An object that conforms to SwapQuote. See type definition for more information. |
`opts` | `Partial` | {} | Options for getting CalldataInfo. See type definition for more information. |
**Returns:** *`Promise`*
___
### getCalldataOrThrowAsync
▸ **getCalldataOrThrowAsync**(`quote`: [SwapQuote](#swapquote), `opts`: `Partial`): *`Promise`*
*Implementation of [SwapQuoteConsumerBase](#interface-swapquoteconsumerbase)*
*Defined in [asset-swapper/src/quote_consumers/swap_quote_consumer.ts:57](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/quote_consumers/swap_quote_consumer.ts#L57)*
Given a SwapQuote, returns 'CalldataInfo' for a 0x extesion or exchange call. See type definition of CalldataInfo for more information.
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`quote` | [SwapQuote](#swapquote) | - | An object that conforms to SwapQuote. See type definition for more information. |
`opts` | `Partial` | {} | Options for getting SmartContractParams. See type definition for more information. |
**Returns:** *`Promise`*
___
### getOptimalExtensionContractTypeAsync
▸ **getOptimalExtensionContractTypeAsync**(`quote`: [SwapQuote](#swapquote), `opts`: `Partial`): *`Promise`*
*Defined in [asset-swapper/src/quote_consumers/swap_quote_consumer.ts:99](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/quote_consumers/swap_quote_consumer.ts#L99)*
Given a SwapQuote, returns optimal 0x protocol interface (extension or no extension) to perform the swap.
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`quote` | [SwapQuote](#swapquote) | - | An object that conforms to SwapQuote. See type definition for more information. |
`opts` | `Partial` | {} | Options for getting optimal exteion contract to fill quote. See type definition for more information. |
**Returns:** *`Promise`*
___
### getSmartContractParamsOrThrowAsync
▸ **getSmartContractParamsOrThrowAsync**(`quote`: [SwapQuote](#swapquote), `opts`: `Partial`): *`Promise>`*
*Implementation of [SwapQuoteConsumerBase](#interface-swapquoteconsumerbase)*
*Defined in [asset-swapper/src/quote_consumers/swap_quote_consumer.ts:71](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/quote_consumers/swap_quote_consumer.ts#L71)*
Given a SwapQuote, returns 'SmartContractParamsInfo' for a 0x extension or exchange call. See type definition of SmartContractParamsInfo for more information.
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`quote` | [SwapQuote](#swapquote) | - | An object that conforms to SwapQuote. See type definition for more information. |
`opts` | `Partial` | {} | Options for getting SmartContractParams. See type definition for more information. |
**Returns:** *`Promise>`*
___
### `Static` getSwapQuoteConsumer
▸ **getSwapQuoteConsumer**(`supportedProvider`: [SupportedProvider](#supportedprovider), `options`: `Partial`): *[SwapQuoteConsumer](#class-swapquoteconsumer)*
*Defined in [asset-swapper/src/quote_consumers/swap_quote_consumer.ts:33](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/quote_consumers/swap_quote_consumer.ts#L33)*
**Parameters:**
Name | Type | Default |
------ | ------ | ------ |
`supportedProvider` | [SupportedProvider](#supportedprovider) | - |
`options` | `Partial` | {} |
**Returns:** *[SwapQuoteConsumer](#class-swapquoteconsumer)*
# Class: SwapQuoter
## Constructors
\+ **new SwapQuoter**(`supportedProvider`: [SupportedProvider](#supportedprovider), `orderbook`: `Orderbook`, `options`: `Partial`): *[SwapQuoter](#class-swapquoter)*
*Defined in [asset-swapper/src/swap_quoter.ts:132](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L132)*
Instantiates a new SwapQuoter instance
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`supportedProvider` | [SupportedProvider](#supportedprovider) | - | The Provider instance you would like to use for interacting with the Ethereum network. |
`orderbook` | `Orderbook` | - | An object that conforms to Orderbook, see type for definition. |
`options` | `Partial` | {} | Initialization options for the SwapQuoter. See type definition for details. |
**Returns:** *[SwapQuoter](#class-swapquoter)*
An instance of SwapQuoter
## Properties
### chainId
• **chainId**: *number*
*Defined in [asset-swapper/src/swap_quoter.ts:34](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L34)*
___
### expiryBufferMs
• **expiryBufferMs**: *number*
*Defined in [asset-swapper/src/swap_quoter.ts:33](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L33)*
___
### orderbook
• **orderbook**: *`Orderbook`*
*Defined in [asset-swapper/src/swap_quoter.ts:32](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L32)*
___
### permittedOrderFeeTypes
• **permittedOrderFeeTypes**: *`Set`*
*Defined in [asset-swapper/src/swap_quoter.ts:35](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L35)*
___
### provider
• **provider**: *`ZeroExProvider`*
*Defined in [asset-swapper/src/swap_quoter.ts:31](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L31)*
## Methods
### destroyAsync
▸ **destroyAsync**(): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:397](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L397)*
Destroys any subscriptions or connections.
**Returns:** *`Promise`*
___
### getAvailableMakerAssetDatasAsync
▸ **getAvailableMakerAssetDatasAsync**(`takerAssetData`: string): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:326](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L326)*
Get the asset data of all assets that are purchaseable with takerAssetData in the order provider passed in at init.
**Parameters:**
Name | Type |
------ | ------ |
`takerAssetData` | string |
**Returns:** *`Promise`*
An array of asset data strings that are purchaseable with takerAssetData.
___
### getAvailableTakerAssetDatasAsync
▸ **getAvailableTakerAssetDatasAsync**(`makerAssetData`: string): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:311](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L311)*
Get the asset data of all assets that can be used to purchase makerAssetData in the order provider passed in at init.
**Parameters:**
Name | Type |
------ | ------ |
`makerAssetData` | string |
**Returns:** *`Promise`*
An array of asset data strings that can purchase makerAssetData.
___
### getEtherTokenAssetDataOrThrowAsync
▸ **getEtherTokenAssetDataOrThrowAsync**(): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:404](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L404)*
Utility function to get assetData for Ether token.
**Returns:** *`Promise`*
___
### getLiquidityForMakerTakerAssetDataPairAsync
▸ **getLiquidityForMakerTakerAssetDataPairAsync**(`makerAssetData`: string, `takerAssetData`: string): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:286](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L286)*
Returns information about available liquidity for an asset
Does not factor in slippage or fees
**Parameters:**
Name | Type | Description |
------ | ------ | ------ |
`makerAssetData` | string | The makerAssetData of the desired asset to swap for (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). |
`takerAssetData` | string | The takerAssetData of the asset to swap makerAssetData for (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). |
**Returns:** *`Promise`*
An object that conforms to LiquidityForTakerMakerAssetDataPair that satisfies the request. See type definition for more information.
___
### getMarketBuySwapQuoteAsync
▸ **getMarketBuySwapQuoteAsync**(`makerTokenAddress`: string, `takerTokenAddress`: string, `makerAssetBuyAmount`: `BigNumber`, `options`: `Partial`): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:228](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L228)*
Get a `SwapQuote` containing all information relevant to fulfilling a swap between a desired ERC20 token address and ERC20 owned by a provided address.
You can then pass the `SwapQuote` to a `SwapQuoteConsumer` to execute a buy, or process SwapQuote for on-chain consumption.
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`makerTokenAddress` | string | - | The address of the maker asset |
`takerTokenAddress` | string | - | The address of the taker asset |
`makerAssetBuyAmount` | `BigNumber` | - | The amount of maker asset to swap for. |
`options` | `Partial` | {} | Options for the request. See type definition for more information. |
**Returns:** *`Promise`*
An object that conforms to SwapQuote that satisfies the request. See type definition for more information.
___
### getMarketBuySwapQuoteForAssetDataAsync
▸ **getMarketBuySwapQuoteForAssetDataAsync**(`makerAssetData`: string, `takerAssetData`: string, `makerAssetBuyAmount`: `BigNumber`, `options`: `Partial`): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:203](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L203)*
Get a `SwapQuote` containing all information relevant to fulfilling a swap between a desired ERC20 token address and ERC20 owned by a provided address.
You can then pass the `SwapQuote` to a `SwapQuoteConsumer` to execute a buy, or process SwapQuote for on-chain consumption.
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`makerAssetData` | string | - | The makerAssetData of the desired asset to swap for (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). |
`takerAssetData` | string | - | The takerAssetData of the asset to swap makerAssetData for (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). |
`makerAssetBuyAmount` | `BigNumber` | - | The amount of maker asset to swap for. |
`options` | `Partial` | {} | Options for the request. See type definition for more information. |
**Returns:** *`Promise`*
An object that conforms to SwapQuote that satisfies the request. See type definition for more information.
___
### getMarketSellSwapQuoteAsync
▸ **getMarketSellSwapQuoteAsync**(`makerTokenAddress`: string, `takerTokenAddress`: string, `takerAssetSellAmount`: `BigNumber`, `options`: `Partial`): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:258](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L258)*
Get a `SwapQuote` containing all information relevant to fulfilling a swap between a desired ERC20 token address and ERC20 owned by a provided address.
You can then pass the `SwapQuote` to a `SwapQuoteConsumer` to execute a buy, or process SwapQuote for on-chain consumption.
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`makerTokenAddress` | string | - | The address of the maker asset |
`takerTokenAddress` | string | - | The address of the taker asset |
`takerAssetSellAmount` | `BigNumber` | - | The amount of taker asset to sell. |
`options` | `Partial` | {} | Options for the request. See type definition for more information. |
**Returns:** *`Promise`*
An object that conforms to SwapQuote that satisfies the request. See type definition for more information.
___
### getMarketSellSwapQuoteForAssetDataAsync
▸ **getMarketSellSwapQuoteForAssetDataAsync**(`makerAssetData`: string, `takerAssetData`: string, `takerAssetSellAmount`: `BigNumber`, `options`: `Partial`): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:177](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L177)*
Get a `SwapQuote` containing all information relevant to fulfilling a swap between a desired ERC20 token address and ERC20 owned by a provided address.
You can then pass the `SwapQuote` to a `SwapQuoteConsumer` to execute a buy, or process SwapQuote for on-chain consumption.
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`makerAssetData` | string | - | The makerAssetData of the desired asset to swap for (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). |
`takerAssetData` | string | - | The takerAssetData of the asset to swap makerAssetData for (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). |
`takerAssetSellAmount` | `BigNumber` | - | The amount of taker asset to swap for. |
`options` | `Partial` | {} | Options for the request. See type definition for more information. |
**Returns:** *`Promise`*
An object that conforms to SwapQuote that satisfies the request. See type definition for more information.
___
### getPrunedSignedOrdersAsync
▸ **getPrunedSignedOrdersAsync**(`makerAssetData`: string, `takerAssetData`: string): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:360](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L360)*
Grab orders from the order provider, prunes for valid orders with provided OrderPruner options
**Parameters:**
Name | Type | Description |
------ | ------ | ------ |
`makerAssetData` | string | The makerAssetData of the desired asset to swap for (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). |
`takerAssetData` | string | The takerAssetData of the asset to swap makerAssetData for (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). |
**Returns:** *`Promise`*
___
### isSwapQuoteFillableByTakerAddressAsync
▸ **isSwapQuoteFillableByTakerAddressAsync**(`swapQuote`: [SwapQuote](#swapquote), `takerAddress`: string): *`Promise<[boolean, boolean]>`*
*Defined in [asset-swapper/src/swap_quoter.ts:381](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L381)*
Util function to check if takerAddress's allowance is enough for 0x exchange contracts to conduct the swap specified by the swapQuote.
**Parameters:**
Name | Type | Description |
------ | ------ | ------ |
`swapQuote` | [SwapQuote](#swapquote) | The swapQuote in question to check enough allowance enabled for 0x exchange contracts to conduct the swap. |
`takerAddress` | string | The address of the taker of the provided swapQuote |
**Returns:** *`Promise<[boolean, boolean]>`*
___
### isTakerMakerAssetDataPairAvailableAsync
▸ **isTakerMakerAssetDataPairAvailableAsync**(`makerAssetData`: string, `takerAssetData`: string): *`Promise`*
*Defined in [asset-swapper/src/swap_quoter.ts:343](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L343)*
Validates the taker + maker asset pair is available from the order provider provided to `SwapQuote`.
**Parameters:**
Name | Type | Description |
------ | ------ | ------ |
`makerAssetData` | string | The makerAssetData of the desired asset to swap for (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). |
`takerAssetData` | string | The takerAssetData of the asset to swap makerAssetData for (for more info: https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). |
**Returns:** *`Promise`*
A boolean on if the taker, maker pair exists
___
### `Static` getSwapQuoterForMeshEndpoint
▸ **getSwapQuoterForMeshEndpoint**(`supportedProvider`: [SupportedProvider](#supportedprovider), `meshEndpoint`: string, `options`: `Partial`): *[SwapQuoter](#class-swapquoter)*
*Defined in [asset-swapper/src/swap_quoter.ts:119](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L119)*
Instantiates a new SwapQuoter instance given a 0x Mesh endpoint. This pulls all available liquidity stored in Mesh
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`supportedProvider` | [SupportedProvider](#supportedprovider) | - | The Provider instance you would like to use for interacting with the Ethereum network. |
`meshEndpoint` | string | - | The standard relayer API base HTTP url you would like to source orders from. |
`options` | `Partial` | {} | Initialization options for the SwapQuoter. See type definition for details. |
**Returns:** *[SwapQuoter](#class-swapquoter)*
An instance of SwapQuoter
___
### `Static` getSwapQuoterForProvidedOrders
▸ **getSwapQuoterForProvidedOrders**(`supportedProvider`: [SupportedProvider](#supportedprovider), `orders`: `SignedOrder`[], `options`: `Partial`): *[SwapQuoter](#class-swapquoter)*
*Defined in [asset-swapper/src/swap_quoter.ts:49](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L49)*
Instantiates a new SwapQuoter instance given existing liquidity in the form of orders and feeOrders.
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`supportedProvider` | [SupportedProvider](#supportedprovider) | - | The Provider instance you would like to use for interacting with the Ethereum network. |
`orders` | `SignedOrder`[] | - | A non-empty array of objects that conform to SignedOrder. All orders must have the same makerAssetData and takerAssetData. |
`options` | `Partial` | {} | Initialization options for the SwapQuoter. See type definition for details. |
**Returns:** *[SwapQuoter](#class-swapquoter)*
An instance of SwapQuoter
___
### `Static` getSwapQuoterForStandardRelayerAPIUrl
▸ **getSwapQuoterForStandardRelayerAPIUrl**(`supportedProvider`: [SupportedProvider](#supportedprovider), `sraApiUrl`: string, `options`: `Partial`): *[SwapQuoter](#class-swapquoter)*
*Defined in [asset-swapper/src/swap_quoter.ts:69](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L69)*
Instantiates a new SwapQuoter instance given a [Standard Relayer API](https://github.com/0xProject/standard-relayer-api) endpoint
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`supportedProvider` | [SupportedProvider](#supportedprovider) | - | The Provider instance you would like to use for interacting with the Ethereum network. |
`sraApiUrl` | string | - | The standard relayer API base HTTP url you would like to source orders from. |
`options` | `Partial` | {} | Initialization options for the SwapQuoter. See type definition for details. |
**Returns:** *[SwapQuoter](#class-swapquoter)*
An instance of SwapQuoter
___
### `Static` getSwapQuoterForStandardRelayerAPIWebsocket
▸ **getSwapQuoterForStandardRelayerAPIWebsocket**(`supportedProvider`: [SupportedProvider](#supportedprovider), `sraApiUrl`: string, `sraWebsocketAPIUrl`: string, `options`: `Partial`): *[SwapQuoter](#class-swapquoter)*
*Defined in [asset-swapper/src/swap_quoter.ts:95](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/swap_quoter.ts#L95)*
Instantiates a new SwapQuoter instance given a [Standard Relayer API](https://github.com/0xProject/standard-relayer-api) endpoint
and a websocket endpoint. This is more effecient than `getSwapQuoterForStandardRelayerAPIUrl` when requesting multiple quotes.
**Parameters:**
Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`supportedProvider` | [SupportedProvider](#supportedprovider) | - | The Provider instance you would like to use for interacting with the Ethereum network. |
`sraApiUrl` | string | - | The standard relayer API base HTTP url you would like to source orders from. |
`sraWebsocketAPIUrl` | string | - | - |
`options` | `Partial` | {} | Initialization options for the SwapQuoter. See type definition for details. |
**Returns:** *[SwapQuoter](#class-swapquoter)*
An instance of SwapQuoter
# Class: ProtocolFeeUtils
## Methods
### calculateWorstCaseProtocolFeeAsync
▸ **calculateWorstCaseProtocolFeeAsync**<**T**>(`orders`: `T`[], `gasPrice`: `BigNumber`): *`Promise`*
*Defined in [asset-swapper/src/utils/protocol_fee_utils.ts:29](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/utils/protocol_fee_utils.ts#L29)*
Calculates protocol fee with protofol fee multiplier for each fill.
**Type parameters:**
▪ **T**: *`Order`*
**Parameters:**
Name | Type |
------ | ------ |
`orders` | `T`[] |
`gasPrice` | `BigNumber` |
**Returns:** *`Promise`*
___
### getGasPriceEstimationOrThrowAsync
▸ **getGasPriceEstimationOrThrowAsync**(): *`Promise`*
*Defined in [asset-swapper/src/utils/protocol_fee_utils.ts:15](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/utils/protocol_fee_utils.ts#L15)*
**Returns:** *`Promise`*
___
### getProtocolFeeMultiplierAsync
▸ **getProtocolFeeMultiplierAsync**(): *`Promise`*
*Defined in [asset-swapper/src/utils/protocol_fee_utils.ts:10](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/asset-swapper/src/utils/protocol_fee_utils.ts#L10)*
**Returns:** *`Promise`*
# Class: BaseOrderProvider
## Constructors
\+ **new BaseOrderProvider**(`orderStore`: [OrderStore](_orderbook_src_order_store_.orderstore.md)): *[BaseOrderProvider](#class-baseorderprovider)*
*Defined in [orderbook/src/order_provider/base_order_provider.ts:12](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_provider/base_order_provider.ts#L12)*
**Parameters:**
Name | Type |
------ | ------ |
`orderStore` | [OrderStore](#class-orderstore) |
**Returns:** *[BaseOrderProvider](#class-baseorderprovider)*
## Properties
### _orderStore
• **_orderStore**: *[OrderStore](#class-orderstore)*
*Defined in [orderbook/src/order_provider/base_order_provider.ts:12](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_provider/base_order_provider.ts#L12)*
## Methods
### `Abstract` addOrdersAsync
▸ **addOrdersAsync**(`orders`: `SignedOrder`[]): *`Promise`*
*Defined in [orderbook/src/order_provider/base_order_provider.ts:27](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_provider/base_order_provider.ts#L27)*
**Parameters:**
Name | Type |
------ | ------ |
`orders` | `SignedOrder`[] |
**Returns:** *`Promise`*
___
### `Abstract` createSubscriptionForAssetPairAsync
▸ **createSubscriptionForAssetPairAsync**(`makerAssetData`: string, `takerAssetData`: string): *`Promise`*
*Defined in [orderbook/src/order_provider/base_order_provider.ts:18](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_provider/base_order_provider.ts#L18)*
**Parameters:**
Name | Type |
------ | ------ |
`makerAssetData` | string |
`takerAssetData` | string |
**Returns:** *`Promise`*
___
### `Abstract` destroyAsync
▸ **destroyAsync**(): *`Promise`*
*Defined in [orderbook/src/order_provider/base_order_provider.ts:25](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_provider/base_order_provider.ts#L25)*
**Returns:** *`Promise`*
___
### `Abstract` getAvailableAssetDatasAsync
▸ **getAvailableAssetDatasAsync**(): *`Promise`*
*Defined in [orderbook/src/order_provider/base_order_provider.ts:23](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_provider/base_order_provider.ts#L23)*
**Returns:** *`Promise`*
# Class: OrderSet
## Constructors
\+ **new OrderSet**(): *[OrderSet](#class-orderset)*
*Defined in [orderbook/src/order_set.ts:6](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_set.ts#L6)*
**Returns:** *[OrderSet](#class-orderset)*
## Methods
### addAsync
▸ **addAsync**(`item`: `APIOrder`): *`Promise`*
*Defined in [orderbook/src/order_set.ts:16](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_set.ts#L16)*
**Parameters:**
Name | Type |
------ | ------ |
`item` | `APIOrder` |
**Returns:** *`Promise`*
___
### addManyAsync
▸ **addManyAsync**(`items`: `APIOrder`[]): *`Promise`*
*Defined in [orderbook/src/order_set.ts:22](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_set.ts#L22)*
**Parameters:**
Name | Type |
------ | ------ |
`items` | `APIOrder`[] |
**Returns:** *`Promise`*
___
### deleteAsync
▸ **deleteAsync**(`item`: `APIOrder`): *`Promise`*
*Defined in [orderbook/src/order_set.ts:54](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_set.ts#L54)*
**Parameters:**
Name | Type |
------ | ------ |
`item` | `APIOrder` |
**Returns:** *`Promise`*
___
### deleteManyAsync
▸ **deleteManyAsync**(`items`: `APIOrder`[]): *`Promise`*
*Defined in [orderbook/src/order_set.ts:58](https://github.com/0xProject/0x-monorepo/blob/de3680125/packages/orderbook/src/order_set.ts#L58)*
**Parameters:**
Name | Type |
------ | ------ |
`items` | `APIOrder`[] |
**Returns:** *`Promise`*
___
### diffAsync
▸ **diffAsync**(`other`: [OrderSet](#class-orderset)): *`Promise