Tokens#
- class defichain.ocean.Tokens(ocean)#
- list(size: int = 30, next: str | None = None) [{}] #
Paginate query tokens
- Parameters:
size (int) – (optional) size of tokens to query
next (str) – (optional) next set of tokens
- Returns:
(json string) {id: str, symbol: str, displaySymbol: str, symbolKey: str, name: str, decimal: float, limit: str, mintable: bool, tradeable: bool, isDAT: bool, isLPS: bool, isLoanToken: bool, finalized: bool, minted: str, creation: {tx: str, height: int}, destruction: {tx: str, height: int}, collateralAddress: str}
- Example:
>>> ocean.tokens.list()
- get(id: str) {} #
Get information about a token with id of the token
- Parameters:
id (str) – (required) id of the token
- Returns:
(json string) {id: str, symbol: str, displaySymbol: str, symbolKey: str, name: str, decimal: float, limit: str, mintable: bool, tradeable: bool, isDAT: bool, isLPS: bool, isLoanToken: bool, finalized: bool, minted: str, creation: {tx: str, height: int}, destruction: {tx: str, height: int}, collateralAddress: str}
- Example:
>>> ocean.tokens.get(0)