CowApi
Defined in: protocol-swap2-cow/src/api.ts:68
Methods
Section titled “Methods”accountOrders()
Section titled “accountOrders()”accountOrders(
network,owner,limit):Promise<unknown[]>
Defined in: protocol-swap2-cow/src/api.ts:77
The account’s orders, newest first (one page).
Parameters
Section titled “Parameters”network
Section titled “network”string
string
number
Returns
Section titled “Returns”Promise<unknown[]>
cancelOrders()
Section titled “cancelOrders()”cancelOrders(
network,body):Promise<void>
Defined in: protocol-swap2-cow/src/api.ts:72
Parameters
Section titled “Parameters”network
Section titled “network”string
orderUids
Section titled “orderUids”string[]
signature
Section titled “signature”string
signingScheme
Section titled “signingScheme”"eip712"
Returns
Section titled “Returns”Promise<void>
order()
Section titled “order()”order(
network,uid):Promise<Record<string,unknown> |null>
Defined in: protocol-swap2-cow/src/api.ts:74
The order, or null when the orderbook does not know the UID.
Parameters
Section titled “Parameters”network
Section titled “network”string
string
Returns
Section titled “Returns”Promise<Record<string, unknown> | null>
postOrder()
Section titled “postOrder()”postOrder(
network,body):Promise<unknown>
Defined in: protocol-swap2-cow/src/api.ts:71
Places a signed order; the answer is its UID.
Parameters
Section titled “Parameters”network
Section titled “network”string
unknown
Returns
Section titled “Returns”Promise<unknown>
putAppData()
Section titled “putAppData()”putAppData(
network,hash,json):Promise<void>
Defined in: protocol-swap2-cow/src/api.ts:79
Registers the appData document under its hash (the orderbook checks the hash).
Parameters
Section titled “Parameters”network
Section titled “network”string
string
string
Returns
Section titled “Returns”Promise<void>
quote()
Section titled “quote()”quote(
network,body,signal?):Promise<unknown>
Defined in: protocol-swap2-cow/src/api.ts:69
Parameters
Section titled “Parameters”network
Section titled “network”string
unknown
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<unknown>
trades()
Section titled “trades()”trades(
network,uid):Promise<unknown[]>
Defined in: protocol-swap2-cow/src/api.ts:75
Parameters
Section titled “Parameters”network
Section titled “network”string
string
Returns
Section titled “Returns”Promise<unknown[]>