Transfer cash between the spot balance and the margin sub-account.
POST/v1/margin/transfer
Moves settlement-asset cash between the account's spot balance and its margin
sub-account. direction is in (spot → margin) or out (margin → spot). Accepted
for sequencing (202): the engine's verdict is asynchronous and a rejected transfer
applies nothing. Outbound transfers are bounded by the engine's margin_withdrawable
gate (GET /v1/margin_info). The authenticated account is the only account whose
margin can move — a mismatched account_id in the body is rejected forbidden.
Request
Responses
- 202
- 400
- 401
- 403
- 500
Accepted for sequencing. status is always accepted; the engine's apply/reject verdict is asynchronous.
Request was malformed or failed validation. The error.code field carries the
machine-readable reason; common values include invalid_request, invalid_json,
invalid_order_id, invalid_instrument_id, invalid_credential_id,
invalid_resolution, and operation-specific codes documented per endpoint.
Missing or invalid Authorization header.
The body's account_id does not match the authenticated account, or the account's state forbids the action.
Unexpected server error. Includes a correlation_id; report it when filing a bug.