# Functions
CheckFundingRatePrerequisites is a simple check to see if the requested data meets the prerequisite.
SetupMultiPositionTracker creates a futures order tracker for a specific exchange.
SetupPositionController creates a position controller to track futures orders.
SetupPositionTracker creates a new position tracker to track n futures orders until the position(s) are closed.
StringToContractSettlementType for converting case insensitive contract settlement type.
# Constants
ContractType definitions.
ContractType definitions.
ContractType definitions.
ContractSettlementType definitions.
ContractSettlementType definitions.
ContractSettlementType definitions.
ContractSettlementType definitions.
ContractType definitions.
ContractType definitions.
ContractType definitions.
ContractType definitions.
ContractSettlementType definitions.
ContractType definitions.
ContractType definitions.
ContractType definitions.
ContractType definitions.
ContractType definitions.
ContractSettlementType definitions.
ContractType definitions.
ContractType definitions.
# Variables
ErrGetFundingDataRequired is returned when requesting funding rate data without the prerequisite.
var error definitions.
ErrNilPNLCalculator is raised when pnl calculation is requested for an exchange, but the fields are not set properly.
ErrNoPositionsFound returned when there is no positions returned.
ErrNotFuturesAsset returned when futures data is requested on a non-futures asset.
ErrNotPerpetualFuture is returned when a currency is not a perpetual future.
ErrOfflineCalculationSet is raised when collateral calculation is set to be offline, yet is attempted online.
ErrOrderHistoryTooLarge is returned when you lookup order history, but with too early a start date.
ErrPositionClosed returned when attempting to amend a closed position.
ErrPositionLiquidated is raised when checking PNL status only for it to be liquidated.
ErrPositionNotFound is raised when a position is not found.
ErrUSDValueRequired returned when usd value unset.
# Structs
CollateralCalculator is used to determine the size of collateral holdings for an exchange eg on Bybit, the collateral is scaled depending on what currency it is.
Contract holds details on futures contracts.
MultiPositionTracker will track the performance of futures positions over time.
MultiPositionTrackerSetup holds the parameters required to set up a multi position tracker.
OpenInterest holds open interest data for an exchange pair asset.
PNLCalculator implements the PNLCalculation interface to call CalculatePNL and is used when a user wishes to have a consistent method of calculating PNL across different exchanges.
PNLCalculatorRequest is used to calculate PNL values for an open position.
PNLResult stores a PNL result from a point in time.
Position is a basic holder for position information.
PositionController manages all futures orders across all exchanges assets and pairs its purpose is to handle the minutia of tracking and so all you need to do is send all orders to the position controller and its all tracked happily.
PositionDetails are used to track open positions in the order manager.
PositionResponse are used to track open positions in the order manager.
PositionsRequest defines the request to retrieve futures position data.
PositionSummary returns basic details on an open position.
PositionSummaryRequest is used to request a summary of an open position.
PositionTracker tracks futures orders until the overall position is considered closed eg a user can open a short position, append to it via two more shorts, reduce via a small long and finally close off the remainder via another long.
PositionTrackerSetup contains all required fields to setup a position tracker.
TotalCollateralCalculator holds many collateral calculators to calculate total collateral standing with one struct.
TotalCollateralResponse holds all collateral.
# Interfaces
PNLCalculation is an interface to allow multiple ways of calculating PNL to be used for futures positions.
# Type aliases
ContractSettlementType holds the various style of contracts offered by futures exchanges.
ContractType holds the various style of contracts offered by futures exchanges.