Documentation
¶
Overview ¶
Package orca preloads Orca Whirlpool trading pools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProgramID = sgo.MustPublicKeyFromBase58("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc") CheckPoolID = sgo.MustPublicKeyFromBase58("Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE") CheckConfigID = sgo.MustPublicKeyFromBase58("2LecshUwdy9xi7meFgHtFJQNSKk4KdTrcpvaB56dP2NQ") )
Functions ¶
This section is empty.
Types ¶
type Orca ¶
type Orca struct {
Pools []*Whirlpool
// contains filtered or unexported fields
}
Orca holds all Whirlpool pools loaded at startup.
func Create ¶
Create queries the graph at depth 2 from the Orca program ID (program → WhirlpoolConfig → Whirlpool) and parses every pool account found.
type PoolConfiguration ¶
type PoolConfiguration struct {
List []*WhirlpoolConfiguration `json:"list"`
}
type Whirlpool ¶
type Whirlpool struct {
Pubkey sgo.PublicKey
TokenMintA sgo.PublicKey
TokenMintB sgo.PublicKey
VaultA sgo.PublicKey
VaultB sgo.PublicKey
SqrtPriceHi uint64 // high 64 bits of Q64.64 sqrt price
SqrtPriceLo uint64 // low 64 bits of Q64.64 sqrt price
TickCurrentIndex int32
TickSpacing uint16
FeeRate uint16 // hundredths of a basis point (3000 = 0.3%)
}
Whirlpool is the parsed state of an Orca Whirlpool concentrated-liquidity pool.
func (*Whirlpool) FeeBps ¶
FeeBps returns the fee in basis points.
func (*Whirlpool) SpotPrice ¶
SpotPrice returns token_b raw units per token_a raw unit.
Source Files
¶
- loader.go
- orca.go
- print.go
- whirlpool.go
Click to show internal directories.
Click to hide internal directories.