Create multiple C2 (Ask) orders
Creates a UI command (QR code string) for creating multiple C2 (Ask) orders in a single batch. This is more efficient than creating orders individually and is useful for market makers or users creating multiple orders at once. The UI command can be used to compose a Coinweb L2 transaction, by means of @coinweb/wallet-lib library or Coinweb Mobile Wallet (by scanning QR generated from the UI command with a camera). The L2 Transaction then can be signed and broadcasted, with the wallet-library or mobile wallet. Validates order amounts and calculates the total cost including fees. Throws an error if l1Amount is less than minL1Amount for any order.
The L2 contract address of the market maker contract.
Batch of orders to create. A batch is an array of instructions for creating sets of orders. Each instruction specifies how many orders to create with a base template, and optionally provides individual overrides for each order.
Optional unique identifier for history tracking. Used to track order creation in off-chain history systems.
Response Body
curl -X POST "https://cwap-api.coinhq.store/pactswap_cm/ui-commands/c2/createOrders" \
-H "Content-Type: application/json" \
-d '{
"contractId": "0x6f20d1802288c90d2a044d3f7afae73fda261b27d85c0e01fdaaf3199b2c0e85",
"orders": [
[
1,
{},
[
{}
]
]
]
}'{
"rawTx": "string"
}Was this documentation helpful? Any suggestions?