http

package
v0.0.0-...-ea1cebd Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTHORIZE         = "authorize"
	CONNECT_WEBSOCKET = "/websocket"
	FIND_CONTRACT     = "contract/find"
	GET_ACCESS_TOKEN  = "/auth/accesstokenrequest"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	AccessToken               string    `json:"accessToken"`
	MarketDataAccessToken     string    `json:"mdAccessToken"`
	ExpirationTime            time.Time `json:"expirationTime"`
	UserStatus                string    `json:"userStatus"`
	UserId                    int       `json:"userId"`
	Name                      string    `json:"name"`
	HasLive                   bool      `json:"hasLive"`
	OutdatedTaC               bool      `json:"outdatedTaC"`
	HasFunded                 bool      `json:"hasFunded"`
	HasMarketData             bool      `json:"hasMarketData"`
	OutdatedLiquidationPolicy bool      `json:"outdatedLiquidationPolicy"`
}

func GetAccessToken

func GetAccessToken(host string, user string, pass string,
	appName string, appVersion string, clientId string,
	deviceId string, apiKey string, penaltyTicket string) (AccessTokenResponse, error)

type AuthorizationResponse

type AuthorizationResponse struct {
	Id         int64 `json:"i"`
	StatusCode int   `json:"s"`
}

type RateLimitError

type RateLimitError struct {
	PenaltyTicket     string
	PenaltyTime       int64
	PenaltyExpiration time.Time
	PenaltyCaptcha    bool
}

func (*RateLimitError) Error

func (e *RateLimitError) Error() string

Jump to

Keyboard shortcuts

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