Pact Swap
SWAPPACTSWAP Market MakerC1 (Bid) Orders APICreate multiple C1 (Bid) orders of EVM type POST

Create multiple C1 (Bid) orders of EVM type


Creates a UI command (QR code string) for creating multiple EVM C1 (Bid) orders (ETH, USDC, etc.) 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.

POST
/pactswap_cm/ui-commands/c1/createOrdersEvm
contractIdstring

The L2 contract address for the EVM token (ETH, USDC, etc.).

ordersarray<array<unknown>>

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.

contractOwnerFeestring

Fee paid to the contract owner (in base token units). Deprecated: Set to "0". No fee should be paid to the contract owner. Will be removed in a future version.

accessId?string

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/c1/createOrdersEvm" \
  -H "Content-Type: application/json" \
  -d '{
    "contractId": "0x6f20d1802288c90d2a044d3f7afae73fda261b27d85c0e01fdaaf3199b2c0e85",
    "orders": [
      [
        1,
        {}
      ]
    ],
    "contractOwnerFee": "0"
  }'
{
  "rawTx": "string"
}

Was this documentation helpful? Any suggestions?