POST
Swap one asset for another

Authorizations

X-API-Key
string
header
required
X-Grant-Token
string
header
required

Token of the owner grant a delegated request runs under. The partner creates it and the owner signs its commitment; keep it on your backend.

Headers

Idempotency-Key
string
required

Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with idempotency_conflict.

Required string length: 8 - 128
Pattern: ^[A-Za-z0-9._:-]+$

Path Parameters

agent_id
string
required
Pattern: ^[0-9a-f]{64}$

Body

application/json
origin_asset
string
required
Required string length: 1 - 256
destination_asset
string
required
Required string length: 1 - 256
amount
string
required
Pattern: ^(?!0+$)[0-9]{1,78}$
min_amount_out
string
Pattern: ^[0-9]{1,78}$
confidential
boolean
default:false
dry
boolean
default:false

Response

Success

correlation_id
required
Pattern: ^op_[A-Za-z0-9_-]{43}$
agent_id
string | null
required
Pattern: ^[0-9a-f]{64}$
status
enum<string>
required
Available options:
PENDING_SIGNATURE,
QUEUED,
PENDING_APPROVAL,
PENDING_DEPOSIT,
PROCESSING,
SUCCESS,
REFUNDED,
FAILED,
UNCERTAIN,
NEEDS_REVIEW
failure_code
string | null
required
created_at
string
required
updated_at
string
required
dispatch_committed_at
string | null
required
grant
object | null
required
type
string
required
Allowed value: "agent_create"
details
object
required