Skip to main content
POST
/
orders
Create order.
curl --request POST \
  --url https://{environment}.garden.finance/v2/orders \
  --header 'Content-Type: application/json' \
  --header 'garden-app-id: <api-key>' \
  --data '
{
  "source": {
    "asset": "arbitrum:wbtc",
    "owner": "<string>",
    "amount": "<string>",
    "delegate": "<string>"
  },
  "destination": {
    "asset": "arbitrum:wbtc",
    "owner": "<string>",
    "amount": "<string>"
  },
  "slippage": 50,
  "nonce": "1736152215456",
  "solver_id": "0x9dd9c2d208b07bf9a4ef9ca311f36d7185749635",
  "affiliate_fees": [
    {
      "address": "<string>",
      "asset": "arbitrum:usdc",
      "fee": 10
    }
  ]
}
'
{
  "status": "Ok",
  "error": "<string>",
  "result": {
    "order_id": "<string>",
    "to": "<string>",
    "amount": 123
  }
}
Create a new swap order to exchange assets across blockchain networks. This starts the atomic swap process and returns a pre-built transaction to initiate a swap on-chain.

Authorizations

garden-app-id
string
header
required

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

Body

application/json
source
object
required
destination
object
required
slippage
number

(Optional) In BIPS (base index points), 100 bips = 1%. When not specified, the slippage configured in app settings is used, or zero if no default is configured.

Example:

50

nonce
string

(Optional) Custom nonce for the order. If not provided, one will be generated.

Example:

"1736152215456"

solver_id
string

(Optional) Specific solver ID to use for this order.

Example:

"0x9dd9c2d208b07bf9a4ef9ca311f36d7185749635"

affiliate_fees
object[]

(Optional) Add an affiliate fee to each swap, defined in bips (100 bips = 1%).

Response

200 - application/json

Object with required information to initiate order on source chain.

status
enum<string>
Available options:
Ok,
Error
error
string | null
result
bitcoin · object