Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.magic.link/llms.txt

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

Authentication

All endpoints require the following headers unless otherwise noted:
Authorization
string
required
Bearer token (JWT) for end-user authentication. Format: Bearer YOUR_JWT_TOKEN
X-MAGIC-SECRET-KEY
string
required
Your Magic secret key for application-level authentication.

Estimate Transfer Cost

Estimate the cost of a transfer route before executing it.
cURL
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",
  "gas_sponsored": false,
  "message": null,
  "route": null
}

Request Parameters

source
string
required
Where to transfer from. Values: self, extended, hyperliquid, paradex, nado, polymarket
destination
string
required
Where to transfer to. Values: self, extended, hyperliquid, paradex, nado, polymarket
amount
string
required
The amount to transfer as a decimal string (e.g., "100").
chain
string
default:"ARB"
The chain context for the transfer (API values match the Chain enum). If source or destination is self, this must be one of ETH, ARB, POL, INK, or SOL (UOA self-wallet policy). Pure venue→venue routes may use other chain contexts where the planner supports them.
token
string
default:"USDC"
The token to transfer. Values: ETH, USDC, USDC.E, POL, SOL
destination_chain
string
Destination chain for transfers to self. Required with destination_token for self-to-self transfers. Must be one of ETH, ARB, POL, INK, or SOL when used (same self-wallet policy as chain).
destination_token
string
Destination token for transfers to self. Required with destination_chain for self-to-self transfers. Values: ETH, USDC, USDC.E, POL, SOL
gas_sponsored
boolean
default:"false"
Whether to use gas-sponsored execution when supported (EVM only; Solana is never gas-sponsored in this stack).

Response Fields

success
boolean
Whether the estimate was computed successfully.
source
string
Echo of the request source (self or a venue id).
destination
string
Echo of the request destination.
amount
string
Echo of the request amount.
steps
array
List of planned transfer steps with individual cost breakdowns.
total_cost_eth
string
Total estimated cost across all steps in ETH.
total_cost_usdc
string
Total estimated cost across all steps in USDC.
gas_sponsored
boolean
Whether the estimate used gas-sponsored execution.
message
string | null
Optional human-readable note from the estimator (e.g. errors or caveats).
route
object | null
When present, a route summary (route_id, reason, hops, steps, gas_policy, chain estimates, optional bridge_estimation_error, effective_minimum_deposit, etc.). Omitted or null when the planner does not attach one.

Create Transfer

Create and execute a transfer task. The transfer is executed asynchronously. Use the returned task_id to monitor progress.
cURL
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. Monitor progress with task_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
The response also includes an X-Task-ID header for convenience.

Request Parameters

The JSON body matches Estimate Transfer Cost (source, destination, amount, optional chain, token, destination_chain, destination_token, gas_sponsored).

Response Fields

success
boolean
Whether the task was created successfully.
task_id
string
The UUID of the created transfer task. Use this to poll for status.
message
string
Human-readable status message.

List Tasks

Get the authenticated user’s transfer tasks, ordered by most recent.
cURL
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": {}
    }
  ]
}

Query Parameters

limit
integer
default:"5"
Maximum number of tasks to return.

Response Fields

user_id
string
The UOA-internal user UUID.
tasks
array
List of task objects.

Get Task

Get a specific transfer task by ID.
cURL
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": {}
}

Path Parameters

task_id
string
required
The UUID of the task to retrieve.

Response Fields

The response fields are the same as those in the List Tasks task object. For a task still in pending status, the server may enqueue background execution when you fetch it (internal retry using stored credentials).

Resume Task

Resume a failed or cancelled transfer task. Returns the same payload shape as Create Transfer (success, task_id, message). Not allowed for pending, in_progress, or completed tasks.
cURL
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 a1b2c3d4-e5f6-7890-abcd-ef1234567890 is being resumed from step 0"
}