types

package
v0.0.0-...-f5fc5cb Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiHostMainnet = "https://api.dydx.exchange"
	ApiHostRopsten = "https://api.stage.dydx.exchange"
	WsHostMainnet  = "wss://api.dydx.exchange/v3/ws"
	WsHostRopsten  = "wss://api.stage.dydx.exchange/v3/ws"
)
View Source
const (
	SignatureTypeNoPrepend   = 0
	SignatureTypeDecimal     = 1
	SignatureTypeHexadecimal = 2
)
View Source
const (
	Domain                       = "dYdX"
	Version                      = "1.0"
	Eip712DomainStringNoContract = "EIP712Domain(string name,string version,uint256 chainId)"
)
View Source
const (
	OffChainOnboardingAction    = "dYdX Onboarding"
	OffChainKeyDerivationAction = "dYdX STARK Key"
)
View Source
const (
	NetworkIdMainnet = 1
	NetworkIdRopsten = 3
)
View Source
const (
	OPEN        = "OPEN"
	CLOSED      = "CLOSED"
	LIQUIDATED  = "LIQUIDATED"
	LIQUIDATION = "LIQUIDATION"
)
View Source
const (
	MARKET       = "MARKET"
	LIMIT        = "LIMIT"
	STOP         = "STOP"
	TRAILINGSTOP = "TRAILING_STOP"
	TAKEPROFIT   = "TAKE_PROFIT"
)
View Source
const (
	BUY  = "BUY"
	SELL = "SELL"
)
View Source
const (
	TimeInForceGtt = "GTT"
	TimeInForceFok = "FOK"
	TimeInForceIoc = "IOC"
)
View Source
const (
	OrderStatusPending     = "PENDING"
	OrderStatusOpen        = "OPEN"
	OrderStatusFilled      = "FILLED"
	OrderStatusCanceled    = "CANCELED"
	OrderStatusUntriggered = "UNTRIGGERED"
)
View Source
const (
	Resolution1D     = "1DAY"
	Resolution4HOURS = "4HOURS"
	Resolution1HOUR  = "1HOUR"
	Resolution30MINS = "30MINS"
	Resolution15MINS = "15MINS"
	Resolution5MINS  = "5MINS"
	Resolution1MIN   = "1MIN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiKeyCredentials

type ApiKeyCredentials struct {
	Key        string
	Secret     string
	Passphrase string
}

type Options

type Options struct {
	NetworkId              int
	Host                   string
	DefaultEthereumAddress string

	StarkPublicKey            string
	StarkPrivateKey           string
	StarkPublicKeyYCoordinate string
	ApiKeyCredentials         *ApiKeyCredentials

	Web3 *jsonrpc.Client
}

type RateLimit

type RateLimit struct {
	Remaining  string
	Reset      string
	RetryAfter string
	Limit      string
}

func (*RateLimit) ToNumber

func (p *RateLimit) ToNumber() (remaining, reset, retryAfter, limit int64)

Jump to

Keyboard shortcuts

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