aptos

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultPackageAddress = "0x50ead22afd6ffd9769e3b3d6e0e64a2a350d68e8b102c4e72e33d0b8cfdfdb06"

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelOrderRequest

type CancelOrderRequest struct {
	SubaccountAddr string
	OrderID        string
	MarketAddr     string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(privateKey string, opts ...ClientOption) (*Client, error)

func (*Client) AccountAddress

func (c *Client) AccountAddress() string

func (*Client) CancelOrder

func (*Client) PlaceOrder

type ClientOption

type ClientOption func(*clientConfig) error

func WithPackageAddress

func WithPackageAddress(address string) ClientOption

func WithSubmitter

func WithSubmitter(s submitter) ClientOption

type OrderEncoder

type OrderEncoder interface {
	EncodePrice(price decimal.Decimal) (uint64, error)
	EncodeSize(size decimal.Decimal) (uint64, error)
}

type PlaceOrderRequest

type PlaceOrderRequest struct {
	SubaccountAddr         string
	MarketAddr             string
	Price                  decimal.Decimal
	Size                   decimal.Decimal
	Encoder                OrderEncoder
	IsBuy                  bool
	TimeInForce            TimeInForce
	ReduceOnly             bool
	ClientOrderID          *string
	StopPrice              *uint64
	TakeProfitTriggerPrice *uint64
	TakeProfitLimitPrice   *uint64
	StopLossTriggerPrice   *uint64
	StopLossLimitPrice     *uint64
	BuilderAddress         *string
	BuilderFees            *uint64
}

type TimeInForce

type TimeInForce uint8
const (
	TimeInForceGoodTillCancelled TimeInForce = iota
	TimeInForcePostOnly
	TimeInForceImmediateOrCancel
)

Jump to

Keyboard shortcuts

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