Set margin profile
PUT/customers/:code/margin-profile
Selects the margin profile that provides the requested leverage and
assigns it to the customer's account. The setting is account-wide: it
applies to every instrument and every open position, and persists until
changed again (here or via leverage on order entry).
leverage must be between 1 and the max_leverage reported by
GET /customers/{code}/margin-profile, and a profile providing exactly
that leverage must be available to the customer; otherwise the request
is rejected with 400 and nothing changes. Requesting the leverage that
is already in effect is a no-op and returns the current profile. A
change that would immediately put an open position into margin call is
rejected with 400.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 502
Margin profile now in effect
Bad request — validation failed, invalid parameters, or the request
was rejected due to a business rule violation (e.g.
INSUFFICIENT_FUNDS when a transfer exceeds the available balance).
Authentication required or credentials invalid
Insufficient permissions for the requested resource
The requested resource was not found
Rate limit exceeded — retry after the period indicated in Retry-After header
Response Headers
Number of seconds to wait before retrying the request
Internal server error
Exchange upstream error — the underlying exchange returned an error or is unavailable