package
1.60.0
Repository: https://github.com/c9s/bbgo.git
Documentation: pkg.go.dev

# Packages

# Functions

CalculateMarginCost calculate the margin cost of the given notional position by price * quantity.
CalculateMaxPosition calculates the maximum notional value of the position and return the max quantity you can use.
CalculateMinRequiredLeverage calculates the leverage of the given position (price and quantity).
How to Calculate Cost Required to Open a Position in Perpetual Futures Contracts See <https://www.binance.com/en/support/faq/87fa7ee33b574f7084d42bd2ce2e463b> For Long Position: = Number of Contract * Absolute Value {min[0, direction of order x (mark price - order price)]} For short position: = Number of Contract * Absolute Value {min[0, direction of order x (mark price - order price)]}.