Documentation ¶
Index ¶
Constants ¶
View Source
const ( Endpoint = "https://api.fox.one/api/v2" EndpointDev = "https://dev.fox.one/api/v2" )
View Source
const (
ErrCodeAuthFailed = 1537
)
Variables ¶
This section is empty.
Functions ¶
func UseEndpoint ¶
func UseEndpoint(endpoint string)
func ValidateToken ¶
Types ¶
type Asset ¶
type Asset struct { AssetID string `json:"asset_id,omitempty"` ChainID string `json:"chain_id,omitempty"` Name string `json:"name,omitempty"` Symbol string `json:"symbol,omitempty"` Icon string `json:"icon,omitempty"` Price decimal.Decimal `json:"price,omitempty"` Change decimal.Decimal `json:"change,omitempty"` PriceUSD decimal.Decimal `json:"price_usd,omitempty"` ChangeUSD decimal.Decimal `json:"change_usd,omitempty"` PriceBTC decimal.Decimal `json:"price_btc,omitempty"` ChangeBTC decimal.Decimal `json:"change_btc,omitempty"` Confirmations int `json:"confirmations,omitempty"` // user asset Balance decimal.Decimal `json:"balance,omitempty"` Destination string `json:"destination,omitempty"` Tag string `json:"tag,omitempty"` Chain *Asset `json:"chain,omitempty"` }
type PageSnapshots ¶
type PageSnapshots struct { Pagination *pagination.Pagination `json:"pagination"` Snapshots []*Snapshot `json:"snapshots"` }
func ReadSnapshots ¶
type Snapshot ¶
type Snapshot struct { Asset *Asset `json:"asset"` Amount decimal.Decimal `json:"amount"` AssetID string `json:"asset_id"` InsideMixin bool `json:"inside_mixin,omitempty"` CreatedAt int64 `json:"created_at"` Memo string `json:"memo,omitempty"` ExtraData map[string]interface{} `json:"extra_data"` Opponent *Opponent `json:"opponent,omitempty"` OpponentID string `json:"opponent_id,omitempty"` Receiver string `json:"receiver,omitempty"` Sender string `json:"sender,omitempty"` SnapshotID string `json:"snapshot_id,omitempty"` Source string `json:"source,omitempty"` TraceID string `json:"trace_id,omitempty"` TransactionHash string `json:"transaction_hash,omitempty"` UserID string `json:"user_id,omitempty"` }
type Token ¶
type Token struct { AccessToken string `json:"access_token,omitempty"` RefreshToken string `json:"refresh_token,omitempty"` ExpiresIn int64 `json:"expires_in,omitempty"` Scope string `json:"scope,omitempty"` TokenType string `json:"token_type,omitempty"` // bearer }
func AuthorizeToken ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.