util

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeUsdcBalance

func ChangeUsdcBalance(subaccount satypes.Subaccount, deltaQuantums int64) satypes.Subaccount

Creates a copy of a subaccount and changes the USDC asset position size of the subaccount by the passed in delta.

func CreateSingleAssetPosition

func CreateSingleAssetPosition(
	assetId uint32,
	quoteBalance *big.Int,
) *satypes.AssetPosition

func CreateSinglePerpetualPosition

func CreateSinglePerpetualPosition(
	perpetualId uint32,
	quantums *big.Int,
	fundingIndex *big.Int,
	quoteBalance *big.Int,
) *satypes.PerpetualPosition

func CreateUsdcAssetPositions

func CreateUsdcAssetPositions(
	quoteBalance *big.Int,
) []*satypes.AssetPosition

func CreateUsdcAssetUpdates

func CreateUsdcAssetUpdates(
	deltaQuoteBalance *big.Int,
) []satypes.AssetUpdate

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL