Retrieve all orders of C2 token contract
Retrieves all C2 liquidity provider orders from the specified C2 token contract. C2 orders are Ask orders where liquidity providers sell L1 tokens for CWEB. The response includes all orders regardless of their activity status (ACTIVE, PENDING, or DISABLED).
Optional API key. When provided, increases the allowed number of requests per second.
In: header
Query Parameters
The L2 contract address of the C2 (market maker) contract. This is the contract address where the market maker orders are stored. The endpoint will retrieve all orders from this contract.
The public key of the user. This is the public key of owner of the orders.
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.
uriThe maximum number of orders to return. Default and maximum is 100.
value <= 100The offset to start from. Default is 0.
Response Body
curl -X GET "https://api.pactswap.io/pactswap_cm/getAllC2Orders?contractAddress=0x6f20d1802288c90d2a044d3f7afae73fda261b27d85c0e01fdaaf3199b2c0e85&publicKey=020a89e0698443aaf4ecd613317d2fdf90ef73b99244182fc7bb3c6b85f375b876&backendUrl=https%3A%2F%2Fapi-cloud.coinweb.io%2Fwallet&limit=100&offset=0"[
{
"id": "order-123-abc",
"baseAmount": "1000000000000000000",
"l1Amount": "50000000",
"minL1Amount": "40000000",
"collateral": "1000000000000000000",
"covering": "500000000000000000",
"createdAt": 1704067200000,
"expirationDate": 1704153600000,
"activityStatus": "ACTIVE",
"marketMaker": {
"auth": "EcdsaContract",
"payload": "020a89e0698443aaf4ecd613317d2fdf90ef73b99244182fc7bb3c6b85f375b876"
},
"baseRecipient": {
"auth": "EcdsaContract",
"payload": "020a89e0698443aaf4ecd613317d2fdf90ef73b99244182fc7bb3c6b85f375b876"
},
"txId": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"history": {
"historyId": "a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d",
"timestamp": 1717334400
}
}
]Was this documentation helpful? Any suggestions?