Skip to content
docs

CowApi

Defined in: protocol-swap2-cow/src/api.ts:68

accountOrders(network, owner, limit): Promise<unknown[]>

Defined in: protocol-swap2-cow/src/api.ts:77

The account’s orders, newest first (one page).

string

string

number

Promise<unknown[]>


cancelOrders(network, body): Promise<void>

Defined in: protocol-swap2-cow/src/api.ts:72

string

string[]

string

"eip712"

Promise<void>


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.

string

string

Promise<Record<string, unknown> | null>


postOrder(network, body): Promise<unknown>

Defined in: protocol-swap2-cow/src/api.ts:71

Places a signed order; the answer is its UID.

string

unknown

Promise<unknown>


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).

string

string

string

Promise<void>


quote(network, body, signal?): Promise<unknown>

Defined in: protocol-swap2-cow/src/api.ts:69

string

unknown

AbortSignal

Promise<unknown>


trades(network, uid): Promise<unknown[]>

Defined in: protocol-swap2-cow/src/api.ts:75

string

string

Promise<unknown[]>