Skip to Content
LandedFXDocs

Get an address to fund a swap

POST
/api/v1/swap/orders

Picks the cheapest provider that answers, falling back to the next, and returns a one-time address to send to. Price first with POST /swap/quotes, which needs no address. Orders are tracked for you: read GET /swap/orders/{id} or subscribe to the swap.order.updated webhook.

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
from*string
to*string
amount*string

Amount of from you will send

recipient*string

Who receives to, on the destination chain

refundTo*string

Where a failed swap gets refunded, on the origin chain. Use an address you control there.

reference?string

Your own id for this payment. It comes back on the order and its webhooks.

minAmountOut?string

Refuse a provider whose fresh price delivers less than this

slippageBps?number

Max slippage in bps

providers?array<>

Limit which providers may be used

Response Body

application/json
  1. response
code*number

HTTP status code

message*string

Human-readable message

data?

Response payload

metadata?
errors?array<string>

Validation errors, when the request was rejected

Example Request
curl -X POST 'https://api.landedfx.com/api/v1/swap/orders' \  -H 'Content-Type: application/json' \  -d '{  "from": "USDT:tron",  "to": "USDC:base",  "amount": "725",  "recipient": "string",  "refundTo": "string"}'
Example Response
{  "message": "string",  "metadata": {    "page": 1,    "limit": 20,    "totalDocs": 42,    "prevPage": null,    "nextPage": 2,    "totalPages": 3  },  "errors": [    "string"  ],  "code": 201,  "data": {    "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",    "reference": "string",    "provider": "relay",    "from": "string",    "to": "string",    "amountIn": 0,    "amountOut": 0,    "minAmountOut": 0,    "depositAddress": "string",    "depositMemo": "string",    "recipient": "string",    "refundTo": "string",    "state": "pending",    "final": true,    "originTxs": [      "string"    ],    "destinationTxs": [      "string"    ],    "receivedIn": 0,    "deliveredOut": 0,    "refunded": 0,    "deadline": "string",    "createdAt": "string"  }}