Katoshi Docs
  • Welcome
  • APP
    • Bots
      • Bot Creation
      • Bot Activation
      • Bot Settings
    • Strategies
      • Strategy Creation
      • Strategy Overview
      • Strategy Settings
      • Strategy Monetization
    • Portfolio
    • Terminal
    • Pricing
    • Alerts
    • Settings
  • API
    • Getting Started
    • Actions
      • Open Position
      • Close Position
      • Market Order
      • Limit Order
      • Stop Market Order
      • Scale Order
      • Modify TP/SL
      • Cancel TP/SL
      • Cancel Order
      • Close All
      • Cancel All
      • Clear All
      • Sell All
      • Set Leverage
      • Start Bot
      • Stop Bot
  • MCP
    • Introduction
    • Quickstart
    • Tools
    • Katoshi Agent Bot
  • Integrations
    • TradingView
Powered by GitBook
On this page
  • Example Request
  • coin*
  • leverage*
  • is_cross*
  • delay

Was this helpful?

  1. API
  2. Actions

Set Leverage

This section documents the set_leverage action.

This action is used to set the leverage of a coin.


Example Request

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

{
  "action": "set_leverage",
  "coin": "BTC",
  "leverage": 5,
  "is_cross": true,
  "bot_id": BOT_ID,
  "api_key": "API_KEY"
}

coin*

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

"coin": "BTC"

leverage*

This parameter specifies the leverage value.

  • A value of 5 is equal to a 5x leverage

"leverage": 5

is_cross*

This parameter specifies the leverage margin-mode.

  • True sets the margin-mode to Cross

  • False sets the margin-mode to Isolated

"is_cross": true

delay

This parameter specifies 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
PreviousSell AllNextStart Bot

Last updated 1 month ago

Was this helpful?