SWAPPACTSWAP Market MakerC2 (Ask) Orders APIWithdraw CWEB collateral from C2(Ask) token contract POST
Withdraw CWEB collateral from C2(Ask) token contract
Creates a UI command (QR code string) for withdrawing 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 withdraw fee will be deducted from the user's wallet.
contractIdstring
The L2 contract address of the market maker contract.
withdrawAmountstring
The amount of CWEB to withdraw (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 withdraw transactions in off-chain history systems.
Response Body
curl -X POST "https://cwap-api.coinhq.store/pactswap_cm/ui-commands/c2/makeWithdraw" \
-H "Content-Type: application/json" \
-d '{
"contractId": "0x6f20d1802288c90d2a044d3f7afae73fda261b27d85c0e01fdaaf3199b2c0e85",
"withdrawAmount": "500000000000000000"
}'{
"rawTx": "string"
}Was this documentation helpful? Any suggestions?