Retrieve all orders of C1 token contract
Retrieves all C1 orders from the specified C1 token contract. C1 orders are bid orders where market makers sell CWEB for L1 tokens. The response includes all orders regardless of their activity status (ACTIVE, COMPLETED, CANCELLING, CANCELLED, EXPIRED, ERROR) or payment status (PAYABLE, NOT_PAYABLE, PAID).
Query Parameters
contractAddressstring
The L2 contract address of the C1 (dex-app.cm) contract. This is the contract address where the orders are stored. The endpoint will retrieve all orders from this contract.
backendUrl?string
Backend URL. Default is https://api-cloud.coinweb.io/wallet. This URL is used to query the contract's claim storage to retrieve all orders.
Format
uriResponse Body
curl -X GET "https://cwap-api.coinhq.store/pactswap_cm/getAllC1Orders?contractAddress=0x1234567890123456789012345678901234567890&backendUrl=https%3A%2F%2Fapi-cloud.coinweb.io%2Fwallet"[
{
"id": "order-123-abc",
"baseAmount": "1000000000000000000",
"l1Amount": "50000000",
"minL1Amount": "40000000",
"recipient": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
"createdAt": 1704067200000,
"activityStatus": "ACTIVE",
"paymentStatus": "PAYABLE",
"funds": "1000000000000000000",
"chainData": null,
"txId": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"error": "Insufficient funds",
"expirationDate": 1704153600000,
"marketMaker": {
"auth": "EcdsaContract",
"payload": "020a89e0698443aaf4ecd613317d2fdf90ef73b99244182fc7bb3c6b85f375b876"
}
}
]Was this documentation helpful? Any suggestions?