Automate Treasury top-ups

This guide explains how to integrate with the Smart Treasury APIs to automate top-ups, configure thresholds, and monitor liquidity.

The Smart Treasury feature automates liquidity top-ups based on configurable thresholds and AI-powered forecasts derived from your treasury history. This helps ensure your Layer1 Wallet always maintains sufficient balance to support trading and withdrawals—even during periods of volatility or high activity.

This guide will walk you through how to integrate with the Layer1 Treasury API to:

  • Monitor and manage your wallet balances
  • Set up automatic top-ups using pre-defined rules
  • Leverage forecasting to anticipate and prevent liquidity shortfalls


Prerequisites

Before integrating Smart Treasury features, ensure your API key has the treasury:admin role.

To check your roles and permissions, in Layer1 Portal, go to Settings > Profile > Roles and Permissions.

Key concepts

TermDescription
Managed BalanceA wallet configured with liquidity thresholds and optional forecasting/monitoring
ThresholdsRules that trigger notifications or top-ups (min, warning, target, buffer)
Eligible SourceA liquidity provider (for example Kraken, Binance) that can fund top-ups or another asset pool
Balance AdjustmentA manual or automated top-up
Buffer FactorSafety margin preventing cascading liquidity issues
ForecastingPredictive system based on historical data to maintain sufficient balance