Pact Swap

Retrieve all Reversed orders of C1 token contract


Retrieves all Reversed C1 orders from the specified C1 token contract address. Reversed orders are created by C2 contract when it can't find a C2 order for a swap, or when the expired PACT is converted to a Reversed order.

GET
/pactswap_cm/getReversedOrders

Query Parameters

contractAddressstring

The C1 contract address.

backendUrl?string

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.

Formaturi

Response Body

curl -X GET "https://cwap-api.coinhq.store/pactswap_cm/getReversedOrders?contractAddress=0x1234567890123456789012345678901234567890&backendUrl=https%3A%2F%2Fapi-cloud.coinweb.io%2Fwallet"
[
  {
    "id": "order-123-abc",
    "baseAmount": "1000000000000000000",
    "l1Amount": "50000000",
    "minL1Amount": "40000000",
    "recipient": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
    "createdAt": 1704067200000,
    "activityStatus": "CANCELLED",
    "paymentStatus": "PAYABLE",
    "funds": "1000000000000000000",
    "chainData": null,
    "txId": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "error": "Order expired",
    "expirationDate": 1704153600000
  }
]

Was this documentation helpful? Any suggestions?