Authentication
All endpoints require the following headers unless otherwise noted:
Bearer token (JWT) for end-user authentication. Format: Bearer YOUR_JWT_TOKEN
Your Magic secret key for application-level authentication.
Estimate Transfer Cost
Estimate the cost of a transfer route before executing it.
curl -X POST 'https://uoa-server.magic.xyz/transfer/estimate-transfer-cost' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer USER_JWT_TOKEN' \
-H 'X-MAGIC-SECRET-KEY: YOUR_MAGIC_SECRET_KEY' \
-d '{
"source": "self",
"destination": "hyperliquid",
"amount": "100",
"chain": "ARB",
"token": "USDC"
}'
Response:
{
"success": true,
"source": "self",
"destination": "hyperliquid",
"amount": "100",
"steps": [
{
"action": "deposit",
"dex": "hyperliquid",
"cost_eth": "0.0001",
"cost_usdc": "0.25",
"breakdown": {
"gas_cost_eth": "0.0001",
"bridge_fee_usdc": "0",
"platform_fee_usdc": "0"
},
"estimated_gas": 150000,
"gas_breakdown": null
}
],
"total_cost_eth": "0.0001",
"total_cost_usdc": "0.25",
"message": null,
"route": null
}
Request Parameters
Where to transfer from. Values: self, extended, hyperliquid, paradex, nado, polymarket
Where to transfer to. Values: self, extended, hyperliquid, paradex, nado, polymarket
The amount to transfer as a decimal string (e.g., "100").
The chain context for the transfer. Values: ETH, ARB, POL, SOL, STRK, INK
The token to transfer. Values: ETH, WETH, USDC, USDC.E, POL, SOL
Optional transfer mode. Values: sponsored (gas-sponsored), legacy
Response Fields
Whether the estimate was computed successfully.
List of planned transfer steps with individual cost breakdowns.
The transfer action (e.g., deposit, bridge, withdrawal).
The DEX venue or bridge provider for this step.
Detailed cost breakdown: gas_cost_eth, bridge_fee_usdc, platform_fee_usdc.
Total estimated cost across all steps in ETH.
Total estimated cost across all steps in USDC.
Create Transfer
Create and execute a transfer task. The transfer is executed asynchronously. Use the returned task_id to monitor progress.
curl -X POST 'https://uoa-server.magic.xyz/transfer' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer USER_JWT_TOKEN' \
-H 'X-MAGIC-SECRET-KEY: YOUR_MAGIC_SECRET_KEY' \
-d '{
"source": "extended",
"destination": "polymarket",
"amount": "50",
"chain": "ARB",
"token": "USDC"
}'
Response:
{
"success": true,
"task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Transfer task created and executing"
}
The response also includes an X-Task-ID header for convenience.
Request Parameters
The request parameters are identical to Estimate Transfer Cost.
Response Fields
Whether the task was created successfully.
The UUID of the created transfer task. Use this to poll for status.
Human-readable status message.
List Tasks
Get the authenticated user’s transfer tasks, ordered by most recent.
curl -X GET 'https://uoa-server.magic.xyz/tasks?limit=10' \
-H 'Authorization: Bearer USER_JWT_TOKEN' \
-H 'X-MAGIC-SECRET-KEY: YOUR_MAGIC_SECRET_KEY'
Response:
{
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"tasks": [
{
"task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"source": "self",
"destination": "hyperliquid",
"amount": "100",
"chain": "ARB",
"token": "USDC",
"status": "COMPLETED",
"created_at": "2026-04-01T12:00:00Z",
"updated_at": "2026-04-01T12:01:30Z",
"progress": {},
"metadata": null
}
]
}
Query Parameters
Maximum number of tasks to return.
Response Fields
The UOA-internal user UUID.
List of task objects.
Transfer source location.
Transfer destination location.
Transfer amount as a decimal string.
Chain code for the transfer.
Token code for the transfer.
Task status: PENDING, IN_PROGRESS, COMPLETED, FAILED, or CANCELLED.
ISO 8601 timestamp of task creation.
ISO 8601 timestamp of last update.
Step-level execution progress.
Additional task metadata including route plan. null if not available.
Get Task
Get a specific transfer task by ID.
curl -X GET 'https://uoa-server.magic.xyz/task/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
-H 'Authorization: Bearer USER_JWT_TOKEN' \
-H 'X-MAGIC-SECRET-KEY: YOUR_MAGIC_SECRET_KEY'
Response:
{
"task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"source": "self",
"destination": "hyperliquid",
"amount": "100",
"chain": "ARB",
"token": "USDC",
"status": "IN_PROGRESS",
"created_at": "2026-04-01T12:00:00Z",
"updated_at": "2026-04-01T12:00:45Z",
"progress": {
"current_step": 1,
"total_steps": 2,
"steps": [
{ "action": "approve", "status": "completed" },
{ "action": "deposit", "status": "in_progress" }
]
},
"metadata": null
}
Path Parameters
The UUID of the task to retrieve.
Response Fields
The response fields are the same as those in the List Tasks task object.
Resume Task
Resume a failed or cancelled transfer task from the last successful checkpoint.
curl -X POST 'https://uoa-server.magic.xyz/task/a1b2c3d4-e5f6-7890-abcd-ef1234567890/resume' \
-H 'Authorization: Bearer USER_JWT_TOKEN' \
-H 'X-MAGIC-SECRET-KEY: YOUR_MAGIC_SECRET_KEY'
Response:
{
"success": true,
"task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Task resumed"
}
Path Parameters
The UUID of the task to resume.
Only tasks with status FAILED or CANCELLED can be resumed. Attempting to resume a COMPLETED, IN_PROGRESS, or PENDING task will return an error.
Response Fields
Whether the task was resumed successfully.
The UUID of the resumed task.
Human-readable status message.