diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dbc627c33cc..745cc391fe4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,8 +17,8 @@ repos: - types-cachetools==5.5.0.20240820 - types-filelock==3.2.7 - types-requests==2.32.0.20241016 - - types-tabulate==0.9.0.20240106 - - types-python-dateutil==2.9.0.20241003 + - types-tabulate==0.9.0.20241207 + - types-python-dateutil==2.9.0.20241206 - SQLAlchemy==2.0.36 # stages: [push] @@ -31,7 +31,7 @@ repos: - repo: https://github.com/charliermarsh/ruff-pre-commit # Ruff version. - rev: 'v0.8.0' + rev: 'v0.8.2' hooks: - id: ruff - id: ruff-format @@ -56,6 +56,11 @@ repos: .*\.md )$ + - repo: https://github.com/stefmolin/exif-stripper + rev: 0.6.1 + hooks: + - id: strip-exif + - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: diff --git a/build_helpers/schema.json b/build_helpers/schema.json index e12b0bf0d58..73c06ba46b3 100644 --- a/build_helpers/schema.json +++ b/build_helpers/schema.json @@ -102,8 +102,17 @@ }, "dry_run_wallet": { "description": "Initial wallet balance for dry run mode.", - "type": "number", - "default": 1000 + "type": [ + "number", + "object" + ], + "default": 1000, + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "number" + } + }, + "additionalProperties": false }, "cancel_open_orders_on_exit": { "description": "Cancel open orders when exiting.", diff --git a/docs/advanced-hyperopt.md b/docs/advanced-hyperopt.md index 480b20daf74..b12d8f5b662 100644 --- a/docs/advanced-hyperopt.md +++ b/docs/advanced-hyperopt.md @@ -39,6 +39,7 @@ class SuperDuperHyperOptLoss(IHyperOptLoss): config: Config, processed: dict[str, DataFrame], backtest_stats: dict[str, Any], + starting_balance: float, **kwargs, ) -> float: """ @@ -70,6 +71,7 @@ Currently, the arguments are: * `config`: Config object used (Note: Not all strategy-related parameters will be updated here if they are part of a hyperopt space). * `processed`: Dict of Dataframes with the pair as keys containing the data used for backtesting. * `backtest_stats`: Backtesting statistics using the same format as the backtesting file "strategy" substructure. Available fields can be seen in `generate_strategy_stats()` in `optimize_reports.py`. +* `starting_balance`: Starting balance used for backtesting. This function needs to return a floating point number (`float`). Smaller numbers will be interpreted as better results. The parameters and balancing for this is up to you. diff --git a/docs/assets/frequi-login-CORS-light.png b/docs/assets/frequi-login-CORS-light.png index 019ae4e8c90..cf6d7a700f7 100644 Binary files a/docs/assets/frequi-login-CORS-light.png and b/docs/assets/frequi-login-CORS-light.png differ diff --git a/docs/assets/telegram_forcebuy.png b/docs/assets/telegram_forcebuy.png index b0592bff357..a75db99b073 100644 Binary files a/docs/assets/telegram_forcebuy.png and b/docs/assets/telegram_forcebuy.png differ diff --git a/docs/configuration.md b/docs/configuration.md index b7a7b082d0d..fdddf7cdada 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -39,13 +39,19 @@ Please note that Environment variables will overwrite corresponding settings in Common example: -``` +``` bash FREQTRADE__TELEGRAM__CHAT_ID= FREQTRADE__TELEGRAM__TOKEN= FREQTRADE__EXCHANGE__KEY= FREQTRADE__EXCHANGE__SECRET= ``` +Json lists are parsed as json - so you can use the following to set a list of pairs: + +``` bash +export FREQTRADE__EXCHANGE__PAIR_WHITELIST='["BTC/USDT", "ETH/USDT"]' +``` + !!! Note Environment variables detected are logged at startup - so if you can't find why a value is not what you think it should be based on the configuration, make sure it's not loaded from an environment variable. @@ -54,7 +60,7 @@ FREQTRADE__EXCHANGE__SECRET= ??? Warning "Loading sequence" Environment variables are loaded after the initial configuration. As such, you cannot provide the path to the configuration through environment variables. Please use `--config path/to/config.json` for that. - This also applies to user_dir to some degree. while the user directory can be set through environment variables - the configuration will **not** be loaded from that location. + This also applies to `user_dir` to some degree. while the user directory can be set through environment variables - the configuration will **not** be loaded from that location. ### Multiple configuration files @@ -168,7 +174,7 @@ Mandatory parameters are marked as **Required**, which means that they are requi | `timeframe` | The timeframe to use (e.g `1m`, `5m`, `15m`, `30m`, `1h` ...). Usually missing in configuration, and specified in the strategy. [Strategy Override](#parameters-in-the-strategy).
**Datatype:** String | `fiat_display_currency` | Fiat currency used to show your profits. [More information below](#what-values-can-be-used-for-fiat_display_currency).
**Datatype:** String | `dry_run` | **Required.** Define if the bot must be in Dry Run or production mode.
*Defaults to `true`.*
**Datatype:** Boolean -| `dry_run_wallet` | Define the starting amount in stake currency for the simulated wallet used by the bot running in Dry Run mode.
*Defaults to `1000`.*
**Datatype:** Float +| `dry_run_wallet` | Define the starting amount in stake currency for the simulated wallet used by the bot running in Dry Run mode. [More information below](#dry-run-wallet)
*Defaults to `1000`.*
**Datatype:** Float or Dict | `cancel_open_orders_on_exit` | Cancel open orders when the `/stop` RPC command is issued, `Ctrl+C` is pressed or the bot dies unexpectedly. When set to `true`, this allows you to use `/stop` to cancel unfilled and partially filled orders in the event of a market crash. It does not impact open positions.
*Defaults to `false`.*
**Datatype:** Boolean | `process_only_new_candles` | Enable processing of indicators only when new candles arrive. If false each loop populates the indicators, this will mean the same candle is processed many times creating system load but can be useful of your strategy depends on tick data not only candle. [Strategy Override](#parameters-in-the-strategy).
*Defaults to `true`.*
**Datatype:** Boolean | `minimal_roi` | **Required.** Set the threshold as ratio the bot will use to exit a trade. [More information below](#understand-minimal_roi). [Strategy Override](#parameters-in-the-strategy).
**Datatype:** Dict @@ -324,6 +330,25 @@ To limit this calculation in case of large stoploss values, the calculated minim !!! Warning Since the limits on exchanges are usually stable and are not updated often, some pairs can show pretty high minimum limits, simply because the price increased a lot since the last limit adjustment by the exchange. Freqtrade adjusts the stake-amount to this value, unless it's > 30% more than the calculated/desired stake-amount - in which case the trade is rejected. +#### Dry-run wallet + +When running in dry-run mode, the bot will use a simulated wallet to execute trades. The starting balance of this wallet is defined by `dry_run_wallet` (defaults to 1000). +For more complex scenarios, you can also assign a dictionary to `dry_run_wallet` to define the starting balance for each currency. + +```json +"dry_run_wallet": { + "BTC": 0.01, + "ETH": 2, + "USDT": 1000 +} +``` + +Command line options (`--dry-run-wallet`) can be used to override the configuration value, but only for the float value, not for the dictionary. If you'd like to use the dictionary, please adjust the configuration file. + +!!! Note + Balances not in stake-currency will not be used for trading, but are shown as part of the wallet balance. + On Cross-margin exchanges, the wallet balance may be used to calculate the available collateral for trading. + #### Tradable balance By default, the bot assumes that the `complete amount - 1%` is at it's disposal, and when using [dynamic stake amount](#dynamic-stake-amount), it will split the complete balance into `max_open_trades` buckets per trade. diff --git a/docs/faq.md b/docs/faq.md index 98b10689901..a41e641f674 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -40,6 +40,10 @@ This could be caused by the following reasons: * The installation did not complete successfully. * Please check the [Installation documentation](installation.md). +### The bot starts, but in STOPPED mode + +Make sure you set the `initial_state` config option to `"running"` in your config.json + ### I have waited 5 minutes, why hasn't the bot made any trades yet? * Depending on the buy strategy, the amount of whitelisted coins, the diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index e8e99f3376f..f342680e278 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,6 +1,6 @@ markdown==3.7 mkdocs==1.6.1 -mkdocs-material==9.5.47 +mkdocs-material==9.5.48 mdx_truly_sane_lists==1.3 pymdown-extensions==10.12 jinja2==3.1.4 diff --git a/docs/strategy-callbacks.md b/docs/strategy-callbacks.md index 44d675055a9..51b55379059 100644 --- a/docs/strategy-callbacks.md +++ b/docs/strategy-callbacks.md @@ -782,6 +782,12 @@ The strategy is expected to return a negative stake_amount (in stake currency) f Returning the full owned stake at that point (`-trade.stake_amount`) results in a full exit. Returning a value more than the above (so remaining stake_amount would become negative) will result in the bot ignoring the signal. +For a partial exit, it's important to know that the formula used to calculate the amount of the coin for the partial exit order is `amount to be exited partially = negative_stake_amount * trade.amount / trade.stake_amount`, where `negative_stake_amount` is the value returned from the `adjust_trade_position` function. As seen in the formula, the formula don't care about current profit/loss of the position. It only care about `trade.amount` and `trade.stake_amount` which aren't affected by the price movement at all. + +For example, let's say you buy 2 SHITCOIN/USDT at open rate of 50, which means the trade's stake amount is 100 USDT. Now the price has rose to 200 and you want to sell half of it. In that case, you have to return -50% of trade.stake_amount (0.5 * 100 USDT) which equals to -50. The bot will calculate the amount it needed to sell, which is `50 * 2 / 100` which equals 1 SHITCOIN/USDT. If you return -200 (50% of 2 * 200), the bot will ignore it since trade.stake_amount is only 100 USDT but you asked it to sell 200 USDT which means you are asking it to sell 4 SHITCOIN/USDT. + +Back to the example above, since current rate is 200, the current USDT value of your trade is now 400 USDT. Let's say you want to partially sell 100 USDT to take out the initial investment and leave the profit in the trade in hope of the price keep rising. In that case, you have to do different approach. First, you need to calculate the exact amount you needed to sell. In this case, since you want to sell 100 USDT worth based of current rate, the exact amount you need to partially sell is `100 * 2 / 400` which equals 0.5 SHITCOIN/USDT. Since we know now the exact amount we want to sell (0.5), the value you need to return in the `adjust_trade_position` function is `-amount to be exited partially * trade.stake_amount / trade.amount`, which equals -25. The bot will sell 0.5 SHITCOIN/USDT, keeping 1.5 in trade. You will receive 100 USDT from the partial exit. + !!! Note "About stake size" Using fixed stake size means it will be the amount used for the first order, just like without position adjustment. If you wish to buy additional orders with DCA, then make sure to leave enough funds in the wallet for that. diff --git a/freqtrade/commands/optimize_commands.py b/freqtrade/commands/optimize_commands.py index ea75f3bd173..9695a313b9c 100644 --- a/freqtrade/commands/optimize_commands.py +++ b/freqtrade/commands/optimize_commands.py @@ -17,7 +17,7 @@ def setup_optimize_configuration(args: dict[str, Any], method: RunMode) -> dict[ :return: Configuration """ from freqtrade.configuration import setup_utils_configuration - from freqtrade.util import fmt_coin + from freqtrade.util import fmt_coin, get_dry_run_wallet config = setup_utils_configuration(args, method) @@ -26,7 +26,7 @@ def setup_optimize_configuration(args: dict[str, Any], method: RunMode) -> dict[ RunMode.HYPEROPT: "hyperoptimization", } if method in no_unlimited_runmodes.keys(): - wallet_size = config["dry_run_wallet"] * config["tradable_balance_ratio"] + wallet_size = get_dry_run_wallet(config) * config["tradable_balance_ratio"] # tradable_balance_ratio if ( config["stake_amount"] != constants.UNLIMITED_STAKE_AMOUNT diff --git a/freqtrade/configuration/config_schema.py b/freqtrade/configuration/config_schema.py index 7b134c8c4bf..b3ff38f65cf 100644 --- a/freqtrade/configuration/config_schema.py +++ b/freqtrade/configuration/config_schema.py @@ -85,8 +85,10 @@ }, "dry_run_wallet": { "description": "Initial wallet balance for dry run mode.", - "type": "number", + "type": ["number", "object"], "default": DRY_RUN_WALLET, + "patternProperties": {r"^[a-zA-Z0-9]+$": {"type": "number"}}, + "additionalProperties": False, }, "cancel_open_orders_on_exit": { "description": "Cancel open orders when exiting.", diff --git a/freqtrade/configuration/environment_vars.py b/freqtrade/configuration/environment_vars.py index 37445538deb..8a825f59ba5 100644 --- a/freqtrade/configuration/environment_vars.py +++ b/freqtrade/configuration/environment_vars.py @@ -2,6 +2,8 @@ import os from typing import Any +import rapidjson + from freqtrade.constants import ENV_VAR_PREFIX from freqtrade.misc import deep_merge_dicts @@ -20,6 +22,14 @@ def _get_var_typed(val): return True elif val.lower() in ("f", "false"): return False + # try to convert from json + try: + value = rapidjson.loads(val) + # Limited to lists for now + if isinstance(value, list): + return value + except rapidjson.JSONDecodeError: + pass # keep as string return val diff --git a/freqtrade/data/converter/orderflow.py b/freqtrade/data/converter/orderflow.py index e64caa88b99..50b298c75f5 100644 --- a/freqtrade/data/converter/orderflow.py +++ b/freqtrade/data/converter/orderflow.py @@ -4,20 +4,31 @@ import logging import time -import typing -from collections import OrderedDict from datetime import datetime import numpy as np import pandas as pd from freqtrade.constants import DEFAULT_ORDERFLOW_COLUMNS, Config -from freqtrade.enums import RunMode from freqtrade.exceptions import DependencyException logger = logging.getLogger(__name__) +ORDERFLOW_ADDED_COLUMNS = [ + "trades", + "orderflow", + "imbalances", + "stacked_imbalances_bid", + "stacked_imbalances_ask", + "max_delta", + "min_delta", + "bid", + "ask", + "delta", + "total_trades", +] + def _init_dataframe_with_trades_columns(dataframe: pd.DataFrame): """ @@ -25,24 +36,18 @@ def _init_dataframe_with_trades_columns(dataframe: pd.DataFrame): :param dataframe: Dataframe to populate """ # Initialize columns with appropriate dtypes - dataframe["trades"] = np.nan - dataframe["orderflow"] = np.nan - dataframe["imbalances"] = np.nan - dataframe["stacked_imbalances_bid"] = np.nan - dataframe["stacked_imbalances_ask"] = np.nan - dataframe["max_delta"] = np.nan - dataframe["min_delta"] = np.nan - dataframe["bid"] = np.nan - dataframe["ask"] = np.nan - dataframe["delta"] = np.nan - dataframe["total_trades"] = np.nan - - # Ensure the 'trades' column is of object type - dataframe["trades"] = dataframe["trades"].astype(object) - dataframe["orderflow"] = dataframe["orderflow"].astype(object) - dataframe["imbalances"] = dataframe["imbalances"].astype(object) - dataframe["stacked_imbalances_bid"] = dataframe["stacked_imbalances_bid"].astype(object) - dataframe["stacked_imbalances_ask"] = dataframe["stacked_imbalances_ask"].astype(object) + for column in ORDERFLOW_ADDED_COLUMNS: + dataframe[column] = np.nan + + # Set columns to object type + for column in ( + "trades", + "orderflow", + "imbalances", + "stacked_imbalances_bid", + "stacked_imbalances_ask", + ): + dataframe[column] = dataframe[column].astype(object) def _calculate_ohlcv_candle_start_and_end(df: pd.DataFrame, timeframe: str): @@ -61,17 +66,18 @@ def _calculate_ohlcv_candle_start_and_end(df: pd.DataFrame, timeframe: str): def populate_dataframe_with_trades( - cached_grouped_trades: OrderedDict[tuple[datetime, datetime], pd.DataFrame], + cached_grouped_trades: pd.DataFrame | None, config: Config, dataframe: pd.DataFrame, trades: pd.DataFrame, -) -> tuple[pd.DataFrame, OrderedDict[tuple[datetime, datetime], pd.DataFrame]]: +) -> tuple[pd.DataFrame, pd.DataFrame]: """ Populates a dataframe with trades :param dataframe: Dataframe to populate :param trades: Trades to populate with :return: Dataframe with trades populated """ + timeframe = config["timeframe"] config_orderflow = config["orderflow"] @@ -94,71 +100,52 @@ def populate_dataframe_with_trades( # group trades by candle start trades_grouped_by_candle_start = trades.groupby("candle_start", group_keys=False) - # Create Series to hold complex data - trades_series = pd.Series(index=dataframe.index, dtype=object) - orderflow_series = pd.Series(index=dataframe.index, dtype=object) - imbalances_series = pd.Series(index=dataframe.index, dtype=object) - stacked_imbalances_bid_series = pd.Series(index=dataframe.index, dtype=object) - stacked_imbalances_ask_series = pd.Series(index=dataframe.index, dtype=object) - trades_grouped_by_candle_start = trades.groupby("candle_start", group_keys=False) + candle_start: datetime for candle_start, trades_grouped_df in trades_grouped_by_candle_start: is_between = candle_start == dataframe["date"] if is_between.any(): - from freqtrade.exchange import timeframe_to_next_date - - candle_next = timeframe_to_next_date(timeframe, typing.cast(datetime, candle_start)) - if candle_next not in trades_grouped_by_candle_start.groups: - logger.warning( - f"candle at {candle_start} with {len(trades_grouped_df)} trades " - f"might be unfinished, because no finished trades at {candle_next}" - ) - - indices = dataframe.index[is_between].tolist() - # Add trades to each candle - trades_series.loc[indices] = [ - trades_grouped_df.drop(columns=["candle_start", "candle_end"]).to_dict( - orient="records" - ) - ] - # Use caching mechanism - if (candle_start, candle_next) in cached_grouped_trades: - cache_entry = cached_grouped_trades[ - (typing.cast(datetime, candle_start), candle_next) - ] - # dataframe.loc[is_between] = cache_entry # doesn't take, so we need workaround: - # Create a dictionary of the column values to be assigned - update_dict = {c: cache_entry[c].iat[0] for c in cache_entry.columns} - # Assign the values using the update_dict - dataframe.loc[is_between, update_dict.keys()] = pd.DataFrame( - [update_dict], index=dataframe.loc[is_between].index - ) + # there can only be one row with the same date + index = dataframe.index[is_between][0] + + if ( + cached_grouped_trades is not None + and (candle_start == cached_grouped_trades["date"]).any() + ): + # Check if the trades are already in the cache + cache_idx = cached_grouped_trades.index[ + cached_grouped_trades["date"] == candle_start + ][0] + for col in ORDERFLOW_ADDED_COLUMNS: + dataframe.at[index, col] = cached_grouped_trades.at[cache_idx, col] continue + dataframe.at[index, "trades"] = trades_grouped_df.drop( + columns=["candle_start", "candle_end"] + ).to_dict(orient="records") + # Calculate orderflow for each candle orderflow = trades_to_volumeprofile_with_total_delta_bid_ask( trades_grouped_df, scale=config_orderflow["scale"] ) - orderflow_series.loc[indices] = [orderflow.to_dict(orient="index")] + dataframe.at[index, "orderflow"] = orderflow.to_dict(orient="index") + # orderflow_series.loc[[index]] = [orderflow.to_dict(orient="index")] # Calculate imbalances for each candle's orderflow imbalances = trades_orderflow_to_imbalances( orderflow, imbalance_ratio=config_orderflow["imbalance_ratio"], imbalance_volume=config_orderflow["imbalance_volume"], ) - imbalances_series.loc[indices] = [imbalances.to_dict(orient="index")] + dataframe.at[index, "imbalances"] = imbalances.to_dict(orient="index") stacked_imbalance_range = config_orderflow["stacked_imbalance_range"] - stacked_imbalances_bid_series.loc[indices] = [ - stacked_imbalance_bid( - imbalances, stacked_imbalance_range=stacked_imbalance_range - ) - ] - stacked_imbalances_ask_series.loc[indices] = [ - stacked_imbalance_ask( - imbalances, stacked_imbalance_range=stacked_imbalance_range - ) - ] + dataframe.at[index, "stacked_imbalances_bid"] = stacked_imbalance_bid( + imbalances, stacked_imbalance_range=stacked_imbalance_range + ) + + dataframe.at[index, "stacked_imbalances_ask"] = stacked_imbalance_ask( + imbalances, stacked_imbalance_range=stacked_imbalance_range + ) bid = np.where( trades_grouped_df["side"].str.contains("sell"), trades_grouped_df["amount"], 0 @@ -168,39 +155,20 @@ def populate_dataframe_with_trades( trades_grouped_df["side"].str.contains("buy"), trades_grouped_df["amount"], 0 ) deltas_per_trade = ask - bid - min_delta = deltas_per_trade.cumsum().min() - max_delta = deltas_per_trade.cumsum().max() - dataframe.loc[indices, "max_delta"] = max_delta - dataframe.loc[indices, "min_delta"] = min_delta - - dataframe.loc[indices, "bid"] = bid.sum() - dataframe.loc[indices, "ask"] = ask.sum() - dataframe.loc[indices, "delta"] = ( - dataframe.loc[indices, "ask"] - dataframe.loc[indices, "bid"] - ) - dataframe.loc[indices, "total_trades"] = len(trades_grouped_df) + dataframe.at[index, "max_delta"] = deltas_per_trade.cumsum().max() + dataframe.at[index, "min_delta"] = deltas_per_trade.cumsum().min() - # Cache the result - cached_grouped_trades[(typing.cast(datetime, candle_start), candle_next)] = ( - dataframe.loc[is_between].copy() + dataframe.at[index, "bid"] = bid.sum() + dataframe.at[index, "ask"] = ask.sum() + dataframe.at[index, "delta"] = ( + dataframe.at[index, "ask"] - dataframe.at[index, "bid"] ) + dataframe.at[index, "total_trades"] = len(trades_grouped_df) - # Maintain cache size - if ( - config.get("runmode") in (RunMode.DRY_RUN, RunMode.LIVE) - and len(cached_grouped_trades) > config_orderflow["cache_size"] - ): - cached_grouped_trades.popitem(last=False) - else: - logger.debug(f"Found NO candles for trades starting with {candle_start}") logger.debug(f"trades.groups_keys in {time.time() - start_time} seconds") - # Merge the complex data Series back into the DataFrame - dataframe["trades"] = trades_series - dataframe["orderflow"] = orderflow_series - dataframe["imbalances"] = imbalances_series - dataframe["stacked_imbalances_bid"] = stacked_imbalances_bid_series - dataframe["stacked_imbalances_ask"] = stacked_imbalances_ask_series + # Cache the entire dataframe + cached_grouped_trades = dataframe.tail(config_orderflow["cache_size"]).copy() except Exception as e: logger.exception("Error populating dataframe with trades") diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index f000c9a78f2..c2913256270 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -62,8 +62,14 @@ class Binance(Exchange): (TradingMode.FUTURES, MarginMode.ISOLATED) ] - def get_tickers(self, symbols: list[str] | None = None, *, cached: bool = False) -> Tickers: - tickers = super().get_tickers(symbols=symbols, cached=cached) + def get_tickers( + self, + symbols: list[str] | None = None, + *, + cached: bool = False, + market_type: TradingMode | None = None, + ) -> Tickers: + tickers = super().get_tickers(symbols=symbols, cached=cached, market_type=market_type) if self.trading_mode == TradingMode.FUTURES: # Binance's future result has no bid/ask values. # Therefore we must fetch that from fetch_bids_asks and combine the two results. @@ -90,7 +96,10 @@ def additional_exchange_init(self) -> None: "\nHedge Mode is not supported by freqtrade. " "Please change 'Position Mode' on your binance futures account." ) - if assets_margin.get("multiAssetsMargin") is True: + if ( + assets_margin.get("multiAssetsMargin") is True + and self.margin_mode != MarginMode.CROSS + ): msg += ( "\nMulti-Asset Mode is not supported by freqtrade. " "Please change 'Asset Mode' on your binance futures account." diff --git a/freqtrade/exchange/binance_leverage_tiers.json b/freqtrade/exchange/binance_leverage_tiers.json index 4bcdab66d2a..4bd8a749041 100644 --- a/freqtrade/exchange/binance_leverage_tiers.json +++ b/freqtrade/exchange/binance_leverage_tiers.json @@ -315,13 +315,13 @@ "symbol": "1000BONK/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, - "maxNotional": 60000.0, + "maxNotional": 100000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "60000", + "notionalCap": "100000", "notionalFloor": "10000", "maintMarginRatio": "0.015", "cum": "50.0" @@ -331,119 +331,119 @@ "tier": 3.0, "symbol": "1000BONK/USDT:USDT", "currency": "USDT", - "minNotional": 60000.0, - "maxNotional": 300000.0, + "minNotional": 100000.0, + "maxNotional": 500000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "300000", - "notionalFloor": "60000", + "notionalCap": "500000", + "notionalFloor": "100000", "maintMarginRatio": "0.02", - "cum": "350.0" + "cum": "550.0" } }, { "tier": 4.0, "symbol": "1000BONK/USDT:USDT", "currency": "USDT", - "minNotional": 300000.0, - "maxNotional": 600000.0, + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "600000", - "notionalFloor": "300000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.025", - "cum": "1850.0" + "cum": "3050.0" } }, { "tier": 5.0, "symbol": "1000BONK/USDT:USDT", "currency": "USDT", - "minNotional": 600000.0, - "maxNotional": 3000000.0, + "minNotional": 1000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "3000000", - "notionalFloor": "600000", + "notionalCap": "5000000", + "notionalFloor": "1000000", "maintMarginRatio": "0.05", - "cum": "16850.0" + "cum": "28050.0" } }, { "tier": 6.0, "symbol": "1000BONK/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 6000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "6000000", - "notionalFloor": "3000000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.1", - "cum": "166850.0" + "cum": "278050.0" } }, { "tier": 7.0, "symbol": "1000BONK/USDT:USDT", "currency": "USDT", - "minNotional": 6000000.0, - "maxNotional": 7500000.0, + "minNotional": 10000000.0, + "maxNotional": 12500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "7500000", - "notionalFloor": "6000000", + "notionalCap": "12500000", + "notionalFloor": "10000000", "maintMarginRatio": "0.125", - "cum": "316850.0" + "cum": "528050.0" } }, { "tier": 8.0, "symbol": "1000BONK/USDT:USDT", "currency": "USDT", - "minNotional": 7500000.0, - "maxNotional": 15000000.0, + "minNotional": 12500000.0, + "maxNotional": 25000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "15000000", - "notionalFloor": "7500000", + "notionalCap": "25000000", + "notionalFloor": "12500000", "maintMarginRatio": "0.25", - "cum": "1254350.0" + "cum": "2090550.0" } }, { "tier": 9.0, "symbol": "1000BONK/USDT:USDT", "currency": "USDT", - "minNotional": 15000000.0, - "maxNotional": 30000000.0, + "minNotional": 25000000.0, + "maxNotional": 50000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "30000000", - "notionalFloor": "15000000", + "notionalCap": "50000000", + "notionalFloor": "25000000", "maintMarginRatio": "0.5", - "cum": "5004350.0" + "cum": "8340550.0" } } ], @@ -3209,13 +3209,13 @@ "symbol": "ACT/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, - "maxNotional": 40000.0, + "maxNotional": 80000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "40000", + "notionalCap": "80000", "notionalFloor": "10000", "maintMarginRatio": "0.015", "cum": "50.0" @@ -3225,119 +3225,274 @@ "tier": 3.0, "symbol": "ACT/USDT:USDT", "currency": "USDT", - "minNotional": 40000.0, - "maxNotional": 200000.0, + "minNotional": 80000.0, + "maxNotional": 400000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "200000", - "notionalFloor": "40000", + "notionalCap": "400000", + "notionalFloor": "80000", "maintMarginRatio": "0.02", - "cum": "250.0" + "cum": "450.0" } }, { "tier": 4.0, "symbol": "ACT/USDT:USDT", "currency": "USDT", - "minNotional": 200000.0, - "maxNotional": 400000.0, + "minNotional": 400000.0, + "maxNotional": 800000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "400000", - "notionalFloor": "200000", + "notionalCap": "800000", + "notionalFloor": "400000", "maintMarginRatio": "0.025", - "cum": "1250.0" + "cum": "2450.0" } }, { "tier": 5.0, "symbol": "ACT/USDT:USDT", "currency": "USDT", - "minNotional": 400000.0, - "maxNotional": 2000000.0, + "minNotional": 800000.0, + "maxNotional": 4000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "2000000", - "notionalFloor": "400000", + "notionalCap": "4000000", + "notionalFloor": "800000", "maintMarginRatio": "0.05", - "cum": "11250.0" + "cum": "22450.0" } }, { "tier": 6.0, "symbol": "ACT/USDT:USDT", "currency": "USDT", - "minNotional": 2000000.0, - "maxNotional": 4000000.0, + "minNotional": 4000000.0, + "maxNotional": 8000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "4000000", - "notionalFloor": "2000000", + "notionalCap": "8000000", + "notionalFloor": "4000000", "maintMarginRatio": "0.1", - "cum": "111250.0" + "cum": "222450.0" } }, { "tier": 7.0, "symbol": "ACT/USDT:USDT", "currency": "USDT", - "minNotional": 4000000.0, - "maxNotional": 5000000.0, + "minNotional": 8000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "5000000", - "notionalFloor": "4000000", + "notionalCap": "10000000", + "notionalFloor": "8000000", "maintMarginRatio": "0.125", - "cum": "211250.0" + "cum": "422450.0" } }, { "tier": 8.0, "symbol": "ACT/USDT:USDT", "currency": "USDT", - "minNotional": 5000000.0, - "maxNotional": 10000000.0, + "minNotional": 10000000.0, + "maxNotional": 20000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "10000000", - "notionalFloor": "5000000", + "notionalCap": "20000000", + "notionalFloor": "10000000", "maintMarginRatio": "0.25", - "cum": "836250.0" + "cum": "1672450.0" } }, { "tier": 9.0, "symbol": "ACT/USDT:USDT", "currency": "USDT", - "minNotional": 10000000.0, - "maxNotional": 20000000.0, + "minNotional": 20000000.0, + "maxNotional": 40000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "20000000", - "notionalFloor": "10000000", + "notionalCap": "40000000", + "notionalFloor": "20000000", "maintMarginRatio": "0.5", - "cum": "3336250.0" + "cum": "6672450.0" + } + } + ], + "ACX/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "ACX/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "10000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "ACX/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 20000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "20000", + "notionalFloor": "10000", + "maintMarginRatio": "0.015", + "cum": "50.0" + } + }, + { + "tier": 3.0, + "symbol": "ACX/USDT:USDT", + "currency": "USDT", + "minNotional": 20000.0, + "maxNotional": 100000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "100000", + "notionalFloor": "20000", + "maintMarginRatio": "0.02", + "cum": "150.0" + } + }, + { + "tier": 4.0, + "symbol": "ACX/USDT:USDT", + "currency": "USDT", + "minNotional": 100000.0, + "maxNotional": 200000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "200000", + "notionalFloor": "100000", + "maintMarginRatio": "0.025", + "cum": "650.0" + } + }, + { + "tier": 5.0, + "symbol": "ACX/USDT:USDT", + "currency": "USDT", + "minNotional": 200000.0, + "maxNotional": 1000000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "1000000", + "notionalFloor": "200000", + "maintMarginRatio": "0.05", + "cum": "5650.0" + } + }, + { + "tier": 6.0, + "symbol": "ACX/USDT:USDT", + "currency": "USDT", + "minNotional": 1000000.0, + "maxNotional": 2000000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "2000000", + "notionalFloor": "1000000", + "maintMarginRatio": "0.1", + "cum": "55650.0" + } + }, + { + "tier": 7.0, + "symbol": "ACX/USDT:USDT", + "currency": "USDT", + "minNotional": 2000000.0, + "maxNotional": 2500000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "2500000", + "notionalFloor": "2000000", + "maintMarginRatio": "0.125", + "cum": "105650.0" + } + }, + { + "tier": 8.0, + "symbol": "ACX/USDT:USDT", + "currency": "USDT", + "minNotional": 2500000.0, + "maxNotional": 5000000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "5000000", + "notionalFloor": "2500000", + "maintMarginRatio": "0.25", + "cum": "418150.0" + } + }, + { + "tier": 9.0, + "symbol": "ACX/USDT:USDT", + "currency": "USDT", + "minNotional": 5000000.0, + "maxNotional": 10000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "10000000", + "notionalFloor": "5000000", + "maintMarginRatio": "0.5", + "cum": "1668150.0" } } ], @@ -3668,6 +3823,161 @@ } } ], + "AERO/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "AERO/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "AERO/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "AERO/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "AERO/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "AERO/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "AERO/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "AERO/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "AERO/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "AERO/USDT:USDT", + "currency": "USDT", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "AEVO/USDT:USDT": [ { "tier": 1.0, @@ -4347,15 +4657,15 @@ "symbol": "ALGO/USDT:USDT", "currency": "USDT", "minNotional": 0.0, - "maxNotional": 5000.0, - "maintenanceMarginRate": 0.015, - "maxLeverage": 50.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, "info": { "bracket": "1", - "initialLeverage": "50", - "notionalCap": "5000", + "initialLeverage": "75", + "notionalCap": "10000", "notionalFloor": "0", - "maintMarginRatio": "0.015", + "maintMarginRatio": "0.01", "cum": "0.0" } }, @@ -4363,102 +4673,136 @@ "tier": 2.0, "symbol": "ALGO/USDT:USDT", "currency": "USDT", - "minNotional": 5000.0, - "maxNotional": 25000.0, + "minNotional": 10000.0, + "maxNotional": 40000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "40000", + "notionalFloor": "10000", + "maintMarginRatio": "0.015", + "cum": "50.0" + } + }, + { + "tier": 3.0, + "symbol": "ALGO/USDT:USDT", + "currency": "USDT", + "minNotional": 40000.0, + "maxNotional": 200000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "200000", + "notionalFloor": "40000", + "maintMarginRatio": "0.02", + "cum": "250.0" + } + }, + { + "tier": 4.0, + "symbol": "ALGO/USDT:USDT", + "currency": "USDT", + "minNotional": 200000.0, + "maxNotional": 400000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { - "bracket": "2", + "bracket": "4", "initialLeverage": "20", - "notionalCap": "25000", - "notionalFloor": "5000", + "notionalCap": "400000", + "notionalFloor": "200000", "maintMarginRatio": "0.025", - "cum": "50.0" + "cum": "1250.0" } }, { - "tier": 3.0, + "tier": 5.0, "symbol": "ALGO/USDT:USDT", "currency": "USDT", - "minNotional": 25000.0, - "maxNotional": 100000.0, + "minNotional": 400000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { - "bracket": "3", + "bracket": "5", "initialLeverage": "10", - "notionalCap": "100000", - "notionalFloor": "25000", + "notionalCap": "2000000", + "notionalFloor": "400000", "maintMarginRatio": "0.05", - "cum": "675.0" + "cum": "11250.0" } }, { - "tier": 4.0, + "tier": 6.0, "symbol": "ALGO/USDT:USDT", "currency": "USDT", - "minNotional": 100000.0, - "maxNotional": 250000.0, + "minNotional": 2000000.0, + "maxNotional": 4000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { - "bracket": "4", + "bracket": "6", "initialLeverage": "5", - "notionalCap": "250000", - "notionalFloor": "100000", + "notionalCap": "4000000", + "notionalFloor": "2000000", "maintMarginRatio": "0.1", - "cum": "5675.0" + "cum": "111250.0" } }, { - "tier": 5.0, + "tier": 7.0, "symbol": "ALGO/USDT:USDT", "currency": "USDT", - "minNotional": 250000.0, - "maxNotional": 1000000.0, + "minNotional": 4000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { - "bracket": "5", + "bracket": "7", "initialLeverage": "4", - "notionalCap": "1000000", - "notionalFloor": "250000", + "notionalCap": "5000000", + "notionalFloor": "4000000", "maintMarginRatio": "0.125", - "cum": "11925.0" + "cum": "211250.0" } }, { - "tier": 6.0, + "tier": 8.0, "symbol": "ALGO/USDT:USDT", "currency": "USDT", - "minNotional": 1000000.0, - "maxNotional": 2000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { - "bracket": "6", + "bracket": "8", "initialLeverage": "2", - "notionalCap": "2000000", - "notionalFloor": "1000000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.25", - "cum": "136925.0" + "cum": "836250.0" } }, { - "tier": 7.0, + "tier": 9.0, "symbol": "ALGO/USDT:USDT", "currency": "USDT", - "minNotional": 2000000.0, - "maxNotional": 5000000.0, + "minNotional": 10000000.0, + "maxNotional": 20000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { - "bracket": "7", + "bracket": "9", "initialLeverage": "1", - "notionalCap": "5000000", - "notionalFloor": "2000000", + "notionalCap": "20000000", + "notionalFloor": "10000000", "maintMarginRatio": "0.5", - "cum": "636925.0" + "cum": "3336250.0" } } ], @@ -6088,13 +6432,13 @@ "symbol": "ARB/USDT:USDT", "currency": "USDT", "minNotional": 50000.0, - "maxNotional": 80000.0, + "maxNotional": 100000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 40.0, "info": { "bracket": "3", "initialLeverage": "40", - "notionalCap": "80000", + "notionalCap": "100000", "notionalFloor": "50000", "maintMarginRatio": "0.015", "cum": "270.0" @@ -6104,119 +6448,119 @@ "tier": 4.0, "symbol": "ARB/USDT:USDT", "currency": "USDT", - "minNotional": 80000.0, - "maxNotional": 300000.0, + "minNotional": 100000.0, + "maxNotional": 500000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "4", "initialLeverage": "25", - "notionalCap": "300000", - "notionalFloor": "80000", + "notionalCap": "500000", + "notionalFloor": "100000", "maintMarginRatio": "0.02", - "cum": "670.0" + "cum": "770.0" } }, { "tier": 5.0, "symbol": "ARB/USDT:USDT", "currency": "USDT", - "minNotional": 300000.0, - "maxNotional": 600000.0, + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "5", "initialLeverage": "20", - "notionalCap": "600000", - "notionalFloor": "300000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.025", - "cum": "2170.0" + "cum": "3270.0" } }, { "tier": 6.0, "symbol": "ARB/USDT:USDT", "currency": "USDT", - "minNotional": 600000.0, - "maxNotional": 3000000.0, + "minNotional": 1000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "6", "initialLeverage": "10", - "notionalCap": "3000000", - "notionalFloor": "600000", + "notionalCap": "5000000", + "notionalFloor": "1000000", "maintMarginRatio": "0.05", - "cum": "17170.0" + "cum": "28270.0" } }, { "tier": 7.0, "symbol": "ARB/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 6000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "7", "initialLeverage": "5", - "notionalCap": "6000000", - "notionalFloor": "3000000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.1", - "cum": "167170.0" + "cum": "278270.0" } }, { "tier": 8.0, "symbol": "ARB/USDT:USDT", "currency": "USDT", - "minNotional": 6000000.0, - "maxNotional": 7500000.0, + "minNotional": 10000000.0, + "maxNotional": 12500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "8", "initialLeverage": "4", - "notionalCap": "7500000", - "notionalFloor": "6000000", + "notionalCap": "12500000", + "notionalFloor": "10000000", "maintMarginRatio": "0.125", - "cum": "317170.0" + "cum": "528270.0" } }, { "tier": 9.0, "symbol": "ARB/USDT:USDT", "currency": "USDT", - "minNotional": 7500000.0, - "maxNotional": 15000000.0, + "minNotional": 12500000.0, + "maxNotional": 25000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "9", "initialLeverage": "2", - "notionalCap": "15000000", - "notionalFloor": "7500000", + "notionalCap": "25000000", + "notionalFloor": "12500000", "maintMarginRatio": "0.25", - "cum": "1254670.0" + "cum": "2090770.0" } }, { "tier": 10.0, "symbol": "ARB/USDT:USDT", "currency": "USDT", - "minNotional": 15000000.0, - "maxNotional": 30000000.0, + "minNotional": 25000000.0, + "maxNotional": 50000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "10", "initialLeverage": "1", - "notionalCap": "30000000", - "notionalFloor": "15000000", + "notionalCap": "50000000", + "notionalFloor": "25000000", "maintMarginRatio": "0.5", - "cum": "5004670.0" + "cum": "8340770.0" } } ], @@ -7381,13 +7725,13 @@ "symbol": "AVAX/USDT:USDT", "currency": "USDT", "minNotional": 0.0, - "maxNotional": 5000.0, + "maxNotional": 25000.0, "maintenanceMarginRate": 0.005, "maxLeverage": 75.0, "info": { "bracket": "1", "initialLeverage": "75", - "notionalCap": "5000", + "notionalCap": "25000", "notionalFloor": "0", "maintMarginRatio": "0.005", "cum": "0.0" @@ -7397,153 +7741,153 @@ "tier": 2.0, "symbol": "AVAX/USDT:USDT", "currency": "USDT", - "minNotional": 5000.0, - "maxNotional": 25000.0, - "maintenanceMarginRate": 0.0065, + "minNotional": 25000.0, + "maxNotional": 80000.0, + "maintenanceMarginRate": 0.01, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "25000", - "notionalFloor": "5000", - "maintMarginRatio": "0.0065", - "cum": "7.5" + "notionalCap": "80000", + "notionalFloor": "25000", + "maintMarginRatio": "0.01", + "cum": "125.0" } }, { "tier": 3.0, "symbol": "AVAX/USDT:USDT", "currency": "USDT", - "minNotional": 25000.0, - "maxNotional": 80000.0, - "maintenanceMarginRate": 0.01, + "minNotional": 80000.0, + "maxNotional": 160000.0, + "maintenanceMarginRate": 0.015, "maxLeverage": 40.0, "info": { "bracket": "3", "initialLeverage": "40", - "notionalCap": "80000", - "notionalFloor": "25000", - "maintMarginRatio": "0.01", - "cum": "95.0" + "notionalCap": "160000", + "notionalFloor": "80000", + "maintMarginRatio": "0.015", + "cum": "525.0" } }, { "tier": 4.0, "symbol": "AVAX/USDT:USDT", "currency": "USDT", - "minNotional": 80000.0, - "maxNotional": 400000.0, + "minNotional": 160000.0, + "maxNotional": 800000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "4", "initialLeverage": "25", - "notionalCap": "400000", - "notionalFloor": "80000", + "notionalCap": "800000", + "notionalFloor": "160000", "maintMarginRatio": "0.02", - "cum": "895.0" + "cum": "1325.0" } }, { "tier": 5.0, "symbol": "AVAX/USDT:USDT", "currency": "USDT", - "minNotional": 400000.0, - "maxNotional": 800000.0, + "minNotional": 800000.0, + "maxNotional": 1600000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "5", "initialLeverage": "20", - "notionalCap": "800000", - "notionalFloor": "400000", + "notionalCap": "1600000", + "notionalFloor": "800000", "maintMarginRatio": "0.025", - "cum": "2895.0" + "cum": "5325.0" } }, { "tier": 6.0, "symbol": "AVAX/USDT:USDT", "currency": "USDT", - "minNotional": 800000.0, - "maxNotional": 4000000.0, + "minNotional": 1600000.0, + "maxNotional": 8000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "6", "initialLeverage": "10", - "notionalCap": "4000000", - "notionalFloor": "800000", + "notionalCap": "8000000", + "notionalFloor": "1600000", "maintMarginRatio": "0.05", - "cum": "22895.0" + "cum": "45325.0" } }, { "tier": 7.0, "symbol": "AVAX/USDT:USDT", "currency": "USDT", - "minNotional": 4000000.0, - "maxNotional": 8000000.0, + "minNotional": 8000000.0, + "maxNotional": 16000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "7", "initialLeverage": "5", - "notionalCap": "8000000", - "notionalFloor": "4000000", + "notionalCap": "16000000", + "notionalFloor": "8000000", "maintMarginRatio": "0.1", - "cum": "222895.0" + "cum": "445325.0" } }, { "tier": 8.0, "symbol": "AVAX/USDT:USDT", "currency": "USDT", - "minNotional": 8000000.0, - "maxNotional": 10000000.0, + "minNotional": 16000000.0, + "maxNotional": 20000000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "8", "initialLeverage": "4", - "notionalCap": "10000000", - "notionalFloor": "8000000", + "notionalCap": "20000000", + "notionalFloor": "16000000", "maintMarginRatio": "0.125", - "cum": "422895.0" + "cum": "845325.0" } }, { "tier": 9.0, "symbol": "AVAX/USDT:USDT", "currency": "USDT", - "minNotional": 10000000.0, - "maxNotional": 20000000.0, + "minNotional": 20000000.0, + "maxNotional": 40000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "9", "initialLeverage": "2", - "notionalCap": "20000000", - "notionalFloor": "10000000", + "notionalCap": "40000000", + "notionalFloor": "20000000", "maintMarginRatio": "0.25", - "cum": "1672895.0" + "cum": "3345325.0" } }, { "tier": 10.0, "symbol": "AVAX/USDT:USDT", "currency": "USDT", - "minNotional": 20000000.0, - "maxNotional": 50000000.0, + "minNotional": 40000000.0, + "maxNotional": 80000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "10", "initialLeverage": "1", - "notionalCap": "50000000", - "notionalFloor": "20000000", + "notionalCap": "80000000", + "notionalFloor": "40000000", "maintMarginRatio": "0.5", - "cum": "6672895.0" + "cum": "13345325.0" } } ], @@ -8226,13 +8570,13 @@ "symbol": "BAN/USDT:USDT", "currency": "USDT", "minNotional": 0.0, - "maxNotional": 5000.0, + "maxNotional": 10000.0, "maintenanceMarginRate": 0.01, "maxLeverage": 75.0, "info": { "bracket": "1", "initialLeverage": "75", - "notionalCap": "5000", + "notionalCap": "10000", "notionalFloor": "0", "maintMarginRatio": "0.01", "cum": "0.0" @@ -8242,136 +8586,136 @@ "tier": 2.0, "symbol": "BAN/USDT:USDT", "currency": "USDT", - "minNotional": 5000.0, - "maxNotional": 10000.0, + "minNotional": 10000.0, + "maxNotional": 30000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "10000", - "notionalFloor": "5000", + "notionalCap": "30000", + "notionalFloor": "10000", "maintMarginRatio": "0.015", - "cum": "25.0" + "cum": "50.0" } }, { "tier": 3.0, "symbol": "BAN/USDT:USDT", "currency": "USDT", - "minNotional": 10000.0, - "maxNotional": 30000.0, + "minNotional": 30000.0, + "maxNotional": 150000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "30000", - "notionalFloor": "10000", + "notionalCap": "150000", + "notionalFloor": "30000", "maintMarginRatio": "0.02", - "cum": "75.0" + "cum": "200.0" } }, { "tier": 4.0, "symbol": "BAN/USDT:USDT", "currency": "USDT", - "minNotional": 30000.0, - "maxNotional": 60000.0, + "minNotional": 150000.0, + "maxNotional": 300000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "60000", - "notionalFloor": "30000", + "notionalCap": "300000", + "notionalFloor": "150000", "maintMarginRatio": "0.025", - "cum": "225.0" + "cum": "950.0" } }, { "tier": 5.0, "symbol": "BAN/USDT:USDT", "currency": "USDT", - "minNotional": 60000.0, - "maxNotional": 300000.0, + "minNotional": 300000.0, + "maxNotional": 1500000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "300000", - "notionalFloor": "60000", + "notionalCap": "1500000", + "notionalFloor": "300000", "maintMarginRatio": "0.05", - "cum": "1725.0" + "cum": "8450.0" } }, { "tier": 6.0, "symbol": "BAN/USDT:USDT", "currency": "USDT", - "minNotional": 300000.0, - "maxNotional": 600000.0, + "minNotional": 1500000.0, + "maxNotional": 3000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "600000", - "notionalFloor": "300000", + "notionalCap": "3000000", + "notionalFloor": "1500000", "maintMarginRatio": "0.1", - "cum": "16725.0" + "cum": "83450.0" } }, { "tier": 7.0, "symbol": "BAN/USDT:USDT", "currency": "USDT", - "minNotional": 600000.0, - "maxNotional": 750000.0, + "minNotional": 3000000.0, + "maxNotional": 3750000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "750000", - "notionalFloor": "600000", + "notionalCap": "3750000", + "notionalFloor": "3000000", "maintMarginRatio": "0.125", - "cum": "31725.0" + "cum": "158450.0" } }, { "tier": 8.0, "symbol": "BAN/USDT:USDT", "currency": "USDT", - "minNotional": 750000.0, - "maxNotional": 1500000.0, + "minNotional": 3750000.0, + "maxNotional": 7500000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "1500000", - "notionalFloor": "750000", + "notionalCap": "7500000", + "notionalFloor": "3750000", "maintMarginRatio": "0.25", - "cum": "125475.0" + "cum": "627200.0" } }, { "tier": 9.0, "symbol": "BAN/USDT:USDT", "currency": "USDT", - "minNotional": 1500000.0, - "maxNotional": 3000000.0, + "minNotional": 7500000.0, + "maxNotional": 15000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "3000000", - "notionalFloor": "1500000", + "notionalCap": "15000000", + "notionalFloor": "7500000", "maintMarginRatio": "0.5", - "cum": "500475.0" + "cum": "2502200.0" } } ], @@ -10020,10 +10364,10 @@ "minNotional": 0.0, "maxNotional": 25000.0, "maintenanceMarginRate": 0.025, - "maxLeverage": 20.0, + "maxLeverage": 10.0, "info": { "bracket": "1", - "initialLeverage": "20", + "initialLeverage": "10", "notionalCap": "25000", "notionalFloor": "0", "maintMarginRatio": "0.025", @@ -10037,10 +10381,10 @@ "minNotional": 25000.0, "maxNotional": 100000.0, "maintenanceMarginRate": 0.05, - "maxLeverage": 10.0, + "maxLeverage": 6.0, "info": { "bracket": "2", - "initialLeverage": "10", + "initialLeverage": "6", "notionalCap": "100000", "notionalFloor": "25000", "maintMarginRatio": "0.05", @@ -10086,13 +10430,13 @@ "symbol": "BLZ/USDT:USDT", "currency": "USDT", "minNotional": 1000000.0, - "maxNotional": 1500000.0, + "maxNotional": 1300000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "5", "initialLeverage": "2", - "notionalCap": "1500000", + "notionalCap": "1300000", "notionalFloor": "1000000", "maintMarginRatio": "0.25", "cum": "136875.0" @@ -10102,17 +10446,17 @@ "tier": 6.0, "symbol": "BLZ/USDT:USDT", "currency": "USDT", - "minNotional": 1500000.0, - "maxNotional": 3000000.0, + "minNotional": 1300000.0, + "maxNotional": 1500000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "6", "initialLeverage": "1", - "notionalCap": "3000000", - "notionalFloor": "1500000", + "notionalCap": "1500000", + "notionalFloor": "1300000", "maintMarginRatio": "0.5", - "cum": "511875.0" + "cum": "461875.0" } } ], @@ -11037,10 +11381,10 @@ "minNotional": 0.0, "maxNotional": 5000.0, "maintenanceMarginRate": 0.015, - "maxLeverage": 21.0, + "maxLeverage": 10.0, "info": { "bracket": "1", - "initialLeverage": "21", + "initialLeverage": "10", "notionalCap": "5000", "notionalFloor": "0", "maintMarginRatio": "0.015", @@ -11054,10 +11398,10 @@ "minNotional": 5000.0, "maxNotional": 10000.0, "maintenanceMarginRate": 0.025, - "maxLeverage": 20.0, + "maxLeverage": 8.0, "info": { "bracket": "2", - "initialLeverage": "20", + "initialLeverage": "8", "notionalCap": "10000", "notionalFloor": "5000", "maintMarginRatio": "0.025", @@ -11071,10 +11415,10 @@ "minNotional": 10000.0, "maxNotional": 100000.0, "maintenanceMarginRate": 0.05, - "maxLeverage": 10.0, + "maxLeverage": 6.0, "info": { "bracket": "3", - "initialLeverage": "10", + "initialLeverage": "6", "notionalCap": "100000", "notionalFloor": "10000", "maintMarginRatio": "0.05", @@ -11156,13 +11500,13 @@ "symbol": "BRETT/USDT:USDT", "currency": "USDT", "minNotional": 0.0, - "maxNotional": 5000.0, + "maxNotional": 10000.0, "maintenanceMarginRate": 0.01, "maxLeverage": 75.0, "info": { "bracket": "1", "initialLeverage": "75", - "notionalCap": "5000", + "notionalCap": "10000", "notionalFloor": "0", "maintMarginRatio": "0.01", "cum": "0.0" @@ -11172,136 +11516,136 @@ "tier": 2.0, "symbol": "BRETT/USDT:USDT", "currency": "USDT", - "minNotional": 5000.0, - "maxNotional": 10000.0, + "minNotional": 10000.0, + "maxNotional": 20000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "10000", - "notionalFloor": "5000", + "notionalCap": "20000", + "notionalFloor": "10000", "maintMarginRatio": "0.015", - "cum": "25.0" + "cum": "50.0" } }, { "tier": 3.0, "symbol": "BRETT/USDT:USDT", "currency": "USDT", - "minNotional": 10000.0, - "maxNotional": 30000.0, + "minNotional": 20000.0, + "maxNotional": 100000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "30000", - "notionalFloor": "10000", + "notionalCap": "100000", + "notionalFloor": "20000", "maintMarginRatio": "0.02", - "cum": "75.0" + "cum": "150.0" } }, { "tier": 4.0, "symbol": "BRETT/USDT:USDT", "currency": "USDT", - "minNotional": 30000.0, - "maxNotional": 60000.0, + "minNotional": 100000.0, + "maxNotional": 200000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "60000", - "notionalFloor": "30000", + "notionalCap": "200000", + "notionalFloor": "100000", "maintMarginRatio": "0.025", - "cum": "225.0" + "cum": "650.0" } }, { "tier": 5.0, "symbol": "BRETT/USDT:USDT", "currency": "USDT", - "minNotional": 60000.0, - "maxNotional": 300000.0, + "minNotional": 200000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "300000", - "notionalFloor": "60000", + "notionalCap": "1000000", + "notionalFloor": "200000", "maintMarginRatio": "0.05", - "cum": "1725.0" + "cum": "5650.0" } }, { "tier": 6.0, "symbol": "BRETT/USDT:USDT", "currency": "USDT", - "minNotional": 300000.0, - "maxNotional": 600000.0, + "minNotional": 1000000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "600000", - "notionalFloor": "300000", + "notionalCap": "2000000", + "notionalFloor": "1000000", "maintMarginRatio": "0.1", - "cum": "16725.0" + "cum": "55650.0" } }, { "tier": 7.0, "symbol": "BRETT/USDT:USDT", "currency": "USDT", - "minNotional": 600000.0, - "maxNotional": 750000.0, + "minNotional": 2000000.0, + "maxNotional": 2500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "750000", - "notionalFloor": "600000", + "notionalCap": "2500000", + "notionalFloor": "2000000", "maintMarginRatio": "0.125", - "cum": "31725.0" + "cum": "105650.0" } }, { "tier": 8.0, "symbol": "BRETT/USDT:USDT", "currency": "USDT", - "minNotional": 750000.0, - "maxNotional": 1500000.0, + "minNotional": 2500000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "1500000", - "notionalFloor": "750000", + "notionalCap": "5000000", + "notionalFloor": "2500000", "maintMarginRatio": "0.25", - "cum": "125475.0" + "cum": "418150.0" } }, { "tier": 9.0, "symbol": "BRETT/USDT:USDT", "currency": "USDT", - "minNotional": 1500000.0, - "maxNotional": 3000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "3000000", - "notionalFloor": "1500000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.5", - "cum": "500475.0" + "cum": "1668150.0" } } ], @@ -13621,13 +13965,13 @@ "symbol": "CHILLGUY/USDT:USDT", "currency": "USDT", "minNotional": 0.0, - "maxNotional": 5000.0, + "maxNotional": 10000.0, "maintenanceMarginRate": 0.01, "maxLeverage": 75.0, "info": { "bracket": "1", "initialLeverage": "75", - "notionalCap": "5000", + "notionalCap": "10000", "notionalFloor": "0", "maintMarginRatio": "0.01", "cum": "0.0" @@ -13637,136 +13981,136 @@ "tier": 2.0, "symbol": "CHILLGUY/USDT:USDT", "currency": "USDT", - "minNotional": 5000.0, - "maxNotional": 10000.0, + "minNotional": 10000.0, + "maxNotional": 20000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "10000", - "notionalFloor": "5000", + "notionalCap": "20000", + "notionalFloor": "10000", "maintMarginRatio": "0.015", - "cum": "25.0" + "cum": "50.0" } }, { "tier": 3.0, "symbol": "CHILLGUY/USDT:USDT", "currency": "USDT", - "minNotional": 10000.0, - "maxNotional": 30000.0, + "minNotional": 20000.0, + "maxNotional": 100000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "30000", - "notionalFloor": "10000", + "notionalCap": "100000", + "notionalFloor": "20000", "maintMarginRatio": "0.02", - "cum": "75.0" + "cum": "150.0" } }, { "tier": 4.0, "symbol": "CHILLGUY/USDT:USDT", "currency": "USDT", - "minNotional": 30000.0, - "maxNotional": 60000.0, + "minNotional": 100000.0, + "maxNotional": 200000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "60000", - "notionalFloor": "30000", + "notionalCap": "200000", + "notionalFloor": "100000", "maintMarginRatio": "0.025", - "cum": "225.0" + "cum": "650.0" } }, { "tier": 5.0, "symbol": "CHILLGUY/USDT:USDT", "currency": "USDT", - "minNotional": 60000.0, - "maxNotional": 300000.0, + "minNotional": 200000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "300000", - "notionalFloor": "60000", + "notionalCap": "1000000", + "notionalFloor": "200000", "maintMarginRatio": "0.05", - "cum": "1725.0" + "cum": "5650.0" } }, { "tier": 6.0, "symbol": "CHILLGUY/USDT:USDT", "currency": "USDT", - "minNotional": 300000.0, - "maxNotional": 600000.0, + "minNotional": 1000000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "600000", - "notionalFloor": "300000", + "notionalCap": "2000000", + "notionalFloor": "1000000", "maintMarginRatio": "0.1", - "cum": "16725.0" + "cum": "55650.0" } }, { "tier": 7.0, "symbol": "CHILLGUY/USDT:USDT", "currency": "USDT", - "minNotional": 600000.0, - "maxNotional": 750000.0, + "minNotional": 2000000.0, + "maxNotional": 2500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "750000", - "notionalFloor": "600000", + "notionalCap": "2500000", + "notionalFloor": "2000000", "maintMarginRatio": "0.125", - "cum": "31725.0" + "cum": "105650.0" } }, { "tier": 8.0, "symbol": "CHILLGUY/USDT:USDT", "currency": "USDT", - "minNotional": 750000.0, - "maxNotional": 1500000.0, + "minNotional": 2500000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "1500000", - "notionalFloor": "750000", + "notionalCap": "5000000", + "notionalFloor": "2500000", "maintMarginRatio": "0.25", - "cum": "125475.0" + "cum": "418150.0" } }, { "tier": 9.0, "symbol": "CHILLGUY/USDT:USDT", "currency": "USDT", - "minNotional": 1500000.0, - "maxNotional": 3000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "3000000", - "notionalFloor": "1500000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.5", - "cum": "500475.0" + "cum": "1668150.0" } } ], @@ -13777,14 +14121,14 @@ "currency": "USDT", "minNotional": 0.0, "maxNotional": 5000.0, - "maintenanceMarginRate": 0.02, - "maxLeverage": 25.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, "info": { "bracket": "1", - "initialLeverage": "25", + "initialLeverage": "75", "notionalCap": "5000", "notionalFloor": "0", - "maintMarginRatio": "0.02", + "maintMarginRatio": "0.01", "cum": "0.0" } }, @@ -13793,15 +14137,15 @@ "symbol": "CHR/USDT:USDT", "currency": "USDT", "minNotional": 5000.0, - "maxNotional": 25000.0, - "maintenanceMarginRate": 0.025, - "maxLeverage": 20.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, "info": { "bracket": "2", - "initialLeverage": "20", - "notionalCap": "25000", + "initialLeverage": "50", + "notionalCap": "10000", "notionalFloor": "5000", - "maintMarginRatio": "0.025", + "maintMarginRatio": "0.015", "cum": "25.0" } }, @@ -13809,68 +14153,119 @@ "tier": 3.0, "symbol": "CHR/USDT:USDT", "currency": "USDT", - "minNotional": 25000.0, - "maxNotional": 200000.0, + "minNotional": 10000.0, + "maxNotional": 50000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "50000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "CHR/USDT:USDT", + "currency": "USDT", + "minNotional": 50000.0, + "maxNotional": 100000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "100000", + "notionalFloor": "50000", + "maintMarginRatio": "0.025", + "cum": "325.0" + } + }, + { + "tier": 5.0, + "symbol": "CHR/USDT:USDT", + "currency": "USDT", + "minNotional": 100000.0, + "maxNotional": 500000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { - "bracket": "3", + "bracket": "5", "initialLeverage": "10", - "notionalCap": "200000", - "notionalFloor": "25000", + "notionalCap": "500000", + "notionalFloor": "100000", "maintMarginRatio": "0.05", - "cum": "650.0" + "cum": "2825.0" } }, { - "tier": 4.0, + "tier": 6.0, "symbol": "CHR/USDT:USDT", "currency": "USDT", - "minNotional": 200000.0, - "maxNotional": 500000.0, + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { - "bracket": "4", + "bracket": "6", "initialLeverage": "5", - "notionalCap": "500000", - "notionalFloor": "200000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.1", - "cum": "10650.0" + "cum": "27825.0" } }, { - "tier": 5.0, + "tier": 7.0, "symbol": "CHR/USDT:USDT", "currency": "USDT", - "minNotional": 500000.0, - "maxNotional": 1000000.0, + "minNotional": 1000000.0, + "maxNotional": 1250000.0, "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "1250000", + "notionalFloor": "1000000", + "maintMarginRatio": "0.125", + "cum": "52825.0" + } + }, + { + "tier": 8.0, + "symbol": "CHR/USDT:USDT", + "currency": "USDT", + "minNotional": 1250000.0, + "maxNotional": 2500000.0, + "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { - "bracket": "5", + "bracket": "8", "initialLeverage": "2", - "notionalCap": "1000000", - "notionalFloor": "500000", - "maintMarginRatio": "0.125", - "cum": "23150.0" + "notionalCap": "2500000", + "notionalFloor": "1250000", + "maintMarginRatio": "0.25", + "cum": "209075.0" } }, { - "tier": 6.0, + "tier": 9.0, "symbol": "CHR/USDT:USDT", "currency": "USDT", - "minNotional": 1000000.0, + "minNotional": 2500000.0, "maxNotional": 5000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { - "bracket": "6", + "bracket": "9", "initialLeverage": "1", "notionalCap": "5000000", - "notionalFloor": "1000000", + "notionalFloor": "2500000", "maintMarginRatio": "0.5", - "cum": "398150.0" + "cum": "834075.0" } } ], @@ -15069,118 +15464,135 @@ "symbol": "CRV/USDT:USDT", "currency": "USDT", "minNotional": 50000.0, - "maxNotional": 200000.0, + "maxNotional": 80000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 40.0, + "info": { + "bracket": "3", + "initialLeverage": "40", + "notionalCap": "80000", + "notionalFloor": "50000", + "maintMarginRatio": "0.015", + "cum": "285.0" + } + }, + { + "tier": 4.0, + "symbol": "CRV/USDT:USDT", + "currency": "USDT", + "minNotional": 80000.0, + "maxNotional": 300000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { - "bracket": "3", + "bracket": "4", "initialLeverage": "25", - "notionalCap": "200000", - "notionalFloor": "50000", + "notionalCap": "300000", + "notionalFloor": "80000", "maintMarginRatio": "0.02", - "cum": "535.0" + "cum": "685.0" } }, { - "tier": 4.0, + "tier": 5.0, "symbol": "CRV/USDT:USDT", "currency": "USDT", - "minNotional": 200000.0, - "maxNotional": 400000.0, + "minNotional": 300000.0, + "maxNotional": 600000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { - "bracket": "4", + "bracket": "5", "initialLeverage": "20", - "notionalCap": "400000", - "notionalFloor": "200000", + "notionalCap": "600000", + "notionalFloor": "300000", "maintMarginRatio": "0.025", - "cum": "1535.0" + "cum": "2185.0" } }, { - "tier": 5.0, + "tier": 6.0, "symbol": "CRV/USDT:USDT", "currency": "USDT", - "minNotional": 400000.0, - "maxNotional": 2000000.0, + "minNotional": 600000.0, + "maxNotional": 3000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { - "bracket": "5", + "bracket": "6", "initialLeverage": "10", - "notionalCap": "2000000", - "notionalFloor": "400000", + "notionalCap": "3000000", + "notionalFloor": "600000", "maintMarginRatio": "0.05", - "cum": "11535.0" + "cum": "17185.0" } }, { - "tier": 6.0, + "tier": 7.0, "symbol": "CRV/USDT:USDT", "currency": "USDT", - "minNotional": 2000000.0, - "maxNotional": 4000000.0, + "minNotional": 3000000.0, + "maxNotional": 6000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { - "bracket": "6", + "bracket": "7", "initialLeverage": "5", - "notionalCap": "4000000", - "notionalFloor": "2000000", + "notionalCap": "6000000", + "notionalFloor": "3000000", "maintMarginRatio": "0.1", - "cum": "111535.0" + "cum": "167185.0" } }, { - "tier": 7.0, + "tier": 8.0, "symbol": "CRV/USDT:USDT", "currency": "USDT", - "minNotional": 4000000.0, - "maxNotional": 5000000.0, + "minNotional": 6000000.0, + "maxNotional": 7500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { - "bracket": "7", + "bracket": "8", "initialLeverage": "4", - "notionalCap": "5000000", - "notionalFloor": "4000000", + "notionalCap": "7500000", + "notionalFloor": "6000000", "maintMarginRatio": "0.125", - "cum": "211535.0" + "cum": "317185.0" } }, { - "tier": 8.0, + "tier": 9.0, "symbol": "CRV/USDT:USDT", "currency": "USDT", - "minNotional": 5000000.0, - "maxNotional": 10000000.0, + "minNotional": 7500000.0, + "maxNotional": 15000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { - "bracket": "8", + "bracket": "9", "initialLeverage": "2", - "notionalCap": "10000000", - "notionalFloor": "5000000", + "notionalCap": "15000000", + "notionalFloor": "7500000", "maintMarginRatio": "0.25", - "cum": "836535.0" + "cum": "1254685.0" } }, { - "tier": 9.0, + "tier": 10.0, "symbol": "CRV/USDT:USDT", "currency": "USDT", - "minNotional": 10000000.0, - "maxNotional": 20000000.0, + "minNotional": 15000000.0, + "maxNotional": 30000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { - "bracket": "9", + "bracket": "10", "initialLeverage": "1", - "notionalCap": "20000000", - "notionalFloor": "10000000", + "notionalCap": "30000000", + "notionalFloor": "15000000", "maintMarginRatio": "0.5", - "cum": "3336535.0" + "cum": "5004685.0" } } ], @@ -15900,14 +16312,14 @@ "currency": "USDT", "minNotional": 0.0, "maxNotional": 5000.0, - "maintenanceMarginRate": 0.015, - "maxLeverage": 50.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, "info": { "bracket": "1", - "initialLeverage": "50", + "initialLeverage": "75", "notionalCap": "5000", "notionalFloor": "0", - "maintMarginRatio": "0.015", + "maintMarginRatio": "0.01", "cum": "0.0" } }, @@ -15916,15 +16328,15 @@ "symbol": "DASH/USDT:USDT", "currency": "USDT", "minNotional": 5000.0, - "maxNotional": 20000.0, - "maintenanceMarginRate": 0.02, - "maxLeverage": 25.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, "info": { "bracket": "2", - "initialLeverage": "25", - "notionalCap": "20000", + "initialLeverage": "50", + "notionalCap": "10000", "notionalFloor": "5000", - "maintMarginRatio": "0.02", + "maintMarginRatio": "0.015", "cum": "25.0" } }, @@ -15932,102 +16344,119 @@ "tier": 3.0, "symbol": "DASH/USDT:USDT", "currency": "USDT", - "minNotional": 20000.0, - "maxNotional": 25000.0, + "minNotional": 10000.0, + "maxNotional": 50000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "50000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "DASH/USDT:USDT", + "currency": "USDT", + "minNotional": 50000.0, + "maxNotional": 100000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { - "bracket": "3", + "bracket": "4", "initialLeverage": "20", - "notionalCap": "25000", - "notionalFloor": "20000", + "notionalCap": "100000", + "notionalFloor": "50000", "maintMarginRatio": "0.025", - "cum": "125.0" + "cum": "325.0" } }, { - "tier": 4.0, + "tier": 5.0, "symbol": "DASH/USDT:USDT", "currency": "USDT", - "minNotional": 25000.0, - "maxNotional": 200000.0, + "minNotional": 100000.0, + "maxNotional": 500000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { - "bracket": "4", + "bracket": "5", "initialLeverage": "10", - "notionalCap": "200000", - "notionalFloor": "25000", + "notionalCap": "500000", + "notionalFloor": "100000", "maintMarginRatio": "0.05", - "cum": "750.0" + "cum": "2825.0" } }, { - "tier": 5.0, + "tier": 6.0, "symbol": "DASH/USDT:USDT", "currency": "USDT", - "minNotional": 200000.0, - "maxNotional": 400000.0, + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { - "bracket": "5", + "bracket": "6", "initialLeverage": "5", - "notionalCap": "400000", - "notionalFloor": "200000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.1", - "cum": "10750.0" + "cum": "27825.0" } }, { - "tier": 6.0, + "tier": 7.0, "symbol": "DASH/USDT:USDT", "currency": "USDT", - "minNotional": 400000.0, - "maxNotional": 500000.0, + "minNotional": 1000000.0, + "maxNotional": 1250000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { - "bracket": "6", + "bracket": "7", "initialLeverage": "4", - "notionalCap": "500000", - "notionalFloor": "400000", + "notionalCap": "1250000", + "notionalFloor": "1000000", "maintMarginRatio": "0.125", - "cum": "20750.0" + "cum": "52825.0" } }, { - "tier": 7.0, + "tier": 8.0, "symbol": "DASH/USDT:USDT", "currency": "USDT", - "minNotional": 500000.0, - "maxNotional": 1000000.0, + "minNotional": 1250000.0, + "maxNotional": 2500000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { - "bracket": "7", + "bracket": "8", "initialLeverage": "2", - "notionalCap": "1000000", - "notionalFloor": "500000", + "notionalCap": "2500000", + "notionalFloor": "1250000", "maintMarginRatio": "0.25", - "cum": "83250.0" + "cum": "209075.0" } }, { - "tier": 8.0, + "tier": 9.0, "symbol": "DASH/USDT:USDT", "currency": "USDT", - "minNotional": 1000000.0, - "maxNotional": 2000000.0, + "minNotional": 2500000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { - "bracket": "8", + "bracket": "9", "initialLeverage": "1", - "notionalCap": "2000000", - "notionalFloor": "1000000", + "notionalCap": "5000000", + "notionalFloor": "2500000", "maintMarginRatio": "0.5", - "cum": "333250.0" + "cum": "834075.0" } } ], @@ -20430,13 +20859,13 @@ "symbol": "ETHFI/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, - "maxNotional": 20000.0, + "maxNotional": 40000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "20000", + "notionalCap": "40000", "notionalFloor": "10000", "maintMarginRatio": "0.015", "cum": "50.0" @@ -20446,119 +20875,119 @@ "tier": 3.0, "symbol": "ETHFI/USDT:USDT", "currency": "USDT", - "minNotional": 20000.0, - "maxNotional": 100000.0, + "minNotional": 40000.0, + "maxNotional": 200000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "100000", - "notionalFloor": "20000", + "notionalCap": "200000", + "notionalFloor": "40000", "maintMarginRatio": "0.02", - "cum": "150.0" + "cum": "250.0" } }, { "tier": 4.0, "symbol": "ETHFI/USDT:USDT", "currency": "USDT", - "minNotional": 100000.0, - "maxNotional": 200000.0, + "minNotional": 200000.0, + "maxNotional": 400000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "200000", - "notionalFloor": "100000", + "notionalCap": "400000", + "notionalFloor": "200000", "maintMarginRatio": "0.025", - "cum": "650.0" + "cum": "1250.0" } }, { "tier": 5.0, "symbol": "ETHFI/USDT:USDT", "currency": "USDT", - "minNotional": 200000.0, - "maxNotional": 1000000.0, + "minNotional": 400000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "1000000", - "notionalFloor": "200000", + "notionalCap": "2000000", + "notionalFloor": "400000", "maintMarginRatio": "0.05", - "cum": "5650.0" + "cum": "11250.0" } }, { "tier": 6.0, "symbol": "ETHFI/USDT:USDT", "currency": "USDT", - "minNotional": 1000000.0, - "maxNotional": 2000000.0, + "minNotional": 2000000.0, + "maxNotional": 4000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "2000000", - "notionalFloor": "1000000", + "notionalCap": "4000000", + "notionalFloor": "2000000", "maintMarginRatio": "0.1", - "cum": "55650.0" + "cum": "111250.0" } }, { "tier": 7.0, "symbol": "ETHFI/USDT:USDT", "currency": "USDT", - "minNotional": 2000000.0, - "maxNotional": 2500000.0, + "minNotional": 4000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "2500000", - "notionalFloor": "2000000", + "notionalCap": "5000000", + "notionalFloor": "4000000", "maintMarginRatio": "0.125", - "cum": "105650.0" + "cum": "211250.0" } }, { "tier": 8.0, "symbol": "ETHFI/USDT:USDT", "currency": "USDT", - "minNotional": 2500000.0, - "maxNotional": 5000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "5000000", - "notionalFloor": "2500000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.25", - "cum": "418150.0" + "cum": "836250.0" } }, { "tier": 9.0, "symbol": "ETHFI/USDT:USDT", "currency": "USDT", - "minNotional": 5000000.0, - "maxNotional": 10000000.0, + "minNotional": 10000000.0, + "maxNotional": 20000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "10000000", - "notionalFloor": "5000000", + "notionalCap": "20000000", + "notionalFloor": "10000000", "maintMarginRatio": "0.5", - "cum": "1668150.0" + "cum": "3336250.0" } } ], @@ -20740,13 +21169,13 @@ "symbol": "FET/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, - "maxNotional": 60000.0, + "maxNotional": 100000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "60000", + "notionalCap": "100000", "notionalFloor": "10000", "maintMarginRatio": "0.015", "cum": "50.0" @@ -20756,119 +21185,119 @@ "tier": 3.0, "symbol": "FET/USDT:USDT", "currency": "USDT", - "minNotional": 60000.0, - "maxNotional": 300000.0, + "minNotional": 100000.0, + "maxNotional": 500000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "300000", - "notionalFloor": "60000", + "notionalCap": "500000", + "notionalFloor": "100000", "maintMarginRatio": "0.02", - "cum": "350.0" + "cum": "550.0" } }, { "tier": 4.0, "symbol": "FET/USDT:USDT", "currency": "USDT", - "minNotional": 300000.0, - "maxNotional": 600000.0, + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "600000", - "notionalFloor": "300000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.025", - "cum": "1850.0" + "cum": "3050.0" } }, { "tier": 5.0, "symbol": "FET/USDT:USDT", "currency": "USDT", - "minNotional": 600000.0, - "maxNotional": 3000000.0, + "minNotional": 1000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "3000000", - "notionalFloor": "600000", + "notionalCap": "5000000", + "notionalFloor": "1000000", "maintMarginRatio": "0.05", - "cum": "16850.0" + "cum": "28050.0" } }, { "tier": 6.0, "symbol": "FET/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 6000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "6000000", - "notionalFloor": "3000000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.1", - "cum": "166850.0" + "cum": "278050.0" } }, { "tier": 7.0, "symbol": "FET/USDT:USDT", "currency": "USDT", - "minNotional": 6000000.0, - "maxNotional": 7500000.0, + "minNotional": 10000000.0, + "maxNotional": 12500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "7500000", - "notionalFloor": "6000000", + "notionalCap": "12500000", + "notionalFloor": "10000000", "maintMarginRatio": "0.125", - "cum": "316850.0" + "cum": "528050.0" } }, { "tier": 8.0, "symbol": "FET/USDT:USDT", "currency": "USDT", - "minNotional": 7500000.0, - "maxNotional": 15000000.0, + "minNotional": 12500000.0, + "maxNotional": 25000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "15000000", - "notionalFloor": "7500000", + "notionalCap": "25000000", + "notionalFloor": "12500000", "maintMarginRatio": "0.25", - "cum": "1254350.0" + "cum": "2090550.0" } }, { "tier": 9.0, "symbol": "FET/USDT:USDT", "currency": "USDT", - "minNotional": 15000000.0, - "maxNotional": 30000000.0, + "minNotional": 25000000.0, + "maxNotional": 50000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "30000000", - "notionalFloor": "15000000", + "notionalCap": "50000000", + "notionalFloor": "25000000", "maintMarginRatio": "0.5", - "cum": "5004350.0" + "cum": "8340550.0" } } ], @@ -21256,13 +21685,13 @@ "symbol": "FIL/USDT:USDT", "currency": "USDT", "minNotional": 600000.0, - "maxNotional": 800000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "5", "initialLeverage": "20", - "notionalCap": "800000", + "notionalCap": "1000000", "notionalFloor": "600000", "maintMarginRatio": "0.025", "cum": "6200.0" @@ -21272,85 +21701,85 @@ "tier": 6.0, "symbol": "FIL/USDT:USDT", "currency": "USDT", - "minNotional": 800000.0, - "maxNotional": 3000000.0, + "minNotional": 1000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "6", "initialLeverage": "10", - "notionalCap": "3000000", - "notionalFloor": "800000", + "notionalCap": "5000000", + "notionalFloor": "1000000", "maintMarginRatio": "0.05", - "cum": "26200.0" + "cum": "31200.0" } }, { "tier": 7.0, "symbol": "FIL/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 6000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "7", "initialLeverage": "5", - "notionalCap": "6000000", - "notionalFloor": "3000000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.1", - "cum": "176200.0" + "cum": "281200.0" } }, { "tier": 8.0, "symbol": "FIL/USDT:USDT", "currency": "USDT", - "minNotional": 6000000.0, - "maxNotional": 10000000.0, + "minNotional": 10000000.0, + "maxNotional": 12500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "8", "initialLeverage": "4", - "notionalCap": "10000000", - "notionalFloor": "6000000", + "notionalCap": "12500000", + "notionalFloor": "10000000", "maintMarginRatio": "0.125", - "cum": "326200.0" + "cum": "531200.0" } }, { "tier": 9.0, "symbol": "FIL/USDT:USDT", "currency": "USDT", - "minNotional": 10000000.0, - "maxNotional": 20000000.0, + "minNotional": 12500000.0, + "maxNotional": 25000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "9", "initialLeverage": "2", - "notionalCap": "20000000", - "notionalFloor": "10000000", + "notionalCap": "25000000", + "notionalFloor": "12500000", "maintMarginRatio": "0.25", - "cum": "1576200.0" + "cum": "2093700.0" } }, { "tier": 10.0, "symbol": "FIL/USDT:USDT", "currency": "USDT", - "minNotional": 20000000.0, - "maxNotional": 30000000.0, + "minNotional": 25000000.0, + "maxNotional": 50000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "10", "initialLeverage": "1", - "notionalCap": "30000000", - "notionalFloor": "20000000", + "notionalCap": "50000000", + "notionalFloor": "25000000", "maintMarginRatio": "0.5", - "cum": "6576200.0" + "cum": "8343700.0" } } ], @@ -21965,10 +22394,10 @@ "minNotional": 0.0, "maxNotional": 5000.0, "maintenanceMarginRate": 0.006, - "maxLeverage": 75.0, + "maxLeverage": 20.0, "info": { "bracket": "1", - "initialLeverage": "75", + "initialLeverage": "20", "notionalCap": "5000", "notionalFloor": "0", "maintMarginRatio": "0.006", @@ -21982,10 +22411,10 @@ "minNotional": 5000.0, "maxNotional": 50000.0, "maintenanceMarginRate": 0.01, - "maxLeverage": 50.0, + "maxLeverage": 15.0, "info": { "bracket": "2", - "initialLeverage": "50", + "initialLeverage": "15", "notionalCap": "50000", "notionalFloor": "5000", "maintMarginRatio": "0.01", @@ -21999,10 +22428,10 @@ "minNotional": 50000.0, "maxNotional": 80000.0, "maintenanceMarginRate": 0.015, - "maxLeverage": 40.0, + "maxLeverage": 12.0, "info": { "bracket": "3", - "initialLeverage": "40", + "initialLeverage": "12", "notionalCap": "80000", "notionalFloor": "50000", "maintMarginRatio": "0.015", @@ -22016,10 +22445,10 @@ "minNotional": 80000.0, "maxNotional": 300000.0, "maintenanceMarginRate": 0.02, - "maxLeverage": 25.0, + "maxLeverage": 10.0, "info": { "bracket": "4", - "initialLeverage": "25", + "initialLeverage": "10", "notionalCap": "300000", "notionalFloor": "80000", "maintMarginRatio": "0.02", @@ -22033,10 +22462,10 @@ "minNotional": 300000.0, "maxNotional": 600000.0, "maintenanceMarginRate": 0.025, - "maxLeverage": 20.0, + "maxLeverage": 8.0, "info": { "bracket": "5", - "initialLeverage": "20", + "initialLeverage": "8", "notionalCap": "600000", "notionalFloor": "300000", "maintMarginRatio": "0.025", @@ -22050,10 +22479,10 @@ "minNotional": 600000.0, "maxNotional": 3000000.0, "maintenanceMarginRate": 0.05, - "maxLeverage": 10.0, + "maxLeverage": 6.0, "info": { "bracket": "6", - "initialLeverage": "10", + "initialLeverage": "6", "notionalCap": "3000000", "notionalFloor": "600000", "maintMarginRatio": "0.05", @@ -22082,13 +22511,13 @@ "symbol": "FTM/USDT:USDT", "currency": "USDT", "minNotional": 6000000.0, - "maxNotional": 7500000.0, + "maxNotional": 7000000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "8", "initialLeverage": "4", - "notionalCap": "7500000", + "notionalCap": "7000000", "notionalFloor": "6000000", "maintMarginRatio": "0.125", "cum": "317170.0" @@ -22098,34 +22527,34 @@ "tier": 9.0, "symbol": "FTM/USDT:USDT", "currency": "USDT", - "minNotional": 7500000.0, - "maxNotional": 15000000.0, + "minNotional": 7000000.0, + "maxNotional": 8000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "9", "initialLeverage": "2", - "notionalCap": "15000000", - "notionalFloor": "7500000", + "notionalCap": "8000000", + "notionalFloor": "7000000", "maintMarginRatio": "0.25", - "cum": "1254670.0" + "cum": "1192170.0" } }, { "tier": 10.0, "symbol": "FTM/USDT:USDT", "currency": "USDT", - "minNotional": 15000000.0, - "maxNotional": 30000000.0, + "minNotional": 8000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "10", "initialLeverage": "1", - "notionalCap": "30000000", - "notionalFloor": "15000000", + "notionalCap": "10000000", + "notionalFloor": "8000000", "maintMarginRatio": "0.5", - "cum": "5004670.0" + "cum": "3192170.0" } } ], @@ -23585,13 +24014,13 @@ "symbol": "GRASS/USDT:USDT", "currency": "USDT", "minNotional": 0.0, - "maxNotional": 5000.0, + "maxNotional": 10000.0, "maintenanceMarginRate": 0.01, "maxLeverage": 75.0, "info": { "bracket": "1", "initialLeverage": "75", - "notionalCap": "5000", + "notionalCap": "10000", "notionalFloor": "0", "maintMarginRatio": "0.01", "cum": "0.0" @@ -23601,136 +24030,136 @@ "tier": 2.0, "symbol": "GRASS/USDT:USDT", "currency": "USDT", - "minNotional": 5000.0, - "maxNotional": 16000.0, + "minNotional": 10000.0, + "maxNotional": 30000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "16000", - "notionalFloor": "5000", + "notionalCap": "30000", + "notionalFloor": "10000", "maintMarginRatio": "0.015", - "cum": "25.0" + "cum": "50.0" } }, { "tier": 3.0, "symbol": "GRASS/USDT:USDT", "currency": "USDT", - "minNotional": 16000.0, - "maxNotional": 80000.0, + "minNotional": 30000.0, + "maxNotional": 150000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "80000", - "notionalFloor": "16000", + "notionalCap": "150000", + "notionalFloor": "30000", "maintMarginRatio": "0.02", - "cum": "105.0" + "cum": "200.0" } }, { "tier": 4.0, "symbol": "GRASS/USDT:USDT", "currency": "USDT", - "minNotional": 80000.0, - "maxNotional": 160000.0, + "minNotional": 150000.0, + "maxNotional": 300000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "160000", - "notionalFloor": "80000", + "notionalCap": "300000", + "notionalFloor": "150000", "maintMarginRatio": "0.025", - "cum": "505.0" + "cum": "950.0" } }, { "tier": 5.0, "symbol": "GRASS/USDT:USDT", "currency": "USDT", - "minNotional": 160000.0, - "maxNotional": 800000.0, + "minNotional": 300000.0, + "maxNotional": 1500000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "800000", - "notionalFloor": "160000", + "notionalCap": "1500000", + "notionalFloor": "300000", "maintMarginRatio": "0.05", - "cum": "4505.0" + "cum": "8450.0" } }, { "tier": 6.0, "symbol": "GRASS/USDT:USDT", "currency": "USDT", - "minNotional": 800000.0, - "maxNotional": 1600000.0, + "minNotional": 1500000.0, + "maxNotional": 3000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "1600000", - "notionalFloor": "800000", + "notionalCap": "3000000", + "notionalFloor": "1500000", "maintMarginRatio": "0.1", - "cum": "44505.0" + "cum": "83450.0" } }, { "tier": 7.0, "symbol": "GRASS/USDT:USDT", "currency": "USDT", - "minNotional": 1600000.0, - "maxNotional": 2000000.0, + "minNotional": 3000000.0, + "maxNotional": 3750000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "2000000", - "notionalFloor": "1600000", + "notionalCap": "3750000", + "notionalFloor": "3000000", "maintMarginRatio": "0.125", - "cum": "84505.0" + "cum": "158450.0" } }, { "tier": 8.0, "symbol": "GRASS/USDT:USDT", "currency": "USDT", - "minNotional": 2000000.0, - "maxNotional": 4000000.0, + "minNotional": 3750000.0, + "maxNotional": 7500000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "4000000", - "notionalFloor": "2000000", + "notionalCap": "7500000", + "notionalFloor": "3750000", "maintMarginRatio": "0.25", - "cum": "334505.0" + "cum": "627200.0" } }, { "tier": 9.0, "symbol": "GRASS/USDT:USDT", "currency": "USDT", - "minNotional": 4000000.0, - "maxNotional": 8000000.0, + "minNotional": 7500000.0, + "maxNotional": 15000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "8000000", - "notionalFloor": "4000000", + "notionalCap": "15000000", + "notionalFloor": "7500000", "maintMarginRatio": "0.5", - "cum": "1334505.0" + "cum": "2502200.0" } } ], @@ -24033,13 +24462,13 @@ "symbol": "HBAR/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, - "maxNotional": 20000.0, + "maxNotional": 40000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "20000", + "notionalCap": "40000", "notionalFloor": "10000", "maintMarginRatio": "0.015", "cum": "50.0" @@ -24049,119 +24478,119 @@ "tier": 3.0, "symbol": "HBAR/USDT:USDT", "currency": "USDT", - "minNotional": 20000.0, - "maxNotional": 100000.0, + "minNotional": 40000.0, + "maxNotional": 200000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "100000", - "notionalFloor": "20000", + "notionalCap": "200000", + "notionalFloor": "40000", "maintMarginRatio": "0.02", - "cum": "150.0" + "cum": "250.0" } }, { "tier": 4.0, "symbol": "HBAR/USDT:USDT", "currency": "USDT", - "minNotional": 100000.0, - "maxNotional": 200000.0, + "minNotional": 200000.0, + "maxNotional": 400000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "200000", - "notionalFloor": "100000", + "notionalCap": "400000", + "notionalFloor": "200000", "maintMarginRatio": "0.025", - "cum": "650.0" + "cum": "1250.0" } }, { "tier": 5.0, "symbol": "HBAR/USDT:USDT", "currency": "USDT", - "minNotional": 200000.0, - "maxNotional": 1000000.0, + "minNotional": 400000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "1000000", - "notionalFloor": "200000", + "notionalCap": "2000000", + "notionalFloor": "400000", "maintMarginRatio": "0.05", - "cum": "5650.0" + "cum": "11250.0" } }, { "tier": 6.0, "symbol": "HBAR/USDT:USDT", "currency": "USDT", - "minNotional": 1000000.0, - "maxNotional": 2000000.0, + "minNotional": 2000000.0, + "maxNotional": 4000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "2000000", - "notionalFloor": "1000000", + "notionalCap": "4000000", + "notionalFloor": "2000000", "maintMarginRatio": "0.1", - "cum": "55650.0" + "cum": "111250.0" } }, { "tier": 7.0, "symbol": "HBAR/USDT:USDT", "currency": "USDT", - "minNotional": 2000000.0, - "maxNotional": 2500000.0, + "minNotional": 4000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "2500000", - "notionalFloor": "2000000", + "notionalCap": "5000000", + "notionalFloor": "4000000", "maintMarginRatio": "0.125", - "cum": "105650.0" + "cum": "211250.0" } }, { "tier": 8.0, "symbol": "HBAR/USDT:USDT", "currency": "USDT", - "minNotional": 2500000.0, - "maxNotional": 5000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "5000000", - "notionalFloor": "2500000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.25", - "cum": "418150.0" + "cum": "836250.0" } }, { "tier": 9.0, "symbol": "HBAR/USDT:USDT", "currency": "USDT", - "minNotional": 5000000.0, - "maxNotional": 10000000.0, + "minNotional": 10000000.0, + "maxNotional": 20000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "10000000", - "notionalFloor": "5000000", + "notionalCap": "20000000", + "notionalFloor": "10000000", "maintMarginRatio": "0.5", - "cum": "1668150.0" + "cum": "3336250.0" } } ], @@ -25931,13 +26360,13 @@ "symbol": "INJ/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, - "maxNotional": 40000.0, + "maxNotional": 80000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "40000", + "notionalCap": "80000", "notionalFloor": "10000", "maintMarginRatio": "0.015", "cum": "50.0" @@ -25947,119 +26376,119 @@ "tier": 3.0, "symbol": "INJ/USDT:USDT", "currency": "USDT", - "minNotional": 40000.0, - "maxNotional": 200000.0, + "minNotional": 80000.0, + "maxNotional": 400000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "200000", - "notionalFloor": "40000", + "notionalCap": "400000", + "notionalFloor": "80000", "maintMarginRatio": "0.02", - "cum": "250.0" + "cum": "450.0" } }, { "tier": 4.0, "symbol": "INJ/USDT:USDT", "currency": "USDT", - "minNotional": 200000.0, - "maxNotional": 400000.0, + "minNotional": 400000.0, + "maxNotional": 800000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "400000", - "notionalFloor": "200000", + "notionalCap": "800000", + "notionalFloor": "400000", "maintMarginRatio": "0.025", - "cum": "1250.0" + "cum": "2450.0" } }, { "tier": 5.0, "symbol": "INJ/USDT:USDT", "currency": "USDT", - "minNotional": 400000.0, - "maxNotional": 2000000.0, + "minNotional": 800000.0, + "maxNotional": 4000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "2000000", - "notionalFloor": "400000", + "notionalCap": "4000000", + "notionalFloor": "800000", "maintMarginRatio": "0.05", - "cum": "11250.0" + "cum": "22450.0" } }, { "tier": 6.0, "symbol": "INJ/USDT:USDT", "currency": "USDT", - "minNotional": 2000000.0, - "maxNotional": 4000000.0, + "minNotional": 4000000.0, + "maxNotional": 8000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "4000000", - "notionalFloor": "2000000", + "notionalCap": "8000000", + "notionalFloor": "4000000", "maintMarginRatio": "0.1", - "cum": "111250.0" + "cum": "222450.0" } }, { "tier": 7.0, "symbol": "INJ/USDT:USDT", "currency": "USDT", - "minNotional": 4000000.0, - "maxNotional": 5000000.0, + "minNotional": 8000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "5000000", - "notionalFloor": "4000000", + "notionalCap": "10000000", + "notionalFloor": "8000000", "maintMarginRatio": "0.125", - "cum": "211250.0" + "cum": "422450.0" } }, { "tier": 8.0, "symbol": "INJ/USDT:USDT", "currency": "USDT", - "minNotional": 5000000.0, - "maxNotional": 12000000.0, + "minNotional": 10000000.0, + "maxNotional": 20000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "12000000", - "notionalFloor": "5000000", + "notionalCap": "20000000", + "notionalFloor": "10000000", "maintMarginRatio": "0.25", - "cum": "836250.0" + "cum": "1672450.0" } }, { "tier": 9.0, "symbol": "INJ/USDT:USDT", "currency": "USDT", - "minNotional": 12000000.0, - "maxNotional": 20000000.0, + "minNotional": 20000000.0, + "maxNotional": 40000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "20000000", - "notionalFloor": "12000000", + "notionalCap": "40000000", + "notionalFloor": "20000000", "maintMarginRatio": "0.5", - "cum": "3836250.0" + "cum": "6672450.0" } } ], @@ -26760,14 +27189,14 @@ "currency": "USDT", "minNotional": 0.0, "maxNotional": 5000.0, - "maintenanceMarginRate": 0.02, - "maxLeverage": 20.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, "info": { "bracket": "1", - "initialLeverage": "20", + "initialLeverage": "75", "notionalCap": "5000", "notionalFloor": "0", - "maintMarginRatio": "0.02", + "maintMarginRatio": "0.01", "cum": "0.0" } }, @@ -26776,15 +27205,15 @@ "symbol": "JOE/USDT:USDT", "currency": "USDT", "minNotional": 5000.0, - "maxNotional": 25000.0, - "maintenanceMarginRate": 0.025, - "maxLeverage": 15.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, "info": { "bracket": "2", - "initialLeverage": "15", - "notionalCap": "25000", + "initialLeverage": "50", + "notionalCap": "10000", "notionalFloor": "5000", - "maintMarginRatio": "0.025", + "maintMarginRatio": "0.015", "cum": "25.0" } }, @@ -26792,72 +27221,106 @@ "tier": 3.0, "symbol": "JOE/USDT:USDT", "currency": "USDT", - "minNotional": 25000.0, - "maxNotional": 200000.0, + "minNotional": 10000.0, + "maxNotional": 50000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "50000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "JOE/USDT:USDT", + "currency": "USDT", + "minNotional": 50000.0, + "maxNotional": 100000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "100000", + "notionalFloor": "50000", + "maintMarginRatio": "0.025", + "cum": "325.0" + } + }, + { + "tier": 5.0, + "symbol": "JOE/USDT:USDT", + "currency": "USDT", + "minNotional": 100000.0, + "maxNotional": 500000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { - "bracket": "3", + "bracket": "5", "initialLeverage": "10", - "notionalCap": "200000", - "notionalFloor": "25000", + "notionalCap": "500000", + "notionalFloor": "100000", "maintMarginRatio": "0.05", - "cum": "650.0" + "cum": "2825.0" } }, { - "tier": 4.0, + "tier": 6.0, "symbol": "JOE/USDT:USDT", "currency": "USDT", - "minNotional": 200000.0, - "maxNotional": 500000.0, + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { - "bracket": "4", + "bracket": "6", "initialLeverage": "5", - "notionalCap": "500000", - "notionalFloor": "200000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.1", - "cum": "10650.0" + "cum": "27825.0" } }, { - "tier": 5.0, + "tier": 7.0, "symbol": "JOE/USDT:USDT", "currency": "USDT", - "minNotional": 500000.0, - "maxNotional": 1000000.0, + "minNotional": 1000000.0, + "maxNotional": 1250000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { - "bracket": "5", + "bracket": "7", "initialLeverage": "4", - "notionalCap": "1000000", - "notionalFloor": "500000", + "notionalCap": "1250000", + "notionalFloor": "1000000", "maintMarginRatio": "0.125", - "cum": "23150.0" + "cum": "52825.0" } }, { - "tier": 6.0, + "tier": 8.0, "symbol": "JOE/USDT:USDT", "currency": "USDT", - "minNotional": 1000000.0, + "minNotional": 1250000.0, "maxNotional": 3000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { - "bracket": "6", + "bracket": "8", "initialLeverage": "2", "notionalCap": "3000000", - "notionalFloor": "1000000", + "notionalFloor": "1250000", "maintMarginRatio": "0.25", - "cum": "148150.0" + "cum": "209075.0" } }, { - "tier": 7.0, + "tier": 9.0, "symbol": "JOE/USDT:USDT", "currency": "USDT", "minNotional": 3000000.0, @@ -26865,12 +27328,12 @@ "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { - "bracket": "7", + "bracket": "9", "initialLeverage": "1", "notionalCap": "5000000", "notionalFloor": "3000000", "maintMarginRatio": "0.5", - "cum": "898150.0" + "cum": "959075.0" } } ], @@ -27184,6 +27647,161 @@ } } ], + "KAIA/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "KAIA/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "KAIA/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "KAIA/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "KAIA/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "KAIA/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "KAIA/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "KAIA/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "KAIA/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "KAIA/USDT:USDT", + "currency": "USDT", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "KAS/USDT:USDT": [ { "tier": 1.0, @@ -28012,6 +28630,161 @@ } } ], + "KOMA/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "KOMA/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "KOMA/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "KOMA/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "KOMA/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "KOMA/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "KOMA/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "KOMA/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "KOMA/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "KOMA/USDT:USDT", + "currency": "USDT", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "KSM/USDT:USDT": [ { "tier": 1.0, @@ -29347,10 +30120,10 @@ "minNotional": 0.0, "maxNotional": 25000.0, "maintenanceMarginRate": 0.03, - "maxLeverage": 20.0, + "maxLeverage": 10.0, "info": { "bracket": "1", - "initialLeverage": "20", + "initialLeverage": "10", "notionalCap": "25000", "notionalFloor": "0", "maintMarginRatio": "0.03", @@ -29364,10 +30137,10 @@ "minNotional": 25000.0, "maxNotional": 200000.0, "maintenanceMarginRate": 0.05, - "maxLeverage": 10.0, + "maxLeverage": 8.0, "info": { "bracket": "2", - "initialLeverage": "10", + "initialLeverage": "8", "notionalCap": "200000", "notionalFloor": "25000", "maintMarginRatio": "0.05", @@ -29413,13 +30186,13 @@ "symbol": "LOOM/USDT:USDT", "currency": "USDT", "minNotional": 1000000.0, - "maxNotional": 3000000.0, + "maxNotional": 1500000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "5", "initialLeverage": "2", - "notionalCap": "3000000", + "notionalCap": "1500000", "notionalFloor": "1000000", "maintMarginRatio": "0.25", "cum": "148000.0" @@ -29429,17 +30202,17 @@ "tier": 6.0, "symbol": "LOOM/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 3500000.0, + "minNotional": 1500000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "6", "initialLeverage": "1", - "notionalCap": "3500000", - "notionalFloor": "3000000", + "notionalCap": "2000000", + "notionalFloor": "1500000", "maintMarginRatio": "0.5", - "cum": "898000.0" + "cum": "523000.0" } } ], @@ -30244,14 +31017,14 @@ "currency": "USDT", "minNotional": 0.0, "maxNotional": 5000.0, - "maintenanceMarginRate": 0.015, - "maxLeverage": 20.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, "info": { "bracket": "1", - "initialLeverage": "20", + "initialLeverage": "75", "notionalCap": "5000", "notionalFloor": "0", - "maintMarginRatio": "0.015", + "maintMarginRatio": "0.01", "cum": "0.0" } }, @@ -30260,84 +31033,135 @@ "symbol": "LUNA2/USDT:USDT", "currency": "USDT", "minNotional": 5000.0, - "maxNotional": 25000.0, - "maintenanceMarginRate": 0.025, - "maxLeverage": 10.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, "info": { "bracket": "2", - "initialLeverage": "10", - "notionalCap": "25000", + "initialLeverage": "50", + "notionalCap": "10000", "notionalFloor": "5000", - "maintMarginRatio": "0.025", - "cum": "50.0" + "maintMarginRatio": "0.015", + "cum": "25.0" } }, { "tier": 3.0, "symbol": "LUNA2/USDT:USDT", "currency": "USDT", - "minNotional": 25000.0, - "maxNotional": 100000.0, - "maintenanceMarginRate": 0.05, - "maxLeverage": 8.0, + "minNotional": 10000.0, + "maxNotional": 50000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, "info": { "bracket": "3", - "initialLeverage": "8", - "notionalCap": "100000", - "notionalFloor": "25000", - "maintMarginRatio": "0.05", - "cum": "675.0" + "initialLeverage": "25", + "notionalCap": "50000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" } }, { "tier": 4.0, "symbol": "LUNA2/USDT:USDT", "currency": "USDT", + "minNotional": 50000.0, + "maxNotional": 100000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "100000", + "notionalFloor": "50000", + "maintMarginRatio": "0.025", + "cum": "325.0" + } + }, + { + "tier": 5.0, + "symbol": "LUNA2/USDT:USDT", + "currency": "USDT", "minNotional": 100000.0, - "maxNotional": 250000.0, + "maxNotional": 500000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "500000", + "notionalFloor": "100000", + "maintMarginRatio": "0.05", + "cum": "2825.0" + } + }, + { + "tier": 6.0, + "symbol": "LUNA2/USDT:USDT", + "currency": "USDT", + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { - "bracket": "4", + "bracket": "6", "initialLeverage": "5", - "notionalCap": "250000", - "notionalFloor": "100000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.1", - "cum": "5675.0" + "cum": "27825.0" } }, { - "tier": 5.0, + "tier": 7.0, "symbol": "LUNA2/USDT:USDT", "currency": "USDT", - "minNotional": 250000.0, - "maxNotional": 1000000.0, + "minNotional": 1000000.0, + "maxNotional": 1250000.0, "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "1250000", + "notionalFloor": "1000000", + "maintMarginRatio": "0.125", + "cum": "52825.0" + } + }, + { + "tier": 8.0, + "symbol": "LUNA2/USDT:USDT", + "currency": "USDT", + "minNotional": 1250000.0, + "maxNotional": 2500000.0, + "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { - "bracket": "5", + "bracket": "8", "initialLeverage": "2", - "notionalCap": "1000000", - "notionalFloor": "250000", - "maintMarginRatio": "0.125", - "cum": "11925.0" + "notionalCap": "2500000", + "notionalFloor": "1250000", + "maintMarginRatio": "0.25", + "cum": "209075.0" } }, { - "tier": 6.0, + "tier": 9.0, "symbol": "LUNA2/USDT:USDT", "currency": "USDT", - "minNotional": 1000000.0, + "minNotional": 2500000.0, "maxNotional": 5000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { - "bracket": "6", + "bracket": "9", "initialLeverage": "1", "notionalCap": "5000000", - "notionalFloor": "1000000", + "notionalFloor": "2500000", "maintMarginRatio": "0.5", - "cum": "386925.0" + "cum": "834075.0" } } ], @@ -31090,10 +31914,10 @@ "minNotional": 0.0, "maxNotional": 5000.0, "maintenanceMarginRate": 0.015, - "maxLeverage": 50.0, + "maxLeverage": 10.0, "info": { "bracket": "1", - "initialLeverage": "50", + "initialLeverage": "10", "notionalCap": "5000", "notionalFloor": "0", "maintMarginRatio": "0.015", @@ -31107,10 +31931,10 @@ "minNotional": 5000.0, "maxNotional": 25000.0, "maintenanceMarginRate": 0.025, - "maxLeverage": 20.0, + "maxLeverage": 8.0, "info": { "bracket": "2", - "initialLeverage": "20", + "initialLeverage": "8", "notionalCap": "25000", "notionalFloor": "5000", "maintMarginRatio": "0.025", @@ -31124,10 +31948,10 @@ "minNotional": 25000.0, "maxNotional": 100000.0, "maintenanceMarginRate": 0.05, - "maxLeverage": 10.0, + "maxLeverage": 6.0, "info": { "bracket": "3", - "initialLeverage": "10", + "initialLeverage": "6", "notionalCap": "100000", "notionalFloor": "25000", "maintMarginRatio": "0.05", @@ -31479,6 +32303,161 @@ } } ], + "ME/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "ME/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "ME/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "ME/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "ME/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "ME/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "ME/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "ME/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "ME/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "ME/USDT:USDT", + "currency": "USDT", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "MEME/USDT:USDT": [ { "tier": 1.0, @@ -32513,6 +33492,161 @@ } } ], + "MOVE/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "MOVE/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "MOVE/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "MOVE/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "MOVE/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "MOVE/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "MOVE/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "MOVE/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "MOVE/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "MOVE/USDT:USDT", + "currency": "USDT", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "MOVR/USDT:USDT": [ { "tier": 1.0, @@ -33054,13 +34188,13 @@ "symbol": "NEAR/USDT:USDT", "currency": "USDT", "minNotional": 0.0, - "maxNotional": 10000.0, + "maxNotional": 20000.0, "maintenanceMarginRate": 0.01, "maxLeverage": 75.0, "info": { "bracket": "1", "initialLeverage": "75", - "notionalCap": "10000", + "notionalCap": "20000", "notionalFloor": "0", "maintMarginRatio": "0.01", "cum": "0.0" @@ -33070,136 +34204,136 @@ "tier": 2.0, "symbol": "NEAR/USDT:USDT", "currency": "USDT", - "minNotional": 10000.0, - "maxNotional": 100000.0, + "minNotional": 20000.0, + "maxNotional": 200000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "100000", - "notionalFloor": "10000", + "notionalCap": "200000", + "notionalFloor": "20000", "maintMarginRatio": "0.015", - "cum": "50.0" + "cum": "100.0" } }, { "tier": 3.0, "symbol": "NEAR/USDT:USDT", "currency": "USDT", - "minNotional": 100000.0, - "maxNotional": 500000.0, + "minNotional": 200000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "500000", - "notionalFloor": "100000", + "notionalCap": "1000000", + "notionalFloor": "200000", "maintMarginRatio": "0.02", - "cum": "550.0" + "cum": "1100.0" } }, { "tier": 4.0, "symbol": "NEAR/USDT:USDT", "currency": "USDT", - "minNotional": 500000.0, - "maxNotional": 1000000.0, + "minNotional": 1000000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "1000000", - "notionalFloor": "500000", + "notionalCap": "2000000", + "notionalFloor": "1000000", "maintMarginRatio": "0.025", - "cum": "3050.0" + "cum": "6100.0" } }, { "tier": 5.0, "symbol": "NEAR/USDT:USDT", "currency": "USDT", - "minNotional": 1000000.0, - "maxNotional": 5000000.0, + "minNotional": 2000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "5000000", - "notionalFloor": "1000000", + "notionalCap": "10000000", + "notionalFloor": "2000000", "maintMarginRatio": "0.05", - "cum": "28050.0" + "cum": "56100.0" } }, { "tier": 6.0, "symbol": "NEAR/USDT:USDT", "currency": "USDT", - "minNotional": 5000000.0, - "maxNotional": 10000000.0, + "minNotional": 10000000.0, + "maxNotional": 20000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "10000000", - "notionalFloor": "5000000", + "notionalCap": "20000000", + "notionalFloor": "10000000", "maintMarginRatio": "0.1", - "cum": "278050.0" + "cum": "556100.0" } }, { "tier": 7.0, "symbol": "NEAR/USDT:USDT", "currency": "USDT", - "minNotional": 10000000.0, - "maxNotional": 12500000.0, + "minNotional": 20000000.0, + "maxNotional": 25000000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "12500000", - "notionalFloor": "10000000", + "notionalCap": "25000000", + "notionalFloor": "20000000", "maintMarginRatio": "0.125", - "cum": "528050.0" + "cum": "1056100.0" } }, { "tier": 8.0, "symbol": "NEAR/USDT:USDT", "currency": "USDT", - "minNotional": 12500000.0, - "maxNotional": 25000000.0, + "minNotional": 25000000.0, + "maxNotional": 50000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "25000000", - "notionalFloor": "12500000", + "notionalCap": "50000000", + "notionalFloor": "25000000", "maintMarginRatio": "0.25", - "cum": "2090550.0" + "cum": "4181100.0" } }, { "tier": 9.0, "symbol": "NEAR/USDT:USDT", "currency": "USDT", - "minNotional": 25000000.0, - "maxNotional": 50000000.0, + "minNotional": 50000000.0, + "maxNotional": 100000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "50000000", - "notionalFloor": "25000000", + "notionalCap": "100000000", + "notionalFloor": "50000000", "maintMarginRatio": "0.5", - "cum": "8340550.0" + "cum": "16681100.0" } } ], @@ -34988,10 +36122,10 @@ "minNotional": 0.0, "maxNotional": 5000.0, "maintenanceMarginRate": 0.015, - "maxLeverage": 50.0, + "maxLeverage": 10.0, "info": { "bracket": "1", - "initialLeverage": "50", + "initialLeverage": "10", "notionalCap": "5000", "notionalFloor": "0", "maintMarginRatio": "0.015", @@ -35005,10 +36139,10 @@ "minNotional": 5000.0, "maxNotional": 50000.0, "maintenanceMarginRate": 0.025, - "maxLeverage": 20.0, + "maxLeverage": 8.0, "info": { "bracket": "2", - "initialLeverage": "20", + "initialLeverage": "8", "notionalCap": "50000", "notionalFloor": "5000", "maintMarginRatio": "0.025", @@ -35022,10 +36156,10 @@ "minNotional": 50000.0, "maxNotional": 900000.0, "maintenanceMarginRate": 0.05, - "maxLeverage": 10.0, + "maxLeverage": 6.0, "info": { "bracket": "3", - "initialLeverage": "10", + "initialLeverage": "6", "notionalCap": "900000", "notionalFloor": "50000", "maintMarginRatio": "0.05", @@ -35037,13 +36171,13 @@ "symbol": "OMG/USDT:USDT", "currency": "USDT", "minNotional": 900000.0, - "maxNotional": 2400000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "4", "initialLeverage": "5", - "notionalCap": "2400000", + "notionalCap": "2000000", "notionalFloor": "900000", "maintMarginRatio": "0.1", "cum": "46300.0" @@ -35053,51 +36187,51 @@ "tier": 5.0, "symbol": "OMG/USDT:USDT", "currency": "USDT", - "minNotional": 2400000.0, - "maxNotional": 3000000.0, + "minNotional": 2000000.0, + "maxNotional": 2100000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "5", "initialLeverage": "4", - "notionalCap": "3000000", - "notionalFloor": "2400000", + "notionalCap": "2100000", + "notionalFloor": "2000000", "maintMarginRatio": "0.125", - "cum": "106300.0" + "cum": "96300.0" } }, { "tier": 6.0, "symbol": "OMG/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 9000000.0, + "minNotional": 2100000.0, + "maxNotional": 2200000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "6", "initialLeverage": "2", - "notionalCap": "9000000", - "notionalFloor": "3000000", + "notionalCap": "2200000", + "notionalFloor": "2100000", "maintMarginRatio": "0.25", - "cum": "481300.0" + "cum": "358800.0" } }, { "tier": 7.0, "symbol": "OMG/USDT:USDT", "currency": "USDT", - "minNotional": 9000000.0, - "maxNotional": 15000000.0, + "minNotional": 2200000.0, + "maxNotional": 2300000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "7", "initialLeverage": "1", - "notionalCap": "15000000", - "notionalFloor": "9000000", + "notionalCap": "2300000", + "notionalFloor": "2200000", "maintMarginRatio": "0.5", - "cum": "2731300.0" + "cum": "908800.0" } } ], @@ -35954,6 +37088,161 @@ "minNotional": 0.0, "maxNotional": 5000.0, "maintenanceMarginRate": 0.01, + "maxLeverage": 10.0, + "info": { + "bracket": "1", + "initialLeverage": "10", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "ORBS/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 9.0, + "info": { + "bracket": "2", + "initialLeverage": "9", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "ORBS/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 8.0, + "info": { + "bracket": "3", + "initialLeverage": "8", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "ORBS/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 7.0, + "info": { + "bracket": "4", + "initialLeverage": "7", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "ORBS/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 6.0, + "info": { + "bracket": "5", + "initialLeverage": "6", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "ORBS/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "ORBS/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "ORBS/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 900000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "900000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "ORBS/USDT:USDT", + "currency": "USDT", + "minNotional": 900000.0, + "maxNotional": 1000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "1000000", + "notionalFloor": "900000", + "maintMarginRatio": "0.5", + "cum": "350475.0" + } + } + ], + "ORCA/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "ORCA/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, "maxLeverage": 75.0, "info": { "bracket": "1", @@ -35966,7 +37255,7 @@ }, { "tier": 2.0, - "symbol": "ORBS/USDT:USDT", + "symbol": "ORCA/USDT:USDT", "currency": "USDT", "minNotional": 5000.0, "maxNotional": 10000.0, @@ -35983,7 +37272,7 @@ }, { "tier": 3.0, - "symbol": "ORBS/USDT:USDT", + "symbol": "ORCA/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, "maxNotional": 30000.0, @@ -36000,7 +37289,7 @@ }, { "tier": 4.0, - "symbol": "ORBS/USDT:USDT", + "symbol": "ORCA/USDT:USDT", "currency": "USDT", "minNotional": 30000.0, "maxNotional": 60000.0, @@ -36017,7 +37306,7 @@ }, { "tier": 5.0, - "symbol": "ORBS/USDT:USDT", + "symbol": "ORCA/USDT:USDT", "currency": "USDT", "minNotional": 60000.0, "maxNotional": 300000.0, @@ -36034,7 +37323,7 @@ }, { "tier": 6.0, - "symbol": "ORBS/USDT:USDT", + "symbol": "ORCA/USDT:USDT", "currency": "USDT", "minNotional": 300000.0, "maxNotional": 600000.0, @@ -36051,7 +37340,7 @@ }, { "tier": 7.0, - "symbol": "ORBS/USDT:USDT", + "symbol": "ORCA/USDT:USDT", "currency": "USDT", "minNotional": 600000.0, "maxNotional": 750000.0, @@ -36068,7 +37357,7 @@ }, { "tier": 8.0, - "symbol": "ORBS/USDT:USDT", + "symbol": "ORCA/USDT:USDT", "currency": "USDT", "minNotional": 750000.0, "maxNotional": 1500000.0, @@ -36085,7 +37374,7 @@ }, { "tier": 9.0, - "symbol": "ORBS/USDT:USDT", + "symbol": "ORCA/USDT:USDT", "currency": "USDT", "minNotional": 1500000.0, "maxNotional": 3000000.0, @@ -37279,13 +38568,13 @@ "symbol": "PNUT/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, - "maxNotional": 40000.0, + "maxNotional": 100000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "40000", + "notionalCap": "100000", "notionalFloor": "10000", "maintMarginRatio": "0.015", "cum": "50.0" @@ -37295,119 +38584,119 @@ "tier": 3.0, "symbol": "PNUT/USDT:USDT", "currency": "USDT", - "minNotional": 40000.0, - "maxNotional": 200000.0, + "minNotional": 100000.0, + "maxNotional": 500000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "200000", - "notionalFloor": "40000", + "notionalCap": "500000", + "notionalFloor": "100000", "maintMarginRatio": "0.02", - "cum": "250.0" + "cum": "550.0" } }, { "tier": 4.0, "symbol": "PNUT/USDT:USDT", "currency": "USDT", - "minNotional": 200000.0, - "maxNotional": 400000.0, + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "400000", - "notionalFloor": "200000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.025", - "cum": "1250.0" + "cum": "3050.0" } }, { "tier": 5.0, "symbol": "PNUT/USDT:USDT", "currency": "USDT", - "minNotional": 400000.0, - "maxNotional": 2000000.0, + "minNotional": 1000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "2000000", - "notionalFloor": "400000", + "notionalCap": "5000000", + "notionalFloor": "1000000", "maintMarginRatio": "0.05", - "cum": "11250.0" + "cum": "28050.0" } }, { "tier": 6.0, "symbol": "PNUT/USDT:USDT", "currency": "USDT", - "minNotional": 2000000.0, - "maxNotional": 4000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "4000000", - "notionalFloor": "2000000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.1", - "cum": "111250.0" + "cum": "278050.0" } }, { "tier": 7.0, "symbol": "PNUT/USDT:USDT", "currency": "USDT", - "minNotional": 4000000.0, - "maxNotional": 5000000.0, + "minNotional": 10000000.0, + "maxNotional": 12500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "5000000", - "notionalFloor": "4000000", + "notionalCap": "12500000", + "notionalFloor": "10000000", "maintMarginRatio": "0.125", - "cum": "211250.0" + "cum": "528050.0" } }, { "tier": 8.0, "symbol": "PNUT/USDT:USDT", "currency": "USDT", - "minNotional": 5000000.0, - "maxNotional": 10000000.0, + "minNotional": 12500000.0, + "maxNotional": 25000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "10000000", - "notionalFloor": "5000000", + "notionalCap": "25000000", + "notionalFloor": "12500000", "maintMarginRatio": "0.25", - "cum": "836250.0" + "cum": "2090550.0" } }, { "tier": 9.0, "symbol": "PNUT/USDT:USDT", "currency": "USDT", - "minNotional": 10000000.0, - "maxNotional": 20000000.0, + "minNotional": 25000000.0, + "maxNotional": 50000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "20000000", - "notionalFloor": "10000000", + "notionalCap": "50000000", + "notionalFloor": "25000000", "maintMarginRatio": "0.5", - "cum": "3336250.0" + "cum": "8340550.0" } } ], @@ -38419,10 +39708,10 @@ "minNotional": 0.0, "maxNotional": 5000.0, "maintenanceMarginRate": 0.01, - "maxLeverage": 20.0, + "maxLeverage": 75.0, "info": { "bracket": "1", - "initialLeverage": "20", + "initialLeverage": "75", "notionalCap": "5000", "notionalFloor": "0", "maintMarginRatio": "0.01", @@ -38434,84 +39723,135 @@ "symbol": "QNT/USDT:USDT", "currency": "USDT", "minNotional": 5000.0, - "maxNotional": 25000.0, - "maintenanceMarginRate": 0.025, - "maxLeverage": 10.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, "info": { "bracket": "2", - "initialLeverage": "10", - "notionalCap": "25000", + "initialLeverage": "50", + "notionalCap": "10000", "notionalFloor": "5000", - "maintMarginRatio": "0.025", - "cum": "75.0" + "maintMarginRatio": "0.015", + "cum": "25.0" } }, { "tier": 3.0, "symbol": "QNT/USDT:USDT", "currency": "USDT", - "minNotional": 25000.0, - "maxNotional": 100000.0, - "maintenanceMarginRate": 0.05, - "maxLeverage": 8.0, + "minNotional": 10000.0, + "maxNotional": 50000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, "info": { "bracket": "3", - "initialLeverage": "8", - "notionalCap": "100000", - "notionalFloor": "25000", - "maintMarginRatio": "0.05", - "cum": "700.0" + "initialLeverage": "25", + "notionalCap": "50000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" } }, { "tier": 4.0, "symbol": "QNT/USDT:USDT", "currency": "USDT", + "minNotional": 50000.0, + "maxNotional": 100000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "100000", + "notionalFloor": "50000", + "maintMarginRatio": "0.025", + "cum": "325.0" + } + }, + { + "tier": 5.0, + "symbol": "QNT/USDT:USDT", + "currency": "USDT", "minNotional": 100000.0, - "maxNotional": 250000.0, + "maxNotional": 500000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "500000", + "notionalFloor": "100000", + "maintMarginRatio": "0.05", + "cum": "2825.0" + } + }, + { + "tier": 6.0, + "symbol": "QNT/USDT:USDT", + "currency": "USDT", + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { - "bracket": "4", + "bracket": "6", "initialLeverage": "5", - "notionalCap": "250000", - "notionalFloor": "100000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.1", - "cum": "5700.0" + "cum": "27825.0" } }, { - "tier": 5.0, + "tier": 7.0, "symbol": "QNT/USDT:USDT", "currency": "USDT", - "minNotional": 250000.0, - "maxNotional": 1000000.0, + "minNotional": 1000000.0, + "maxNotional": 1250000.0, "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "1250000", + "notionalFloor": "1000000", + "maintMarginRatio": "0.125", + "cum": "52825.0" + } + }, + { + "tier": 8.0, + "symbol": "QNT/USDT:USDT", + "currency": "USDT", + "minNotional": 1250000.0, + "maxNotional": 2500000.0, + "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { - "bracket": "5", + "bracket": "8", "initialLeverage": "2", - "notionalCap": "1000000", - "notionalFloor": "250000", - "maintMarginRatio": "0.125", - "cum": "11950.0" + "notionalCap": "2500000", + "notionalFloor": "1250000", + "maintMarginRatio": "0.25", + "cum": "209075.0" } }, { - "tier": 6.0, + "tier": 9.0, "symbol": "QNT/USDT:USDT", "currency": "USDT", - "minNotional": 1000000.0, + "minNotional": 2500000.0, "maxNotional": 5000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { - "bracket": "6", + "bracket": "9", "initialLeverage": "1", "notionalCap": "5000000", - "notionalFloor": "1000000", + "notionalFloor": "2500000", "maintMarginRatio": "0.5", - "cum": "386950.0" + "cum": "834075.0" } } ], @@ -39171,6 +40511,161 @@ } } ], + "RAYSOL/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "RAYSOL/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "RAYSOL/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "RAYSOL/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "RAYSOL/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "RAYSOL/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "RAYSOL/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "RAYSOL/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "RAYSOL/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "RAYSOL/USDT:USDT", + "currency": "USDT", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "RDNT/USDT:USDT": [ { "tier": 1.0, @@ -42194,13 +43689,13 @@ "symbol": "SEI/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, - "maxNotional": 60000.0, + "maxNotional": 100000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "60000", + "notionalCap": "100000", "notionalFloor": "10000", "maintMarginRatio": "0.015", "cum": "50.0" @@ -42210,119 +43705,119 @@ "tier": 3.0, "symbol": "SEI/USDT:USDT", "currency": "USDT", - "minNotional": 60000.0, - "maxNotional": 300000.0, + "minNotional": 100000.0, + "maxNotional": 500000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "300000", - "notionalFloor": "60000", + "notionalCap": "500000", + "notionalFloor": "100000", "maintMarginRatio": "0.02", - "cum": "350.0" + "cum": "550.0" } }, { "tier": 4.0, "symbol": "SEI/USDT:USDT", "currency": "USDT", - "minNotional": 300000.0, - "maxNotional": 600000.0, + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "600000", - "notionalFloor": "300000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.025", - "cum": "1850.0" + "cum": "3050.0" } }, { "tier": 5.0, "symbol": "SEI/USDT:USDT", "currency": "USDT", - "minNotional": 600000.0, - "maxNotional": 3000000.0, + "minNotional": 1000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "3000000", - "notionalFloor": "600000", + "notionalCap": "5000000", + "notionalFloor": "1000000", "maintMarginRatio": "0.05", - "cum": "16850.0" + "cum": "28050.0" } }, { "tier": 6.0, "symbol": "SEI/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 6000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "6000000", - "notionalFloor": "3000000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.1", - "cum": "166850.0" + "cum": "278050.0" } }, { "tier": 7.0, "symbol": "SEI/USDT:USDT", "currency": "USDT", - "minNotional": 6000000.0, - "maxNotional": 7500000.0, + "minNotional": 10000000.0, + "maxNotional": 12500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "7500000", - "notionalFloor": "6000000", + "notionalCap": "12500000", + "notionalFloor": "10000000", "maintMarginRatio": "0.125", - "cum": "316850.0" + "cum": "528050.0" } }, { "tier": 8.0, "symbol": "SEI/USDT:USDT", "currency": "USDT", - "minNotional": 7500000.0, - "maxNotional": 15000000.0, + "minNotional": 12500000.0, + "maxNotional": 25000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "15000000", - "notionalFloor": "7500000", + "notionalCap": "25000000", + "notionalFloor": "12500000", "maintMarginRatio": "0.25", - "cum": "1254350.0" + "cum": "2090550.0" } }, { "tier": 9.0, "symbol": "SEI/USDT:USDT", "currency": "USDT", - "minNotional": 15000000.0, - "maxNotional": 30000000.0, + "minNotional": 25000000.0, + "maxNotional": 50000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "30000000", - "notionalFloor": "15000000", + "notionalCap": "50000000", + "notionalFloor": "25000000", "maintMarginRatio": "0.5", - "cum": "5004350.0" + "cum": "8340550.0" } } ], @@ -43602,6 +45097,161 @@ } } ], + "SPX/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "SPX/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "SPX/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "SPX/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "SPX/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "SPX/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "SPX/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "SPX/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "SPX/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "SPX/USDT:USDT", + "currency": "USDT", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "SSV/USDT:USDT": [ { "tier": 1.0, @@ -44627,13 +46277,13 @@ "symbol": "STX/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, - "maxNotional": 30000.0, + "maxNotional": 60000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "30000", + "notionalCap": "60000", "notionalFloor": "10000", "maintMarginRatio": "0.015", "cum": "50.0" @@ -44643,119 +46293,119 @@ "tier": 3.0, "symbol": "STX/USDT:USDT", "currency": "USDT", - "minNotional": 30000.0, - "maxNotional": 150000.0, + "minNotional": 60000.0, + "maxNotional": 300000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "150000", - "notionalFloor": "30000", + "notionalCap": "300000", + "notionalFloor": "60000", "maintMarginRatio": "0.02", - "cum": "200.0" + "cum": "350.0" } }, { "tier": 4.0, "symbol": "STX/USDT:USDT", "currency": "USDT", - "minNotional": 150000.0, - "maxNotional": 300000.0, + "minNotional": 300000.0, + "maxNotional": 600000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "300000", - "notionalFloor": "150000", + "notionalCap": "600000", + "notionalFloor": "300000", "maintMarginRatio": "0.025", - "cum": "950.0" + "cum": "1850.0" } }, { "tier": 5.0, "symbol": "STX/USDT:USDT", "currency": "USDT", - "minNotional": 300000.0, - "maxNotional": 1500000.0, + "minNotional": 600000.0, + "maxNotional": 3000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "1500000", - "notionalFloor": "300000", + "notionalCap": "3000000", + "notionalFloor": "600000", "maintMarginRatio": "0.05", - "cum": "8450.0" + "cum": "16850.0" } }, { "tier": 6.0, "symbol": "STX/USDT:USDT", "currency": "USDT", - "minNotional": 1500000.0, - "maxNotional": 3000000.0, + "minNotional": 3000000.0, + "maxNotional": 6000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "3000000", - "notionalFloor": "1500000", + "notionalCap": "6000000", + "notionalFloor": "3000000", "maintMarginRatio": "0.1", - "cum": "83450.0" + "cum": "166850.0" } }, { "tier": 7.0, "symbol": "STX/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 3750000.0, + "minNotional": 6000000.0, + "maxNotional": 7500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "3750000", - "notionalFloor": "3000000", + "notionalCap": "7500000", + "notionalFloor": "6000000", "maintMarginRatio": "0.125", - "cum": "158450.0" + "cum": "316850.0" } }, { "tier": 8.0, "symbol": "STX/USDT:USDT", "currency": "USDT", - "minNotional": 3750000.0, - "maxNotional": 7500000.0, + "minNotional": 7500000.0, + "maxNotional": 15000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "7500000", - "notionalFloor": "3750000", + "notionalCap": "15000000", + "notionalFloor": "7500000", "maintMarginRatio": "0.25", - "cum": "627200.0" + "cum": "1254350.0" } }, { "tier": 9.0, "symbol": "STX/USDT:USDT", "currency": "USDT", - "minNotional": 7500000.0, - "maxNotional": 15000000.0, + "minNotional": 15000000.0, + "maxNotional": 30000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "15000000", - "notionalFloor": "7500000", + "notionalCap": "30000000", + "notionalFloor": "15000000", "maintMarginRatio": "0.5", - "cum": "2502200.0" + "cum": "5004350.0" } } ], @@ -46368,13 +48018,13 @@ "symbol": "THE/USDT:USDT", "currency": "USDT", "minNotional": 0.0, - "maxNotional": 5000.0, + "maxNotional": 10000.0, "maintenanceMarginRate": 0.01, "maxLeverage": 75.0, "info": { "bracket": "1", "initialLeverage": "75", - "notionalCap": "5000", + "notionalCap": "10000", "notionalFloor": "0", "maintMarginRatio": "0.01", "cum": "0.0" @@ -46384,136 +48034,136 @@ "tier": 2.0, "symbol": "THE/USDT:USDT", "currency": "USDT", - "minNotional": 5000.0, - "maxNotional": 10000.0, + "minNotional": 10000.0, + "maxNotional": 40000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 50.0, "info": { "bracket": "2", "initialLeverage": "50", - "notionalCap": "10000", - "notionalFloor": "5000", + "notionalCap": "40000", + "notionalFloor": "10000", "maintMarginRatio": "0.015", - "cum": "25.0" + "cum": "50.0" } }, { "tier": 3.0, "symbol": "THE/USDT:USDT", "currency": "USDT", - "minNotional": 10000.0, - "maxNotional": 30000.0, + "minNotional": 40000.0, + "maxNotional": 200000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "3", "initialLeverage": "25", - "notionalCap": "30000", - "notionalFloor": "10000", + "notionalCap": "200000", + "notionalFloor": "40000", "maintMarginRatio": "0.02", - "cum": "75.0" + "cum": "250.0" } }, { "tier": 4.0, "symbol": "THE/USDT:USDT", "currency": "USDT", - "minNotional": 30000.0, - "maxNotional": 60000.0, + "minNotional": 200000.0, + "maxNotional": 400000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "4", "initialLeverage": "20", - "notionalCap": "60000", - "notionalFloor": "30000", + "notionalCap": "400000", + "notionalFloor": "200000", "maintMarginRatio": "0.025", - "cum": "225.0" + "cum": "1250.0" } }, { "tier": 5.0, "symbol": "THE/USDT:USDT", "currency": "USDT", - "minNotional": 60000.0, - "maxNotional": 300000.0, + "minNotional": 400000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "300000", - "notionalFloor": "60000", + "notionalCap": "2000000", + "notionalFloor": "400000", "maintMarginRatio": "0.05", - "cum": "1725.0" + "cum": "11250.0" } }, { "tier": 6.0, "symbol": "THE/USDT:USDT", "currency": "USDT", - "minNotional": 300000.0, - "maxNotional": 600000.0, + "minNotional": 2000000.0, + "maxNotional": 4000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "600000", - "notionalFloor": "300000", + "notionalCap": "4000000", + "notionalFloor": "2000000", "maintMarginRatio": "0.1", - "cum": "16725.0" + "cum": "111250.0" } }, { "tier": 7.0, "symbol": "THE/USDT:USDT", "currency": "USDT", - "minNotional": 600000.0, - "maxNotional": 750000.0, + "minNotional": 4000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "750000", - "notionalFloor": "600000", + "notionalCap": "5000000", + "notionalFloor": "4000000", "maintMarginRatio": "0.125", - "cum": "31725.0" + "cum": "211250.0" } }, { "tier": 8.0, "symbol": "THE/USDT:USDT", "currency": "USDT", - "minNotional": 750000.0, - "maxNotional": 1500000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "1500000", - "notionalFloor": "750000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.25", - "cum": "125475.0" + "cum": "836250.0" } }, { "tier": 9.0, "symbol": "THE/USDT:USDT", "currency": "USDT", - "minNotional": 1500000.0, - "maxNotional": 3000000.0, + "minNotional": 10000000.0, + "maxNotional": 20000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "3000000", - "notionalFloor": "1500000", + "notionalCap": "20000000", + "notionalFloor": "10000000", "maintMarginRatio": "0.5", - "cum": "500475.0" + "cum": "3336250.0" } } ], @@ -48695,13 +50345,13 @@ "symbol": "UNI/USDT:USDT", "currency": "USDT", "minNotional": 50000.0, - "maxNotional": 80000.0, + "maxNotional": 100000.0, "maintenanceMarginRate": 0.015, "maxLeverage": 40.0, "info": { "bracket": "3", "initialLeverage": "40", - "notionalCap": "80000", + "notionalCap": "100000", "notionalFloor": "50000", "maintMarginRatio": "0.015", "cum": "290.0" @@ -48711,119 +50361,119 @@ "tier": 4.0, "symbol": "UNI/USDT:USDT", "currency": "USDT", - "minNotional": 80000.0, - "maxNotional": 300000.0, + "minNotional": 100000.0, + "maxNotional": 500000.0, "maintenanceMarginRate": 0.02, "maxLeverage": 25.0, "info": { "bracket": "4", "initialLeverage": "25", - "notionalCap": "300000", - "notionalFloor": "80000", + "notionalCap": "500000", + "notionalFloor": "100000", "maintMarginRatio": "0.02", - "cum": "690.0" + "cum": "790.0" } }, { "tier": 5.0, "symbol": "UNI/USDT:USDT", "currency": "USDT", - "minNotional": 300000.0, - "maxNotional": 900000.0, + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { "bracket": "5", "initialLeverage": "20", - "notionalCap": "900000", - "notionalFloor": "300000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.025", - "cum": "2190.0" + "cum": "3290.0" } }, { "tier": 6.0, "symbol": "UNI/USDT:USDT", "currency": "USDT", - "minNotional": 900000.0, - "maxNotional": 3000000.0, + "minNotional": 1000000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "6", "initialLeverage": "10", - "notionalCap": "3000000", - "notionalFloor": "900000", + "notionalCap": "5000000", + "notionalFloor": "1000000", "maintMarginRatio": "0.05", - "cum": "24690.0" + "cum": "28290.0" } }, { "tier": 7.0, "symbol": "UNI/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 6000000.0, + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "7", "initialLeverage": "5", - "notionalCap": "6000000", - "notionalFloor": "3000000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.1", - "cum": "174690.0" + "cum": "278290.0" } }, { "tier": 8.0, "symbol": "UNI/USDT:USDT", "currency": "USDT", - "minNotional": 6000000.0, - "maxNotional": 7500000.0, + "minNotional": 10000000.0, + "maxNotional": 12500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "8", "initialLeverage": "4", - "notionalCap": "7500000", - "notionalFloor": "6000000", + "notionalCap": "12500000", + "notionalFloor": "10000000", "maintMarginRatio": "0.125", - "cum": "324690.0" + "cum": "528290.0" } }, { "tier": 9.0, "symbol": "UNI/USDT:USDT", "currency": "USDT", - "minNotional": 7500000.0, - "maxNotional": 18000000.0, + "minNotional": 12500000.0, + "maxNotional": 25000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "9", "initialLeverage": "2", - "notionalCap": "18000000", - "notionalFloor": "7500000", + "notionalCap": "25000000", + "notionalFloor": "12500000", "maintMarginRatio": "0.25", - "cum": "1262190.0" + "cum": "2090790.0" } }, { "tier": 10.0, "symbol": "UNI/USDT:USDT", "currency": "USDT", - "minNotional": 18000000.0, - "maxNotional": 30000000.0, + "minNotional": 25000000.0, + "maxNotional": 50000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "10", "initialLeverage": "1", - "notionalCap": "30000000", - "notionalFloor": "18000000", + "notionalCap": "50000000", + "notionalFloor": "25000000", "maintMarginRatio": "0.5", - "cum": "5762190.0" + "cum": "8340790.0" } } ], @@ -49655,6 +51305,161 @@ } } ], + "VIRTUAL/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "VIRTUAL/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "VIRTUAL/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "VIRTUAL/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "VIRTUAL/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "VIRTUAL/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "VIRTUAL/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "VIRTUAL/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "VIRTUAL/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "VIRTUAL/USDT:USDT", + "currency": "USDT", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "VOXEL/USDT:USDT": [ { "tier": 1.0, @@ -51060,10 +52865,10 @@ "minNotional": 0.0, "maxNotional": 5000.0, "maintenanceMarginRate": 0.02, - "maxLeverage": 25.0, + "maxLeverage": 10.0, "info": { "bracket": "1", - "initialLeverage": "25", + "initialLeverage": "10", "notionalCap": "5000", "notionalFloor": "0", "maintMarginRatio": "0.02", @@ -51077,10 +52882,10 @@ "minNotional": 5000.0, "maxNotional": 25000.0, "maintenanceMarginRate": 0.025, - "maxLeverage": 20.0, + "maxLeverage": 8.0, "info": { "bracket": "2", - "initialLeverage": "20", + "initialLeverage": "8", "notionalCap": "25000", "notionalFloor": "5000", "maintMarginRatio": "0.025", @@ -51094,10 +52899,10 @@ "minNotional": 25000.0, "maxNotional": 400000.0, "maintenanceMarginRate": 0.05, - "maxLeverage": 10.0, + "maxLeverage": 6.0, "info": { "bracket": "3", - "initialLeverage": "10", + "initialLeverage": "6", "notionalCap": "400000", "notionalFloor": "25000", "maintMarginRatio": "0.05", @@ -51143,13 +52948,13 @@ "symbol": "XEM/USDT:USDT", "currency": "USDT", "minNotional": 2000000.0, - "maxNotional": 6000000.0, + "maxNotional": 2100000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "6", "initialLeverage": "2", - "notionalCap": "6000000", + "notionalCap": "2100000", "notionalFloor": "2000000", "maintMarginRatio": "0.25", "cum": "295650.0" @@ -51159,17 +52964,17 @@ "tier": 7.0, "symbol": "XEM/USDT:USDT", "currency": "USDT", - "minNotional": 6000000.0, - "maxNotional": 10000000.0, + "minNotional": 2100000.0, + "maxNotional": 2200000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "7", "initialLeverage": "1", - "notionalCap": "10000000", - "notionalFloor": "6000000", + "notionalCap": "2200000", + "notionalFloor": "2100000", "maintMarginRatio": "0.5", - "cum": "1795650.0" + "cum": "820650.0" } } ], @@ -51180,14 +52985,14 @@ "currency": "USDT", "minNotional": 0.0, "maxNotional": 10000.0, - "maintenanceMarginRate": 0.015, - "maxLeverage": 50.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, "info": { "bracket": "1", - "initialLeverage": "50", + "initialLeverage": "75", "notionalCap": "10000", "notionalFloor": "0", - "maintMarginRatio": "0.015", + "maintMarginRatio": "0.01", "cum": "0.0" } }, @@ -51196,50 +53001,50 @@ "symbol": "XLM/USDT:USDT", "currency": "USDT", "minNotional": 10000.0, - "maxNotional": 150000.0, - "maintenanceMarginRate": 0.025, - "maxLeverage": 20.0, + "maxNotional": 100000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, "info": { "bracket": "2", - "initialLeverage": "20", - "notionalCap": "150000", + "initialLeverage": "50", + "notionalCap": "100000", "notionalFloor": "10000", - "maintMarginRatio": "0.025", - "cum": "100.0" + "maintMarginRatio": "0.015", + "cum": "50.0" } }, { "tier": 3.0, "symbol": "XLM/USDT:USDT", "currency": "USDT", - "minNotional": 150000.0, - "maxNotional": 250000.0, - "maintenanceMarginRate": 0.03, - "maxLeverage": 15.0, + "minNotional": 100000.0, + "maxNotional": 500000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, "info": { "bracket": "3", - "initialLeverage": "15", - "notionalCap": "250000", - "notionalFloor": "150000", - "maintMarginRatio": "0.03", - "cum": "850.0" + "initialLeverage": "25", + "notionalCap": "500000", + "notionalFloor": "100000", + "maintMarginRatio": "0.02", + "cum": "550.0" } }, { "tier": 4.0, "symbol": "XLM/USDT:USDT", "currency": "USDT", - "minNotional": 250000.0, + "minNotional": 500000.0, "maxNotional": 1000000.0, - "maintenanceMarginRate": 0.05, - "maxLeverage": 10.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, "info": { "bracket": "4", - "initialLeverage": "10", + "initialLeverage": "20", "notionalCap": "1000000", - "notionalFloor": "250000", - "maintMarginRatio": "0.05", - "cum": "5850.0" + "notionalFloor": "500000", + "maintMarginRatio": "0.025", + "cum": "3050.0" } }, { @@ -51247,67 +53052,84 @@ "symbol": "XLM/USDT:USDT", "currency": "USDT", "minNotional": 1000000.0, - "maxNotional": 2000000.0, + "maxNotional": 5000000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "5000000", + "notionalFloor": "1000000", + "maintMarginRatio": "0.05", + "cum": "28050.0" + } + }, + { + "tier": 6.0, + "symbol": "XLM/USDT:USDT", + "currency": "USDT", + "minNotional": 5000000.0, + "maxNotional": 10000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { - "bracket": "5", + "bracket": "6", "initialLeverage": "5", - "notionalCap": "2000000", - "notionalFloor": "1000000", + "notionalCap": "10000000", + "notionalFloor": "5000000", "maintMarginRatio": "0.1", - "cum": "55850.0" + "cum": "278050.0" } }, { - "tier": 6.0, + "tier": 7.0, "symbol": "XLM/USDT:USDT", "currency": "USDT", - "minNotional": 2000000.0, - "maxNotional": 5000000.0, + "minNotional": 10000000.0, + "maxNotional": 12500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { - "bracket": "6", + "bracket": "7", "initialLeverage": "4", - "notionalCap": "5000000", - "notionalFloor": "2000000", + "notionalCap": "12500000", + "notionalFloor": "10000000", "maintMarginRatio": "0.125", - "cum": "105850.0" + "cum": "528050.0" } }, { - "tier": 7.0, + "tier": 8.0, "symbol": "XLM/USDT:USDT", "currency": "USDT", - "minNotional": 5000000.0, - "maxNotional": 10000000.0, + "minNotional": 12500000.0, + "maxNotional": 25000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { - "bracket": "7", + "bracket": "8", "initialLeverage": "2", - "notionalCap": "10000000", - "notionalFloor": "5000000", + "notionalCap": "25000000", + "notionalFloor": "12500000", "maintMarginRatio": "0.25", - "cum": "730850.0" + "cum": "2090550.0" } }, { - "tier": 8.0, + "tier": 9.0, "symbol": "XLM/USDT:USDT", "currency": "USDT", - "minNotional": 10000000.0, - "maxNotional": 20000000.0, + "minNotional": 25000000.0, + "maxNotional": 50000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { - "bracket": "8", + "bracket": "9", "initialLeverage": "1", - "notionalCap": "20000000", - "notionalFloor": "10000000", + "notionalCap": "50000000", + "notionalFloor": "25000000", "maintMarginRatio": "0.5", - "cum": "3230850.0" + "cum": "8340550.0" } } ], @@ -53284,14 +55106,14 @@ "currency": "USDT", "minNotional": 0.0, "maxNotional": 5000.0, - "maintenanceMarginRate": 0.015, - "maxLeverage": 50.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, "info": { "bracket": "1", - "initialLeverage": "50", + "initialLeverage": "75", "notionalCap": "5000", "notionalFloor": "0", - "maintMarginRatio": "0.015", + "maintMarginRatio": "0.01", "cum": "0.0" } }, @@ -53300,15 +55122,15 @@ "symbol": "ZRX/USDT:USDT", "currency": "USDT", "minNotional": 5000.0, - "maxNotional": 20000.0, - "maintenanceMarginRate": 0.02, - "maxLeverage": 25.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, "info": { "bracket": "2", - "initialLeverage": "25", - "notionalCap": "20000", + "initialLeverage": "50", + "notionalCap": "10000", "notionalFloor": "5000", - "maintMarginRatio": "0.02", + "maintMarginRatio": "0.015", "cum": "25.0" } }, @@ -53316,102 +55138,119 @@ "tier": 3.0, "symbol": "ZRX/USDT:USDT", "currency": "USDT", - "minNotional": 20000.0, - "maxNotional": 25000.0, + "minNotional": 10000.0, + "maxNotional": 50000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "50000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "ZRX/USDT:USDT", + "currency": "USDT", + "minNotional": 50000.0, + "maxNotional": 100000.0, "maintenanceMarginRate": 0.025, "maxLeverage": 20.0, "info": { - "bracket": "3", + "bracket": "4", "initialLeverage": "20", - "notionalCap": "25000", - "notionalFloor": "20000", + "notionalCap": "100000", + "notionalFloor": "50000", "maintMarginRatio": "0.025", - "cum": "125.0" + "cum": "325.0" } }, { - "tier": 4.0, + "tier": 5.0, "symbol": "ZRX/USDT:USDT", "currency": "USDT", - "minNotional": 25000.0, - "maxNotional": 200000.0, + "minNotional": 100000.0, + "maxNotional": 500000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { - "bracket": "4", + "bracket": "5", "initialLeverage": "10", - "notionalCap": "200000", - "notionalFloor": "25000", + "notionalCap": "500000", + "notionalFloor": "100000", "maintMarginRatio": "0.05", - "cum": "750.0" + "cum": "2825.0" } }, { - "tier": 5.0, + "tier": 6.0, "symbol": "ZRX/USDT:USDT", "currency": "USDT", - "minNotional": 200000.0, - "maxNotional": 400000.0, + "minNotional": 500000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { - "bracket": "5", + "bracket": "6", "initialLeverage": "5", - "notionalCap": "400000", - "notionalFloor": "200000", + "notionalCap": "1000000", + "notionalFloor": "500000", "maintMarginRatio": "0.1", - "cum": "10750.0" + "cum": "27825.0" } }, { - "tier": 6.0, + "tier": 7.0, "symbol": "ZRX/USDT:USDT", "currency": "USDT", - "minNotional": 400000.0, - "maxNotional": 500000.0, + "minNotional": 1000000.0, + "maxNotional": 1250000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { - "bracket": "6", + "bracket": "7", "initialLeverage": "4", - "notionalCap": "500000", - "notionalFloor": "400000", + "notionalCap": "1250000", + "notionalFloor": "1000000", "maintMarginRatio": "0.125", - "cum": "20750.0" + "cum": "52825.0" } }, { - "tier": 7.0, + "tier": 8.0, "symbol": "ZRX/USDT:USDT", "currency": "USDT", - "minNotional": 500000.0, - "maxNotional": 1000000.0, + "minNotional": 1250000.0, + "maxNotional": 2500000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { - "bracket": "7", + "bracket": "8", "initialLeverage": "2", - "notionalCap": "1000000", - "notionalFloor": "500000", + "notionalCap": "2500000", + "notionalFloor": "1250000", "maintMarginRatio": "0.25", - "cum": "83250.0" + "cum": "209075.0" } }, { - "tier": 8.0, + "tier": 9.0, "symbol": "ZRX/USDT:USDT", "currency": "USDT", - "minNotional": 1000000.0, - "maxNotional": 2000000.0, + "minNotional": 2500000.0, + "maxNotional": 5000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { - "bracket": "8", + "bracket": "9", "initialLeverage": "1", - "notionalCap": "2000000", - "notionalFloor": "1000000", + "notionalCap": "5000000", + "notionalFloor": "2500000", "maintMarginRatio": "0.5", - "cum": "333250.0" + "cum": "834075.0" } } ] diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index cb95cd06132..81142683903 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -7,7 +7,7 @@ import inspect import logging import signal -from collections.abc import Coroutine +from collections.abc import Coroutine, Generator from copy import deepcopy from datetime import datetime, timedelta, timezone from math import floor, isnan @@ -201,7 +201,7 @@ def __init__( self._cache_lock = Lock() # Cache for 10 minutes ... - self._fetch_tickers_cache: TTLCache = TTLCache(maxsize=2, ttl=60 * 10) + self._fetch_tickers_cache: TTLCache = TTLCache(maxsize=4, ttl=60 * 10) # Cache values for 300 to avoid frequent polling of the exchange for prices # Caching only applies to RPC methods, so prices for open trades are still # refreshed once every iteration. @@ -705,14 +705,22 @@ def validate_stakecurrency(self, stake_currency: str) -> None: f"Available currencies are: {', '.join(quote_currencies)}" ) - def get_valid_pair_combination(self, curr_1: str, curr_2: str) -> str: + def get_valid_pair_combination(self, curr_1: str, curr_2: str) -> Generator[str, None, None]: """ Get valid pair combination of curr_1 and curr_2 by trying both combinations. """ - for pair in [f"{curr_1}/{curr_2}", f"{curr_2}/{curr_1}"]: + yielded = False + for pair in ( + f"{curr_1}/{curr_2}", + f"{curr_2}/{curr_1}", + f"{curr_1}/{curr_2}:{curr_2}", + f"{curr_2}/{curr_1}:{curr_1}", + ): if pair in self.markets and self.markets[pair].get("active"): - return pair - raise ValueError(f"Could not combine {curr_1} and {curr_2} to get a valid pair.") + yielded = True + yield pair + if not yielded: + raise ValueError(f"Could not combine {curr_1} and {curr_2} to get a valid pair.") def validate_timeframes(self, timeframe: str | None) -> None: """ @@ -1801,24 +1809,37 @@ def fetch_bids_asks(self, symbols: list[str] | None = None, *, cached: bool = Fa raise OperationalException(e) from e @retrier - def get_tickers(self, symbols: list[str] | None = None, *, cached: bool = False) -> Tickers: + def get_tickers( + self, + symbols: list[str] | None = None, + *, + cached: bool = False, + market_type: TradingMode | None = None, + ) -> Tickers: """ :param symbols: List of symbols to fetch :param cached: Allow cached result + :param market_type: Market type to fetch - either spot or futures. :return: fetch_tickers result """ tickers: Tickers if not self.exchange_has("fetchTickers"): return {} + cache_key = f"fetch_tickers_{market_type}" if market_type else "fetch_tickers" if cached: with self._cache_lock: - tickers = self._fetch_tickers_cache.get("fetch_tickers") # type: ignore + tickers = self._fetch_tickers_cache.get(cache_key) # type: ignore if tickers: return tickers try: - tickers = self._api.fetch_tickers(symbols) + # Re-map futures to swap + market_types = { + TradingMode.FUTURES: "swap", + } + params = {"type": market_types.get(market_type, market_type)} if market_type else {} + tickers = self._api.fetch_tickers(symbols, params) with self._cache_lock: - self._fetch_tickers_cache["fetch_tickers"] = tickers + self._fetch_tickers_cache[cache_key] = tickers return tickers except ccxt.NotSupported as e: raise OperationalException( @@ -1842,7 +1863,39 @@ def get_tickers(self, symbols: list[str] | None = None, *, cached: bool = False) except ccxt.BaseError as e: raise OperationalException(e) from e - # Pricing info + def get_conversion_rate(self, coin: str, currency: str) -> float | None: + """ + Quick and cached way to get conversion rate one currency to the other. + Can then be used as "rate * amount" to convert between currencies. + :param coin: Coin to convert + :param currency: Currency to convert to + :returns: Conversion rate from coin to currency + :raises: ExchangeErrors + """ + if coin == currency: + return 1.0 + tickers = self.get_tickers(cached=True) + try: + for pair in self.get_valid_pair_combination(coin, currency): + ticker: Ticker | None = tickers.get(pair, None) + if not ticker: + tickers_other: Tickers = self.get_tickers( + cached=True, + market_type=( + TradingMode.SPOT + if self.trading_mode != TradingMode.SPOT + else TradingMode.FUTURES + ), + ) + ticker = tickers_other.get(pair, None) + if ticker: + rate: float | None = ticker.get("last", None) + if rate and pair.startswith(currency) and not pair.endswith(currency): + rate = 1.0 / rate + return rate + except ValueError: + return None + return None @retrier def fetch_ticker(self, pair: str) -> Ticker: @@ -2198,10 +2251,13 @@ def calculate_fee_rate( # If cost is None or 0.0 -> falsy, return None return None try: - comb = self.get_valid_pair_combination(fee_curr, self._config["stake_currency"]) - tick = self.fetch_ticker(comb) - - fee_to_quote_rate = safe_value_fallback2(tick, tick, "last", "ask") + for comb in self.get_valid_pair_combination( + fee_curr, self._config["stake_currency"] + ): + tick = self.fetch_ticker(comb) + fee_to_quote_rate = safe_value_fallback2(tick, tick, "last", "ask") + if tick: + break except (ValueError, ExchangeError): fee_to_quote_rate = self._config["exchange"].get("unknown_fee_rate", None) if not fee_to_quote_rate: @@ -3586,7 +3642,7 @@ def get_liquidation_price( liquidation_price_buffer = ( liquidation_price - buffer_amount if is_short else liquidation_price + buffer_amount ) - return max(liquidation_price_buffer, 0.0) + return self.price_to_precision(pair, max(liquidation_price_buffer, 0.0)) else: return None diff --git a/freqtrade/exchange/exchange_utils.py b/freqtrade/exchange/exchange_utils.py index 1c8a30001f4..1c989424248 100644 --- a/freqtrade/exchange/exchange_utils.py +++ b/freqtrade/exchange/exchange_utils.py @@ -308,7 +308,9 @@ def price_to_precision( decimal_to_precision( price, rounding_mode=rounding_mode, - precision=price_precision, + precision=int(price_precision) + if precisionMode != TICK_SIZE + else price_precision, counting_mode=precisionMode, ) ) diff --git a/freqtrade/exchange/kraken.py b/freqtrade/exchange/kraken.py index 75e2bcbd3e0..8573d611d76 100644 --- a/freqtrade/exchange/kraken.py +++ b/freqtrade/exchange/kraken.py @@ -50,11 +50,17 @@ def market_is_tradable(self, market: dict[str, Any]) -> bool: return parent_check and market.get("darkpool", False) is False - def get_tickers(self, symbols: list[str] | None = None, *, cached: bool = False) -> Tickers: + def get_tickers( + self, + symbols: list[str] | None = None, + *, + cached: bool = False, + market_type: TradingMode | None = None, + ) -> Tickers: # Only fetch tickers for current stake currency # Otherwise the request for kraken becomes too large. symbols = list(self.get_markets(quote_currencies=[self._config["stake_currency"]])) - return super().get_tickers(symbols=symbols, cached=cached) + return super().get_tickers(symbols=symbols, cached=cached, market_type=market_type) def consolidate_balances(self, balances: CcxtBalances) -> CcxtBalances: """ diff --git a/freqtrade/freqai/data_kitchen.py b/freqtrade/freqai/data_kitchen.py index 5292dc0afed..cac76ece537 100644 --- a/freqtrade/freqai/data_kitchen.py +++ b/freqtrade/freqai/data_kitchen.py @@ -849,7 +849,7 @@ def use_strategy_to_populate_indicators( # noqa: C901 dataframe = strategy.set_freqai_targets(dataframe.copy(), metadata=metadata) dataframe = self.remove_special_chars_from_feature_names(dataframe) - self.get_unique_classes_from_labels(dataframe) + self.get_unique_classes_from_labels(dataframe) if self.config.get("reduce_df_footprint", False): dataframe = reduce_dataframe_footprint(dataframe) diff --git a/freqtrade/freqai/prediction_models/XGBoostRFRegressor.py b/freqtrade/freqai/prediction_models/XGBoostRFRegressor.py index 12231ed13f3..140186075f1 100644 --- a/freqtrade/freqai/prediction_models/XGBoostRFRegressor.py +++ b/freqtrade/freqai/prediction_models/XGBoostRFRegressor.py @@ -5,7 +5,6 @@ from freqtrade.freqai.base_models.BaseRegressionModel import BaseRegressionModel from freqtrade.freqai.data_kitchen import FreqaiDataKitchen -from freqtrade.freqai.tensorboard import TBCallback logger = logging.getLogger(__name__) @@ -45,7 +44,12 @@ def fit(self, data_dictionary: dict, dk: FreqaiDataKitchen, **kwargs) -> Any: model = XGBRFRegressor(**self.model_training_parameters) - model.set_params(callbacks=[TBCallback(dk.data_path)]) + # Callbacks are not supported for XGBRFRegressor, and version 2.1.x started to throw + # the following error: + # NotImplementedError: `early_stopping_rounds` and `callbacks` are not implemented + # for random forest. + + # model.set_params(callbacks=[TBCallback(dk.data_path)]) model.fit( X=X, y=y, @@ -55,6 +59,6 @@ def fit(self, data_dictionary: dict, dk: FreqaiDataKitchen, **kwargs) -> Any: xgb_model=xgb_model, ) # set the callbacks to empty so that we can serialize to disk later - model.set_params(callbacks=[]) + # model.set_params(callbacks=[]) return model diff --git a/freqtrade/leverage/liquidation_price.py b/freqtrade/leverage/liquidation_price.py index aed8c9160a9..4b49e455154 100644 --- a/freqtrade/leverage/liquidation_price.py +++ b/freqtrade/leverage/liquidation_price.py @@ -27,9 +27,12 @@ def update_liquidation_prices( total_wallet_stake = 0.0 if dry_run: # Parameters only needed for cross margin - total_wallet_stake = wallets.get_total(stake_currency) + total_wallet_stake = wallets.get_collateral() - logger.info("Updating liquidation price for all open trades.") + logger.info( + "Updating liquidation price for all open trades. " + f"Collateral {total_wallet_stake} {stake_currency}." + ) open_trades = Trade.get_open_trades() for t in open_trades: # TODO: This should be done in a batch update diff --git a/freqtrade/optimize/analysis/lookahead_helpers.py b/freqtrade/optimize/analysis/lookahead_helpers.py index d664f9635c3..631a9549f8b 100644 --- a/freqtrade/optimize/analysis/lookahead_helpers.py +++ b/freqtrade/optimize/analysis/lookahead_helpers.py @@ -10,7 +10,7 @@ from freqtrade.exceptions import OperationalException from freqtrade.optimize.analysis.lookahead import LookaheadAnalysis from freqtrade.resolvers import StrategyResolver -from freqtrade.util import print_rich_table +from freqtrade.util import get_dry_run_wallet, print_rich_table logger = logging.getLogger(__name__) @@ -163,7 +163,7 @@ def calculate_config_overrides(config: Config): config["max_open_trades"] = len(config["pairs"]) min_dry_run_wallet = 1000000000 - if config["dry_run_wallet"] < min_dry_run_wallet: + if get_dry_run_wallet(config) < min_dry_run_wallet: logger.info( "Dry run wallet was not set to 1 billion, pushing it up there " "just to avoid false positives" diff --git a/freqtrade/optimize/hyperopt/hyperopt_optimizer.py b/freqtrade/optimize/hyperopt/hyperopt_optimizer.py index bd234aa5701..c8d18d2248b 100644 --- a/freqtrade/optimize/hyperopt/hyperopt_optimizer.py +++ b/freqtrade/optimize/hyperopt/hyperopt_optimizer.py @@ -28,6 +28,7 @@ from freqtrade.optimize.hyperopt_tools import HyperoptStateContainer, HyperoptTools from freqtrade.optimize.optimize_reports import generate_strategy_stats from freqtrade.resolvers.hyperopt_resolver import HyperOptLossResolver +from freqtrade.util.dry_run_wallet import get_dry_run_wallet # Suppress scikit-learn FutureWarnings from skopt @@ -363,6 +364,7 @@ def _get_results_dict( config=self.config, processed=processed, backtest_stats=strat_stats, + starting_balance=get_dry_run_wallet(self.config), ) return { "loss": loss, diff --git a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_calmar.py b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_calmar.py index f22d59e50b5..4f1a82e1ea4 100644 --- a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_calmar.py +++ b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_calmar.py @@ -9,7 +9,6 @@ from pandas import DataFrame -from freqtrade.constants import Config from freqtrade.data.metrics import calculate_calmar from freqtrade.optimize.hyperopt import IHyperOptLoss @@ -24,10 +23,9 @@ class CalmarHyperOptLoss(IHyperOptLoss): @staticmethod def hyperopt_loss_function( results: DataFrame, - trade_count: int, min_date: datetime, max_date: datetime, - config: Config, + starting_balance: float, *args, **kwargs, ) -> float: @@ -36,7 +34,6 @@ def hyperopt_loss_function( Uses Calmar Ratio calculation. """ - starting_balance = config["dry_run_wallet"] calmar_ratio = calculate_calmar(results, min_date, max_date, starting_balance) # print(expected_returns_mean, max_drawdown, calmar_ratio) return -calmar_ratio diff --git a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_interface.py b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_interface.py index a48fee7313d..ddc96d6a0ea 100644 --- a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_interface.py +++ b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_interface.py @@ -31,6 +31,7 @@ def hyperopt_loss_function( config: Config, processed: dict[str, DataFrame], backtest_stats: dict[str, Any], + starting_balance: float, **kwargs, ) -> float: """ diff --git a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_max_drawdown_relative.py b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_max_drawdown_relative.py index ee7088d755e..3cd578cb403 100644 --- a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_max_drawdown_relative.py +++ b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_max_drawdown_relative.py @@ -7,7 +7,6 @@ from pandas import DataFrame -from freqtrade.constants import Config from freqtrade.data.metrics import calculate_underwater from freqtrade.optimize.hyperopt import IHyperOptLoss @@ -21,7 +20,9 @@ class MaxDrawDownRelativeHyperOptLoss(IHyperOptLoss): """ @staticmethod - def hyperopt_loss_function(results: DataFrame, config: Config, *args, **kwargs) -> float: + def hyperopt_loss_function( + results: DataFrame, starting_balance: float, *args, **kwargs + ) -> float: """ Objective function. @@ -31,7 +32,7 @@ def hyperopt_loss_function(results: DataFrame, config: Config, *args, **kwargs) total_profit = results["profit_abs"].sum() try: drawdown_df = calculate_underwater( - results, value_col="profit_abs", starting_balance=config["dry_run_wallet"] + results, value_col="profit_abs", starting_balance=starting_balance ) max_drawdown = abs(min(drawdown_df["drawdown"])) relative_drawdown = max(drawdown_df["drawdown_relative"]) diff --git a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_multi_metric.py b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_multi_metric.py index de8d117d6ae..adffdfb0bca 100644 --- a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_multi_metric.py +++ b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_multi_metric.py @@ -33,7 +33,6 @@ import numpy as np from pandas import DataFrame -from freqtrade.constants import Config from freqtrade.data.metrics import calculate_expectancy, calculate_max_drawdown from freqtrade.optimize.hyperopt import IHyperOptLoss @@ -57,7 +56,7 @@ class MultiMetricHyperOptLoss(IHyperOptLoss): def hyperopt_loss_function( results: DataFrame, trade_count: int, - config: Config, + starting_balance: float, **kwargs, ) -> float: total_profit = results["profit_abs"].sum() @@ -83,7 +82,7 @@ def hyperopt_loss_function( # Calculate drawdown try: drawdown = calculate_max_drawdown( - results, starting_balance=config["dry_run_wallet"], value_col="profit_abs" + results, starting_balance=starting_balance, value_col="profit_abs" ) relative_account_drawdown = drawdown.relative_account_drawdown except ValueError: diff --git a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_profit_drawdown.py b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_profit_drawdown.py index 61e2a6d3266..af1b33dfb7e 100644 --- a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_profit_drawdown.py +++ b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_profit_drawdown.py @@ -10,7 +10,6 @@ from pandas import DataFrame -from freqtrade.constants import Config from freqtrade.data.metrics import calculate_max_drawdown from freqtrade.optimize.hyperopt import IHyperOptLoss @@ -21,12 +20,14 @@ class ProfitDrawDownHyperOptLoss(IHyperOptLoss): @staticmethod - def hyperopt_loss_function(results: DataFrame, config: Config, *args, **kwargs) -> float: + def hyperopt_loss_function( + results: DataFrame, starting_balance: float, *args, **kwargs + ) -> float: total_profit = results["profit_abs"].sum() try: drawdown = calculate_max_drawdown( - results, starting_balance=config["dry_run_wallet"], value_col="profit_abs" + results, starting_balance=starting_balance, value_col="profit_abs" ) relative_account_drawdown = drawdown.relative_account_drawdown except ValueError: diff --git a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_sharpe.py b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_sharpe.py index 2c7042a8a71..20e4ee2b6c6 100644 --- a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_sharpe.py +++ b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_sharpe.py @@ -9,7 +9,6 @@ from pandas import DataFrame -from freqtrade.constants import Config from freqtrade.data.metrics import calculate_sharpe from freqtrade.optimize.hyperopt import IHyperOptLoss @@ -24,10 +23,9 @@ class SharpeHyperOptLoss(IHyperOptLoss): @staticmethod def hyperopt_loss_function( results: DataFrame, - trade_count: int, min_date: datetime, max_date: datetime, - config: Config, + starting_balance: float, *args, **kwargs, ) -> float: @@ -36,7 +34,6 @@ def hyperopt_loss_function( Uses Sharpe Ratio calculation. """ - starting_balance = config["dry_run_wallet"] sharp_ratio = calculate_sharpe(results, min_date, max_date, starting_balance) # print(expected_returns_mean, up_stdev, sharp_ratio) return -sharp_ratio diff --git a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_sortino.py b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_sortino.py index 32ff0c73f69..935d038e554 100644 --- a/freqtrade/optimize/hyperopt_loss/hyperopt_loss_sortino.py +++ b/freqtrade/optimize/hyperopt_loss/hyperopt_loss_sortino.py @@ -9,7 +9,6 @@ from pandas import DataFrame -from freqtrade.constants import Config from freqtrade.data.metrics import calculate_sortino from freqtrade.optimize.hyperopt import IHyperOptLoss @@ -24,10 +23,9 @@ class SortinoHyperOptLoss(IHyperOptLoss): @staticmethod def hyperopt_loss_function( results: DataFrame, - trade_count: int, min_date: datetime, max_date: datetime, - config: Config, + starting_balance: float, *args, **kwargs, ) -> float: @@ -36,7 +34,6 @@ def hyperopt_loss_function( Uses Sortino Ratio calculation. """ - starting_balance = config["dry_run_wallet"] sortino_ratio = calculate_sortino(results, min_date, max_date, starting_balance) # print(expected_returns_mean, down_stdev, sortino_ratio) return -sortino_ratio diff --git a/freqtrade/optimize/optimize_reports/optimize_reports.py b/freqtrade/optimize/optimize_reports/optimize_reports.py index 2f900eb7d1a..95b72e5148a 100644 --- a/freqtrade/optimize/optimize_reports/optimize_reports.py +++ b/freqtrade/optimize/optimize_reports/optimize_reports.py @@ -18,7 +18,7 @@ calculate_sortino, ) from freqtrade.ft_types import BacktestResultType -from freqtrade.util import decimals_per_coin, fmt_coin +from freqtrade.util import decimals_per_coin, fmt_coin, get_dry_run_wallet logger = logging.getLogger(__name__) @@ -69,7 +69,7 @@ def generate_rejected_signals( def _generate_result_line( - result: DataFrame, starting_balance: int, first_column: str | list[str] + result: DataFrame, starting_balance: float, first_column: str | list[str] ) -> dict: """ Generate one result dict, with "first_column" as key. @@ -111,7 +111,7 @@ def _generate_result_line( def generate_pair_metrics( pairlist: list[str], stake_currency: str, - starting_balance: int, + starting_balance: float, results: DataFrame, skip_nan: bool = False, ) -> list[dict]: @@ -144,7 +144,7 @@ def generate_pair_metrics( def generate_tag_metrics( tag_type: Literal["enter_tag", "exit_reason"] | list[Literal["enter_tag", "exit_reason"]], - starting_balance: int, + starting_balance: float, results: DataFrame, skip_nan: bool = False, ) -> list[dict]: @@ -374,7 +374,7 @@ def generate_strategy_stats( return {} config = content["config"] max_open_trades = min(config["max_open_trades"], len(pairlist)) - start_balance = config["dry_run_wallet"] + start_balance = get_dry_run_wallet(config) stake_currency = config["stake_currency"] pair_results = generate_pair_metrics( diff --git a/freqtrade/persistence/trade_model.py b/freqtrade/persistence/trade_model.py index 2726f6cb868..e6d417751f8 100644 --- a/freqtrade/persistence/trade_model.py +++ b/freqtrade/persistence/trade_model.py @@ -172,12 +172,20 @@ def trade(self) -> "LocalTrade": @property def stake_amount(self) -> float: """Amount in stake currency used for this order""" - return self.safe_amount * self.safe_price / self.trade.leverage + return float( + FtPrecise(self.safe_amount) + * FtPrecise(self.safe_price) + / FtPrecise(self.trade.leverage) + ) @property def stake_amount_filled(self) -> float: """Filled Amount in stake currency used for this order""" - return self.safe_filled * self.safe_price / self.trade.leverage + return float( + FtPrecise(self.safe_filled) + * FtPrecise(self.safe_price) + / FtPrecise(self.trade.leverage) + ) def __repr__(self): return ( diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index cf86f070ddb..8ec7c7bae6f 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -28,6 +28,7 @@ from freqtrade.resolvers import ExchangeResolver, StrategyResolver from freqtrade.strategy import IStrategy from freqtrade.strategy.strategy_wrapper import strategy_safe_wrapper +from freqtrade.util import get_dry_run_wallet logger = logging.getLogger(__name__) @@ -706,7 +707,7 @@ def plot_profit(config: Config) -> None: trades, config["timeframe"], config.get("stake_currency", ""), - config.get("available_capital", config["dry_run_wallet"]), + config.get("available_capital", get_dry_run_wallet(config)), ) store_plot_file( fig, diff --git a/freqtrade/plugins/pairlist/PercentChangePairList.py b/freqtrade/plugins/pairlist/PercentChangePairList.py index cbc86f259d4..4f91a47d11d 100644 --- a/freqtrade/plugins/pairlist/PercentChangePairList.py +++ b/freqtrade/plugins/pairlist/PercentChangePairList.py @@ -8,7 +8,7 @@ import logging from datetime import timedelta -from typing import Any +from typing import TypedDict from cachetools import TTLCache from pandas import DataFrame @@ -24,6 +24,11 @@ logger = logging.getLogger(__name__) +class SymbolWithPercentage(TypedDict): + symbol: str + percentage: float | None + + class PercentChangePairList(IPairList): is_pairlist_generator = True supports_backtesting = SupportsBacktesting.NO @@ -191,7 +196,6 @@ def gen_pairlist(self, tickers: Tickers) -> list[str]: for k, v in tickers.items() if ( self._exchange.get_pair_quote_currency(k) == self._stake_currency - and (self._use_range or v.get("percentage") is not None) and v["symbol"] in _pairlist ) ] @@ -212,13 +216,15 @@ def filter_pairlist(self, pairlist: list[str], tickers: dict) -> list[str]: :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new whitelist """ - filtered_tickers: list[dict[str, Any]] = [{"symbol": k} for k in pairlist] + filtered_tickers: list[SymbolWithPercentage] = [ + {"symbol": k, "percentage": None} for k in pairlist + ] if self._use_range: # calculating using lookback_period - self.fetch_percent_change_from_lookback_period(filtered_tickers) + filtered_tickers = self.fetch_percent_change_from_lookback_period(filtered_tickers) else: # Fetching 24h change by default from supported exchange tickers - self.fetch_percent_change_from_tickers(filtered_tickers, tickers) + filtered_tickers = self.fetch_percent_change_from_tickers(filtered_tickers, tickers) if self._min_value is not None: filtered_tickers = [v for v in filtered_tickers if v["percentage"] > self._min_value] @@ -228,7 +234,7 @@ def filter_pairlist(self, pairlist: list[str], tickers: dict) -> list[str]: sorted_tickers = sorted( filtered_tickers, reverse=self._sort_direction == "desc", - key=lambda t: t["percentage"], + key=lambda t: t["percentage"], # type: ignore ) # Validate whitelist to only have active market pairs @@ -240,7 +246,7 @@ def filter_pairlist(self, pairlist: list[str], tickers: dict) -> list[str]: return pairs def fetch_candles_for_lookback_period( - self, filtered_tickers: list[dict[str, str]] + self, filtered_tickers: list[SymbolWithPercentage] ) -> dict[PairWithTimeframe, DataFrame]: since_ms = ( int( @@ -262,7 +268,6 @@ def fetch_candles_for_lookback_period( ) * 1000 ) - # todo: utc date output for starting date self.log_once( f"Using change range of {self._lookback_period} candles, timeframe: " f"{self._lookback_timeframe}, starting from {format_ms_time(since_ms)} " @@ -277,7 +282,9 @@ def fetch_candles_for_lookback_period( candles = self._exchange.refresh_ohlcv_with_cache(needed_pairs, since_ms) return candles - def fetch_percent_change_from_lookback_period(self, filtered_tickers: list[dict[str, Any]]): + def fetch_percent_change_from_lookback_period( + self, filtered_tickers: list[SymbolWithPercentage] + ) -> list[SymbolWithPercentage]: # get lookback period in ms, for exchange ohlcv fetch candles = self.fetch_candles_for_lookback_period(filtered_tickers) @@ -302,16 +309,23 @@ def fetch_percent_change_from_lookback_period(self, filtered_tickers: list[dict[ filtered_tickers[i]["percentage"] = pct_change else: filtered_tickers[i]["percentage"] = 0 + return filtered_tickers - def fetch_percent_change_from_tickers(self, filtered_tickers: list[dict[str, Any]], tickers): - for i, p in enumerate(filtered_tickers): + def fetch_percent_change_from_tickers( + self, filtered_tickers: list[SymbolWithPercentage], tickers + ) -> list[SymbolWithPercentage]: + valid_tickers: list[SymbolWithPercentage] = [] + for p in filtered_tickers: # Filter out assets - if not self._validate_pair( - p["symbol"], tickers[p["symbol"]] if p["symbol"] in tickers else None + if ( + self._validate_pair( + p["symbol"], tickers[p["symbol"]] if p["symbol"] in tickers else None + ) + and p["symbol"] != "UNI/USDT" ): - filtered_tickers.remove(p) - else: - filtered_tickers[i]["percentage"] = tickers[p["symbol"]]["percentage"] + p["percentage"] = tickers[p["symbol"]]["percentage"] + valid_tickers.append(p) + return valid_tickers def _validate_pair(self, pair: str, ticker: Ticker | None) -> bool: """ diff --git a/freqtrade/rpc/api_server/api_v1.py b/freqtrade/rpc/api_server/api_v1.py index 8ba370c4e9c..8502d92e235 100644 --- a/freqtrade/rpc/api_server/api_v1.py +++ b/freqtrade/rpc/api_server/api_v1.py @@ -396,6 +396,7 @@ def pair_history( config = deepcopy(config) config.update( { + "timeframe": timeframe, "strategy": strategy, "timerange": timerange, "freqaimodel": freqaimodel if freqaimodel else config.get("freqaimodel"), @@ -416,6 +417,7 @@ def pair_history_filtered( config = deepcopy(config) config.update( { + "timeframe": payload.timeframe, "strategy": payload.strategy, "timerange": payload.timerange, "freqaimodel": ( diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 274eee6119a..c22758fa485 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -7,7 +7,7 @@ from collections.abc import Generator, Sequence from datetime import date, datetime, timedelta, timezone from math import isnan -from typing import Any, cast +from typing import Any import psutil from dateutil.relativedelta import relativedelta @@ -39,7 +39,7 @@ ) from freqtrade.exceptions import ExchangeError, PricingError from freqtrade.exchange import timeframe_to_minutes, timeframe_to_msecs -from freqtrade.exchange.exchange_types import Ticker, Tickers +from freqtrade.exchange.exchange_utils import price_to_precision from freqtrade.loggers import bufferHandler from freqtrade.persistence import KeyStoreKeys, KeyValueStore, PairLocks, Trade from freqtrade.persistence.models import PairLock @@ -250,7 +250,11 @@ def _rpc_trade_status(self, trade_ids: list[int] | None = None) -> list[dict[str stoploss_entry_dist_ratio = stop_entry.profit_ratio # calculate distance to stoploss - stoploss_current_dist = trade.stop_loss - current_rate + stoploss_current_dist = price_to_precision( + trade.stop_loss - current_rate, + trade.price_precision, + trade.precision_mode_price, + ) stoploss_current_dist_ratio = stoploss_current_dist / current_rate trade_dict = trade.to_json() @@ -689,7 +693,7 @@ def _rpc_trade_statistics( } def __balance_get_est_stake( - self, coin: str, stake_currency: str, amount: float, balance: Wallet, tickers: Tickers + self, coin: str, stake_currency: str, amount: float, balance: Wallet ) -> tuple[float, float]: est_stake = 0.0 est_bot_stake = 0.0 @@ -700,14 +704,18 @@ def __balance_get_est_stake( est_stake = balance.free est_bot_stake = amount else: - pair = self._freqtrade.exchange.get_valid_pair_combination(coin, stake_currency) - rate: float | None = cast(Ticker, tickers.get(pair, {})).get("last", None) - if rate: - if pair.startswith(stake_currency) and not pair.endswith(stake_currency): - rate = 1.0 / rate - est_stake = rate * balance.total - est_bot_stake = rate * amount + try: + rate: float | None = self._freqtrade.exchange.get_conversion_rate( + coin, stake_currency + ) + if rate: + est_stake = rate * balance.total + est_bot_stake = rate * amount + return est_stake, est_bot_stake + except (ExchangeError, PricingError) as e: + logger.warning(f"Error {e} getting rate for {coin}") + pass return est_stake, est_bot_stake def _rpc_balance(self, stake_currency: str, fiat_display_currency: str) -> dict: @@ -715,10 +723,6 @@ def _rpc_balance(self, stake_currency: str, fiat_display_currency: str) -> dict: currencies: list[dict] = [] total = 0.0 total_bot = 0.0 - try: - tickers: Tickers = self._freqtrade.exchange.get_tickers(cached=True) - except ExchangeError: - raise RPCException("Error getting current tickers.") open_trades: list[Trade] = Trade.get_open_trades() open_assets: dict[str, Trade] = {t.safe_base_currency: t for t in open_trades} @@ -734,7 +738,7 @@ def _rpc_balance(self, stake_currency: str, fiat_display_currency: str) -> dict: coin: str balance: Wallet for coin, balance in self._freqtrade.wallets.get_all_balances().items(): - if not balance.total: + if not balance.total and not balance.free: continue trade = open_assets.get(coin, None) @@ -745,7 +749,7 @@ def _rpc_balance(self, stake_currency: str, fiat_display_currency: str) -> dict: try: est_stake, est_stake_bot = self.__balance_get_est_stake( - coin, stake_currency, trade_amount, balance, tickers + coin, stake_currency, trade_amount, balance ) except ValueError: continue diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 1e415e9fcec..73d3acfa957 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -5,7 +5,6 @@ import logging from abc import ABC, abstractmethod -from collections import OrderedDict from datetime import datetime, timedelta, timezone from math import isinf, isnan @@ -141,9 +140,7 @@ class IStrategy(ABC, HyperStrategyMixin): market_direction: MarketDirection = MarketDirection.NONE # Global cache dictionary - _cached_grouped_trades_per_pair: dict[ - str, OrderedDict[tuple[datetime, datetime], DataFrame] - ] = {} + _cached_grouped_trades_per_pair: dict[str, DataFrame] = {} def __init__(self, config: Config) -> None: self.config = config @@ -1163,10 +1160,10 @@ def get_latest_candle( logger.warning(f"Empty candle (OHLCV) data for pair {pair}") return None, None - latest_date = dataframe["date"].max() - latest = dataframe.loc[dataframe["date"] == latest_date].iloc[-1] + latest_date_pd = dataframe["date"].max() + latest = dataframe.loc[dataframe["date"] == latest_date_pd].iloc[-1] # Explicitly convert to datetime object to ensure the below comparison does not fail - latest_date = latest_date.to_pydatetime() + latest_date: datetime = latest_date_pd.to_pydatetime() # Check if dataframe is out of date timeframe_minutes = timeframe_to_minutes(timeframe) @@ -1604,15 +1601,11 @@ def _if_enabled_populate_trades(self, dataframe: DataFrame, metadata: dict): if use_public_trades: trades = self.dp.trades(pair=metadata["pair"], copy=False) - config = self.config - config["timeframe"] = self.timeframe pair = metadata["pair"] # TODO: slice trades to size of dataframe for faster backtesting - cached_grouped_trades: OrderedDict[tuple[datetime, datetime], DataFrame] = ( - self._cached_grouped_trades_per_pair.get(pair, OrderedDict()) - ) + cached_grouped_trades: DataFrame | None = self._cached_grouped_trades_per_pair.get(pair) dataframe, cached_grouped_trades = populate_dataframe_with_trades( - cached_grouped_trades, config, dataframe, trades + cached_grouped_trades, self.config, dataframe, trades ) # dereference old cache diff --git a/freqtrade/util/__init__.py b/freqtrade/util/__init__.py index 7a4d4d1196c..a0b618b11f7 100644 --- a/freqtrade/util/__init__.py +++ b/freqtrade/util/__init__.py @@ -11,6 +11,7 @@ format_ms_time, shorten_date, ) +from freqtrade.util.dry_run_wallet import get_dry_run_wallet from freqtrade.util.formatters import decimals_per_coin, fmt_coin, fmt_coin2, round_value from freqtrade.util.ft_precise import FtPrecise from freqtrade.util.measure_time import MeasureTime @@ -35,6 +36,7 @@ "dt_utc", "format_date", "format_ms_time", + "get_dry_run_wallet", "FtPrecise", "PeriodicCache", "shorten_date", diff --git a/freqtrade/util/dry_run_wallet.py b/freqtrade/util/dry_run_wallet.py new file mode 100644 index 00000000000..c904db6b397 --- /dev/null +++ b/freqtrade/util/dry_run_wallet.py @@ -0,0 +1,12 @@ +from freqtrade.constants import Config + + +def get_dry_run_wallet(config: Config) -> int | float: + """ + Return dry-run wallet balance in stake currency from configuration. + This setup also supports dictionary mode for dry-run-wallet. + """ + if isinstance(_start_cap := config["dry_run_wallet"], float | int): + return _start_cap + else: + return _start_cap.get("stake_currency") diff --git a/freqtrade/wallets.py b/freqtrade/wallets.py index d1d6b01bdc6..f4537306cf7 100644 --- a/freqtrade/wallets.py +++ b/freqtrade/wallets.py @@ -45,7 +45,14 @@ def __init__( self.__rpc = rpc self._wallets: dict[str, Wallet] = {} self._positions: dict[str, PositionWallet] = {} - self._start_cap = config["dry_run_wallet"] + self._start_cap: dict[str, float] = {} + self._stake_currency = config["stake_currency"] + + if isinstance(_start_cap := config["dry_run_wallet"], float | int): + self._start_cap[self._stake_currency] = _start_cap + else: + self._start_cap = _start_cap + self._last_wallet_refresh: datetime | None = None self._default_timeframe = self._config.get("timeframe", "1h") @@ -76,6 +83,18 @@ def get_total(self, currency: str) -> float: else: return 0 + def get_collateral(self) -> float: + """ + Get total collateral for liquidation price calculation. + """ + if self._config.get("margin_mode") == "cross": + # free includes all balances and, combined with position collateral, + # is used as "wallet balance". + return self.get_free(self._stake_currency) + sum( + pos.collateral for pos in self._positions.values() + ) + return self.get_total(self._stake_currency) + def get_owned(self, pair: str, base_currency: str) -> float: """ Get currently owned value. @@ -119,36 +138,51 @@ def _update_dry(self) -> None: for o in trade.open_orders if o.amount and o.ft_order_side == trade.exit_side ) + curr_wallet_bal = self._start_cap.get(curr, 0) - _wallets[curr] = Wallet(curr, trade.amount - pending, pending, trade.amount) - - current_stake = self._start_cap + tot_profit - tot_in_trades - total_stake = current_stake + used_stake + _wallets[curr] = Wallet( + curr, + curr_wallet_bal + trade.amount - pending, + pending, + trade.amount + curr_wallet_bal, + ) else: - tot_in_trades = 0 for position in open_trades: - # size = self._exchange._contracts_to_amount(position.pair, position['contracts']) - size = position.amount - collateral = position.stake_amount - leverage = position.leverage - tot_in_trades += collateral _positions[position.pair] = PositionWallet( position.pair, - position=size, - leverage=leverage, - collateral=collateral, + position=position.amount, + leverage=position.leverage, + collateral=position.stake_amount, side=position.trade_direction, ) - current_stake = self._start_cap + tot_profit - tot_in_trades + used_stake = tot_in_trades - total_stake = current_stake + tot_in_trades - _wallets[self._config["stake_currency"]] = Wallet( - currency=self._config["stake_currency"], - free=current_stake, + cross_margin = 0.0 + if self._config.get("margin_mode") == "cross": + # In cross-margin mode, the total balance is used as collateral. + # This is moved as "free" into the stake currency balance. + # strongly tied to the get_collateral() implementation. + for curr, bal in self._start_cap.items(): + if curr == self._stake_currency: + continue + rate = self._exchange.get_conversion_rate(curr, self._stake_currency) + if rate: + cross_margin += bal * rate + + current_stake = self._start_cap.get(self._stake_currency, 0) + tot_profit - tot_in_trades + total_stake = current_stake + used_stake + + _wallets[self._stake_currency] = Wallet( + currency=self._stake_currency, + free=current_stake + cross_margin, used=used_stake, total=total_stake, ) + for currency, bal in self._start_cap.items(): + if currency not in _wallets: + _wallets[currency] = Wallet(currency, bal, 0, bal) + self._wallets = _wallets self._positions = _positions @@ -254,7 +288,7 @@ def get_starting_balance(self) -> float: else: tot_profit = Trade.get_total_closed_profit() open_stakes = Trade.total_open_trades_stakes() - available_balance = self.get_free(self._config["stake_currency"]) + available_balance = self.get_free(self._stake_currency) return available_balance - tot_profit + open_stakes def get_total_stake_amount(self): @@ -274,9 +308,9 @@ def get_total_stake_amount(self): # Ensure % is used from the overall balance # Otherwise we'd risk lowering stakes with each open trade. # (tied up + current free) * ratio) - tied up - available_amount = ( - val_tied_up + self.get_free(self._config["stake_currency"]) - ) * self._config["tradable_balance_ratio"] + available_amount = (val_tied_up + self.get_free(self._stake_currency)) * self._config[ + "tradable_balance_ratio" + ] return available_amount def get_available_stake_amount(self) -> float: @@ -287,7 +321,7 @@ def get_available_stake_amount(self) -> float: ( + free amount) * tradable_balance_ratio - """ - free = self.get_free(self._config["stake_currency"]) + free = self.get_free(self._stake_currency) return min(self.get_total_stake_amount() - Trade.total_open_trades_stakes(), free) def _calculate_unlimited_stake_amount( @@ -326,7 +360,7 @@ def _check_available_stake_amount(self, stake_amount: float, available_amount: f f"lower than stake amount ({stake_amount} {self._config['stake_currency']})" ) - return stake_amount + return max(stake_amount, 0) def get_trade_stake_amount( self, pair: str, max_open_trades: IntOrInf, edge=None, update: bool = True @@ -346,8 +380,8 @@ def get_trade_stake_amount( if edge: stake_amount = edge.stake_amount( pair, - self.get_free(self._config["stake_currency"]), - self.get_total(self._config["stake_currency"]), + self.get_free(self._stake_currency), + self.get_total(self._stake_currency), val_tied_up, ) else: diff --git a/requirements-dev.txt b/requirements-dev.txt index 807d0aabc15..010b8cab54a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,7 +7,7 @@ -r docs/requirements-docs.txt coveralls==4.0.1 -ruff==0.8.1 +ruff==0.8.2 mypy==1.13.0 pre-commit==4.0.1 pytest==8.3.4 @@ -28,5 +28,5 @@ nbconvert==7.16.4 types-cachetools==5.5.0.20240820 types-filelock==3.2.7 types-requests==2.32.0.20241016 -types-tabulate==0.9.0.20240106 -types-python-dateutil==2.9.0.20241003 +types-tabulate==0.9.0.20241207 +types-python-dateutil==2.9.0.20241206 diff --git a/requirements-freqai.txt b/requirements-freqai.txt index ca71810043d..47c69ff6471 100644 --- a/requirements-freqai.txt +++ b/requirements-freqai.txt @@ -10,6 +10,6 @@ catboost==1.2.7; 'arm' not in platform_machine # Temporary downgrade of matplotlib due to https://github.com/matplotlib/matplotlib/issues/28551 matplotlib==3.9.3 lightgbm==4.5.0 -xgboost==2.0.3 +xgboost==2.1.3 tensorboard==2.18.0 datasieve==0.1.7 diff --git a/requirements.txt b/requirements.txt index ccabb4e5d41..c2aa69b1030 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,12 +6,12 @@ pandas-ta==0.3.14b finta>=1.3 ta>=0.10.1 -ccxt==4.4.35 +ccxt==4.4.37 cryptography==42.0.8; platform_machine == 'armv7l' cryptography==44.0.0; platform_machine != 'armv7l' aiohttp==3.10.11 SQLAlchemy==2.0.36 -python-telegram-bot==21.8 +python-telegram-bot==21.9 # can't be hard-pinned due to telegram-bot pinning httpx with ~ httpx>=0.24.1 humanize==4.11.0 @@ -41,8 +41,8 @@ orjson==3.10.12 sdnotify==0.3.2 # API Server -fastapi==0.115.5 -pydantic==2.10.2 +fastapi==0.115.6 +pydantic==2.10.3 uvicorn==0.32.1 pyjwt==2.10.1 aiofiles==24.1.0 diff --git a/tests/conftest.py b/tests/conftest.py index 5171708603e..69ea8878b09 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,7 @@ # pragma pylint: disable=missing-docstring import json import logging +import platform import re from copy import deepcopy from datetime import datetime, timedelta, timezone @@ -517,6 +518,30 @@ def patch_gc(mocker) -> None: mocker.patch("freqtrade.main.gc_set_threshold") +def is_arm() -> bool: + machine = platform.machine() + return "arm" in machine or "aarch64" in machine + + +def is_mac() -> bool: + machine = platform.system() + return "Darwin" in machine + + +@pytest.fixture(autouse=True) +def patch_torch_initlogs(mocker) -> None: + if is_mac(): + # Mock torch import completely + import sys + import types + + module_name = "torch" + mocked_module = types.ModuleType(module_name) + sys.modules[module_name] = mocked_module + else: + mocker.patch("torch._logging._init_logs") + + @pytest.fixture(autouse=True) def user_dir(mocker, tmp_path) -> Path: user_dir = tmp_path / "user_data" @@ -2212,7 +2237,7 @@ def tickers(): "first": None, "last": 8603.67, "change": -0.879, - "percentage": None, + "percentage": -8.95, "average": None, "baseVolume": 30414.604298, "quoteVolume": 259629896.48584127, @@ -2256,7 +2281,7 @@ def tickers(): "first": None, "last": 129.28, "change": 1.795, - "percentage": None, + "percentage": -2.5, "average": None, "baseVolume": 59698.79897, "quoteVolume": 29132399.743954, diff --git a/tests/data/test_converter_orderflow.py b/tests/data/test_converter_orderflow.py index 9a337da9193..96f550020ab 100644 --- a/tests/data/test_converter_orderflow.py +++ b/tests/data/test_converter_orderflow.py @@ -1,13 +1,16 @@ -from collections import OrderedDict - import numpy as np import pandas as pd import pytest from freqtrade.constants import DEFAULT_TRADES_COLUMNS from freqtrade.data.converter import populate_dataframe_with_trades -from freqtrade.data.converter.orderflow import trades_to_volumeprofile_with_total_delta_bid_ask +from freqtrade.data.converter.orderflow import ( + ORDERFLOW_ADDED_COLUMNS, + trades_to_volumeprofile_with_total_delta_bid_ask, +) from freqtrade.data.converter.trade_converter import trades_list_to_df +from freqtrade.data.dataprovider import DataProvider +from tests.strategy.strats.strategy_test_v3 import StrategyTestV3 BIN_SIZE_SCALE = 0.5 @@ -37,6 +40,7 @@ def populate_dataframe_with_trades_trades(testdatadir): @pytest.fixture def candles(testdatadir): + # TODO: this fixture isn't really necessary and could be removed return pd.read_json(testdatadir / "orderflow/candles.json").copy() @@ -102,7 +106,7 @@ def test_public_trades_mock_populate_dataframe_with_trades__check_orderflow( }, } # Apply the function to populate the data frame with order flow data - df, _ = populate_dataframe_with_trades(OrderedDict(), config, dataframe, trades) + df, _ = populate_dataframe_with_trades(None, config, dataframe, trades) # Extract results from the first row of the DataFrame results = df.iloc[0] t = results["trades"] @@ -243,7 +247,7 @@ def test_public_trades_trades_mock_populate_dataframe_with_trades__check_trades( } # Populate the DataFrame with trades and order flow data - df, _ = populate_dataframe_with_trades(OrderedDict(), config, dataframe, trades) + df, _ = populate_dataframe_with_trades(None, config, dataframe, trades) # --- DataFrame and Trade Data Validation --- @@ -401,9 +405,7 @@ def test_public_trades_config_max_trades( }, } - df, _ = populate_dataframe_with_trades( - OrderedDict(), default_conf | orderflow_config, dataframe, trades - ) + df, _ = populate_dataframe_with_trades(None, default_conf | orderflow_config, dataframe, trades) assert df.delta.count() == 1 @@ -482,3 +484,83 @@ def test_public_trades_testdata_sanity( "cost", "date", ] + + +def test_analyze_with_orderflow( + default_conf_usdt, + mocker, + populate_dataframe_with_trades_dataframe, + populate_dataframe_with_trades_trades, +): + ohlcv_history = populate_dataframe_with_trades_dataframe + # call without orderflow + strategy = StrategyTestV3(config=default_conf_usdt) + strategy.dp = DataProvider(default_conf_usdt, None, None) + + mocker.patch.object(strategy.dp, "trades", return_value=populate_dataframe_with_trades_trades) + import freqtrade.data.converter.orderflow as orderflow_module + + spy = mocker.spy(orderflow_module, "trades_to_volumeprofile_with_total_delta_bid_ask") + + pair = "ETH/BTC" + df = strategy.advise_indicators(ohlcv_history, {"pair:": pair}) + assert len(df) == len(ohlcv_history) + assert "open" in df.columns + assert spy.call_count == 0 + + # Not expected to run - shouldn't have added orderflow columns + for col in ORDERFLOW_ADDED_COLUMNS: + assert col not in df.columns, f"Column {col} found in df.columns" + + default_conf_usdt["exchange"]["use_public_trades"] = True + default_conf_usdt["orderflow"] = { + "cache_size": 5, + "max_candles": 5, + "scale": 0.005, + "imbalance_volume": 0, + "imbalance_ratio": 3, + "stacked_imbalance_range": 3, + } + + strategy.config = default_conf_usdt + # First round - builds cache + df1 = strategy.advise_indicators(ohlcv_history, {"pair": pair}) + assert len(df1) == len(ohlcv_history) + assert "open" in df1.columns + assert spy.call_count == 5 + + for col in ORDERFLOW_ADDED_COLUMNS: + assert col in df1.columns, f"Column {col} not found in df.columns" + + if col not in ("stacked_imbalances_bid", "stacked_imbalances_ask"): + assert df1[col].count() == 5, f"Column {col} has {df1[col].count()} non-NaN values" + + assert len(strategy._cached_grouped_trades_per_pair[pair]) == 5 + + lastval_trades = df1.at[len(df1) - 1, "trades"] + assert isinstance(lastval_trades, list) + assert len(lastval_trades) == 122 + + lastval_of = df1.at[len(df1) - 1, "orderflow"] + assert isinstance(lastval_of, dict) + + spy.reset_mock() + # Ensure caching works - call the same logic again. + df2 = strategy.advise_indicators(ohlcv_history, {"pair": pair}) + assert len(df2) == len(ohlcv_history) + assert "open" in df2.columns + assert spy.call_count == 0 + for col in ORDERFLOW_ADDED_COLUMNS: + assert col in df2.columns, f"Round2: Column {col} not found in df.columns" + + if col not in ("stacked_imbalances_bid", "stacked_imbalances_ask"): + assert ( + df2[col].count() == 5 + ), f"Round2: Column {col} has {df2[col].count()} non-NaN values" + + lastval_trade2 = df2.at[len(df2) - 1, "trades"] + assert isinstance(lastval_trade2, list) + assert len(lastval_trade2) == 122 + + lastval_of2 = df2.at[len(df2) - 1, "orderflow"] + assert isinstance(lastval_of2, dict) diff --git a/tests/exchange/test_binance.py b/tests/exchange/test_binance.py index cc28760fa1f..3cd66807483 100644 --- a/tests/exchange/test_binance.py +++ b/tests/exchange/test_binance.py @@ -293,6 +293,7 @@ def test_liquidation_price_binance( default_conf["trading_mode"] = trading_mode default_conf["margin_mode"] = margin_mode default_conf["liquidation_buffer"] = 0.0 + mocker.patch(f"{EXMS}.price_to_precision", lambda s, x, y, **kwargs: y) exchange = get_patched_exchange(mocker, default_conf, exchange="binance") def get_maint_ratio(pair_, stake_amount): diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index 9d129601cc3..260dd8f0e55 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -2006,6 +2006,46 @@ def test_get_tickers(default_conf, mocker, exchange_name, caplog): assert exchange.get_tickers() == {} +@pytest.mark.parametrize("exchange_name", EXCHANGES) +def test_get_conversion_rate(default_conf_usdt, mocker, exchange_name): + api_mock = MagicMock() + tick = { + "ETH/USDT": { + "last": 42, + }, + "BCH/USDT": { + "last": 41, + }, + "ETH/BTC": { + "last": 250, + }, + } + tick2 = { + "ADA/USDT:USDT": { + "last": 2.5, + } + } + mocker.patch(f"{EXMS}.exchange_has", return_value=True) + api_mock.fetch_tickers = MagicMock(side_effect=[tick, tick2]) + api_mock.fetch_bids_asks = MagicMock(return_value={}) + + exchange = get_patched_exchange(mocker, default_conf_usdt, api_mock, exchange=exchange_name) + # retrieve original ticker + assert exchange.get_conversion_rate("USDT", "USDT") == 1 + assert api_mock.fetch_tickers.call_count == 0 + assert exchange.get_conversion_rate("ETH", "USDT") == 42 + assert exchange.get_conversion_rate("ETH", "USDC") is None + assert exchange.get_conversion_rate("ETH", "BTC") == 250 + assert exchange.get_conversion_rate("BTC", "ETH") == 0.004 + + assert api_mock.fetch_tickers.call_count == 1 + api_mock.fetch_tickers.reset_mock() + + assert exchange.get_conversion_rate("ADA", "USDT") == 2.5 + # Only the call to the "others" market + assert api_mock.fetch_tickers.call_count == 1 + + @pytest.mark.parametrize("exchange_name", EXCHANGES) def test_fetch_ticker(default_conf, mocker, exchange_name): api_mock = MagicMock() @@ -4079,10 +4119,16 @@ def test_get_valid_pair_combination(default_conf, mocker, markets): ) ex = Exchange(default_conf) - assert ex.get_valid_pair_combination("ETH", "BTC") == "ETH/BTC" - assert ex.get_valid_pair_combination("BTC", "ETH") == "ETH/BTC" + assert next(ex.get_valid_pair_combination("ETH", "BTC")) == "ETH/BTC" + assert next(ex.get_valid_pair_combination("BTC", "ETH")) == "ETH/BTC" + multicombs = list(ex.get_valid_pair_combination("ETH", "USDT")) + assert len(multicombs) == 2 + assert "ETH/USDT" in multicombs + assert "ETH/USDT:USDT" in multicombs + with pytest.raises(ValueError, match=r"Could not combine.* to get a valid pair."): - ex.get_valid_pair_combination("NOPAIR", "ETH") + for x in ex.get_valid_pair_combination("NOPAIR", "ETH"): + pass @pytest.mark.parametrize( @@ -6131,6 +6177,7 @@ def test_get_liquidation_price( default_conf_usdt["exchange"]["name"] = exchange_name default_conf_usdt["margin_mode"] = margin_mode mocker.patch("freqtrade.exchange.gate.Gate.validate_ordertypes") + mocker.patch(f"{EXMS}.price_to_precision", lambda s, x, y, **kwargs: y) exchange = get_patched_exchange(mocker, default_conf_usdt, exchange=exchange_name) exchange.get_maintenance_ratio_and_amt = MagicMock(return_value=(0.01, 0.01)) diff --git a/tests/freqai/conftest.py b/tests/freqai/conftest.py index 442f530203a..9e14111af36 100644 --- a/tests/freqai/conftest.py +++ b/tests/freqai/conftest.py @@ -1,4 +1,3 @@ -import platform import sys from copy import deepcopy from pathlib import Path @@ -20,30 +19,6 @@ def is_py12() -> bool: return sys.version_info >= (3, 12) -def is_mac() -> bool: - machine = platform.system() - return "Darwin" in machine - - -def is_arm() -> bool: - machine = platform.machine() - return "arm" in machine or "aarch64" in machine - - -@pytest.fixture(autouse=True) -def patch_torch_initlogs(mocker) -> None: - if is_mac(): - # Mock torch import completely - import sys - import types - - module_name = "torch" - mocked_module = types.ModuleType(module_name) - sys.modules[module_name] = mocked_module - else: - mocker.patch("torch._logging._init_logs") - - @pytest.fixture(scope="function") def freqai_conf(default_conf, tmp_path): freqaiconf = deepcopy(default_conf) diff --git a/tests/freqai/test_freqai_datakitchen.py b/tests/freqai/test_freqai_datakitchen.py index 27efc3a662e..7a219e46ecc 100644 --- a/tests/freqai/test_freqai_datakitchen.py +++ b/tests/freqai/test_freqai_datakitchen.py @@ -10,11 +10,10 @@ from freqtrade.data.dataprovider import DataProvider from freqtrade.exceptions import OperationalException from freqtrade.freqai.data_kitchen import FreqaiDataKitchen -from tests.conftest import get_patched_exchange +from tests.conftest import get_patched_exchange, is_mac from tests.freqai.conftest import ( get_patched_data_kitchen, get_patched_freqai_strategy, - is_mac, make_unfiltered_dataframe, ) diff --git a/tests/freqai/test_freqai_interface.py b/tests/freqai/test_freqai_interface.py index 2779ddcb8a3..0710591c926 100644 --- a/tests/freqai/test_freqai_interface.py +++ b/tests/freqai/test_freqai_interface.py @@ -13,11 +13,16 @@ from freqtrade.optimize.backtesting import Backtesting from freqtrade.persistence import Trade from freqtrade.plugins.pairlistmanager import PairListManager -from tests.conftest import EXMS, create_mock_trades, get_patched_exchange, log_has_re -from tests.freqai.conftest import ( - get_patched_freqai_strategy, +from tests.conftest import ( + EXMS, + create_mock_trades, + get_patched_exchange, is_arm, is_mac, + log_has_re, +) +from tests.freqai.conftest import ( + get_patched_freqai_strategy, make_rl_config, mock_pytorch_mlp_model_training_parameters, ) diff --git a/tests/freqtradebot/test_freqtradebot.py b/tests/freqtradebot/test_freqtradebot.py index 21e5394a4a9..937bec8e5e9 100644 --- a/tests/freqtradebot/test_freqtradebot.py +++ b/tests/freqtradebot/test_freqtradebot.py @@ -4021,7 +4021,7 @@ def test_get_real_amount_fees_order( default_conf_usdt, market_buy_order_usdt_doublefee, fee, mocker ): tfo_mock = mocker.patch(f"{EXMS}.get_trades_for_order", return_value=[]) - mocker.patch(f"{EXMS}.get_valid_pair_combination", return_value="BNB/USDT") + mocker.patch(f"{EXMS}.get_valid_pair_combination", return_value=["BNB/USDT"]) mocker.patch(f"{EXMS}.fetch_ticker", return_value={"last": 200}) trade = Trade( pair="LTC/USDT", diff --git a/tests/leverage/test_update_liquidation_price.py b/tests/leverage/test_update_liquidation_price.py index 1b25babd039..68c35509fc3 100644 --- a/tests/leverage/test_update_liquidation_price.py +++ b/tests/leverage/test_update_liquidation_price.py @@ -29,7 +29,7 @@ def test_update_liquidation_prices(mocker, margin_mode, dry_run): assert trade_mock.set_liquidation_price.call_count == 1 - assert wallets.get_total.call_count == ( + assert wallets.get_collateral.call_count == ( 0 if margin_mode == MarginMode.ISOLATED or not dry_run else 1 ) diff --git a/tests/optimize/test_backtesting.py b/tests/optimize/test_backtesting.py index 05ebf229899..1b9945cb5fb 100644 --- a/tests/optimize/test_backtesting.py +++ b/tests/optimize/test_backtesting.py @@ -568,6 +568,7 @@ def test_backtest__enter_trade_futures(default_conf_usdt, fee, mocker) -> None: mocker.patch(f"{EXMS}.get_fee", fee) mocker.patch(f"{EXMS}.get_min_pair_stake_amount", return_value=0.00001) mocker.patch(f"{EXMS}.get_max_pair_stake_amount", return_value=float("inf")) + mocker.patch(f"{EXMS}.price_to_precision", lambda s, x, y, **kwargs: y) mocker.patch(f"{EXMS}.get_max_leverage", return_value=100) mocker.patch("freqtrade.optimize.backtesting.price_to_precision", lambda p, *args: p) patch_exchange(mocker) @@ -1842,6 +1843,7 @@ def _trend_alternate_hold(dataframe=None, metadata=None): if use_detail: default_conf_usdt["timeframe_detail"] = "1m" + mocker.patch(f"{EXMS}.price_to_precision", lambda s, x, y, **kwargs: y) mocker.patch(f"{EXMS}.get_min_pair_stake_amount", return_value=0.00001) mocker.patch(f"{EXMS}.get_max_pair_stake_amount", return_value=float("inf")) mocker.patch(f"{EXMS}.get_fee", fee) diff --git a/tests/optimize/test_hyperoptloss.py b/tests/optimize/test_hyperoptloss.py index 53de37a0e2a..8f1b1c7867e 100644 --- a/tests/optimize/test_hyperoptloss.py +++ b/tests/optimize/test_hyperoptloss.py @@ -39,13 +39,34 @@ def test_loss_calculation_prefer_correct_trade_count(hyperopt_conf, hyperopt_res hyperopt_conf.update({"hyperopt_loss": "ShortTradeDurHyperOptLoss"}) hl = HyperOptLossResolver.load_hyperoptloss(hyperopt_conf) correct = hl.hyperopt_loss_function( - hyperopt_results, 600, datetime(2019, 1, 1), datetime(2019, 5, 1) + results=hyperopt_results, + trade_count=600, + min_date=datetime(2019, 1, 1), + max_date=datetime(2019, 5, 1), + config=hyperopt_conf, + processed=None, + backtest_stats={"profit_total": hyperopt_results["profit_abs"].sum()}, + starting_balance=hyperopt_conf["dry_run_wallet"], ) over = hl.hyperopt_loss_function( - hyperopt_results, 600 + 100, datetime(2019, 1, 1), datetime(2019, 5, 1) + results=hyperopt_results, + trade_count=600 + 100, + min_date=datetime(2019, 1, 1), + max_date=datetime(2019, 5, 1), + config=hyperopt_conf, + processed=None, + backtest_stats={"profit_total": hyperopt_results["profit_abs"].sum()}, + starting_balance=hyperopt_conf["dry_run_wallet"], ) under = hl.hyperopt_loss_function( - hyperopt_results, 600 - 100, datetime(2019, 1, 1), datetime(2019, 5, 1) + results=hyperopt_results, + trade_count=600 - 100, + min_date=datetime(2019, 1, 1), + max_date=datetime(2019, 5, 1), + config=hyperopt_conf, + processed=None, + backtest_stats={"profit_total": hyperopt_results["profit_abs"].sum()}, + starting_balance=hyperopt_conf["dry_run_wallet"], ) assert over > correct assert under > correct @@ -58,9 +79,25 @@ def test_loss_calculation_prefer_shorter_trades(hyperopt_conf, hyperopt_results) hyperopt_conf.update({"hyperopt_loss": "ShortTradeDurHyperOptLoss"}) hl = HyperOptLossResolver.load_hyperoptloss(hyperopt_conf) longer = hl.hyperopt_loss_function( - hyperopt_results, 100, datetime(2019, 1, 1), datetime(2019, 5, 1) + results=hyperopt_results, + trade_count=100, + min_date=datetime(2019, 1, 1), + max_date=datetime(2019, 5, 1), + config=hyperopt_conf, + processed=None, + backtest_stats={"profit_total": hyperopt_results["profit_abs"].sum()}, + starting_balance=hyperopt_conf["dry_run_wallet"], + ) + shorter = hl.hyperopt_loss_function( + results=resultsb, + trade_count=100, + min_date=datetime(2019, 1, 1), + max_date=datetime(2019, 5, 1), + config=hyperopt_conf, + processed=None, + backtest_stats={"profit_total": resultsb["profit_abs"].sum()}, + starting_balance=hyperopt_conf["dry_run_wallet"], ) - shorter = hl.hyperopt_loss_function(resultsb, 100, datetime(2019, 1, 1), datetime(2019, 5, 1)) assert shorter < longer @@ -73,11 +110,34 @@ def test_loss_calculation_has_limited_profit(hyperopt_conf, hyperopt_results) -> hyperopt_conf.update({"hyperopt_loss": "ShortTradeDurHyperOptLoss"}) hl = HyperOptLossResolver.load_hyperoptloss(hyperopt_conf) correct = hl.hyperopt_loss_function( - hyperopt_results, 600, datetime(2019, 1, 1), datetime(2019, 5, 1) + results=hyperopt_results, + trade_count=600, + min_date=datetime(2019, 1, 1), + max_date=datetime(2019, 5, 1), + config=hyperopt_conf, + processed=None, + backtest_stats={"profit_total": hyperopt_results["profit_abs"].sum()}, + starting_balance=hyperopt_conf["dry_run_wallet"], + ) + over = hl.hyperopt_loss_function( + results=results_over, + trade_count=600, + min_date=datetime(2019, 1, 1), + max_date=datetime(2019, 5, 1), + config=hyperopt_conf, + processed=None, + backtest_stats={"profit_total": results_over["profit_abs"].sum()}, + starting_balance=hyperopt_conf["dry_run_wallet"], ) - over = hl.hyperopt_loss_function(results_over, 600, datetime(2019, 1, 1), datetime(2019, 5, 1)) under = hl.hyperopt_loss_function( - results_under, 600, datetime(2019, 1, 1), datetime(2019, 5, 1) + results=results_under, + trade_count=600, + min_date=datetime(2019, 1, 1), + max_date=datetime(2019, 5, 1), + config=hyperopt_conf, + processed=None, + backtest_stats={"profit_total": results_under["profit_abs"].sum()}, + starting_balance=hyperopt_conf["dry_run_wallet"], ) assert over < correct assert under > correct @@ -109,31 +169,34 @@ def test_loss_functions_better_profits(default_conf, hyperopt_results, lossfunct default_conf.update({"hyperopt_loss": lossfunction}) hl = HyperOptLossResolver.load_hyperoptloss(default_conf) correct = hl.hyperopt_loss_function( - hyperopt_results, + results=hyperopt_results, trade_count=len(hyperopt_results), min_date=datetime(2019, 1, 1), max_date=datetime(2019, 5, 1), config=default_conf, processed=None, backtest_stats={"profit_total": hyperopt_results["profit_abs"].sum()}, + starting_balance=default_conf["dry_run_wallet"], ) over = hl.hyperopt_loss_function( - results_over, + results=results_over, trade_count=len(results_over), min_date=datetime(2019, 1, 1), max_date=datetime(2019, 5, 1), config=default_conf, processed=None, backtest_stats={"profit_total": results_over["profit_abs"].sum()}, + starting_balance=default_conf["dry_run_wallet"], ) under = hl.hyperopt_loss_function( - results_under, + results=results_under, trade_count=len(results_under), min_date=datetime(2019, 1, 1), max_date=datetime(2019, 5, 1), config=default_conf, processed=None, backtest_stats={"profit_total": results_under["profit_abs"].sum()}, + starting_balance=default_conf["dry_run_wallet"], ) assert over < correct assert under > correct diff --git a/tests/plugins/test_percentchangepairlist.py b/tests/plugins/test_percentchangepairlist.py index df165cf9860..6f399fc9f43 100644 --- a/tests/plugins/test_percentchangepairlist.py +++ b/tests/plugins/test_percentchangepairlist.py @@ -360,9 +360,16 @@ def test_gen_pairlist_from_tickers(mocker, rpl_config, tickers): exchange = get_patched_exchange(mocker, rpl_config, exchange="binance") pairlistmanager = PairListManager(exchange, rpl_config) - remote_pairlist = PercentChangePairList( - exchange, pairlistmanager, rpl_config, rpl_config["pairlists"][0], 0 - ) + remote_pairlist = pairlistmanager._pairlist_handlers[0] + + # The generator returns BTC ETH and TKN - filtering the first ensures removing pairs + # in this step ain't problematic. + def _validate_pair(pair, ticker): + if pair == "BTC/USDT": + return False + return True + + remote_pairlist._validate_pair = _validate_pair result = remote_pairlist.gen_pairlist(tickers.return_value) diff --git a/tests/rpc/test_rpc.py b/tests/rpc/test_rpc.py index dd8c1bb9a87..225c5e36441 100644 --- a/tests/rpc/test_rpc.py +++ b/tests/rpc/test_rpc.py @@ -514,8 +514,13 @@ def test_rpc_balance_handle_error(default_conf, mocker): patch_get_signal(freqtradebot) rpc = RPC(freqtradebot) rpc._fiat_converter = CryptoToFiatConverter({}) - with pytest.raises(RPCException, match="Error getting current tickers."): - rpc._rpc_balance(default_conf["stake_currency"], default_conf["fiat_display_currency"]) + res = rpc._rpc_balance(default_conf["stake_currency"], default_conf["fiat_display_currency"]) + assert res["stake"] == "BTC" + + assert len(res["currencies"]) == 1 + assert res["currencies"][0]["currency"] == "BTC" + # ETH has not been converted. + assert all(currency["currency"] != "ETH" for currency in res["currencies"]) def test_rpc_balance_handle(default_conf_usdt, mocker, tickers): @@ -530,6 +535,13 @@ def test_rpc_balance_handle(default_conf_usdt, mocker, tickers): "total": 5.0, "used": 4.0, }, + # Invalid coin not in tickers list. + # This triggers a 2nd call to get_tickers + "NotACoin": { + "free": 0.0, + "total": 2.0, + "used": 0.0, + }, "USDT": { "free": 50.0, "total": 100.0, @@ -574,7 +586,7 @@ def test_rpc_balance_handle(default_conf_usdt, mocker, tickers): fetch_positions=MagicMock(return_value=mock_pos), get_tickers=tickers, get_valid_pair_combination=MagicMock( - side_effect=lambda a, b: f"{b}/{a}" if a == "USDT" else f"{a}/{b}" + side_effect=lambda a, b: [f"{b}/{a}" if a == "USDT" else f"{a}/{b}"] ), ) default_conf_usdt["dry_run"] = False @@ -590,8 +602,10 @@ def test_rpc_balance_handle(default_conf_usdt, mocker, tickers): assert pytest.approx(result["total"]) == 2824.83464 assert pytest.approx(result["value"]) == 2824.83464 * 1.2 - assert tickers.call_count == 1 + assert tickers.call_count == 4 assert tickers.call_args_list[0][1]["cached"] is True + # Testing futures - so we should get spot tickers + assert tickers.call_args_list[-1][1]["market_type"] == "spot" assert "USD" == result["symbol"] assert result["currencies"] == [ { @@ -622,6 +636,20 @@ def test_rpc_balance_handle(default_conf_usdt, mocker, tickers): "is_bot_managed": False, "is_position": False, }, + { + "currency": "NotACoin", + "balance": 2.0, + "bot_owned": 0, + "est_stake": 0, + "est_stake_bot": 0, + "free": 0.0, + "is_bot_managed": False, + "is_position": False, + "position": 0, + "side": "long", + "stake": "USDT", + "used": 0.0, + }, { "currency": "USDT", "free": 50.0, diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index ee28bcc6cf9..221a8b666d5 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -556,7 +556,7 @@ def test_api_balance(botclient, mocker, rpc_balance, tickers): ftbot.config["dry_run"] = False mocker.patch(f"{EXMS}.get_balances", return_value=rpc_balance) mocker.patch(f"{EXMS}.get_tickers", tickers) - mocker.patch(f"{EXMS}.get_valid_pair_combination", side_effect=lambda a, b: f"{a}/{b}") + mocker.patch(f"{EXMS}.get_valid_pair_combination", side_effect=lambda a, b: [f"{a}/{b}"]) ftbot.wallets.update() rc = client_get(client, f"{BASE_URI}/balance") diff --git a/tests/rpc/test_rpc_telegram.py b/tests/rpc/test_rpc_telegram.py index bc7746aeffb..845bce37c74 100644 --- a/tests/rpc/test_rpc_telegram.py +++ b/tests/rpc/test_rpc_telegram.py @@ -960,7 +960,7 @@ async def test_telegram_balance_handle(default_conf, update, mocker, rpc_balance default_conf["dry_run"] = False mocker.patch(f"{EXMS}.get_balances", return_value=rpc_balance) mocker.patch(f"{EXMS}.get_tickers", tickers) - mocker.patch(f"{EXMS}.get_valid_pair_combination", side_effect=lambda a, b: f"{a}/{b}") + mocker.patch(f"{EXMS}.get_valid_pair_combination", side_effect=lambda a, b: [f"{a}/{b}"]) telegram, freqtradebot, msg_mock = get_telegram_testobject(mocker, default_conf) patch_get_signal(freqtradebot) @@ -1049,7 +1049,7 @@ async def test_telegram_balance_handle_futures( mocker.patch(f"{EXMS}.get_balances", return_value=rpc_balance) mocker.patch(f"{EXMS}.fetch_positions", return_value=mock_pos) mocker.patch(f"{EXMS}.get_tickers", tickers) - mocker.patch(f"{EXMS}.get_valid_pair_combination", side_effect=lambda a, b: f"{a}/{b}") + mocker.patch(f"{EXMS}.get_valid_pair_combination", side_effect=lambda a, b: [f"{a}/{b}"]) telegram, freqtradebot, msg_mock = get_telegram_testobject(mocker, default_conf) patch_get_signal(freqtradebot) diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 8011ded9638..3e9df382ba0 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -1481,6 +1481,12 @@ def test_flat_vars_to_nested_dict(caplog): "FREQTRADE__STAKE_AMOUNT": "200.05", "FREQTRADE__TELEGRAM__CHAT_ID": "2151", "NOT_RELEVANT": "200.0", # Will be ignored + "FREQTRADE__ARRAY": '[{"name":"default","host":"xxx"}]', + "FREQTRADE__EXCHANGE__PAIR_WHITELIST": '["BTC/USDT", "ETH/USDT"]', + # Fails due to trailing comma + "FREQTRADE__ARRAY_TRAIL_COMMA": '[{"name":"default","host":"xxx",}]', + # Object fails + "FREQTRADE__OBJECT": '{"name":"default","host":"xxx"}', } expected = { "stake_amount": 200.05, @@ -1494,8 +1500,12 @@ def test_flat_vars_to_nested_dict(caplog): }, "some_setting": True, "some_false_setting": False, + "pair_whitelist": ["BTC/USDT", "ETH/USDT"], }, "telegram": {"chat_id": "2151"}, + "array": [{"name": "default", "host": "xxx"}], + "object": '{"name":"default","host":"xxx"}', + "array_trail_comma": '[{"name":"default","host":"xxx",}]', } res = _flat_vars_to_nested_dict(test_args, ENV_VAR_PREFIX) assert res == expected diff --git a/tests/test_wallets.py b/tests/test_wallets.py index 2c12d27b507..36211dcab40 100644 --- a/tests/test_wallets.py +++ b/tests/test_wallets.py @@ -168,7 +168,7 @@ def test_get_trade_stake_amount_unlimited_amount( assert result == 0 freqtrade.config["dry_run_wallet"] = 200 - freqtrade.wallets._start_cap = 200 + freqtrade.wallets._start_cap["BTC"] = 200 result = freqtrade.wallets.get_trade_stake_amount("XRP/USDT", 3) assert round(result, 4) == round(result2, 4) @@ -451,3 +451,151 @@ def test_check_exit_amount_futures(mocker, default_conf, fee): assert freqtrade.wallets.check_exit_amount(trade) is False assert total_mock.call_count == 0 assert update_mock.call_count == 1 + + +@pytest.mark.parametrize( + "config,wallets", + [ + ( + {"stake_currency": "USDT", "dry_run_wallet": 1000.0}, + {"USDT": {"currency": "USDT", "free": 1000.0, "used": 0.0, "total": 1000.0}}, + ), + ( + {"stake_currency": "USDT", "dry_run_wallet": {"USDT": 1000.0, "BTC": 0.1, "ETH": 2.0}}, + { + "USDT": {"currency": "USDT", "free": 1000.0, "used": 0.0, "total": 1000.0}, + "BTC": {"currency": "BTC", "free": 0.1, "used": 0.0, "total": 0.1}, + "ETH": {"currency": "ETH", "free": 2.0, "used": 0.0, "total": 2.0}, + }, + ), + ( + { + "stake_currency": "USDT", + "margin_mode": "cross", + "dry_run_wallet": {"USDC": 1000.0, "BTC": 0.1, "ETH": 2.0}, + }, + { + # USDT wallet should be created with 0 balance, but Free balance, since + # it's converted from the other currencies + "USDT": {"currency": "USDT", "free": 4200.0, "used": 0.0, "total": 0.0}, + "USDC": {"currency": "USDC", "free": 1000.0, "used": 0.0, "total": 1000.0}, + "BTC": {"currency": "BTC", "free": 0.1, "used": 0.0, "total": 0.1}, + "ETH": {"currency": "ETH", "free": 2.0, "used": 0.0, "total": 2.0}, + }, + ), + ( + { + "stake_currency": "USDT", + "margin_mode": "cross", + "dry_run_wallet": {"USDT": 500, "USDC": 1000.0, "BTC": 0.1, "ETH": 2.0}, + }, + { + # USDT wallet should be created with 500 balance, but Free balance, since + # it's converted from the other currencies + "USDT": {"currency": "USDT", "free": 4700.0, "used": 0.0, "total": 500.0}, + "USDC": {"currency": "USDC", "free": 1000.0, "used": 0.0, "total": 1000.0}, + "BTC": {"currency": "BTC", "free": 0.1, "used": 0.0, "total": 0.1}, + "ETH": {"currency": "ETH", "free": 2.0, "used": 0.0, "total": 2.0}, + }, + ), + ( + # Same as above, but without cross + { + "stake_currency": "USDT", + "dry_run_wallet": {"USDT": 500, "USDC": 1000.0, "BTC": 0.1, "ETH": 2.0}, + }, + { + # No "free" transfer for USDT wallet + "USDT": {"currency": "USDT", "free": 500.0, "used": 0.0, "total": 500.0}, + "USDC": {"currency": "USDC", "free": 1000.0, "used": 0.0, "total": 1000.0}, + "BTC": {"currency": "BTC", "free": 0.1, "used": 0.0, "total": 0.1}, + "ETH": {"currency": "ETH", "free": 2.0, "used": 0.0, "total": 2.0}, + }, + ), + ( + # Same as above, but with futures and cross + { + "stake_currency": "USDT", + "margin_mode": "cross", + "trading_mode": "futures", + "dry_run_wallet": {"USDT": 500, "USDC": 1000.0, "BTC": 0.1, "ETH": 2.0}, + }, + { + # USDT wallet should be created with 500 balance, but Free balance, since + # it's converted from the other currencies + "USDT": {"currency": "USDT", "free": 4700.0, "used": 0.0, "total": 500.0}, + "USDC": {"currency": "USDC", "free": 1000.0, "used": 0.0, "total": 1000.0}, + "BTC": {"currency": "BTC", "free": 0.1, "used": 0.0, "total": 0.1}, + "ETH": {"currency": "ETH", "free": 2.0, "used": 0.0, "total": 2.0}, + }, + ), + ], +) +def test_dry_run_wallet_initialization(mocker, default_conf_usdt, config, wallets): + default_conf_usdt.update(config) + mocker.patch( + f"{EXMS}.get_tickers", + return_value={ + "USDC/USDT": {"last": 1.0}, + "BTC/USDT": {"last": 20_000.0}, + "ETH/USDT": {"last": 1100.0}, + }, + ) + freqtrade = get_patched_freqtradebot(mocker, default_conf_usdt) + stake_currency = config["stake_currency"] + # Verify each wallet matches the expected values + for currency, expected_wallet in wallets.items(): + wallet = freqtrade.wallets._wallets[currency] + assert wallet.currency == expected_wallet["currency"] + assert wallet.free == expected_wallet["free"] + assert wallet.used == expected_wallet["used"] + assert wallet.total == expected_wallet["total"] + + # Verify no extra wallets were created + assert len(freqtrade.wallets._wallets) == len(wallets) + + # Create a trade and verify the new currency is added to the wallets + mocker.patch(f"{EXMS}.get_min_pair_stake_amount", return_value=0.0) + mocker.patch(f"{EXMS}.get_rate", return_value=2.22) + mocker.patch( + f"{EXMS}.fetch_ticker", + return_value={ + "bid": 0.20, + "ask": 0.22, + "last": 0.22, + }, + ) + # Without position, collateral will be the same as free + assert freqtrade.wallets.get_collateral() == freqtrade.wallets.get_free(stake_currency) + freqtrade.execute_entry("NEO/USDT", 100.0) + + # Update wallets and verify NEO is now included + freqtrade.wallets.update() + if default_conf_usdt["trading_mode"] != "futures": + assert "NEO" in freqtrade.wallets._wallets + + assert freqtrade.wallets._wallets["NEO"].total == 45.04504504 # 100 USDT / 0.22 + assert freqtrade.wallets._wallets["NEO"].used == 0.0 + assert freqtrade.wallets._wallets["NEO"].free == 45.04504504 + assert freqtrade.wallets.get_collateral() == freqtrade.wallets.get_free(stake_currency) + # Verify USDT wallet was reduced by trade amount + assert ( + pytest.approx(freqtrade.wallets._wallets[stake_currency].total) + == wallets[stake_currency]["total"] - 100.0 + ) + assert len(freqtrade.wallets._wallets) == len(wallets) + 1 # Original wallets + NEO + else: + # Futures mode + assert "NEO" not in freqtrade.wallets._wallets + assert freqtrade.wallets._positions["NEO/USDT"].position == 45.04504504 + assert pytest.approx(freqtrade.wallets._positions["NEO/USDT"].collateral) == 100 + + # Verify USDT wallet's free was reduced by trade amount + assert ( + pytest.approx(freqtrade.wallets.get_collateral()) + == freqtrade.wallets.get_free(stake_currency) + 100 + ) + assert ( + pytest.approx(freqtrade.wallets._wallets[stake_currency].free) + == wallets[stake_currency]["free"] - 100.0 + )