Skip to main content

Offramp Service

The monei.offramp service allows you to:
  • Retrieve supported crypto assets
  • Get crypto-to-fiat quotes
  • Initiate crypto-to-fiat swaps
  • Track transaction history
  • Check transaction status
  • Retrieve supported banks
  • Verify bank accounts

Initialize

from monei import Monei

monei = Monei(api_key="your-secret-key")

Exchange Service

Handles crypto-to-fiat conversion.

Get Supported Assets

Retrieve all supported crypto-network pairs.
assets = await monei.offramp.exchange.get_assets()

for asset in assets.assets:
    print(asset.symbol, asset.network)

Get Fiat Quote

Get a crypto-to-fiat exchange quote.
quote = await monei.offramp.exchange.get_fiat_quote({
    "from_asset": "USDT",
    "network": "TRON",
    "amount": 100,
    "to_currency": "NGN"
})

print(quote["rate"])
print(quote["amount_to_receive"])

Initiate Crypto to Fiat Swap

Create a crypto-to-fiat order.
order = await monei.offramp.exchange.crypto_to_fiat({
    "from_asset": "USDT",
    "network": "TRON",
    "amount": 100,
    "bank_code": "GTBINGLA",
    "account_number": "0123456789"
})

print(order.reference)
print(order.status)

Ledger Service

Track and monitor Offramp transactions.

Get Offramp Transactions

Retrieve transaction history.
transactions = await monei.offramp.ledger.get_offramp_transactions()

for tx in transactions.transactions:
    print(tx.reference, tx.status)

Check Transaction Status

Get the status of a specific Offramp transaction.
status = await monei.offramp.ledger.offramp_transaction_status({
    "reference": "order-reference"
})

print(status.reference)
print(status.status)

Payouts Service

Manage bank payouts for Offramp transactions.

Get Supported Banks

Retrieve all supported banks.
banks = await monei.offramp.payouts.get_offramp_banks()

for bank in banks.banks:
    print(bank.name, bank.code)

Verify Bank Account

Verify a bank account before initiating payout.
verified = await monei.offramp.payouts.verify_offramp_bank({
    "account_number": "0123456789",
    "bank_code": "GTBINGLA"
})

print(verified.account_name)

Error Handling

All Offramp operations may raise MoneiAPIError.
from monei.exceptions import MoneiAPIError

try:
    assets = await monei.offramp.exchange.get_assets()
except MoneiAPIError as error:
    print(error.message)

Service Overview

ServiceDescription
exchangeCrypto-to-fiat operations
ledgerTransaction history and tracking
payoutsBank payout management