Funding your Margin Account

Funding your margin account involves transferring funds between your main balance and your margin account. This process is essential to start margin trading and to manage your positions.

You can:

  • Deposit: Transfer funds from your main balance to your margin account to increase your trading power
  • Withdraw: Transfer funds from your margin account back to your main balance, subject to margin level requirements

Each operation requires an idempotency key to prevent duplicate transactions. You must have sufficient balance in the source account (main balance for deposits, margin account for withdrawals).

If you retry with the same idempotency key while the original request is still in progress, the API returns 409 (concurrent_request). After the original request completes, retries with the same key within its lifetime return the same successful response (see BAP-19).

To process a deposit or withdrawal, use the Process margin funds movement endpoint.

Related endpoints

To check your movements history, use:

Important Restrictions

  • Account Status: The margin account must have INACTIVE or ACTIVE status to process any movement. Accounts with BLOCKED, LIQUIDATING, or ONBOARDING status cannot process movements.
  • Currency Availability: Only currencies available for margin trading can be deposited to the margin account. Check the Get Margin Available Currencies endpoint for the list of supported currencies.
  • Withdrawal Requirements: Withdrawals from margin account are only allowed when the withdrawal keeps the account healthy, meaning the margin level remains above the safe threshold after the operation. You can check the safe threshold and current margin level using the Get Margin Account Summary endpoint.

Error responses

HTTP statusError codeWhen it happens
404resource_not_foundNo margin account exists for the authenticated user
409concurrent_requestA movement with the same idempotency key is already in progress
422not_enough_balanceInsufficient balance in the source account (main for deposits, margin for withdrawals)
422currency_not_enabledCurrency is not enabled for margin trading or is not listed on a live order book
422withdrawal_rejectedWithdrawal would leave margin level below the safe threshold

Did this page help you?