---
layout: home

hero:
  name: LeverUp
  text: Developer Documentation
  tagline: Build trading bots, interfaces, and analytics on top of the LeverUp perpetuals protocol on Monad.
  actions:
    - theme: brand
      text: Quickstart
      link: /introduction/quickstart
    - theme: alt
      text: What is LeverUp
      link: /introduction/what-is-leverup

features:
  - title: Onchain Integration
    details: Call the protocol directly from your own wallet. Full control, you pay gas, nothing between you and the contracts.
    link: /onchain/overview
    linkText: Contract guide
  - title: Gasless Trading (1CT)
    details: Sign trade intents offchain and let the protocol relay and pay for them. No wallet popups, no gas, sub-second submission.
    link: /gasless/overview
    linkText: 1CT guide
  - title: REST API
    details: Prices, pairs, positions, trade history, portfolio analytics, and leaderboards over plain HTTP.
    link: /api/overview
    linkText: API reference
---

## Choosing an integration path

| You are building | Use |
| :--- | :--- |
| A trading bot or strategy that holds its own key | [Onchain](/onchain/overview), or [1CT self-signing](/gasless/overview#integration-modes) if you want gas covered |
| A frontend or wallet that trades on behalf of users | [1CT](/gasless/overview) — users authorize once, then trade without popups |
| A copy-trading or managed-account service | [1CT with a hosted agent](/gasless/authorization) — per-action permission bits |
| A dashboard, indexer, or analytics product | [REST API](/api/overview) and [onchain read functions](/onchain/reading-data) |

Most integrations combine two of these: the REST API for market and account data, and one of the
execution paths for placing trades.

## Before you write code

Three things account for most first-day integration bugs:

1. **Units.** `qty` is not in USD and not in wei — it is the base asset amount at 10 decimals.
   Read [Precision & Units](/introduction/precision) first.
2. **Oracle data.** Every price-sensitive call needs a fresh oracle payload fetched from the LeverUp
   backend, plus a native-token fee. See [Core Concepts](/introduction/concepts#oracle-updates).
3. **`lvToken`.** Every position carries both the token you deposit (`tokenIn`) and the protocol's
   settlement token (`lvToken`). Getting the pairing wrong reverts. See
   [Core Concepts](/introduction/concepts#collateral-and-lvtoken).
