Skip to main content
POST
/
swaps
curl
curl -X POST https://api.remitflex.com/v1/swaps \
  -H "Authorization: Bearer $REMITFLEX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"from":"USDC","to":"EURC","amount":100,"destinationAddress":"2dudFU32c5wsRpfRZDXBAJFirHC4hindqpKSCwwtDaAB"}'
{
  "status": "success",
  "message": "<string>",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "from": "<string>",
    "to": "<string>",
    "amount": 123,
    "expectedAmount": "<string>",
    "receivedAmount": "<string>",
    "outputAmount": "<string>",
    "rate": 123,
    "feeBps": 123,
    "depositAddress": "<string>",
    "depositWallet": "<string>",
    "destinationAddress": "<string>",
    "swapTxSignature": "<string>",
    "payoutTxSignature": "<string>",
    "errorMessage": "<string>",
    "expiresAt": "2023-11-07T05:31:56Z",
    "completedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "expectedOutput": 123,
    "receivedOutput": 123
  }
}

Authorizations

Authorization
string
header
required

API key created in the RemitFlex Dashboard (rmf_live_... or rmf_test_...). Key management endpoints require a dashboard JWT and are not part of this reference.

Headers

Idempotency-Key
string
required

Unique key for safe retries on mutating API-key requests. Cached for 24 hours per org, method, and path.

Maximum string length: 255
Example:

"7f3c2a1b-4e5d-6c7b-8a9f-0e1d2c3b4a5f"

Body

application/json
from
string
required

Source currency code.

Required string length: 2 - 10
Example:

"USDC"

to
string
required

Destination currency code.

Required string length: 2 - 10
Example:

"EURC"

amount
number
required

Human-readable input amount.

Required range: x <= 1000000000
Example:

100

destinationAddress
string
required

Solana address to receive swapped tokens.

Required string length: 32 - 64
Example:

"2dudFU32c5wsRpfRZDXBAJFirHC4hindqpKSCwwtDaAB"

Response

Swap created

status
string
Example:

"success"

message
string
data
object