Adjust Margin

This section documents the adjust_margin action.

This action is used to add or remove isolated margin from an open position.


Example Request

This example sets the leverage on BTC to 5x using the Cross margin-mode.

{
  "action": "adjust_margin",
  "coin": "BTC",
  "amount": 5,
  "is_add": true,
  "bot_id": BOT_ID,
  "api_key": "API_KEY"
}

coin*

This required parameter indicates which coin to use for the action.

"coin": "BTC"

amount*

This parameter indicates the amount value to add/remove.

  • A value of 5 is equal to a 5 USD

"amount": 5

is_add*

This required parameter indicates wether to add or remove an amount from margin.

  • true will add an amount to margin

  • false will remove an amount from margin

"is_add": true

delay

This parameter indicates a number of seconds to wait before triggering the action.

  • A value of 5 is equal to a 5 seconds delay

  • Max. allowed delay is 10 seconds

"delay": 5

Last updated

Was this helpful?