cURL
customerSwap
curl --request POST \ --url https://api-staging.stablestack.xyz/api/instant-swaps \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e", "from_currency": "USDT", "to_currency": "USDC", "amount": "20"}'
200
success
{ "status": "success", "data": { "status": "success", "message": "Successful", "data": { "id": "751935b6-4574-4837-90d6-5039d2c165dd", "from_currency": "USDT", "to_currency": "USDC", "quoted_price": "0.9802941274500001", "quoted_currency": "USDC", "from_amount": "20.0", "to_amount": "19.6", "confirmed": false, "expires_at": "2025-05-13T13:24:46.000Z", "created_at": "2025-05-13T13:24:31.000Z", "updated_at": "2025-05-13T13:24:31.000Z", "user": { "id": "97075f40-1885-4034-92f6-e3e61c0679c5", "sn": "QDXTF3IK5BH", "email": "contact@akande.com", "reference": null, "first_name": "Akande Enterprises", "last_name": "Akande Enterprises", "display_name": null, "created_at": "2025-05-01T21:03:56.000Z", "updated_at": "2025-05-01T21:03:56.000Z" } } }}
API reference for creating instant currency swaps
{ "customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e", "from_currency": "USDT", "to_currency": "USDC", "amount": "20" }
{ "from_currency": "USDT", "to_currency": "USDC", "amount": "20" }
Swap created successfully
The response is of type object.
object