Skip to main content
PATCH
/
orders
/
{order}
Update swap by doing an action.
curl --request PATCH \
  --url https://{environment}.garden.finance/v2/orders/{order} \
  --header 'Content-Type: application/json' \
  --header 'garden-app-id: <api-key>' \
  --data '{
  "signature": "<string>"
}'
{
  "status": "Ok",
  "error": "<string>",
  "result": "<string>"
}
Execute Hashed Time Lock Contract (HTLC) actions on an existing swap order, such as initiate, redeem, refund, and instant refund.

Authorizations

garden-app-id
string
header
required

If you do not yet have an app ID, please follow these steps.

Path Parameters

id
string
required

Query Parameters

action
enum<string>
required
Available options:
initiate,
redeem,
refund,
instant-refund

Body

application/json
  • Initiate
  • Redeem
  • Refund
  • Instant Refund
signature
string
required

An ECDSA signature generated by the initiator over an EIP-712 typed data message containing parameters such as the redeemer address and secret hash obtained from the create order endpoint. Submitting this signature enables the relayer to initiate the swap on behalf of the initiator, making the process gasless for the user.

Response

200 - application/json

Executed action successfully.

result
string
required
status
enum<string>
Available options:
Ok,
Error
error
string | null