Documentation ¶
Index ¶
- Constants
- func CreateOrUpdateCandle(ctx context.Context, base, quote string, price, amount number.Decimal, ...) error
- func CreateOrUpdateMarket(ctx context.Context, base, quote string, ...) error
- func ReadProperty(ctx context.Context, key string) (string, error)
- func ReadPropertyAsTime(ctx context.Context, key string) (time.Time, error)
- func ValidateAndEncryptPassword(ctx context.Context, password string) (string, error)
- func ValidateEmailFormat(ctx context.Context, email string) (string, error)
- func ValidatePhoneNumberFormat(ctx context.Context, phone string) (string, error)
- func WriteProperty(ctx context.Context, key, value string) error
- func WriteTimeProperty(ctx context.Context, key string, value time.Time) error
- type Candle
- type FavoriteMarket
- type Key
- type Market
- func AggregateCandlesAsStats(ctx context.Context, base, quote string) (*Market, error)
- func AllMarkets() []*Market
- func GetMarket(ctx context.Context, base, quote string) (*Market, error)
- func ListActiveMarkets(ctx context.Context, user *User) ([]*Market, error)
- func ListMarkets(ctx context.Context, user *User) ([]*Market, error)
- type OrderAction
- type PoolKey
- type Property
- type Session
- type User
- func (current *User) CancelOrder(ctx context.Context, id string) error
- func (current *User) ConnectMixin(ctx context.Context, authorizationCode string) (*User, error)
- func (current *User) CreateOrder(ctx context.Context, o *OrderAction) error
- func (current *User) CreateWithdrawal(ctx context.Context, assetId string, amount number.Decimal, ...) error
- func (user *User) DislikeMarket(ctx context.Context, base, quote string) error
- func (user *User) LikeMarket(ctx context.Context, base, quote string) (*FavoriteMarket, error)
- func (current *User) MixinIdentityNumber() string
- func (current *User) UpdateName(ctx context.Context, name string) (*User, error)
- type Verification
Constants ¶
View Source
const ( CandleGranularity1M = 60 CandleGranularity5M = 300 CandleGranularity15M = 900 CandleGranularity1H = 3600 CandleGranularity6H = 21600 CandleGranularity1D = 86400 )
View Source
const ( MixinAssetId = "c94ac88f-4671-3976-b60a-09064f1811e8" BitcoinAssetId = "c6d0c728-2624-429b-8e0d-d9d19b6592fa" USDTAssetId = "815b0b1a-2764-3736-8faa-42d694fa620a" )
View Source
const ( VerificationCategoryPhone = "PHONE" VerificationCategoryEmail = "EMAIL" )
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateCandle ¶
func CreateOrUpdateMarket ¶
func ReadPropertyAsTime ¶
func ValidateEmailFormat ¶
Types ¶
type Candle ¶
type FavoriteMarket ¶
type Key ¶
type Market ¶
type Market struct { Base string Quote string Price float64 Volume float64 Total float64 Change float64 QuoteUSD float64 IsLikedBy bool }
func AggregateCandlesAsStats ¶
func AllMarkets ¶
func AllMarkets() []*Market
func (*Market) BaseSymbol ¶
func (*Market) QuoteSymbol ¶
type OrderAction ¶
type PoolKey ¶
type User ¶
type User struct { UserId string Email spanner.NullString Phone spanner.NullString MixinId spanner.NullString IdentityId spanner.NullString FullName string EncryptedPassword string ActiveAt time.Time CreatedAt time.Time SessionId string Key *Key }
func AuthenticateWithToken ¶
func CreateOrResetUser ¶
func CreateSession ¶
func (*User) ConnectMixin ¶
func (*User) CreateOrder ¶
func (current *User) CreateOrder(ctx context.Context, o *OrderAction) error
func (*User) CreateWithdrawal ¶
func (*User) DislikeMarket ¶
func (*User) LikeMarket ¶
func (*User) MixinIdentityNumber ¶
type Verification ¶
type Verification struct { VerificationId string Category string Receiver string Code string Provider string CreatedAt time.Time VerifiedAt spanner.NullTime }
func CreateVerification ¶
func DoVerification ¶
func DoVerification(ctx context.Context, id, code string) (*Verification, error)
Click to show internal directories.
Click to hide internal directories.