Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.monei.cc/llms.txt

Use this file to discover all available pages before exploring further.

Overview

monei.evm provides methods to interact with EVM-compatible blockchains (BSC, Polygon, Ethereum, Base, Arbitrum, Optimism, Scroll, Lisk).
Note: All methods return response objects with attributes accessible via dot notation (e.g., networks, portfolio.tokens, tx.tx_hash).

Get Supported Networks

networks_response = monei.evm.get_supported_networks()
networks = networks_response.networks

for network in networks:
    print(network.name, network.chain_id)

Get Portfolio

Full token breakdown for a wallet on a given chain.
portfolio = monei.evm.get_portfolio(56)  # BSC
print(portfolio.tokens)

Get Native Balance

balance_data = monei.evm.get_native_balance(137)  # Polygon
print(f"{balance_data.balance} {balance_data.symbol}")

Get Token Balance

balance_data = monei.evm.get_token_balance(
    token_address="0xdAC17F958D2ee523a2206206994597C13D831ec7",  # USDT contract
    chain_id=1  # Ethereum
)

print(balance_data.balance)

Send Native Token

tx = monei.evm.send_native_token(
    to="0xRecipientAddress",
    amount="0.01",
    chain_id=56
)

print(tx.tx_hash)

Send ERC-20 Token

tx = monei.evm.send_token(
    to="0xRecipientAddress",
    token_address="0xTokenContractAddress",
    amount="100",
    chain_id=137
)

print(tx.tx_hash)

Working with Response Objects

All methods return objects with attribute access:
# Supported networks response
networks_response = monei.evm.get_supported_networks()
networks = networks_response.networks

for network in networks:
    print(network.name)       # Network name (e.g., "Ethereum")
    print(network.chain_id)   # Chain ID (e.g., 1)
    print(network.symbol)     # Native token symbol (e.g., "ETH")

# Portfolio response
portfolio = monei.evm.get_portfolio(56)
print(portfolio.tokens)        # List of token balances
print(portfolio.total_value)   # Total portfolio value in USD

# Native balance response
balance_data = monei.evm.get_native_balance(137)
print(balance_data.balance)    # Native token balance
print(balance_data.symbol)     # Token symbol (e.g., "MATIC")

# Token balance response
balance_data = monei.evm.get_token_balance(
    "0xdAC17F958D2ee523a2206206994597C13D831ec7",
    1
)
print(balance_data.balance)    # Token balance
print(balance_data.decimals)   # Token decimals
print(balance_data.symbol)     # Token symbol

# Transaction response
tx = monei.evm.send_native_token(...)
print(tx.tx_hash)              # Transaction hash
print(tx.status)               # Transaction status
print(tx.explorer_url)         # Block explorer URL
print(tx.block_number)         # Block number

Notes

  • All methods require a properly configured MoneiClient instance with authentication
  • EVM methods require chain_id parameter (e.g., 56 for BSC, 137 for Polygon, 1 for Ethereum)
  • Supported chains: BSC (56), Polygon (137), Ethereum (1), Base (8453), Arbitrum (42161), Optimism (10), Scroll (534352), Lisk (1135)
  • All responses are strongly typed objects with attribute access