messari.blockexplorers.solscan package
Submodules
messari.blockexplorers.solscan.helpers module
This module is dedicated to helpers for the SolScan class
- messari.blockexplorers.solscan.helpers.unpack_dataframe_of_dicts(df_in: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame
Unpacks a dataframe where all entries are dicts
- Parameters
- df_in: pd.DataFrame
input DataFrame
- Returns
- DataFrame
formated pandas DataFrame
messari.blockexplorers.solscan.solscan module
This module is meant to contain the Solscan class
- class messari.blockexplorers.solscan.solscan.Solscan
Bases:
messari.dataloader.DataLoader
This class is a wrapper around the Solscan API
Methods
get_account
(accounts_in)Return overall account(s) information, including program account, NFT metadata information
get_account_export_transactions
(accounts_in, ...)Export transactions to CSV style string
get_account_sol_transactions
(accounts_in[, ...])Return SOL transfers for given account(s)
get_account_spl_transactions
(accounts_in[, ...])Return SPL transfers for given account(s)
get_account_stake
(accounts_in)Get staking accounts of the given account(s)
get_account_tokens
(accounts_in)Return token balances of the given account(s)
get_account_transactions
(accounts_in)Return DataFrame of transactions of the given account(s)
get_block
(blocks_in)Return information of given block(s)
get_block_last_transactions
(blocks_in[, ...])get last num_transactions of given block numbers
Return Blockchain overall information
get_last_blocks
([num_blocks])returns info for last blocks (default is 1, limit is 20)
get_last_transactions
([num_transactions])Return last num_transactions transactions
get_market_info
(tokens_in)Get market information of the given token
get_response
(endpoint_url[, params, headers])Gets response from endpoint and checks for HTTP errors when requesting data.
get_token_holders
(tokens_in[, limit, offset])Return top token holders for given token(s)
get_token_list
([sort_by, ascending, limit, ...])Returns DataFrame of tokens
get_token_meta
(tokens_in)Return metadata of given token(s)
get_transaction
(signatures_in)Return information of given transaction signature(s)
set_api_dict
(api_dict)Sets a new dictionary to be used as an API key pair
set_taxonomy_dict
(taxonomy_dict)Sets a new dictionary to be used for taxonomy translations
translate
(input_slugs)Wrapper around messari.utils.validate_input, validate input & check if it's supported by DeFi Llama
- get_account(accounts_in: Union[str, List]) pandas.core.frame.DataFrame
Return overall account(s) information, including program account, NFT metadata information
- Parameters
- accounts_in: str, List
single account in or list of accounts in
- Returns
- ——-
- DataFrame
DataFrame with account info
- get_account_export_transactions(accounts_in: Union[str, List], type_in: str, from_time: int, to_time: int) List[str]
Export transactions to CSV style string
- Parameters
- accounts_in: str, List
single account in or list of accounts in
- type_in: str
- what type of transactions to export:
tokenchange
soltransfer
all
- from_time: int
unix time to start transaction history
- to_time: int
unix time to end transaction history
- Returns
- List[str]
list of strings to make csv document
- get_account_sol_transactions(accounts_in: Union[str, List], from_time: Optional[int] = None, to_time: Optional[int] = None, offset: int = 0, limit: int = 10) pandas.core.frame.DataFrame
Return SOL transfers for given account(s)
- Parameters
- accounts_in: str, List
single account in or list of accounts in
- from_time: int
unix time to start transaction history
- to_time: int
unix time to end transaction history
- offset: int
Offset starting at 0. Increment value to offset paginated results
- limit: int
Limit of assets to return. Default is 10
- Returns
- DataFrame
DataFrame with SOL transfers for given account(s)
- get_account_spl_transactions(accounts_in: Union[str, List], from_time: Optional[int] = None, to_time: Optional[int] = None, offset: int = 0, limit: int = 10) pandas.core.frame.DataFrame
Return SPL transfers for given account(s)
- Parameters
- accounts_in: str, List
single account in or list of accounts in
- from_time: int
unix time to start transaction history
- to_time: int
unix time to end transaction history
- offset: int
Offset starting at 0. Increment value to offset paginated results
- limit: int
Limit of assets to return. Default is 10
- Returns
- DataFrame
DataFrame with SPL transfers for given account(s)
- get_account_stake(accounts_in: Union[str, List]) pandas.core.frame.DataFrame
Get staking accounts of the given account(s)
- Parameters
- accounts_in: str, List
single account in or list of accounts in
- Returns
- DataFrame
DataFrame with staking accounts of given accounts
- get_account_tokens(accounts_in: Union[str, List]) pandas.core.frame.DataFrame
Return token balances of the given account(s)
- Parameters
- accounts_in: str, List
single account in or list of accounts in
- Returns
- DataFrame
DataFrame with token balances of given accounts
- get_account_transactions(accounts_in: Union[str, List]) pandas.core.frame.DataFrame
Return DataFrame of transactions of the given account(s)
- Parameters
- accounts_in: str, List
single account in or list of accounts in
- Returns
- DataFrame
DataFrame with transactions of given accounts
- get_block(blocks_in: Union[str, List]) pandas.core.frame.DataFrame
Return information of given block(s)
- Parameters
- blocks_in: str, List
single block in or list of blocks in
- Returns
- DataFrame
DataFrame with block information
- get_block_last_transactions(blocks_in: Union[str, List], offset=0, num_transactions=10) pandas.core.frame.DataFrame
get last num_transactions of given block numbers
- Parameters
- blocks_in: str, List
single block in or list of blocks in
- num_transactions: int (default is 10)
number of transactions to return
- Returns
- DataFrame
dataframe with transaction details
- get_chain_info() Dict
Return Blockchain overall information
- Returns
- Dict
Information about Solana blockchain
- get_last_blocks(num_blocks=1) pandas.core.frame.DataFrame
returns info for last blocks (default is 1, limit is 20)
- Parameters
- num_blocks: int (default is 1)
number of blocks to return, max is 20
- Returns
- DataFrame
DataFrame with block information
- get_last_transactions(num_transactions=10) pandas.core.frame.DataFrame
Return last num_transactions transactions
- Parameters
- num_transactions: int (default is 10)
number of transactions to return, limit is 20
- Returns
- DataFrame
dataframe with transaction details
- get_market_info(tokens_in: Union[str, List]) pandas.core.frame.DataFrame
Get market information of the given token
- Parameters
- tokens_in: str, List
single token address in or list of token addresses
- Returns
- DataFrame
DataFrame containing market info for token(s)
- get_token_holders(tokens_in: Union[str, List], limit: int = 10, offset: int = 0) pandas.core.frame.DataFrame
Return top token holders for given token(s)
- Parameters
- tokens_in: str, List
single token address in or list of token addresses, used to filter results
- offset: int
Offset starting at 0. Increment value to offset paginated results
- limit: int
Limit of assets to return. Default is 10
- Returns
- DataFrame
DataFrame with top token holders
- get_token_list(sort_by: str = 'market_cap', ascending: bool = True, limit: int = 10, offset: int = 0) pandas.core.frame.DataFrame
Returns DataFrame of tokens
- Parameters
- sort_by: str (default ‘market_cap’)
- how to sort results, options are:
market_cap
volume
holder
price
price_change_24h
price_change_7d
price_change_14d
price_change_30d
price_change_60d
price_change_200d
price_change_1y
- offset: int
Offset starting at 0. Increment value to offset paginated results
- limit: int
Limit of assets to return. Default is 10
- ascending: bool
return results ascending or descending (default True)
- Returns
- DataFrame
DataFrame with tokens
- get_token_meta(tokens_in: Union[str, List]) pandas.core.frame.DataFrame
Return metadata of given token(s)
- Parameters
- tokens_in: str, List
single token address in or list of token addresses, used to filter results
- Returns
- DataFrame
DataFrame with token metadata
- get_transaction(signatures_in: Union[str, List]) pandas.core.frame.DataFrame
Return information of given transaction signature(s)
- Parameters
- signatures_in: str, List
single signature in or list of signatures in
- Returns
- DataFrame
DataFrame with transaction details
Module contents
Module to handle initialization, imports, for Solscan class