Pact Swap
SWAPPACTSWAP Market MakerC2 (Ask) Orders APIDeposit CWEB collateral into C2(Ask) token contract POST

Deposit CWEB collateral into C2(Ask) token contract


Creates a UI command (QR code string) for depositing CWEB collateral. 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. The deposit amount plus the deposit fee will be deducted from the user's wallet.

POST
/pactswap_cm/ui-commands/c2/makeDeposit
contractIdstring

The L2 contract address of the market maker contract.

depositAmountstring

The amount of CWEB to deposit (in smallest unit, e.g., wei). Must be provided as a string representation of a bigint.

accessId?string

Optional unique identifier for history tracking. Used to track deposit transactions in off-chain history systems.

Response Body

curl -X POST "https://cwap-api.coinhq.store/pactswap_cm/ui-commands/c2/makeDeposit" \
  -H "Content-Type: application/json" \
  -d '{
    "contractId": "0x6f20d1802288c90d2a044d3f7afae73fda261b27d85c0e01fdaaf3199b2c0e85",
    "depositAmount": "1000000000000000000"
  }'
{
  "rawTx": "string"
}

Was this documentation helpful? Any suggestions?