Skip to main content
POST
Node.js

Authorizations

Authorization
string
header
required

ES256-signed JWT bearer token, single-use, 60-second TTL. See Authentication for how to mint one.

X-Request-Signature
string
header
required

ES256 signature over the request, bound to the bearer JWT. Required on every request. See Authentication → Request signing.

Headers

Idempotency-Key
string
required

Client-generated unique key to make a write operation safely retryable. UUID recommended. See Idempotency.

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9_-]{1,255}$
Example:

"550e8400-e29b-41d4-a716-446655440000"

X-Request-Id
string

Optional, client-supplied correlation ID for this request. Echoed verbatim on the response when supplied; the response omits it when the request did not supply one. Distinct from X-Trace-Id (server-generated, always present). See Metadata & tracing.

Example:

"my-req-abc-123"

X-App-Mode
enum<string>
default:SANDBOX

Environment selector, matching the API key's bound environment. Defaults to SANDBOX when omitted. See Environments. When present, the value must be SANDBOX or LIVE, matched without regard to case. Any other value, including an empty one, returns 400 INVALID_APP_MODE; details.received echoes the value you sent.

Available options:
SANDBOX,
LIVE
Example:

"SANDBOX"

Body

application/json

Initiates a withdrawal to a verified withdrawal account. Rail (fiat vs stablecoin) and network are resolved server-side from withdrawalAccountId. Unknown fields are rejected with 400 VALIDATION_BODY_FAILED.

currency
string
required

Currency to withdraw. The server dispatches crypto vs fiat based on the value — a single union, not separate endpoints.

Pattern: ^[A-Z0-9]{2,15}$
Example:

"USDC"

withdrawalAmount
string
required

Positive decimal amount; must be greater than zero.

Pattern: ^[0-9]+(\.[0-9]{1,16})?$
Example:

"1000.00"

withdrawalAccountId
string
required

Verified withdrawal account from GET /v3/fx/withdrawal-accounts.

Pattern: ^([a-z]{3,5}_[1-9A-HJ-NP-Za-km-z]{1,22}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
Example:

"wac_NDqQ9LmcUASpnHR6CTvdkk"

metadata
object

Optional client-owned bookkeeping bag, persisted with the withdrawal. Accepted only in the request body of POST /v3/fx/withdrawals and returned nested at data.metadata on success. Keys are client-defined strings (e.g. customerId); values must be strings. See Withdrawal metadata for limits, immutability, and error-response behavior. Metadata is visible in the OpenFX platform, API, and MCP server (including connected AI tools), so don't include sensitive or personal data.

Example:

Response

Withdrawal created.

data
object
required

A withdrawal from your trade account.