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 '{}'
{
  "result": "<string>",
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.garden.finance/llms.txt

Use this file to discover all available pages before exploring further.

Execute gasless Hashed Time Lock Contract (HTLC) actions on an existing swap order, such as initiate, redeem, refund, and instant refund.

Initiate

Use action=initiate to initiate the swap on the source chain. The create order endpoint returns chain-specific signing data — sign it and submit here. The relayer broadcasts the transaction on the user’s behalf, making the process gasless.
The create order response includes typed_data with EIP-712 domain and message fields. Sign this using eth_signTypedData_v4.Supported on all EVM chains (Ethereum, Arbitrum, Base, etc.) and Tron.
signature
string
required
An ECDSA signature generated by the initiator over an EIP-712 typed data message containing the redeemer address, timelock, amount, and secret hash from the create order endpoint.
Example
{
  "signature": "0xEIP712SignatureHex..."
}
Want to enable gasless initiations for your users? Reach out to us on Townhall and we’ll help you get set up.

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

The HTLC action to execute on the order.

Available options:
initiate,
redeem,
refund,
instant-refund

Body

application/json

Initiate the swap on the source chain. The request body is chain-specific — refer to the Initiate section above for EVM, Solana, and Starknet request formats.

Response

200 - application/json

Executed action successfully.

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