> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whitebit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get plans

> Get a list of available fixed-term Smart investment plans with available terms and interest rates via the V4 API.

export const SIGNER_FIELDS = {
  "/api/v4/collateral-account/balance": [{
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Asset to be filtered. For example: BTC If not specified, returns balances for all assets.",
    "example": "BTC"
  }],
  "/api/v4/collateral-account/balance-summary": [{
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Filter by requested asset. For example: BTC If not specified, returns summary for all assets.",
    "example": "BTC"
  }],
  "/api/v4/order/collateral/limit": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Available margin market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "side",
    "type": "string",
    "required": true,
    "description": "Order type. Variables: 'buy' / 'sell'. For open long position use **buy**, for short **sell**.",
    "example": "buy",
    "enum": ["buy", "sell"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Amount of stock currency to buy or sell. Minimum and step values are market-dependent — query the market info endpoint for constraints.",
    "example": "0.01"
  }, {
    "name": "price",
    "type": "string",
    "required": true,
    "description": "Limit order price in money currency. Minimum price step is market-dependent — query the market info endpoint for constraints.",
    "example": "40000"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom order identifier. Must be unique and contain only letters, numbers, dashes, dots, or underscores.",
    "example": "order1987111"
  }, {
    "name": "stopLoss",
    "type": "string",
    "required": false,
    "description": "Stop loss price. When provided, the system creates an OTO order with a stop loss condition.",
    "example": "50000"
  }, {
    "name": "takeProfit",
    "type": "string",
    "required": false,
    "description": "Take profit price. When provided, the system creates an OTO order with a take profit condition.",
    "example": "30000"
  }, {
    "name": "postOnly",
    "type": "boolean",
    "required": false,
    "description": "When true, guarantees the order executes as a maker order. The system rejects the order if it would immediately match as taker. Default: false.",
    "example": "false",
    "default": false
  }, {
    "name": "ioc",
    "type": "boolean",
    "required": false,
    "description": "When true, the order executes all or part immediately and cancels any unfilled portion. Cannot be combined with postOnly=true or rpi=true.",
    "example": "false",
    "default": false
  }, {
    "name": "rpi",
    "type": "boolean",
    "required": false,
    "description": "Enables Retail Price Improvement (RPI) mode. RPI orders are post-only by design and cannot be used with ioc=true. The API returns error code 40 when both rpi=true and ioc=true a…",
    "example": "true",
    "default": false
  }, {
    "name": "positionSide",
    "type": "string",
    "required": false,
    "description": "Position direction. Optional at the request layer but functionally required when hedge mode is enabled. See positionSide. - **One-way mode** (default account mode): the field is…",
    "example": "LONG",
    "enum": ["LONG", "SHORT", "BOTH"]
  }, {
    "name": "reduceOnly",
    "type": "boolean",
    "required": false,
    "description": "When true, the order can only reduce or close an existing position — the order cannot increase the position or open a new one. If the order amount exceeds the current position s…",
    "example": "false",
    "default": false
  }],
  "/api/v4/order/collateral/bulk": [{
    "name": "orders",
    "type": "array",
    "required": false
  }, {
    "name": "stopOnFail",
    "type": "boolean",
    "required": false,
    "description": "Controls how the bulk order processor handles failures. When true: Processing stops at the first order that fails validation or execution. Only orders up to (but not including) …",
    "example": "true",
    "default": false
  }],
  "/api/v4/order/collateral/market": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Available margin market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "side",
    "type": "string",
    "required": true,
    "description": "Order direction. Use buy to open or increase a long position and sell to open or increase a short position.",
    "example": "buy",
    "enum": ["buy", "sell"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Amount of stock currency to buy or sell. Minimum and step values are market-dependent — query the market info endpoint for constraints.",
    "example": "0.01"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom order identifier. Must be unique and contain only letters, numbers, dashes, dots, or underscores.",
    "example": "order1987111"
  }, {
    "name": "stopLoss",
    "type": "string",
    "required": false,
    "description": "Stop loss price. When provided, the system creates an OTO order with a stop loss condition.",
    "example": "50000"
  }, {
    "name": "takeProfit",
    "type": "string",
    "required": false,
    "description": "Take profit price. When provided, the system creates an OTO order with a take profit condition.",
    "example": "40000"
  }, {
    "name": "positionSide",
    "type": "string",
    "required": false,
    "description": "Position direction. Optional at the request layer but functionally required when hedge mode is enabled. See positionSide. - **One-way mode** (default account mode): the field is…",
    "example": "LONG",
    "enum": ["LONG", "SHORT", "BOTH"]
  }, {
    "name": "reduceOnly",
    "type": "boolean",
    "required": false,
    "description": "When true, the order can only reduce or close an existing position — the order cannot increase the position or open a new one. If the order amount exceeds the current position s…",
    "example": "false",
    "default": false
  }],
  "/api/v4/order/collateral/stop-limit": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Available margin market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "side",
    "type": "string",
    "required": true,
    "description": "Order direction. Use buy to open or increase a long position and sell to open or increase a short position.",
    "example": "buy",
    "enum": ["buy", "sell"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Amount of stock currency to buy or sell. Minimum and step values are market-dependent — query the market info endpoint for constraints.",
    "example": "0.001"
  }, {
    "name": "price",
    "type": "string",
    "required": true,
    "description": "Limit order price in money currency. The order executes at the specified price or better after activation.",
    "example": "40000"
  }, {
    "name": "activation_price",
    "type": "string",
    "required": true,
    "description": "Trigger price in money currency. The stop-limit order activates when the market price reaches the specified value.",
    "example": "40000"
  }, {
    "name": "stopLoss",
    "type": "string",
    "required": false,
    "description": "Stop loss price. When provided, the system creates an OTO order with a stop loss condition.",
    "example": "30000"
  }, {
    "name": "takeProfit",
    "type": "string",
    "required": false,
    "description": "Take profit price. When provided, the system creates an OTO order with a take profit condition.",
    "example": "50000"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom order identifier. Must be unique and contain only letters, numbers, dashes, dots, or underscores.",
    "example": "order1987111"
  }, {
    "name": "positionSide",
    "type": "string",
    "required": false,
    "description": "Position direction. Optional at the request layer but functionally required when hedge mode is enabled. See positionSide. - **One-way mode** (default account mode): the field is…",
    "example": "LONG",
    "enum": ["LONG", "SHORT", "BOTH"]
  }, {
    "name": "reduceOnly",
    "type": "boolean",
    "required": false,
    "description": "When true, the order can only reduce or close an existing position — the order cannot increase the position or open a new one. If the order amount exceeds the current position s…",
    "example": "false",
    "default": false
  }],
  "/api/v4/order/collateral/trigger-market": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Available margin market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "side",
    "type": "string",
    "required": true,
    "description": "Order direction. Use buy to open or increase a long position and sell to open or increase a short position.",
    "example": "buy",
    "enum": ["buy", "sell"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Amount of stock currency to buy or sell. Minimum and step values are market-dependent — query the market info endpoint for constraints.",
    "example": "0.01"
  }, {
    "name": "activation_price",
    "type": "string",
    "required": true,
    "description": "Trigger price in money currency. The trigger market order activates when the market price reaches the specified value.",
    "example": "40000"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom order identifier. Must be unique and contain only letters, numbers, dashes, dots, or underscores.",
    "example": "order1987111"
  }, {
    "name": "stopLoss",
    "type": "string",
    "required": false,
    "description": "Stop loss price. When provided, the system creates an OTO order with a stop loss condition.",
    "example": "50000"
  }, {
    "name": "takeProfit",
    "type": "string",
    "required": false,
    "description": "Take profit price. When provided, the system creates an OTO order with a take profit condition.",
    "example": "30000"
  }, {
    "name": "positionSide",
    "type": "string",
    "required": false,
    "description": "Position direction. Optional at the request layer but functionally required when hedge mode is enabled. See positionSide. - **One-way mode** (default account mode): the field is…",
    "example": "LONG",
    "enum": ["LONG", "SHORT", "BOTH"]
  }, {
    "name": "reduceOnly",
    "type": "boolean",
    "required": false,
    "description": "When true, the order can only reduce or close an existing position — the order cannot increase the position or open a new one. If the order amount exceeds the current position s…",
    "example": "false",
    "default": false
  }],
  "/api/v4/collateral-account/summary": [],
  "/api/v4/collateral-account/positions/open": [{
    "name": "market",
    "type": "string",
    "required": false,
    "description": "Filter by specific market. For example: BTC_USDT If not specified, returns all open positions.",
    "example": "BTC_USDT"
  }],
  "/api/v4/collateral-account/position/close": [{
    "name": "positionId",
    "type": "integer",
    "required": true,
    "description": "Unique identifier of the position to close. Obtain from the open positions endpoint.",
    "example": "123"
  }, {
    "name": "positionSide",
    "type": "string",
    "required": false,
    "description": "Defines the position direction when hedge mode is enabled. See positionSide",
    "example": "LONG",
    "enum": ["LONG", "SHORT", "BOTH"]
  }, {
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Market of the position to close. Example: BTC_USDT",
    "example": "BTC_USDT"
  }],
  "/api/v4/collateral-account/positions/history": [{
    "name": "market",
    "type": "string",
    "required": false,
    "description": "Filter by specific market. Example: BTC_USDT If not specified, returns position history for all markets.",
    "example": "BTC_USDT"
  }, {
    "name": "positionId",
    "type": "integer",
    "required": false,
    "description": "Filter by specific position identifier. If not specified, returns history for all positions.",
    "example": "1"
  }, {
    "name": "startDate",
    "type": "integer",
    "required": false,
    "description": "Start of the query window as a Unix timestamp in seconds. Optional, no default. Must be ≤ endDate.",
    "example": "1650400000"
  }, {
    "name": "endDate",
    "type": "integer",
    "required": false,
    "description": "End of the query window as a Unix timestamp in seconds. Optional, no default. Must be ≥ startDate and ≤ now + 1s; violating values are rejected with a validation error.",
    "example": "1650500000"
  }],
  "/api/v4/collateral-account/funding-history": [{
    "name": "market",
    "type": "string",
    "required": false,
    "description": "Filter by specific market. For example: BTC_PERP If not specified, returns funding history for all markets.",
    "example": "BTC_PERP"
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Number of records to return",
    "example": "100",
    "default": 100
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Number of records to skip",
    "example": "0",
    "default": 0
  }],
  "/api/v4/collateral-account/leverage": [{
    "name": "leverage",
    "type": "integer",
    "required": true,
    "description": "Target leverage level. Accepted values: 1, 2, 3, 5, 10, 20, 50, 100. The effective maximum depends on the market's max_leverage.",
    "example": "5"
  }],
  "/api/v4/collateral-account/hedge-mode": [],
  "/api/v4/collateral-account/hedge-mode/update": [{
    "name": "hedgeMode",
    "type": "boolean",
    "required": true,
    "description": "Set to true to enable hedge mode (simultaneous long and short positions) or false to use one-way mode.",
    "example": "true"
  }],
  "/api/v4/collateral-account/adl-quantile": [],
  "/api/v4/conditional-orders": [{
    "name": "market",
    "type": "string",
    "required": false,
    "description": "Filter by specific market. Example: BTC_USDT If not specified, returns conditional orders for all markets.",
    "example": "BTC_USDT"
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Number of records to skip for pagination.",
    "example": "0",
    "default": 0
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Maximum number of records to return per page.",
    "example": "100",
    "default": 50
  }],
  "/api/v4/oco-orders": [{
    "name": "market",
    "type": "string",
    "required": false,
    "description": "Filter by specific market. Example: BTC_USDT If not specified, returns OCO orders for all markets.",
    "example": "BTC_USDT"
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Number of records to skip for pagination.",
    "example": "0",
    "default": 0
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Maximum number of records to return per page.",
    "example": "100",
    "default": 50
  }],
  "/api/v4/order/collateral/oco": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Available margin market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "side",
    "type": "string",
    "required": true,
    "description": "Order direction. Use buy to open or increase a long position and sell to open or increase a short position.",
    "example": "buy",
    "enum": ["buy", "sell"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Amount of stock currency for both legs of the OCO order. Minimum and step values are market-dependent — query the market info endpoint for constraints.",
    "example": "0.001"
  }, {
    "name": "price",
    "type": "string",
    "required": true,
    "description": "Limit order price in money currency for the take-profit leg.",
    "example": "40000"
  }, {
    "name": "activation_price",
    "type": "string",
    "required": true,
    "description": "Trigger price in money currency for the stop-loss leg. The stop-limit order activates when the market price reaches the specified value.",
    "example": "41000"
  }, {
    "name": "stop_limit_price",
    "type": "string",
    "required": true,
    "description": "Execution price in money currency for the stop-loss leg. After activation, the stop-loss leg places a limit order at the specified price.",
    "example": "42000"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom order identifier. Must be unique and contain only letters, numbers, dashes, dots, or underscores.",
    "example": "order1987111"
  }, {
    "name": "reduceOnly",
    "type": "boolean",
    "required": false,
    "description": "When true, both legs of the OCO order can only reduce or close an existing position — neither leg can increase the position or open a new one. If the order amount exceeds the cu…",
    "example": "false",
    "default": false
  }, {
    "name": "positionSide",
    "type": "string",
    "required": false,
    "description": "Position direction. Optional at the request layer but functionally required when hedge mode is enabled. See positionSide. Both legs of the OCO inherit the value. - **One-way mod…",
    "example": "LONG",
    "enum": ["LONG", "SHORT", "BOTH"]
  }],
  "/api/v4/order/conditional-cancel": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Market of the conditional order to cancel. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "id",
    "type": "integer",
    "required": true,
    "description": "Conditional order identifier. Obtain from the query unexecuted conditional orders endpoint.",
    "example": "117703764514"
  }],
  "/api/v4/order/oco-cancel": [{
    "name": "market",
    "type": "string",
    "required": true,
    "example": "BTC_USDT"
  }, {
    "name": "orderId",
    "type": "integer",
    "required": true,
    "example": "117703764514"
  }],
  "/api/v4/order/oto-cancel": [{
    "name": "market",
    "type": "string",
    "required": true,
    "example": "BTC_USDT"
  }, {
    "name": "otoId",
    "type": "integer",
    "required": true,
    "example": "117703764514"
  }],
  "/api/v4/convert/estimate": [{
    "name": "from",
    "type": "string",
    "required": true,
    "description": "From currency. Example: BTC",
    "example": "BTC"
  }, {
    "name": "to",
    "type": "string",
    "required": true,
    "description": "To currency. Example: USDT",
    "example": "USDT"
  }, {
    "name": "direction",
    "type": "string",
    "required": true,
    "description": "Convert amount direction, defines in which currency corresponding \"amount\" field is populated. Use \"to\" in case amount is in \"to\" currency, use \"from\" if amount is in \"from\" cur…",
    "example": "to",
    "enum": ["from", "to"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Amount to convert or receive. The value is silently truncated to 8 decimal places before evaluation; excess decimals do not raise an error.",
    "example": "35,103.1"
  }],
  "/api/v4/convert/confirm": [{
    "name": "quoteId",
    "type": "string",
    "required": true,
    "description": "Quote ID",
    "example": "4050"
  }],
  "/api/v4/convert/history": [{
    "name": "fromTicker",
    "type": "string",
    "required": false,
    "description": "From currency. Example: BTC",
    "example": "BTC"
  }, {
    "name": "toTicker",
    "type": "string",
    "required": false,
    "description": "To currency. Example: USDT",
    "example": "USDT"
  }, {
    "name": "from",
    "type": "string",
    "required": false,
    "description": "From time filter (Unix seconds). Must be no more than 30 days before to and no older than 6 months. Example: 1699260637. Default: now()",
    "example": "1699260637"
  }, {
    "name": "to",
    "type": "string",
    "required": false,
    "description": "To time filter (Unix seconds). Must be no more than 30 days after from. Example: 1699260637. Default: now()",
    "example": "1699260637"
  }, {
    "name": "quoteId",
    "type": "string",
    "required": false,
    "description": "Quote Id. Example: 4050",
    "example": "4050"
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "How many records to receive. Allowed range: 1–100. Default: 100",
    "example": "100"
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Number of records to skip for pagination. Minimum: 0. Default: 0",
    "example": "0"
  }],
  "/api/v4/market/fee": [{
    "name": "market",
    "type": "string",
    "required": false,
    "paramIn": "query",
    "description": "Optional. Currently ignored by the API — all market fees are returned regardless of the value provided. Retained for backward compatibility. Example: BTC_USDT",
    "example": "BTC_USDT"
  }],
  "/api/v4/trade-account/balance": [{
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Currency's ticker. Example: BTC",
    "example": "BTC"
  }],
  "/api/v4/order/new": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Trading pair. Format: BASE_QUOTE (e.g., BTC_USDT). Query GET /api/v4/public/markets for available markets.",
    "example": "BTC_USDT"
  }, {
    "name": "side",
    "type": "string",
    "required": true,
    "description": "Order side. Allowed values: buy, sell.",
    "example": "buy",
    "enum": ["buy", "sell"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Order quantity in base (stock) currency. Minimum and maximum values are market-dependent. Query GET /api/v4/public/markets for minAmount, minTotal, maxTotal. Precision: stockPrec.",
    "example": "0.001"
  }, {
    "name": "price",
    "type": "string",
    "required": true,
    "description": "Limit price per unit in quote (money) currency. Minimum and maximum values are market-dependent. Precision: moneyPrec.",
    "example": "9800"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom client order identifier. Uniqueness is enforced only among the account's open (pending) orders on the same market — once a previous order is filled or canceled, the same …",
    "example": "order1987111"
  }, {
    "name": "postOnly",
    "type": "boolean",
    "required": false,
    "description": "Post-only flag. When true, the order executes only as a maker order and the system rejects the order if it would match immediately. Default: false.",
    "example": "false",
    "default": false
  }, {
    "name": "ioc",
    "type": "boolean",
    "required": false,
    "description": "Immediate-or-cancel (IOC) flag. When true, the matching engine executes all or part of the order immediately and cancels any unfilled portion. Default: false. IOC does not suppo…",
    "example": "false",
    "default": false
  }, {
    "name": "bboRole",
    "type": "integer",
    "required": false,
    "description": "Best Bid/Offer (BBO) execution method. The system selects the best market price for execution. 1 = Queue method, 2 = Counterparty method. Use method 2 with the ioc flag.",
    "enum": ["1", "2"]
  }, {
    "name": "stp",
    "type": "string",
    "required": false,
    "description": "Self-trade prevention mode. Allowed values: no, cancel_both, cancel_new, cancel_old. Default: no.",
    "example": "no",
    "enum": ["no", "cancel_both", "cancel_new", "cancel_old"],
    "default": "no"
  }, {
    "name": "rpi",
    "type": "boolean",
    "required": false,
    "description": "Enables Retail Price Improvement (RPI) mode. Default: false. RPI orders use post-only behavior by design. An RPI order does not support ioc=true. The API returns error code 40 w…",
    "example": "true",
    "default": false
  }, {
    "name": "retail",
    "type": "boolean",
    "required": false,
    "description": "Retail-source taker flag. When true, the order is eligible to match against orders submitted by RPI makers and may receive price improvement at execution. Default: false. The Re…",
    "example": "false",
    "default": false
  }],
  "/api/v4/order/bulk": [{
    "name": "orders",
    "type": "array",
    "required": false,
    "description": "Array of limit orders"
  }, {
    "name": "stopOnFail",
    "type": "boolean",
    "required": false,
    "description": "Controls how the bulk order processor handles failures. When true: Processing stops at the first order that fails validation or execution. Only orders up to (but not including) …",
    "example": "true",
    "default": false
  }],
  "/api/v4/order/market": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Trading pair. Format: BASE_QUOTE (e.g., BTC_USDT). Query GET /api/v4/public/markets for available markets.",
    "example": "BTC_USDT"
  }, {
    "name": "side",
    "type": "string",
    "required": true,
    "description": "Order side. Allowed values: buy, sell.",
    "example": "buy",
    "enum": ["buy", "sell"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "For buy orders: total in quote (money) currency to spend. For sell orders: quantity in base (stock) currency to sell. Minimum and maximum values are market-dependent. Query GET …",
    "example": "100"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom client order identifier. Uniqueness is enforced only among the account's open (pending) orders on the same market — once a previous order is filled or canceled, the same …",
    "example": "order1987111"
  }, {
    "name": "stp",
    "type": "string",
    "required": false,
    "description": "Self-trade prevention mode. Allowed values: no, cancel_both, cancel_new, cancel_old. Default: no.",
    "example": "no",
    "enum": ["no", "cancel_both", "cancel_new", "cancel_old"],
    "default": "no"
  }],
  "/api/v4/order/stock_market": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Trading pair. Format: BASE_QUOTE (e.g., BTC_USDT). Query GET /api/v4/public/markets for available markets.",
    "example": "BTC_USDT"
  }, {
    "name": "side",
    "type": "string",
    "required": true,
    "description": "Order side. Allowed values: buy, sell.",
    "example": "buy",
    "enum": ["buy", "sell"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Order quantity in base (stock) currency for both buy and sell sides. To place a market order specifying the quote (money) currency amount instead, use POST /api/v4/order/market.…",
    "example": "0.001"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom client order identifier. Uniqueness is enforced only among the account's open (pending) orders on the same market — once a previous order is filled or canceled, the same …",
    "example": "order1987111"
  }, {
    "name": "stp",
    "type": "string",
    "required": false,
    "description": "Self-trade prevention mode. Allowed values: no, cancel_both, cancel_new, cancel_old. Default: no.",
    "example": "no",
    "enum": ["no", "cancel_both", "cancel_new", "cancel_old"],
    "default": "no"
  }],
  "/api/v4/order/stop_limit": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Trading pair. Format: BASE_QUOTE (e.g., BTC_USDT). Query GET /api/v4/public/markets for available markets.",
    "example": "BTC_USDT"
  }, {
    "name": "side",
    "type": "string",
    "required": true,
    "description": "Order side. Allowed values: buy, sell.",
    "example": "buy",
    "enum": ["buy", "sell"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Order quantity in base (stock) currency. Minimum and maximum values are market-dependent. Query GET /api/v4/public/markets for minAmount, minTotal, maxTotal. Precision: stockPrec.",
    "example": "0.001"
  }, {
    "name": "price",
    "type": "string",
    "required": true,
    "description": "Limit price per unit in quote (money) currency applied after the stop triggers. Minimum and maximum values are market-dependent. Precision: moneyPrec.",
    "example": "9800"
  }, {
    "name": "activation_price",
    "type": "string",
    "required": true,
    "description": "Trigger price in quote (money) currency. For buy orders, the stop triggers when the market price rises to or above the specified price. For sell orders, the stop triggers when t…",
    "example": "10000"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom client order identifier. Uniqueness is enforced only among the account's open (pending) orders on the same market — once a previous order is filled or canceled, the same …",
    "example": "order1987111"
  }, {
    "name": "bboRole",
    "type": "integer",
    "required": false,
    "description": "Best Bid/Offer (BBO) execution method. The system selects the best market price for execution after the stop triggers. 1 = Queue method, 2 = Counterparty method.",
    "enum": ["1", "2"]
  }, {
    "name": "stp",
    "type": "string",
    "required": false,
    "description": "Self-trade prevention mode. Allowed values: no, cancel_both, cancel_new, cancel_old. Default: no.",
    "example": "no",
    "enum": ["no", "cancel_both", "cancel_new", "cancel_old"],
    "default": "no"
  }],
  "/api/v4/order/stop_market": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Trading pair. Format: BASE_QUOTE (e.g., BTC_USDT). Query GET /api/v4/public/markets for available markets.",
    "example": "BTC_USDT"
  }, {
    "name": "side",
    "type": "string",
    "required": true,
    "description": "Order side. Allowed values: buy, sell.",
    "example": "buy",
    "enum": ["buy", "sell"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "For buy orders: total in quote (money) currency to spend. For sell orders: quantity in base (stock) currency to sell. Minimum and maximum values are market-dependent. Query GET …",
    "example": "0.01"
  }, {
    "name": "activation_price",
    "type": "string",
    "required": true,
    "description": "Trigger price in quote (money) currency. For buy orders, the stop triggers when the market price rises to or above the specified price. For sell orders, the stop triggers when t…",
    "example": "10000"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom client order identifier. Uniqueness is enforced only among the account's open (pending) orders on the same market — once a previous order is filled or canceled, the same …",
    "example": "order1987111"
  }, {
    "name": "stp",
    "type": "string",
    "required": false,
    "description": "Self-trade prevention mode. Allowed values: no, cancel_both, cancel_new, cancel_old. Default: no.",
    "example": "no",
    "enum": ["no", "cancel_both", "cancel_new", "cancel_old"],
    "default": "no"
  }],
  "/api/v4/order/cancel": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Available market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "orderId",
    "type": "integer",
    "required": false,
    "description": "Order Id. Example: 4180284841. Required if clientOrderId is not set.",
    "example": "123456"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Custom client order id. Example: 'customId11'. Required if orderId is not set.",
    "example": "customId11"
  }],
  "/api/v4/order/cancel/bulk": [{
    "name": "orders",
    "type": "array",
    "required": true,
    "description": "Array of orders to cancel. From 1 to 100 items per request."
  }],
  "/api/v4/order/cancel/all": [{
    "name": "market",
    "type": "string",
    "required": false,
    "description": "Available market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "type",
    "type": "array",
    "required": false,
    "description": "Order types to target. Valid values: \"spot\" — standard spot orders. \"margin\" — marginal orders placed on spot markets. Note: the \"margin\" value is not the same as the collateral…",
    "example": "spot,margin,futures"
  }],
  "/api/v4/orders": [{
    "name": "market",
    "type": "string",
    "required": false,
    "description": "Trading pair to filter by. Format: BASE_QUOTE (e.g., BTC_USDT). Omit to retrieve orders across all markets.",
    "example": "BTC_USDT"
  }, {
    "name": "orderId",
    "type": "integer",
    "required": false,
    "description": "Filter by a specific order identifier. Returns only the matching active order.",
    "example": "3134995325"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Filter by custom client order identifier. Returns only the matching active order.",
    "example": "customId11"
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Number of records to skip. Default: 0. Maximum: 4294967295.",
    "example": "0",
    "default": 0
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Maximum number of records to return. Default: 50. Minimum: 1. Maximum: 100.",
    "example": "50",
    "default": 50
  }],
  "/api/v4/trade-account/executed-history": [{
    "name": "market",
    "type": "string",
    "required": false,
    "description": "Requested market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Look up by custom client order identifier. When supplied, the endpoint switches to single-order lookup mode and returns the matching order's deal history. Returns 422 with \"Orde…",
    "example": "customId11"
  }, {
    "name": "startDate",
    "type": "integer",
    "required": false,
    "description": "Start date in Unix-time format",
    "example": "1593233939"
  }, {
    "name": "endDate",
    "type": "integer",
    "required": false,
    "description": "End date in Unix-time format",
    "example": "1593233939"
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Starting line index (OFFSET). Default: 0, Min: 0",
    "example": "0",
    "default": 0
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "LIMIT is a special clause used to limit records a particular query can return. Default: 50, Min: 1, Max: 500",
    "example": "50",
    "default": 50
  }],
  "/api/v4/trade-account/order": [{
    "name": "orderId",
    "type": "integer",
    "required": true,
    "description": "Identifier of the order to retrieve deals for.",
    "example": "3134995325"
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Number of records to skip. Default: 0.",
    "example": "0",
    "default": 0
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Maximum number of records to return. Default: 50.",
    "example": "50",
    "default": 50
  }],
  "/api/v4/trade-account/order/history": [{
    "name": "market",
    "type": "string",
    "required": false,
    "description": "Trading pair to filter by. Format: BASE_QUOTE (e.g., BTC_USDT). Omit to retrieve orders across all markets.",
    "example": "BTC_USDT"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Look up a specific order by the custom client identifier. When supplied, the endpoint switches to single-order lookup mode and the startDate, endDate, and status filters are ign…",
    "example": "customId11"
  }, {
    "name": "orderId",
    "type": "integer",
    "required": false,
    "description": "Look up a specific order by the exchange-assigned identifier. When supplied, the endpoint switches to single-order lookup mode and the startDate, endDate, and status filters are…",
    "example": "4986126152"
  }, {
    "name": "status",
    "type": "string",
    "required": false,
    "description": "Filter list-mode results by order status. Ignored when orderId or clientOrderId is supplied.",
    "example": "FILLED",
    "enum": ["ALL", "FILLED", "CANCELED", "PARTIALLY_FILLED"],
    "default": "ALL"
  }, {
    "name": "startDate",
    "type": "integer",
    "required": false,
    "description": "Start of the query window as a Unix timestamp in seconds. Default: now - 1 month. The earliest reachable date is 6 months ago (00:00 UTC) — requests with an older startDate are …",
    "example": "1697000000"
  }, {
    "name": "endDate",
    "type": "integer",
    "required": false,
    "description": "End of the query window as a Unix timestamp in seconds. Default: now. Values greater than the current time are silently clamped to now. The maximum span between startDate and en…",
    "example": "1699000000"
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Number of records to skip. Default: 0.",
    "example": "0",
    "default": 0
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Maximum number of records to return. Default: 50. Minimum: 1. Maximum: 500.",
    "example": "50",
    "default": 50
  }],
  "/api/v4/order/modify": [{
    "name": "orderId",
    "type": "integer",
    "required": false,
    "description": "Active order id. Required if clientOrderId is not set.",
    "example": "4180284841"
  }, {
    "name": "clientOrderId",
    "type": "string",
    "required": false,
    "description": "Identifier should be unique and contain letters, dashes, numbers, dots or underscores. Required if orderId is not set.",
    "example": "order1987111"
  }, {
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Available market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "amount",
    "type": "string",
    "required": false,
    "description": "Amount of stock currency to buy or sell. Example: '0.001' or 0.001",
    "example": "0.001"
  }, {
    "name": "total",
    "type": "string",
    "required": false,
    "description": "Total of money currency to buy or sell. Example: '0.001' or 0.001",
    "example": "100"
  }, {
    "name": "price",
    "type": "string",
    "required": false,
    "description": "Price in money currency. Example: '9800' or 9800",
    "example": "9800"
  }, {
    "name": "activationPrice",
    "type": "string",
    "required": false,
    "description": "Activation price in money currency. Example: '10000' or 10000",
    "example": "10000"
  }],
  "/api/v4/order/kill-switch": [{
    "name": "market",
    "type": "string",
    "required": true,
    "description": "Available market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }, {
    "name": "timeout",
    "type": "string",
    "required": true,
    "description": "Timer value. Example: '5'-'600' or null",
    "example": "60"
  }, {
    "name": "types",
    "type": "array",
    "required": false,
    "description": "Order types to target. Valid values: \"spot\" — standard spot orders. \"margin\" — marginal orders placed on spot markets. Note: the \"margin\" value is not the same as the collateral…",
    "example": "spot,margin"
  }],
  "/api/v4/order/kill-switch/status": [{
    "name": "market",
    "type": "string",
    "required": false,
    "description": "Available market. Example: BTC_USDT",
    "example": "BTC_USDT"
  }],
  "/api/v4/main-account/balance": [{
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Currency's ticker.",
    "example": "BTC"
  }],
  "/api/v4/main-account/address": [{
    "name": "ticker",
    "type": "string",
    "required": true,
    "description": "Currencies ticker. Example: BTC ⚠️ Currency ticker should not be fiat and it’s “can_deposit” status must be “true”. See Asset Status endpoint response for the status.",
    "example": "BTC"
  }, {
    "name": "network",
    "type": "string",
    "required": false,
    "description": "Cryptocurrency network. ⚠️ If currency has multiple networks like USDT, specify the network to use. See ticker networks list in “networks” field from response Asset Status endpo…",
    "example": "ERC20"
  }],
  "/api/v4/main-account/fiat-deposit-url": [{
    "name": "ticker",
    "type": "string",
    "required": true,
    "description": "Currency's ticker (fiat). ⚠️ Currencies ticker should be fiat and has \"can_deposit\" status must be \"true\". Use Asset Status endpoint to know more about currency.",
    "example": "UAH"
  }, {
    "name": "provider",
    "type": "string",
    "required": true,
    "description": "Fiat currency provider. ⚠️ Currency provider should be taken from Asset Status endpoint response.",
    "example": "VISAMASTER"
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Deposit amount",
    "example": "100"
  }, {
    "name": "unique_id",
    "type": "string",
    "required": true,
    "description": "Unique transaction identifier on client's side",
    "example": "qw22"
  }, {
    "name": "customer",
    "type": "object",
    "required": false,
    "description": "Customer information (required for USD/EUR with VISAMASTER provider)"
  }, {
    "name": "successLink",
    "type": "string",
    "required": false,
    "description": "Customer will be redirected to this URL by acquiring provider after success deposit. To activate this feature, please contact support",
    "example": "https://success.example.com"
  }, {
    "name": "failureLink",
    "type": "string",
    "required": false,
    "description": "Customer will be redirected to this URL in case of fail or rejection on acquiring provider side. To activate this feature, please contact support",
    "example": "https://failure.example.com"
  }, {
    "name": "returnLink",
    "type": "string",
    "required": false,
    "description": "Customer will be redirected to the URL defined if selects 'back' option after from the payment success or failure page. To activate this feature, define desired link. If not pop…",
    "example": "https://return.example.com"
  }],
  "/api/v4/jwt": [],
  "/api/v4/profile/websocket_token": [],
  "/api/card-token": [{
    "name": "cardNumber",
    "type": "string",
    "required": true,
    "description": "Target card number",
    "example": "4111111111111111"
  }],
  "/api/v4/main-account/refund-deposit": [{
    "name": "transaction_id",
    "type": "string",
    "required": true,
    "description": "Transaction UUID of the deposit. Obtain from the deposit.canceled webhook (uniqueId field) or from the deposit/withdraw history in the WhiteBIT interface.",
    "example": "54bffeb7-7a8f-43f8-bcd8-f14ec10fee85"
  }, {
    "name": "address",
    "type": "string",
    "required": true,
    "description": "Destination wallet address for the refund. The address must support the same network and asset as the original deposit. Cannot be a WhiteBIT address. Does not have to match the …",
    "example": "0x1234567890abcdef1234567890abcdef12345678"
  }],
  "/api/v4/main-account/withdraw": [{
    "name": "ticker",
    "type": "string",
    "required": true,
    "description": "Currency's ticker. Example: BTC ⚠️ Currencies ticker must have \"can_deposit\" status equal to \"true\". Use Asset Status endpoint to know more about currency.",
    "example": "ETH"
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Withdraw amount (including fee). To add the fee to the specified amount, use the /main-account/withdraw-pay request.",
    "example": "0.9"
  }, {
    "name": "address",
    "type": "string",
    "required": true,
    "description": "Target address (wallet address for cryptocurrencies, identifier/card token for fiat currencies)",
    "example": "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c"
  }, {
    "name": "memo",
    "type": "string",
    "required": false,
    "description": "Memo. ⚠️ Required if currency is memoable.",
    "example": "48565488244493"
  }, {
    "name": "unique_id",
    "type": "string",
    "required": true,
    "description": "Unique transaction identifier. ⚠️ Generate a new unique ID for each withdrawal request.",
    "example": "24529041"
  }, {
    "name": "provider",
    "type": "string",
    "required": false,
    "description": "Fiat currency provider. Example: VISAMASTER ⚠️ Required for fiat currencies. Currency provider should be taken from Asset Status endpoint response.",
    "example": "VISAMASTER"
  }, {
    "name": "network",
    "type": "string",
    "required": false,
    "description": "Cryptocurrency network. Available for multi network currencies. Example: OMNI ⚠️ Currency network should be taken from Asset Status endpoint response. Default for USDT is ERC20",
    "example": "ERC20"
  }, {
    "name": "partialEnable",
    "type": "boolean",
    "required": false,
    "description": "Optional parameter for FIAT withdrawals with increased Maximum Limit if set as \"true\". To use this parameter, the application must support \"Partially successful\" withdrawal stat…",
    "example": "false"
  }, {
    "name": "beneficiary",
    "type": "object",
    "required": false,
    "description": "Beneficiary information data array. ⚠️ Required if currency ticker is one of: UAH_IBAN, USD_VISAMASTER, EUR_VISAMASTER, USD, EUR"
  }, {
    "name": "travelRule",
    "type": "object",
    "required": false,
    "description": "Travel Rule information data array. ⚠️ Required if currency is crypto and the account is from EEA"
  }, {
    "name": "paymentDescription",
    "type": "string",
    "required": false,
    "description": "Description of withdrawal destination ⚠️ Required if currency is crypto and withdrawal from whitebit-tr.com",
    "example": "Payment description"
  }],
  "/api/v4/main-account/withdraw-pay": [{
    "name": "ticker",
    "type": "string",
    "required": true,
    "description": "Currencies ticker. Example: BTC ⚠️ Currencies ticker must have \"can_deposit\" status equal to \"true\". Use Asset Status endpoint to know more about currency.",
    "example": "ETH"
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Withdraw amount (including fee). To add the fee to the specified amount, use the /main-account/withdraw-pay request",
    "example": "0.9"
  }, {
    "name": "address",
    "type": "string",
    "required": true,
    "description": "Target address (wallet address for cryptocurrencies, identifier/card token for fiat currencies)",
    "example": "0x0964A6B8F794A4B8d61b62652dB27ddC9844FB4c"
  }, {
    "name": "memo",
    "type": "string",
    "required": false,
    "description": "Required if currency is memoable. See memo for details.",
    "example": "48565488244493"
  }, {
    "name": "unique_id",
    "type": "string",
    "required": true,
    "description": "Unique transaction identifier. ⚠️ Generate a new unique ID for each withdrawal request.",
    "example": "24529041"
  }, {
    "name": "provider",
    "type": "string",
    "required": false,
    "description": "Fiat currency provider. Example: VISAMASTER ⚠️ Currency provider should be taken from Asset Status endpoint response. Required if currency is fiat.",
    "example": "VISAMASTER"
  }, {
    "name": "network",
    "type": "string",
    "required": false,
    "description": "Cryptocurrency network. Available for multinetwork currencies. Example: OMNI ⚠️ Currency network should be taken from Asset Status endpoint response. Default for USDT is ERC20",
    "example": "ERC20"
  }, {
    "name": "partialEnable",
    "type": "boolean",
    "required": false,
    "description": "Optional parameter for FIAT withdrawals with increased Maximum Limit if set as \"true\". To use this parameter, the application must support \"Partially successful\" withdrawal stat…",
    "example": "false"
  }, {
    "name": "beneficiary",
    "type": "object",
    "required": false,
    "description": "Beneficiary information data. Required if currency ticker is one of: UAH_IBAN, USD_VISAMASTER, EUR_VISAMASTER, USD, EUR"
  }, {
    "name": "travelRule",
    "type": "object",
    "required": false,
    "description": "Travel Rule information data. Required if currency is crypto and the account is from EEA"
  }],
  "/api/v4/main-account/transfer": [{
    "name": "method",
    "type": "string",
    "required": false,
    "description": "Transfer method. ⚠️ We highly recommend to use **from** and **to** fields, which provides more flexibility. This way will be deprecated in future. Example: **deposit** to transf…",
    "example": "deposit",
    "enum": ["deposit", "withdraw", "collateral-deposit", "collateral-withdraw"]
  }, {
    "name": "from",
    "type": "string",
    "required": false,
    "description": "Balance FROM which funds will move to. Acceptable values: **main**, **spot**, **collateral** **Not required** if **method** is set.",
    "example": "main",
    "enum": ["main", "spot", "collateral"]
  }, {
    "name": "to",
    "type": "string",
    "required": false,
    "description": "Balance TO which funds will move to. Acceptable values: **main**, **spot**, **collateral** **Not required** if **method** is set.",
    "example": "spot",
    "enum": ["main", "spot", "collateral"]
  }, {
    "name": "ticker",
    "type": "string",
    "required": true,
    "description": "Currency's ticker. Example: BTC",
    "example": "XLM"
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Amount to transfer. Max precision = 8, value must be greater than zero and less than or equal to the available balance.",
    "example": "0.9"
  }],
  "/api/v4/main-account/history": [{
    "name": "transactionMethod",
    "type": "integer",
    "required": false,
    "description": "Method. Example: **1** to display deposits / **2** to display withdraws. Do not send this parameter in order to receive both deposits and withdraws.",
    "example": "1",
    "enum": ["1", "2"]
  }, {
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Currency's ticker. Example: BTC",
    "example": "BTC"
  }, {
    "name": "address",
    "type": "string",
    "required": false,
    "description": "Can be used for filtering transactions by specific address.",
    "example": "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"
  }, {
    "name": "memo",
    "type": "string",
    "required": false,
    "description": "Can be used for filtering transactions by specific memo",
    "example": "48565488244493"
  }, {
    "name": "addresses",
    "type": "array",
    "required": false,
    "description": "Can be used for filtering transactions by specific array of addresses.",
    "example": "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE"
  }, {
    "name": "unique_id",
    "type": "string",
    "required": false,
    "description": "Can be used for filtering transactions by specific unique id",
    "example": "24529041"
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "LIMIT is a special clause used to limit records a particular query can return. Default: 50, Min: 1, Max: 500",
    "example": "100",
    "default": 50
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Use the OFFSET clause to return entries starting from a particular line.",
    "example": "0",
    "default": 0
  }, {
    "name": "status",
    "type": "array",
    "required": false,
    "description": "Can be used for filtering transactions by status codes. ⚠️ Caution: Use this parameter with the appropriate transactionMethod and valid status codes for that method. See the end…",
    "example": "3,7"
  }],
  "/api/v4/main-account/create-new-address": [{
    "name": "ticker",
    "type": "string",
    "required": true,
    "description": "Currency's ticker.",
    "example": "XLM"
  }, {
    "name": "network",
    "type": "string",
    "required": false,
    "description": "Currency's network (for multinetwork currencies). Example: OMNI or TRC20 or ERC20. For USDT default network is ERC20(ETH).",
    "example": "ERC20"
  }, {
    "name": "type",
    "type": "string",
    "required": false,
    "description": "Address type, available for specific currencies list (see address types table in endpoint description)",
    "example": "bech32",
    "enum": ["p2sh-segwit", "bech32"]
  }],
  "/api/v4/main-account/codes": [{
    "name": "ticker",
    "type": "string",
    "required": true,
    "description": "Currency's ticker. Example: BTC",
    "example": "ETH"
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Amount to transfer. Max precision = 8, value must be greater than zero and less than or equal to the main balance.",
    "example": "0.002"
  }, {
    "name": "passphrase",
    "type": "string",
    "required": false,
    "description": "Passphrase for applying WhiteBIT codes. Passphrase must contain only latin letters, numbers and symbols (like !@#$%^, no whitespaces). Max: 25 symbols.",
    "example": "some passphrase"
  }, {
    "name": "description",
    "type": "string",
    "required": false,
    "description": "Additional text description for code. Visible only for creator. Max: 75 symbols.",
    "example": "some description"
  }],
  "/api/v4/main-account/codes/apply": [{
    "name": "code",
    "type": "string",
    "required": true,
    "description": "Code that will be applied.",
    "example": "WBe11f4fce-2a53-4edc-b195-66b693bd77e3ETH"
  }, {
    "name": "passphrase",
    "type": "string",
    "required": false,
    "description": "Should be provided if the code was created with passphrase. Max: 25 symbols.",
    "example": "some passphrase"
  }],
  "/api/v4/main-account/codes/my": [{
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "LIMIT is a special clause used to limit records a particular query can return.",
    "example": "30",
    "default": 30
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Use the OFFSET clause to return entries starting from a particular line.",
    "example": "0",
    "default": 0
  }],
  "/api/v4/main-account/codes/history": [{
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "LIMIT is a special clause used to limit records a particular query can return.",
    "example": "100",
    "default": 30
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Use the OFFSET clause to return entries starting from a particular line.",
    "example": "0",
    "default": 0
  }],
  "/api/v4/main-account/smart/plans": [{
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Invest plan source currency's ticker. Example: BTC",
    "example": "USDT"
  }],
  "/api/v4/main-account/smart/investment": [{
    "name": "planId",
    "type": "string",
    "required": true,
    "description": "Invest plan identifier",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Investment amount",
    "example": "100"
  }],
  "/api/v4/main-account/smart/investment/close": [{
    "name": "id",
    "type": "string",
    "required": true,
    "description": "Investment identifier",
    "example": "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
  }],
  "/api/v4/main-account/smart/investments": [{
    "name": "id",
    "type": "string",
    "required": false,
    "description": "Investment identifier",
    "example": "0d7b66ff-1909-4938-ab7a-d16d9a64dcd5"
  }, {
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Invest plan source currency's ticker",
    "example": "USDT"
  }, {
    "name": "status",
    "type": "integer",
    "required": false,
    "description": "Investment status (1 - active, 2 - closed)",
    "example": "1",
    "enum": ["1", "2"]
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "LIMIT is a special clause used to limit records a particular query can return.",
    "example": "100",
    "default": 100
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Use the OFFSET clause to return entries starting from a particular line.",
    "example": "0",
    "default": 0
  }],
  "/api/v4/main-account/smart/interest-payment-history": [{
    "name": "planId",
    "type": "string",
    "required": false,
    "description": "Invest plan identifier",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }, {
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Invest plan target currency's ticker",
    "example": "USDT"
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "LIMIT is a special clause used to limit records a particular query can return.",
    "example": "100",
    "default": 100
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Use the OFFSET clause to return entries starting from a particular line.",
    "example": "0",
    "default": 0
  }],
  "/api/v4/main-account/smart-flex/plans": [{
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Pagination limit.",
    "example": "50",
    "default": 100
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Pagination offset.",
    "example": "0",
    "default": 0
  }, {
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Filter by currency ticker. Example: USDT",
    "example": "USDT"
  }],
  "/api/v4/main-account/smart-flex/investments": [{
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Pagination limit. Default: 100.",
    "example": "100",
    "default": 100
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Pagination offset. Default: 0.",
    "example": "0",
    "default": 0
  }, {
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Filter by currency ticker. Example: USDT.",
    "example": "USDT"
  }, {
    "name": "plan",
    "type": "string",
    "required": false,
    "description": "Filter by plan ID (UUID).",
    "example": "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
  }, {
    "name": "investment",
    "type": "string",
    "required": false,
    "description": "Filter by investment ID.",
    "example": "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
  }, {
    "name": "investmentStatus",
    "type": "integer",
    "required": false,
    "description": "Filter by status (1=ACTIVE, 0=CLOSED).",
    "example": "1",
    "enum": ["0", "1"]
  }],
  "/api/v4/main-account/smart-flex/investments/history": [{
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Pagination limit.",
    "example": "50",
    "default": 50
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Pagination offset.",
    "example": "0",
    "default": 0
  }, {
    "name": "plan",
    "type": "string",
    "required": false,
    "description": "Filter by plan ID (UUID).",
    "example": "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
  }, {
    "name": "investment",
    "type": "string",
    "required": false,
    "description": "Filter by investment ID.",
    "example": "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
  }, {
    "name": "transaction",
    "type": "string",
    "required": false,
    "description": "Filter by transaction ID.",
    "example": "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
  }, {
    "name": "dateFrom",
    "type": "integer",
    "required": false,
    "description": "Filter from date (timestamp).",
    "example": "1640995200"
  }, {
    "name": "dateTo",
    "type": "integer",
    "required": false,
    "description": "Filter to date (timestamp).",
    "example": "1641081600"
  }, {
    "name": "actionTypes",
    "type": "array",
    "required": false,
    "description": "Array of operation type IDs. See table below.",
    "example": "1,2,4"
  }],
  "/api/v4/main-account/smart-flex/investments/payment-history": [{
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Pagination limit.",
    "example": "50",
    "default": 50
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Pagination offset.",
    "example": "0",
    "default": 0
  }, {
    "name": "plan",
    "type": "string",
    "required": false,
    "description": "Filter by plan ID (UUID).",
    "example": "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
  }, {
    "name": "investment",
    "type": "string",
    "required": false,
    "description": "Filter by investment ID.",
    "example": "inv_7e2d9c3b-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
  }, {
    "name": "transaction",
    "type": "string",
    "required": false,
    "description": "Filter by transaction ID.",
    "example": "tx_9f3e0d4c-2b5c-4d3e-8f6g-7a8b9c0d1e2f"
  }, {
    "name": "dateFrom",
    "type": "integer",
    "required": false,
    "description": "Filter from date (timestamp).",
    "example": "1640995200"
  }, {
    "name": "dateTo",
    "type": "integer",
    "required": false,
    "description": "Filter to date (timestamp).",
    "example": "1641081600"
  }],
  "/api/v4/main-account/smart-flex/investments/invest": [{
    "name": "plan",
    "type": "string",
    "required": true,
    "description": "Plan external ID (UUID).",
    "example": "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Investment amount.",
    "example": "1000.500000"
  }, {
    "name": "withReinvest",
    "type": "boolean",
    "required": false,
    "description": "Enable auto-reinvestment.",
    "example": "true",
    "default": false
  }],
  "/api/v4/main-account/smart-flex/investments/withdraw": [{
    "name": "plan",
    "type": "string",
    "required": true,
    "description": "Plan external ID (UUID).",
    "example": "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Withdrawal amount.",
    "example": "500.250000"
  }],
  "/api/v4/main-account/smart-flex/investments/close": [{
    "name": "plan",
    "type": "string",
    "required": true,
    "description": "Plan external ID (UUID).",
    "example": "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
  }],
  "/api/v4/main-account/smart-flex/investments/auto-invest": [{
    "name": "plan",
    "type": "string",
    "required": true,
    "description": "Plan external ID (UUID).",
    "example": "8f2e9d3c-1a4b-4c2d-9e5f-6a7b8c9d0e1f"
  }, {
    "name": "enabled",
    "type": "boolean",
    "required": false,
    "description": "Enable or disable auto-reinvestment.",
    "example": "true",
    "default": false
  }],
  "/api/v4/main-account/fee": [],
  "/api/v4/sub-account/create": [{
    "name": "alias",
    "type": "string",
    "required": true,
    "description": "Name for sub-account",
    "example": "trading_bot"
  }, {
    "name": "email",
    "type": "string",
    "required": false,
    "description": "Sub-account email (required when shareKyc is false)",
    "example": "sub@example.com"
  }, {
    "name": "shareKyc",
    "type": "boolean",
    "required": false,
    "description": "If KYC shared with main account",
    "example": "false"
  }, {
    "name": "permissions",
    "type": "object",
    "required": true
  }],
  "/api/v4/sub-account/delete": [{
    "name": "id",
    "type": "string",
    "required": true,
    "description": "Sub-account id",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }],
  "/api/v4/sub-account/edit": [{
    "name": "id",
    "type": "string",
    "required": true,
    "description": "Sub-account id",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }, {
    "name": "alias",
    "type": "string",
    "required": true,
    "description": "Name for sub-account",
    "example": "training"
  }, {
    "name": "permissions",
    "type": "object",
    "required": true
  }],
  "/api/v4/sub-account/list": [{
    "name": "search",
    "type": "string",
    "required": false,
    "description": "Search term",
    "example": "trading"
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "example": "30",
    "default": 30
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "example": "0",
    "default": 0
  }],
  "/api/v4/sub-account/transfer": [{
    "name": "id",
    "type": "string",
    "required": true,
    "description": "Sub-account id",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }, {
    "name": "direction",
    "type": "string",
    "required": true,
    "description": "Transfer direction",
    "example": "main_to_sub",
    "enum": ["main_to_sub", "sub_to_main"]
  }, {
    "name": "amount",
    "type": "string",
    "required": true,
    "description": "Transfer amount (min 0.00000001)",
    "example": "0.5"
  }, {
    "name": "ticker",
    "type": "string",
    "required": true,
    "description": "Currency's ticker",
    "example": "ETH"
  }],
  "/api/v4/sub-account/block": [{
    "name": "id",
    "type": "string",
    "required": true,
    "description": "Sub-account id",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }],
  "/api/v4/sub-account/unblock": [{
    "name": "id",
    "type": "string",
    "required": true,
    "description": "Sub-account id",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }],
  "/api/v4/sub-account/balances": [{
    "name": "id",
    "type": "string",
    "required": true,
    "description": "Sub-account id",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }, {
    "name": "ticker",
    "type": "string",
    "required": false,
    "description": "Currency's ticker (if not provided, returns data by all currencies)",
    "example": "USDC"
  }],
  "/api/v4/sub-account/transfer/history": [{
    "name": "id",
    "type": "string",
    "required": true,
    "description": "Sub-account id",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }, {
    "name": "direction",
    "type": "string",
    "required": false,
    "description": "Transfer direction (optional)",
    "example": "main_to_sub",
    "enum": ["main_to_sub", "sub_to_main"]
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "example": "100",
    "default": 100
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "example": "0",
    "default": 0
  }],
  "/api/v4/sub-account/withdraw/unconfirmed-list": [{
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Number of records to return.",
    "example": "100",
    "default": 100
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Number of records to skip.",
    "example": "0",
    "default": 0
  }, {
    "name": "subAccountId",
    "type": "string",
    "required": false,
    "description": "Filter by specific sub-account external ID. If omitted, returns withdrawals from all sub-accounts.",
    "example": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
  }],
  "/api/v4/sub-account/api-key/create": [{
    "name": "type",
    "type": "integer",
    "required": true,
    "description": "Type of API key (1 - info and trading; 2 - info, trading, deposits, withdraws)",
    "example": "1",
    "enum": ["1", "2"]
  }, {
    "name": "subAccountId",
    "type": "string",
    "required": true,
    "description": "ID of the sub-account to create the API key for",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }, {
    "name": "title",
    "type": "string",
    "required": false,
    "description": "Custom title/name for the API key",
    "example": "Trading Bot Key"
  }],
  "/api/v4/sub-account/api-key/edit": [{
    "name": "apiKeyId",
    "type": "string",
    "required": true,
    "description": "ID of the API key to update",
    "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }, {
    "name": "title",
    "type": "string",
    "required": true,
    "description": "New title for the API key",
    "example": "Trading Bot Key"
  }, {
    "name": "urls",
    "type": "array",
    "required": true,
    "description": "Array of URL objects for API key restrictions"
  }],
  "/api/v4/sub-account/api-key/delete": [{
    "name": "apiKeyId",
    "type": "string",
    "required": true,
    "description": "ID of the API key to delete",
    "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }],
  "/api/v4/sub-account/api-key/list": [{
    "name": "subAccountId",
    "type": "string",
    "required": false,
    "description": "ID of the sub-account to list API keys for",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "example": "100",
    "default": 100
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "example": "0",
    "default": 0
  }],
  "/api/v4/sub-account/api-key/reset": [{
    "name": "apiKeyId",
    "type": "string",
    "required": true,
    "description": "ID of the API key to reset",
    "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }],
  "/api/v4/sub-account/api-key/ip-address/list": [{
    "name": "apiKeyId",
    "type": "string",
    "required": true,
    "description": "ID of the API key to list IP addresses for",
    "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }],
  "/api/v4/sub-account/api-key/ip-address/create": [{
    "name": "apiKeyId",
    "type": "string",
    "required": true,
    "description": "ID of the API key to add IP address to",
    "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }, {
    "name": "ip",
    "type": "string",
    "required": true,
    "description": "IP address to add to allowed list",
    "example": "192.168.1.100"
  }],
  "/api/v4/sub-account/api-key/ip-address/delete": [{
    "name": "apiKeyId",
    "type": "string",
    "required": true,
    "description": "ID of the API key to remove IP address from",
    "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }, {
    "name": "ip",
    "type": "string",
    "required": true,
    "description": "IP address to remove from allowed list",
    "example": "192.168.1.100"
  }],
  "/api/v4/sub-account/kyc-url": [{
    "name": "id",
    "type": "string",
    "required": true,
    "description": "Sub-account external ID. Must belong to the authenticated main account.",
    "example": "8e667b4a-0b71-4988-8af5-9474dbfaeb51"
  }],
  "/api/v4/mining/rewards": [{
    "name": "account",
    "type": "string",
    "required": false,
    "description": "Mining pool account",
    "example": "miner123"
  }, {
    "name": "from",
    "type": "integer",
    "required": false,
    "description": "Date timestamp starting from which rewards are received",
    "example": "1640995200"
  }, {
    "name": "to",
    "type": "integer",
    "required": false,
    "description": "Date timestamp until which rewards are received",
    "example": "1641081600"
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "example": "30",
    "default": 30
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "example": "0",
    "default": 0
  }],
  "/api/v4/mining/hashrate": [{
    "name": "account",
    "type": "string",
    "required": true,
    "description": "Mining pool account",
    "example": "miner123"
  }, {
    "name": "from",
    "type": "integer",
    "required": false,
    "description": "Unix timestamp of starting point",
    "example": "1640995200"
  }, {
    "name": "to",
    "type": "integer",
    "required": false,
    "description": "Unix timestamp of final point",
    "example": "1641081600"
  }, {
    "name": "interval",
    "type": "string",
    "required": false,
    "description": "Timestamp interval",
    "example": "1h",
    "enum": ["5m", "1h", "24h"],
    "default": "1h"
  }],
  "/api/v4/mining/payout-destination": [{
    "name": "accountName",
    "type": "string",
    "required": true,
    "description": "Mining pool account name",
    "example": "my_miner_01"
  }],
  "/api/v4/mining/payout-destination/edit": [{
    "name": "accountName",
    "type": "string",
    "required": true,
    "description": "Mining pool account name",
    "example": "my_miner_01"
  }, {
    "name": "destination",
    "type": "string",
    "required": true,
    "description": "Payout destination type",
    "example": "external_address",
    "enum": ["main_balance", "external_address"]
  }, {
    "name": "address",
    "type": "string",
    "required": false,
    "description": "External BTC address. Required when destination is external_address. Supports all standard Bitcoin address formats.",
    "example": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
  }],
  "/api/v4/mining/miners/info": [{
    "name": "account",
    "type": "string",
    "required": true,
    "description": "Mining pool account name",
    "example": "my_miner_01"
  }],
  "/api/v4/mining/workers/names": [{
    "name": "account",
    "type": "string",
    "required": true,
    "description": "Mining pool account name",
    "example": "my_miner_01"
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Pagination offset",
    "example": "0",
    "default": 0
  }, {
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Pagination limit",
    "example": "50",
    "default": 100
  }],
  "/api/v4/mining/workers/hashrate": [{
    "name": "account",
    "type": "string",
    "required": true,
    "description": "Mining pool account name",
    "example": "my_miner_01"
  }, {
    "name": "worker",
    "type": "string",
    "required": true,
    "description": "Worker name",
    "example": "worker_001"
  }, {
    "name": "interval",
    "type": "string",
    "required": false,
    "description": "Time frame granularity",
    "example": "1h",
    "enum": ["5m", "1h", "24h"],
    "default": "1h"
  }, {
    "name": "from",
    "type": "integer",
    "required": false,
    "description": "Start timestamp in Unix seconds. Must be <= now",
    "example": "1709290000"
  }, {
    "name": "to",
    "type": "integer",
    "required": false,
    "description": "End timestamp in Unix seconds. Must be <= now",
    "example": "1709340000"
  }],
  "/api/v4/mining/watcher-links/create": [{
    "name": "accounts",
    "type": "array",
    "required": true,
    "description": "Array of mining account names",
    "example": "my_miner_01,my_miner_02"
  }, {
    "name": "name",
    "type": "string",
    "required": true,
    "description": "Link name (alphanumeric and underscores only)",
    "example": "monitoring_link"
  }, {
    "name": "permissions",
    "type": "array",
    "required": true,
    "description": "Array of permissions",
    "example": "dashboard,workers"
  }, {
    "name": "liveUntil",
    "type": "string",
    "required": true,
    "description": "Expiration period",
    "example": "7d",
    "enum": ["1h", "24h", "7d", "always"]
  }],
  "/api/v4/mining/watcher-links/list": [{
    "name": "account",
    "type": "string",
    "required": true,
    "description": "Mining pool account name",
    "example": "my_miner_01"
  }],
  "/api/v4/mining/accounts/create": [{
    "name": "name",
    "type": "string",
    "required": true,
    "description": "Mining pool account name. Must be unique. Alphanumeric characters and underscores allowed.",
    "example": "my_miner_01"
  }, {
    "name": "referralCode",
    "type": "string",
    "required": false,
    "description": "Optional referral code for account creation",
    "example": "REF123"
  }],
  "/api/v4/mining/accounts": [{
    "name": "name",
    "type": "string",
    "required": false,
    "description": "Optional filter to search for a specific mining account name (exact match)",
    "example": "my_miner_01"
  }],
  "/api/v4/credit-line/loans/info": [],
  "/api/v4/aml/checks/assets": [],
  "/api/v4/aml/checks/create": [{
    "name": "asset",
    "type": "string",
    "required": true,
    "description": "Asset symbol supported by the Address Checker.",
    "example": "string"
  }, {
    "name": "address",
    "type": "string",
    "required": true,
    "description": "Cryptocurrency address to screen.",
    "example": "string"
  }, {
    "name": "network",
    "type": "string",
    "required": false,
    "description": "Network identifier. May be null when not required.",
    "example": "string",
    "nullable": true
  }],
  "/api/v4/aml/checks/result": [{
    "name": "id",
    "type": "string",
    "required": true,
    "description": "Unique identifier of the created check.",
    "example": "string"
  }],
  "/api/v4/aml/checks/history": [{
    "name": "limit",
    "type": "integer",
    "required": false,
    "description": "Default: 100.",
    "example": "50"
  }, {
    "name": "offset",
    "type": "integer",
    "required": false,
    "description": "Default: 0.",
    "example": "0"
  }, {
    "name": "from",
    "type": "integer",
    "required": false,
    "description": "Start timestamp (Unix).",
    "example": "1704067200"
  }, {
    "name": "to",
    "type": "integer",
    "required": false,
    "description": "End timestamp (Unix).",
    "example": "1706745599"
  }, {
    "name": "status",
    "type": "array",
    "required": false,
    "description": "in_progress, success, failed.",
    "example": "success,in_progress"
  }, {
    "name": "address",
    "type": "string",
    "required": false,
    "description": "Address filter.",
    "example": "0x28C6c06298d514Db089934071355E5743bf21d60"
  }, {
    "name": "asset",
    "type": "array",
    "required": false,
    "description": "Asset filter.",
    "example": "USDT,USDC"
  }, {
    "name": "network",
    "type": "array",
    "required": false,
    "description": "Applied only when asset is provided.",
    "example": "ERC20,TRC20"
  }, {
    "name": "riskLevel",
    "type": "array",
    "required": false,
    "description": "low, medium, high.",
    "example": "medium,high"
  }]
};

export const WhitebitSigner = ({path: defaultPath = "/api/v4/order/market", defaultParams = "{}", fields = null}) => {
  const getApiHost = () => {
    const sel = typeof document !== "undefined" ? document.querySelector('select[aria-label="Select base URL"]') : null;
    return sel?.options[sel.selectedIndex]?.text?.trim() || "https://whitebit.com";
  };
  const hex = buf => Array.from(new Uint8Array(buf)).map(b => b.toString(16).padStart(2, "0")).join("");
  const b64 = s => {
    const bytes = new TextEncoder().encode(s);
    let bin = "";
    bytes.forEach(b => bin += String.fromCharCode(b));
    return btoa(bin);
  };
  const hmacSha512Hex = async (secret, msg) => {
    const key = await crypto.subtle.importKey("raw", new TextEncoder().encode(secret), {
      name: "HMAC",
      hash: "SHA-512"
    }, false, ["sign"]);
    const sig = await crypto.subtle.sign("HMAC", key, new TextEncoder().encode(msg));
    return hex(sig);
  };
  const queryFields = fields ? fields.filter(function (f) {
    return f.paramIn === "query" || f.paramIn === "path";
  }) : [];
  const bodyFields = fields ? fields.filter(function (f) {
    return !f.paramIn || f.paramIn === "body";
  }) : [];
  const [open, setOpen] = useState(false);
  const [authOpen, setAuthOpen] = useState(true);
  const [paramsOpen, setParamsOpen] = useState(true);
  const [apiKey, setApiKey] = useState("");
  const [apiSecret, setApiSecret] = useState("");
  const [showSecret, setShowSecret] = useState(false);
  const [path, setPath] = useState(defaultPath);
  const initFieldValues = fieldDefs => {
    if (!fieldDefs) return {};
    const vals = {};
    for (const f of fieldDefs) {
      vals[f.name] = f.default !== undefined ? String(f.default) : "";
    }
    return vals;
  };
  const [fieldValues, setFieldValues] = useState(function () {
    return initFieldValues(fields);
  });
  const [showRaw, setShowRaw] = useState(false);
  const [params, setParams] = useState(defaultParams === "{}" ? "" : defaultParams);
  const [computed, setComputed] = useState(null);
  const [response, setResponse] = useState(null);
  const [busy, setBusy] = useState(false);
  const [error, setError] = useState("");
  const [urlCopied, setUrlCopied] = useState(false);
  const useFieldsMode = fields !== null && fields !== undefined && !showRaw;
  const setFieldValue = (name, value) => setFieldValues(function (prev) {
    return {
      ...prev,
      [name]: value
    };
  });
  const toggleRaw = () => {
    if (fields === null || fields === undefined) return;
    if (!showRaw) {
      const obj = {};
      for (const f of bodyFields) {
        const val = fieldValues[f.name];
        if (val !== "" && val !== null && val !== undefined) {
          obj[f.name] = f.type === "integer" || f.type === "number" ? Number(val) : val;
        }
      }
      setParams(Object.keys(obj).length ? JSON.stringify(obj, null, 2) : "");
      setShowRaw(true);
    } else {
      try {
        const parsed = JSON.parse(params.trim() || "{}");
        const next = {
          ...fieldValues
        };
        for (const f of bodyFields) {
          if (parsed[f.name] !== undefined) next[f.name] = String(parsed[f.name]);
        }
        setFieldValues(next);
      } catch (e) {}
      setShowRaw(false);
    }
  };
  const compute = async () => {
    setError("");
    setComputed(null);
    setResponse(null);
    try {
      if (!apiKey.trim()) throw new Error("API key is required");
      if (!apiSecret.trim()) throw new Error("API secret is required");
      let extraBodyParams = {};
      let queryString = "";
      if (useFieldsMode) {
        const qParams = {};
        for (const f of fields) {
          const val = fieldValues[f.name];
          const empty = val === "" || val === null || val === undefined;
          if (empty) {
            if (f.required) throw new Error('"' + f.name + '" is required');
            continue;
          }
          if (f.paramIn === "query" || f.paramIn === "path") {
            qParams[f.name] = String(val);
          } else {
            if (f.type === "integer" || f.type === "number") {
              const num = Number(val);
              if (isNaN(num)) throw new Error('"' + f.name + '" must be a number');
              extraBodyParams[f.name] = num;
            } else {
              extraBodyParams[f.name] = val;
            }
          }
        }
        if (Object.keys(qParams).length > 0) {
          queryString = "?" + Object.entries(qParams).map(function (kv) {
            return encodeURIComponent(kv[0]) + "=" + encodeURIComponent(kv[1]);
          }).join("&");
        }
      } else if (params.trim()) {
        try {
          extraBodyParams = JSON.parse(params.trim());
        } catch (e) {
          throw new Error("Body params is not valid JSON");
        }
      }
      const bodyObj = {
        request: path,
        nonce: Date.now(),
        nonceWindow: true
      };
      for (const k in extraBodyParams) bodyObj[k] = extraBodyParams[k];
      const bodyStr = JSON.stringify(bodyObj);
      const payload = b64(bodyStr);
      const signature = await hmacSha512Hex(apiSecret.trim(), payload);
      const result = {
        payload,
        signature,
        bodyStr,
        queryString
      };
      setComputed(result);
      return result;
    } catch (e) {
      setError(e && e.message ? e.message : String(e));
      return null;
    }
  };
  const send = async () => {
    setBusy(true);
    setResponse(null);
    try {
      const out = await compute();
      if (!out) return;
      const res = await fetch("/_mintlify/api/request", {
        method: "POST",
        headers: {
          "Content-Type": "application/json"
        },
        body: JSON.stringify({
          method: "post",
          url: getApiHost() + path + out.queryString,
          header: {
            "content-type": "application/json",
            "X-TXC-APIKEY": apiKey.trim(),
            "X-TXC-PAYLOAD": out.payload,
            "X-TXC-SIGNATURE": out.signature
          },
          body: JSON.parse(out.bodyStr),
          cookie: {},
          query: {}
        })
      });
      const text = await res.text();
      let status = res.status;
      let pretty = text;
      try {
        const json = JSON.parse(text);
        if (json.statusCode !== undefined) {
          status = json.statusCode;
          const raw = typeof json.body === "string" ? json.body : JSON.stringify(json.body);
          try {
            pretty = JSON.stringify(JSON.parse(raw), null, 2);
          } catch (e2) {
            pretty = raw;
          }
        } else {
          pretty = JSON.stringify(json, null, 2);
        }
      } catch (e2) {}
      setResponse({
        status,
        body: pretty
      });
    } catch (e) {
      setError(e && e.message ? e.message : String(e));
    } finally {
      setBusy(false);
    }
  };
  const copy = text => {
    if (navigator && navigator.clipboard) navigator.clipboard.writeText(text);
  };
  const headerRows = useMemo(function () {
    if (!computed) return [];
    return [{
      key: "X-TXC-APIKEY",
      value: apiKey.trim()
    }, {
      key: "X-TXC-PAYLOAD",
      value: computed.payload
    }, {
      key: "X-TXC-SIGNATURE",
      value: computed.signature
    }];
  }, [computed, apiKey]);
  const INPUT_CLS = "w-full rounded-xl border-standard px-3 py-2 text-sm font-mono bg-background-light dark:bg-background-dark outline-none focus:ring-1 focus:ring-[#3064E3]/40 text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-white/20";
  const SECTION_CLS = "rounded-2xl border border-zinc-200 dark:border-zinc-800";
  const SECTION_BTN_CLS_OPEN = "flex w-full pt-3.5 pb-3 px-3.5 items-center justify-between cursor-pointer hover:bg-gray-50 dark:hover:bg-white/5 transition-colors rounded-t-2xl";
  const SECTION_BTN_CLS_CLOSED = "flex w-full pt-3.5 pb-3 px-3.5 items-center justify-between cursor-pointer hover:bg-gray-50 dark:hover:bg-white/5 transition-colors rounded-2xl";
  const renderField = function (f) {
    return <div key={f.name}>
        <div className="flex items-center gap-1.5 mb-1 mt-2.5">
          <span className="text-xs font-mono font-medium text-gray-700 dark:text-gray-300">{f.name}</span>
          {f.required ? <span className="text-xs text-red-500 dark:text-red-400">required</span> : <span className="text-xs text-gray-400 dark:text-gray-500">optional</span>}
          <span className="text-xs text-gray-400 dark:text-gray-500 ml-auto">{f.type}{f.enum ? " · enum" : ""}</span>
        </div>
        {f.description && <div className="text-xs text-gray-400 dark:text-gray-500 mb-1">{f.description}</div>}
        {f.enum ? <select className={INPUT_CLS} value={fieldValues[f.name] || ""} onChange={function (e) {
      setFieldValue(f.name, e.target.value);
    }}>
            {!f.required && <option value="">— leave empty —</option>}
            {f.enum.map(function (v) {
      return <option key={v} value={v}>{v}</option>;
    })}
          </select> : <input type={f.type === "integer" || f.type === "number" ? "number" : "text"} className={INPUT_CLS} value={fieldValues[f.name] || ""} onChange={function (e) {
      setFieldValue(f.name, e.target.value);
    }} placeholder={f.example !== undefined ? String(f.example) : f.required ? f.name : "optional"} spellCheck={false} autoComplete="off" />}
      </div>;
  };
  return <div className="not-prose my-6 flex w-full flex-col bg-background-light dark:bg-background-dark border-standard rounded-2xl p-1.5">

      {}
      <div className={"flex w-full items-center space-x-1.5 rounded-xl p-1.5 transition-colors border-standard " + (open ? "bg-gray-50 dark:bg-white/5" : "hover:bg-gray-50 dark:hover:bg-white/5")}>
        <button type="button" onClick={function () {
    setOpen(function (v) {
      return !v;
    });
  }} className="rounded-lg font-bold px-1.5 py-0.5 text-xs leading-5 shrink-0 bg-blue-400/20 text-blue-700 dark:text-blue-400 cursor-pointer">
          POST
        </button>

        <button type="button" onClick={function () {
    setOpen(function (v) {
      return !v;
    });
  }} className="flex-1 min-w-0 text-sm font-mono text-gray-600 dark:text-gray-400 truncate text-left cursor-pointer">
          {path}
        </button>

        <div className="flex items-center gap-1.5 shrink-0">
          {}
          <button type="button" title="Copy URL" onClick={function (e) {
    e.stopPropagation();
    var url = getApiHost() + path;
    if (navigator && navigator.clipboard) navigator.clipboard.writeText(url);
    setUrlCopied(true);
    setTimeout(function () {
      setUrlCopied(false);
    }, 1500);
  }} className="flex items-center justify-center w-6 h-6 rounded-lg hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400 dark:text-gray-500 transition-colors">
            {urlCopied ? <svg width="13" height="13" viewBox="0 0 13 13" fill="none">
                <path d="M2 7L5 10L11 3" stroke="#2AB673" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
              </svg> : <svg width="13" height="13" viewBox="0 0 13 13" fill="none">
                <rect x="4.5" y="1.5" width="7" height="8" rx="1.5" stroke="currentColor" strokeWidth="1.2" />
                <path d="M2 4.5H1.5A1 1 0 0 0 .5 5.5v6A1 1 0 0 0 1.5 12.5h6A1 1 0 0 0 8.5 11.5V11" stroke="currentColor" strokeWidth="1.2" strokeLinecap="round" />
              </svg>}
          </button>

          <span className="text-xs font-medium px-2 py-0.5 rounded-lg bg-[#2AB673]/10 text-[#2AB673] hidden sm:inline">
            Try it
          </span>

          <button type="button" onClick={function () {
    setOpen(function (v) {
      return !v;
    });
  }} className="flex items-center justify-center cursor-pointer">
            <svg width="14" height="14" viewBox="0 0 14 14" fill="none" className="text-gray-400 dark:text-gray-500 transition-transform shrink-0" style={{
    transform: open ? "rotate(180deg)" : "rotate(0deg)"
  }}>
              <path d="M3 5.5L7 9L11 5.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
            </svg>
          </button>
        </div>
      </div>

      {}
      {open && <div className="mt-1.5 space-y-1.5">

          {}
          <div className={SECTION_CLS}>
            <button type="button" onClick={function () {
    setAuthOpen(function (v) {
      return !v;
    });
  }} className={authOpen ? SECTION_BTN_CLS_OPEN : SECTION_BTN_CLS_CLOSED}>
              <div className="flex items-center gap-x-1.5">
                <svg width="12" height="12" viewBox="0 0 12 12" fill="none" className="text-gray-400 dark:text-gray-500 transition-transform shrink-0" style={{
    transform: authOpen ? "rotate(90deg)" : "rotate(0deg)"
  }}>
                  <path d="M4 2.5L8 6L4 9.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
                </svg>
                <span className="text-sm font-medium text-gray-800 dark:text-gray-200 leading-6">Authentication</span>
              </div>
            </button>
            {authOpen && <div className="px-3.5 pb-3.5 pt-0 border-t border-zinc-100 dark:border-zinc-800/60">
                <div className="flex items-center gap-1.5 mb-1 mt-2.5">
                  <span className="text-xs font-mono font-medium text-gray-700 dark:text-gray-300">X-TXC-APIKEY</span>
                  <span className="text-xs text-red-500 dark:text-red-400">required</span>
                  <span className="text-xs text-gray-400 dark:text-gray-500 ml-auto">string</span>
                </div>
                <input className={INPUT_CLS} value={apiKey} onChange={function (e) {
    setApiKey(e.target.value);
  }} placeholder="your-api-key" autoComplete="off" spellCheck={false} />

                <div className="flex items-center gap-1.5 mb-1 mt-2.5">
                  <span className="text-xs font-mono font-medium text-gray-700 dark:text-gray-300">API secret</span>
                  <span className="text-xs text-red-500 dark:text-red-400">required</span>
                  <span className="text-xs text-gray-400 dark:text-gray-500 ml-auto">string</span>
                </div>
                <div className="flex gap-1.5">
                  <input type={showSecret ? "text" : "password"} className={INPUT_CLS + " flex-1"} value={apiSecret} onChange={function (e) {
    setApiSecret(e.target.value);
  }} placeholder="your-api-secret" autoComplete="off" spellCheck={false} />
                  <button type="button" onClick={function () {
    setShowSecret(function (v) {
      return !v;
    });
  }} className="text-xs px-2.5 rounded-xl border-standard bg-background-light dark:bg-background-dark hover:bg-gray-50 dark:hover:bg-white/5 text-gray-500 dark:text-gray-400 shrink-0 transition-colors">
                    {showSecret ? "hide" : "show"}
                  </button>
                </div>
                <p className="text-xs text-gray-400 dark:text-gray-500 mt-1.5">
                  Credentials stay in memory only — never written to localStorage or cookies.
                </p>
              </div>}
          </div>

          {}
          <div className={SECTION_CLS}>
            <button type="button" onClick={function () {
    setParamsOpen(function (v) {
      return !v;
    });
  }} className={paramsOpen ? SECTION_BTN_CLS_OPEN : SECTION_BTN_CLS_CLOSED}>
              <div className="flex items-center gap-x-1.5">
                <svg width="12" height="12" viewBox="0 0 12 12" fill="none" className="text-gray-400 dark:text-gray-500 transition-transform shrink-0" style={{
    transform: paramsOpen ? "rotate(90deg)" : "rotate(0deg)"
  }}>
                  <path d="M4 2.5L8 6L4 9.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
                </svg>
                <span className="text-sm font-medium text-gray-800 dark:text-gray-200 leading-6">Body</span>
              </div>
              {fields !== null && fields !== undefined && bodyFields.length > 0 && <button type="button" onClick={function (e) {
    e.stopPropagation();
    toggleRaw();
  }} className="text-xs text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 underline mr-1">
                  {showRaw ? "form fields" : "edit as JSON"}
                </button>}
            </button>
            {paramsOpen && <div className="px-3.5 pb-3.5 pt-0 border-t border-zinc-100 dark:border-zinc-800/60">
                {queryFields.length > 0 && <div className="mb-1">
                    <p className="text-xs font-medium text-gray-500 dark:text-gray-400 mb-1 mt-2.5">Query parameters</p>
                    {queryFields.map(renderField)}
                  </div>}

                {useFieldsMode ? bodyFields.length > 0 ? <div>
                      {bodyFields.map(renderField)}
                      <p className="text-xs text-gray-400 dark:text-gray-500 mt-2">
                        <code className="font-mono">request</code>, <code className="font-mono">nonce</code>, <code className="font-mono">nonceWindow</code> added automatically.
                      </p>
                    </div> : <p className="text-xs text-gray-400 dark:text-gray-500 mt-2.5">
                      No body parameters required.{" "}
                      <code className="font-mono">request</code>, <code className="font-mono">nonce</code>, <code className="font-mono">nonceWindow</code> added automatically.
                    </p> : <div>
                    <p className="text-xs text-gray-400 dark:text-gray-500 mt-2.5 mb-1.5">
                      <code className="font-mono">request</code>, <code className="font-mono">nonce</code>, <code className="font-mono">nonceWindow</code> added automatically.
                    </p>
                    <textarea className={INPUT_CLS + " min-h-[80px] resize-y"} rows={4} value={params} onChange={function (e) {
    setParams(e.target.value);
  }} placeholder="{ &quot;market&quot;: &quot;BTC_USDT&quot; }" spellCheck={false} />
                  </div>}
              </div>}
          </div>

          {}
          <div className="flex flex-wrap items-center gap-1.5 px-0.5">
            <button type="button" onClick={send} disabled={busy} className="flex items-center justify-center px-3 h-9 text-sm font-medium rounded-xl hover:opacity-80 gap-1.5 transition-opacity disabled:opacity-50 disabled:pointer-events-none bg-[#3064E3] text-white">
              {busy ? <svg className="animate-spin w-4 h-4" viewBox="0 0 24 24" fill="none">
                  <circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" />
                  <path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v8z" />
                </svg> : "Send request"}
            </button>
            <button type="button" onClick={compute} disabled={busy} className="flex items-center justify-center px-3 h-9 text-sm font-medium rounded-xl border-standard hover:bg-gray-50 dark:hover:bg-white/5 transition-colors disabled:opacity-50 disabled:pointer-events-none text-gray-700 dark:text-gray-300 bg-background-light dark:bg-background-dark">
              Compute headers
            </button>
          </div>

          {}
          {error && <div className="px-3.5 py-2.5 rounded-2xl border border-red-200 dark:border-red-900/40 bg-red-50 dark:bg-red-950/20 text-sm text-red-600 dark:text-red-400 break-words">
              {error}
            </div>}

          {}
          {computed && <div className={SECTION_CLS + " overflow-hidden"}>
              <div className="flex items-center justify-between pt-3 pb-2.5 px-3.5 border-b border-zinc-100 dark:border-zinc-800/60">
                <span className="text-sm font-medium text-gray-800 dark:text-gray-200">Computed headers</span>
              </div>
              <div className="px-3.5 pb-3.5">
                {headerRows.map(function (row) {
    return <div key={row.key} className="mt-2.5">
                      <div className="flex items-center justify-between mb-1">
                        <span className="text-xs font-mono text-gray-500 dark:text-gray-400">{row.key}</span>
                        <button type="button" onClick={function () {
      copy(row.value);
    }} className="text-xs px-2 py-0.5 rounded-lg border-standard hover:bg-gray-50 dark:hover:bg-white/5 text-gray-500 dark:text-gray-400 transition-colors">
                          copy
                        </button>
                      </div>
                      <input readOnly value={row.value} className="w-full rounded-xl border-standard px-3 py-2 text-xs font-mono bg-gray-50 dark:bg-white/[0.03] text-gray-500 dark:text-gray-400 outline-none select-all cursor-default" />
                    </div>;
  })}
                <details className="mt-2.5">
                  <summary className="text-xs text-gray-400 dark:text-gray-500 cursor-pointer select-none hover:text-gray-600 dark:hover:text-gray-300 transition-colors">
                    full request body
                  </summary>
                  <pre className="text-xs font-mono whitespace-pre-wrap break-all mt-2 text-gray-600 dark:text-gray-400 m-0">
                    {(function () {
    try {
      return JSON.stringify(JSON.parse(computed.bodyStr), null, 2);
    } catch (e) {
      return computed.bodyStr;
    }
  })()}
                  </pre>
                </details>
                {computed.queryString && <p className="text-xs text-gray-400 dark:text-gray-500 font-mono mt-1">
                    query: {computed.queryString}
                  </p>}
              </div>
            </div>}

          {}
          {response && <div className={SECTION_CLS + " overflow-hidden"}>
              <div className="flex items-center gap-2 pt-3 pb-2.5 px-3.5 border-b border-zinc-100 dark:border-zinc-800/60">
                <span className="text-sm font-medium text-gray-800 dark:text-gray-200">Response</span>
                <span className={"text-xs font-mono font-medium px-1.5 py-0.5 rounded-lg " + (response.status < 400 ? "bg-[#2AB673]/10 text-[#2AB673]" : "bg-red-100/50 dark:bg-red-400/10 text-red-600 dark:text-red-300")}>
                  {response.status}
                </span>
              </div>
              <pre className="text-xs font-mono whitespace-pre-wrap overflow-auto max-h-80 m-0 px-3.5 py-3 text-gray-700 dark:text-gray-300">
                {response.body}
              </pre>
            </div>}

        </div>}

    </div>;
};

<WhitebitSigner path="/api/v4/main-account/smart/plans" fields={SIGNER_FIELDS["/api/v4/main-account/smart/plans"]} />

<Note>
  These endpoints are available only for B2B partner services. Fill the form at [https://whitebit.com/institutional-services/b2b](https://whitebit.com/institutional-services/b2b) to request access.
</Note>

<Note>
  The `id` field in each returned plan object is the `planId` value required by the [investment creation endpoint](/api-reference/account-wallet/invest) (`POST /api/v4/main-account/smart/investment`). Only plans returned by this endpoint can be used to create new investments — plans with inactive status or disabled API access are excluded automatically.
</Note>


## OpenAPI

````yaml openapi/private/main_api_v4.yaml POST /api/v4/main-account/smart/plans
openapi: 3.0.3
info:
  title: WhiteBIT Private HTTP API V4
  description: |
    WhiteBIT Private HTTP API V4 for Main balance changes.

    Base URL: https://whitebit.com

    All endpoints return time in Unix-time format.
    All endpoints return either a JSON object or array.
    For receiving responses from API calls please use http method POST.
  version: 4.0.0
  contact:
    name: WhiteBIT Support
    email: support@whitebit.com
    url: https://whitebit.com
servers:
  - url: https://whitebit.com
    description: WhiteBIT Global Server
  - url: https://whitebit.eu
    description: WhiteBIT EU Server
security:
  - ApiKeyAuth: []
    PayloadAuth: []
    SignatureAuth: []
tags:
  - name: Main Account
    description: Main account balance and operations
  - name: Deposit
    description: Cryptocurrency and fiat deposit operations
  - name: Withdraw
    description: Cryptocurrency and fiat withdrawal operations
  - name: Transfer
    description: Balance transfer operations
  - name: Codes
    description: WhiteBIT codes operations
  - name: Crypto Lending - Fixed
    description: Fixed crypto lending plans
  - name: Crypto Lending - Flex
    description: Flexible crypto lending plans
  - name: Fees
    description: Fee information
  - name: Sub-Account
    description: Sub-account management
  - name: Sub-Account API Keys
    description: Sub-account API key management
  - name: Mining Pool
    description: Mining pool operations
  - name: Credit Line
    description: Credit line information
  - name: JWT
    description: JWT token management
  - name: Travel Rule
    description: Travel Rule compliance endpoints for deposits and withdrawals
paths:
  /api/v4/main-account/smart/plans:
    post:
      tags:
        - Crypto Lending - Fixed
      summary: Get plans
      description: >
        The endpoint returns investment plan configurations with active status
        and API access enabled, filtered by the authenticated user's region and
        plan visibility. Results include public plans and private plans assigned
        to the account.


        <Note>

        These endpoints are available only for B2B partner services. Fill the
        institutional services form to get permissions to use these endpoints.

        </Note>


        **Note:** When target currency is different from source currency,
        interest amount in target currency will be calculated using
        `interestRatio` value.


        **Examples:**

        - When source currency = USDT, target currency = BTC and interest ratio
        = 40000, interest is received in BTC and equals the USDT interest amount
        divided by the interest ratio (e.g. 0.000025 BTC per 1 USDT of
        interest).

        - When source currency equals target currency, interest ratio equals 1.


        <Warning>

        Rate limit: 1000 requests/10 sec.

        </Warning>


        <Note>

        The API does not cache the response.

        </Note>
      operationId: getFixedPlans
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - request
                - nonce
              properties:
                ticker:
                  type: string
                  description: >-
                    [Invest plan](/glossary#crypto-lending) source currency's
                    [ticker](/glossary#ticker). Example: BTC
                  example: USDT
                request:
                  type: string
                  description: Request signature
                  example: '{{request}}'
                nonce:
                  type: integer
                  description: Unique request identifier
                  example: 1594297865000
            example:
              ticker: USDT
              request: '{{request}}'
              nonce: 1594297865000
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FixedPlan'
              example:
                - id: 8e667b4a-0b71-4988-8af5-9474dbfaeb51
                  ticker: USDT
                  status: 1
                  percent: '10'
                  duration: 14400
                  interestTicker: USDT
                  interestRatio: '1'
                  minInvestment: '100'
                  maxInvestment: '10000'
                  maxPossibleInvestment: '3000'
        '400':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalidTicker:
                  summary: Invalid ticker
                  value:
                    code: 0
                    message: Validation failed
                    errors:
                      ticker:
                        - The selected ticker is invalid.
components:
  schemas:
    FixedPlan:
      type: object
      properties:
        id:
          type: string
          description: Invest plan identifier
          example: '1'
        ticker:
          type: string
          description: Source currency ticker
          example: BTC
        status:
          type: integer
          description: Status (1 - active, 2 - no coins left, 3 - inactive, 4 - pause)
          example: 1
        percent:
          type: string
          description: Interest percent
          example: '0.01'
        duration:
          type: integer
          description: Investment duration (in minutes)
          example: 40320
        interestTicker:
          type: string
          description: Target currency ticker
          example: BTC
        interestRatio:
          type: string
          description: Target currency to source currency ratio
          example: '1'
        minInvestment:
          type: string
          description: Minimum investment amount
          example: '100'
        maxInvestment:
          type: string
          description: Maximum investment amount
          example: '10000'
        maxPossibleInvestment:
          type: string
          description: Maximum investment amount due to current invest plan state
          example: '3000'
    Error:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-TXC-APIKEY
      description: The public WhiteBIT API key.
    PayloadAuth:
      type: apiKey
      in: header
      name: X-TXC-PAYLOAD
      description: Base64-encoded JSON request body.
    SignatureAuth:
      type: apiKey
      in: header
      name: X-TXC-SIGNATURE
      description: >-
        HMAC-SHA512 signature of the payload, hex-encoded. Computed as
        hex(HMAC-SHA512(payload, api_secret)).

````