Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultApiBase = "https://api.stxtools.io"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
func NewAPIClient ¶
func (*APIClient) GetAllHolders ¶
func (c *APIClient) GetAllHolders(contractId string) (HoldersData, error)
func (*APIClient) GetAllSwaps ¶
func (*APIClient) GetAllTokens ¶
func (*APIClient) GetAllTransfers ¶
func (c *APIClient) GetAllTransfers(contractId string) ([]Transaction, error)
type HoldersData ¶
type HoldersResponse ¶
type HoldersResponse struct {
Data HoldersData `json:"data"`
Page Page `json:"page"`
}
type Metrics ¶
type Metrics struct {
ContractID string `json:"contract_id"`
HolderCount int `json:"holder_count"`
SwapCount int `json:"swap_count"`
TransferCount int `json:"transfer_count"`
PriceUSD float64 `json:"price_usd"`
PriceChange1D float64 `json:"price_change_1d"`
PriceChange7D float64 `json:"price_change_7d"`
PriceChange30D float64 `json:"price_change_30d"`
LiquidityUSD float64 `json:"liquidity_usd"`
}
type SwapsData ¶
type SwapsData struct {
TxID string `json:"tx_id"`
PoolID string `json:"pool_id"`
SenderAddress string `json:"sender_address"`
TokenXAmount string `json:"token_x_amount"`
TokenYAmount string `json:"token_y_amount"`
BurnBlockTime time.Time `json:"burn_block_time"`
TokenX SwapToken `json:"token_x"`
TokenY SwapToken `json:"token_y"`
}
type SwapsResponse ¶
type Token ¶
type Token struct {
ContractID string `json:"contract_id"`
Symbol string `json:"symbol"`
Name string `json:"name"`
Decimals int `json:"decimals"`
CirculatingSupply string `json:"circulating_supply"`
TotalSupply string `json:"total_supply"`
ImageURL string `json:"image_url"`
Enabled bool `json:"enabled"`
WrappedToken string `json:"wrapped_token"`
Metrics Metrics `json:"metrics"`
}
type Transaction ¶
type Transaction struct {
TxID string `json:"tx_id"`
SenderAddress string `json:"sender_address"`
Amount string `json:"amount"`
RecipientAddress string `json:"recipient_address"`
ContractID string `json:"contract_id"`
BurnBlockTime string `json:"burn_block_time"`
BlockHeight int `json:"block_height"`
Token Token `json:"token"`
}
type TransfersResponse ¶
type TransfersResponse struct {
Data []Transaction `json:"data"`
Page Page `json:"page"`
}
type TransfersToken ¶
Click to show internal directories.
Click to hide internal directories.