Skip to main content
POST
/
v1
/
transactions
Create Swap Transaction
curl --request POST \
  --url https://api.swaplinq.com/v1/transactions \
  --header 'Content-Type: application/json' \
  --data '
{
  "from": "<string>",
  "to": "<string>",
  "amount": 123,
  "address": "<string>",
  "refundAddress": "<string>",
  "extraId": "<string>"
}
'
{
  "id": "a5c73e2d7b89f0a1",
  "status": "waiting",
  "payinAddress": "bc1qDepositAddressPlaceholderxyz987",
  "payoutAddress": "0xYourEthDestAddress12345",
  "fromCurrency": "btc",
  "toCurrency": "eth",
  "expectedAmountTo": 16.542891,
  "amountFrom": 1
}

Documentation Index

Fetch the complete documentation index at: https://docs.swaplinq.com/llms.txt

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

Once you have received an estimated rate via the exchange-amount endpoint, you call this endpoint to officially lock the transaction and generate a pay-in address.

Request Body

from
string
required
The ticker of the currency you are sending. E.g., btc.
to
string
required
The ticker of the currency you want to receive. E.g., eth.
amount
number
required
The exact amount of the from currency you plan to deposit.
address
string
required
The destination wallet address where SwaplinQ will send the output funds.
refundAddress
string
required
The wallet address where funds should be returned if the transaction fails, times out, or encounters massive slippage. Essential for user security.
extraId
string
Optional Memo, Destination Tag, or Payment ID for currencies that require it (like XRP or XLM).

Response

The response provides the unique payinAddress where the user must send their funds. It also provides the id required to track the transaction.
{
  "id": "a5c73e2d7b89f0a1",
  "status": "waiting",
  "payinAddress": "bc1qDepositAddressPlaceholderxyz987",
  "payoutAddress": "0xYourEthDestAddress12345",
  "fromCurrency": "btc",
  "toCurrency": "eth",
  "expectedAmountTo": 16.542891,
  "amountFrom": 1
}