0bps

Strategy vault / Other

Bn Obtain the Minimum Precision Increment Essential for a Stable Trading System

Python strategy by BTC[策略代写]团队.

PythonOther
Author
BTC[策略代写]团队
Complexity
Starter · 40 lines
Parameters
0

The original spec has no written description. Read the source below.

Source Python

#!Python3

"""
"Strategy writing » and (this program helps), write toQQ:35787501

Binance Contract can be used to solve the problem of abnormal orders due to accuracy, obtain the minimum change unit, and use it to stabilize the operation of the trading system.
"""

import requests


def get_min_size(symbol: str, host="https://www.binancezh.jp"):
    
    """
    Get the minimum change unit
    Args:
        symbol: trading pair(str)
                For example: ETHUSDT, etc.
        host: Domain name will affect access timeout
              Overseas address: https://fapi.binance.com
              Domestic address (needs to be replaced after change)): https://www.binancezh.jp
    Returns:
        Minimum price increment (str), minimum quantity increment(str)
    """
    
    tick_size, step_size = None, None
    symbols_info = requests.get(f"{host}/fapi/v1/exchangeInfo", timeout=5).json()["symbols"]
    
    for info in symbols_info:
        if symbol == info["symbol"]:
            tick_size, step_size = info["filters"][0]["tickSize"], info["filters"][1]["stepSize"]
            break
            
    return tick_size, step_size


def main():
    tick_size, step_size = get_min_size("ETHUSDT")
    Log(tick_size, step_size)

Published by BTC[策略代写]团队 on the FMZ strategy square · last modified 2023-04-20. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.

Build this with AgenKit

A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.

in Claude Code, Cursor, Codex & 4 more
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Bn-Obtain-the-Minimum-Precision-Increment-Essential-for-a-Stable-Trading-System.md
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. Get tests, backtest, risk controls and a paper-trading switch

Understand it first

Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.

Related specs

esc

Try , , or .

↑↓ move↵ open