DeFi
- class DeFi(http: IHttp)
- history(*, time_from: int, time_to: int, address: str | None = 'So11111111111111111111111111111111111111112', address_type: str | None = 'token', type_in_time: str | None = '15m') dict
Get historical price line chart of a token.
- Parameters:
time_from – Specify the start time using Unix timestamps in seconds
time_to – Specify the end time using Unix timestamps in seconds
address – The address of the token.
address_type – The type of the address…defaults to ‘token’
type_in_time – The type of time…defaults to ‘15m’
- history_by_unix(*, address: str, unixtime: int) dict
Get historical price of a token at a specific Unix time.
- Parameters:
address – The address of the token.
unixtime – The Unix time.
- ohlcv(*, address: str, time_from: int, time_to: int, type_in_time: str | None = '15m') dict
Get OHLCV price of a token.
- Parameters:
address – The address of the token.
time_from – Specify the start time using Unix timestamps in seconds
time_to – Specify the end time using Unix timestamps in seconds
type_in_time – The type of time…defaults to ‘15m’
- ohlcv_pair(*, address: str, time_from: int, time_to: int, type_in_time: str | None = '15m') dict
Get OHLCV price of a pair.
- Parameters:
address – The address of the token.
time_from – Specify the start time using Unix timestamps in seconds
time_to – Specify the end time using Unix timestamps in seconds
type_in_time – The type of time…defaults to ‘15m’
- price(*, address: str | None = 'So11111111111111111111111111111111111111112', check_liquidity: int | None = 100, include_liquidity: bool | None = None) dict
Get price update of a token.
- Parameters:
address – The address of the token.
check_liquidity – The minimum liquidity to check.
include_liquidity – Include liquidity in the response.
- price_multiple(*, addresses: list | str, check_liquidity: int | None = 100, include_liquidity: bool | None = None) dict
Get price updates of multiple tokens in a single API call. Maximum 100 tokens
- Parameters:
addresses – The addresses of the tokens.
check_liquidity – The minimum liquidity to check.
include_liquidity – Include liquidity in the response.
- supported_networks() dict
Get a list of all supported networks.
- trades_pair(*, address: str, tx_type: str | None = 'swap', sort_type: str | None = 'desc', offset: int | None = 0, limit: int | None = 50) dict
Get list of trades of a certain pair or market.
- Parameters:
address – The address of the token.
tx_type – The type of transaction.
sort_type – The type of sorting.
limit – The limit.
- trades_pair_by_time(*, address: str | None = 'So11111111111111111111111111111111111111112', tx_type: str | None = 'swap', sort_type: str | None = 'desc', offset: int | None = 0, limit: int | None = 50, before_time: int | None = 0, after_time: int | None = 0) dict
Get list of trades of a certain pair or market with time bound option.
- trades_token(*, address: str | None = 'So11111111111111111111111111111111111111112', tx_type: str | None = 'swap', sort_type: str | None = 'desc', offset: int | None = 0, limit: int | None = 50) dict
Get trades of a token.
- Parameters:
address – The address of the token.
tx_type – The type of transaction.
sort_type – The type of sorting.
limit – The limit.
- trades_token_by_time(*, address: str | None = 'So11111111111111111111111111111111111111112', tx_type: str | None = 'swap', sort_type: str | None = 'desc', offset: int | None = 0, limit: int | None = 50, before_time: int | None = 0, after_time: int | None = 0) dict
Get list of trades of a token with time bound option.
- volume_price_single(*, address: str, type_in_time: str | None = '24h') dict
Get volume and price of a token.
- Parameters:
address – The address of the token.
type_in_time – The type of time…defaults to ‘24h’