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": "bitcoin:btc",
    "owner": "<string>",
    "delegate": "<string>",
    "amount": "<string>"
  },
  "destination": {
    "asset": "bitcoin:btc",
    "owner": "<string>",
    "delegate": "<string>",
    "amount": "<string>"
  },
  "slippage": 0.5,
  "secret_hash": "0x057ff5cacab1d75df04e8e9d349f0d8dd92e87b989244b934d9b09bc99fc4173",
  "nonce": "<string>",
  "affiliate_fees": [
    {
      "address": "<string>",
      "asset": "ethereum:cbbtc",
      "fee": 0.1
    }
  ]
}'
{
  "status": "Ok",
  "error": "<string>",
  "result": {
    "order_id": "<string>",
    "to": "<string>",
    "amount": 123
  }
}

Create a new swap order to exchange assets across blockchain networks. This initiates the atomic swap process and returns order details including deposit addresses.

Authorizations

garden-app-id
string
header
required

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

Body

application/json

Response

200 - application/json

Object with required information to initiate order on source chain.

The response is of type object.