iexec / Exports / IExecOrderbookModule
module exposing orderbook methods
-
↳
IExecOrderbookModule
- fetchAppOrderbook
- fetchApporder
- fetchDatasetOrderbook
- fetchDatasetorder
- fetchRequestOrderbook
- fetchRequestorder
- fetchWorkerpoolOrderbook
- fetchWorkerpoolorder
- fromConfig
• new IExecOrderbookModule(configOrArgs
, options?
): IExecOrderbookModule
Create an IExecModule instance
Name | Type |
---|---|
configOrArgs |
IExecConfig | IExecConfigArgs |
options? |
IExecConfigOptions |
• config: IExecConfig
current IExecConfig
▸ fetchAppOrderbook(appAddress
, options?
): Promise
<PaginableOrders
<PublishedApporder
>>
find the cheapest orders for the specified app.
NB: use options
to include restricted orders or filter results.
example:
const { count, orders } = await fetchAppOrderbook(appAddress);
console.log('best order:', orders[0]?.order);
console.log('total orders:', count);
Name | Type | Description |
---|---|---|
appAddress |
string |
- |
options? |
Object |
- |
options.dataset? |
string |
include orders restricted to specified dataset (use 'any' to include any dataset) |
options.isDatasetStrict? |
boolean |
filters out orders allowing “any” dataset (default: false ) |
options.isRequesterStrict? |
boolean |
filters out orders allowing “any” requester (default: false ) |
options.isWorkerpoolStrict? |
boolean |
filters out orders allowing “any” workerpool (default: false ) |
options.maxTag? |
Tag | string [] |
filter by maximum tag accepted |
options.minTag? |
Tag | string [] |
filter by minimum tag required |
options.minVolume? |
BNish |
filter by minimum volume remaining |
options.page? |
number |
index of the page to fetch |
options.pageSize? |
number |
size of the page to fetch |
options.requester? |
string |
include orders restricted to specified requester (use 'any' to include any requester) |
options.workerpool? |
string |
include orders restricted to specified workerpool (use 'any' to include any workerpool) |
Promise
<PaginableOrders
<PublishedApporder
>>
▸ fetchApporder(orderHash
): Promise
<PublishedApporder
>
find a published apporder by orderHash.
example:
const { order, remaining } = await fetchApporder(orderHash);
console.log('order:' order);
console.log('remaining volume:', remaining);
Name | Type |
---|---|
orderHash |
string |
Promise
<PublishedApporder
>
▸ fetchDatasetOrderbook(datasetAddress
, options?
): Promise
<PaginableOrders
<PublishedDatasetorder
>>
find the cheapest orders for the specified dataset.
NB: use options
to include restricted orders or filter results.
example:
const { count, orders } = await fetchDatasetOrderbook(datasetAddress);
console.log('best order:', orders[0]?.order);
console.log('total orders:', count);
Name | Type | Description |
---|---|---|
datasetAddress |
string |
- |
options? |
Object |
- |
options.app? |
string |
include orders restricted to specified app (use 'any' to include any app) |
options.isAppStrict? |
boolean |
filters out orders allowing “any” app (default: false ) |
options.isRequesterStrict? |
boolean |
filters out orders allowing “any” requester (default: false ) |
options.isWorkerpoolStrict? |
boolean |
filters out orders allowing “any” workerpool (default: false ) |
options.maxTag? |
Tag | string [] |
filter by maximum tag accepted |
options.minTag? |
Tag | string [] |
filter by minimum tag required |
options.minVolume? |
BNish |
filter by minimum volume remaining |
options.page? |
number |
index of the page to fetch |
options.pageSize? |
number |
size of the page to fetch |
options.requester? |
string |
include orders restricted to specified requester (use 'any' to include any requester) |
options.workerpool? |
string |
include orders restricted to specified workerpool (use 'any' to include any workerpool) |
Promise
<PaginableOrders
<PublishedDatasetorder
>>
▸ fetchDatasetorder(orderHash
): Promise
<PublishedDatasetorder
>
find a published datasetorder by orderHash.
example:
const { order, remaining } = await fetchDatasetorder(orderHash);
console.log('order:' order);
console.log('remaining volume:', remaining);
Name | Type |
---|---|
orderHash |
string |
Promise
<PublishedDatasetorder
>
▸ fetchRequestOrderbook(options?
): Promise
<PaginableOrders
<PublishedWorkerpoolorder
>>
find the best paying request orders for computing resource.
NB: use options
to include restricted orders or filter results.
example:
const { count, orders } = await fetchRequestOrderbook();
console.log('best order:', orders[0]?.order);
console.log('total orders:', count);
Name | Type | Description |
---|---|---|
options? |
Object |
- |
options.app? |
string |
filter by specified app |
options.category? |
BNish |
filter by category |
options.dataset? |
string |
filter by specified dataset |
options.isWorkerpoolStrict? |
boolean |
filters out orders allowing “any” workerpool (default: false ) |
options.maxTag? |
Tag | string [] |
filter by maximum tag accepted |
options.maxTrust? |
BNish |
filter by maximum trust required |
options.minTag? |
Tag | string [] |
filter by minimum tag required |
options.minVolume? |
BNish |
filter by minimum volume remaining |
options.page? |
number |
index of the page to fetch |
options.pageSize? |
number |
size of the page to fetch |
options.requester? |
string |
filter by requester |
options.workerpool? |
string |
include orders restricted to specified workerpool (use 'any' to include any workerpool) |
Promise
<PaginableOrders
<PublishedWorkerpoolorder
>>
▸ fetchRequestorder(orderHash
): Promise
<PublishedRequestorder
>
find a published requestorder by orderHash.
example:
const { order, remaining } = await fetchRequestorder(orderHash);
console.log('order:' order);
console.log('remaining volume:', remaining);
Name | Type |
---|---|
orderHash |
string |
Promise
<PublishedRequestorder
>
▸ fetchWorkerpoolOrderbook(options?
): Promise
<PaginableOrders
<PublishedWorkerpoolorder
>>
find the cheapest orders for the specified computing resource.
NB: use options
to include restricted orders or filter results.
example:
const { count, orders } = await fetchWorkerpoolOrderbook();
console.log('best order:', orders[0]?.order);
console.log('total orders:', count);
Name | Type | Description |
---|---|---|
options? |
Object |
- |
options.app? |
string |
include orders restricted to specified app (use 'any' to include any app) |
options.category? |
BNish |
filter by category |
options.dataset? |
string |
include orders restricted to specified dataset (use 'any' to include any dataset) |
options.isAppStrict? |
boolean |
filters out orders allowing “any” app (default: false ) |
options.isDatasetStrict? |
boolean |
filters out orders allowing “any” dataset (default: false ) |
options.isRequesterStrict? |
boolean |
filters out orders allowing “any” requester (default: false ) |
options.maxTag? |
Tag | string [] |
filter by maximum tag offered |
options.minTag? |
Tag | string [] |
filter by minimum tag required |
options.minTrust? |
BNish |
filter by minimum trust required |
options.minVolume? |
BNish |
filter by minimum volume remaining |
options.page? |
number |
index of the page to fetch |
options.pageSize? |
number |
size of the page to fetch |
options.requester? |
string |
include orders restricted to specified requester (use 'any' to include any requester) |
options.workerpool? |
string |
filter by workerpool |
Promise
<PaginableOrders
<PublishedWorkerpoolorder
>>
▸ fetchWorkerpoolorder(orderHash
): Promise
<PublishedWorkerpoolorder
>
find a published workerpoolorder by orderHash.
example:
const { order, remaining } = await fetchWorkerpoolorder(orderHash);
console.log('order:' order);
console.log('remaining volume:', remaining);
Name | Type |
---|---|
orderHash |
string |
Promise
<PublishedWorkerpoolorder
>
▸ fromConfig(config
): IExecOrderbookModule
Create an IExecOrderbookModule instance using an IExecConfig instance
Name | Type |
---|---|
config |
IExecConfig |