# Platform

> Check API health and load the platform constants the web app configures itself from.

The platform endpoints describe the API rather than an account. `GET /health` is a public liveness probe. `GET /get-constants` returns the configuration the web app builds its forms and limits from: supported chains and their launch platforms, funding and launch bounds, and feature switches.

Constants depend on the caller: some launch platforms and platform fields are only returned to beta licenses. Request them with the license's own token rather than sharing one copy across licenses.

Base URL: `https://api-mig.proxima.tools`

## Endpoints

- `GET /health`: Check API health
- `GET /get-constants`: Retrieve platform constants

## The Constants object

Platform configuration returned by `GET /get-constants`.

- `launch_scripts_only` (boolean): When `true`, launch scripts are the single source of launches and a plan's owner steers it live.
- `fee_activation` (object): Fee programme switches.
  - `active` (boolean): Cashback is on. The web app shows the Rewards section only when this is `true`.
  - `referral` (boolean): Referral fee switch.
- `usepaid` (object): usepaid integration switches.
  - `pumpfun_enabled` (boolean): Enabled for Pump.fun launches.
  - `pons_enabled` (boolean): Enabled for Pons launches.
- `zaio` (object): Zaio integration settings.
  - `live` (boolean): Whether the integration is live.
  - `platforms` (array<string>): Launch platforms it applies to.
  - `fee_wallet` (string): Fee wallet address.
  - `zaio_share_bps` (integer): Zaio share of fees, in basis points.
- `funding` (object): Funding bounds.
  - `buyback_min_fund_multiplier` (number): Minimum funding multiplier for buybacks.
  - `max_funding_delay` (number): Maximum funding delay.
  - `min_holder_base_funding` (number): Minimum base funding per holder wallet.
- `aged_wallets` (object): Aged wallet generation bounds.
  - `max_delay` (number): Maximum delay between ageing steps.
  - `max_loops` (number): Maximum ageing loops.
  - `min_balance_multiplier` (number): Minimum balance multiplier.
- `launch` (object): Launch plan bounds used to validate the launch form.
  - `min_buy_delay_mev` (number): Minimum MEV buy delay.
  - `max_buy_delay_mev` (number): Maximum MEV buy delay.
  - `min_buy_delay_stagger` (number): Minimum staggered buy delay.
  - `max_buy_delay_stagger` (number): Maximum staggered buy delay.
  - `min_holders_count` (integer): Minimum number of holder wallets.
  - `max_holders_count` (integer): Maximum number of holder wallets.
  - `max_total_buy_percentage` (object): Default maximum share of supply a launch may buy, keyed by launch platform.
  - `default_front_to_back_delay_ms` (integer): Default delay between front and back MEV buys, in milliseconds.
  - `default_back_to_temp_delay_ms` (integer): Default delay between back MEV and temporary holder buys, in milliseconds.
  - `max_mev_step_delay_ms` (integer): Maximum delay of one MEV step, in milliseconds.
  - `autosell` (object): Autosell bounds: `max_autosell_session_duration`, `min_replication_factor`, `max_replication_factor`, `min_swap_back_rate`, `min_timed_exact_in_delay`, `max_timed_exact_in_delay`.
- `chains` (object): Per-chain configuration, keyed by chain id.
  - `network_type` (enum): Network of the chain. Possible values: `svm`, `evm`.
  - `chainId` (string): Chain id.
  - `name` (string): Display name.
  - `symbol` (string): Native token symbol.
  - `decimals` (integer): Native token decimals.
  - `live` (boolean): Whether the chain is enabled.
  - `dexs` (object): Launch platforms on this chain, keyed by platform id. Platform-specific fields (fee tiers, snipe tax, supply bounds) appear only on the platforms that use them.
    - `id` (string): Launch platform id, e.g. `pumpfun`.
    - `name` (string): Display name.
    - `decimals` (integer): Token decimals of coins launched on this platform.
    - `live` (boolean): Whether the platform is open for launches.
    - `available_quotes` (array<string>): Quote token mints or addresses a launch can pair with.
    - `versions` (object): Per-generation quote lists. The root `available_quotes` is the v1-safe subset.
    - `graduation_mcap_usd` (number): Market cap, in USD, at which the bonding curve graduates.
    - `max_total_buy_percentage` (number): Maximum share of supply a launch bundle may buy, in percent.
    - `max_dev_buy_percentage` (number): Maximum dev buy, in percent of supply.
    - `custom_quote` (boolean): Pump.fun only: any pump coin can be used as quote once the quote check admits it.
    - `launch_modes` (array<string>): Launch modes beyond the standard one, listed only for licenses allowed them.
    - `dev_buy_modes` (array<string>): Supported dev buy modes.
  - `tokens` (object): Quote tokens keyed by mint or lowercase address. Each entry has `symbol` and `decimals`; on EVM, `decimals` is the 10^d multiplier as a string because it exceeds JavaScript number precision.
  - `lock_token` (object | false): Token lock settings (`fee_bps`, `min_native_balance`), or `false` when locking is not available.
  - `volume_bundle` (boolean): Whether a bundle relay is configured, which the volume bot's atomic bundle mode requires.
- `ocp` (object): Shield settings.
  - `minimum_funder_balance` (integer): Minimum funder balance needed to deploy a Shield, in lamports.

```json
{
  "launch_scripts_only": false,
  "fee_activation": {
    "active": true,
    "referral": true
  },
  "funding": {
    "buyback_min_fund_multiplier": 1.2,
    "max_funding_delay": 60,
    "min_holder_base_funding": 0.01
  },
  "aged_wallets": {
    "max_delay": 30,
    "max_loops": 5,
    "min_balance_multiplier": 1.5
  },
  "launch": {
    "min_buy_delay_mev": 0,
    "max_buy_delay_mev": 10,
    "min_buy_delay_stagger": 1,
    "max_buy_delay_stagger": 60,
    "min_holders_count": 1,
    "max_holders_count": 50,
    "max_total_buy_percentage": {
      "pumpfun": 80
    },
    "default_front_to_back_delay_ms": 400,
    "default_back_to_temp_delay_ms": 800,
    "max_mev_step_delay_ms": 5000,
    "autosell": {
      "max_autosell_session_duration": 3600,
      "min_replication_factor": 1,
      "max_replication_factor": 10,
      "min_swap_back_rate": 0.1,
      "min_timed_exact_in_delay": 1,
      "max_timed_exact_in_delay": 300
    }
  },
  "chains": {
    "sol": {
      "network_type": "svm",
      "chainId": "sol",
      "name": "Solana",
      "symbol": "SOL",
      "decimals": 9,
      "live": true,
      "dexs": {
        "pumpfun": {
          "id": "pumpfun",
          "name": "Pump.fun",
          "decimals": 6,
          "live": true,
          "available_quotes": [
            "So11111111111111111111111111111111111111112"
          ],
          "max_total_buy_percentage": 80,
          "max_dev_buy_percentage": 80
        }
      },
      "lock_token": false
    },
    "bsc": {
      "network_type": "evm",
      "chainId": "bsc",
      "name": "BNB Chain",
      "symbol": "BNB",
      "decimals": 18,
      "live": true,
      "dexs": {
        "fourmeme": {
          "id": "fourmeme",
          "name": "Four.meme",
          "decimals": 18,
          "live": true
        }
      },
      "tokens": {
        "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c": {
          "symbol": "BNB",
          "decimals": "1000000000000000000"
        }
      },
      "lock_token": {
        "fee_bps": 100,
        "min_native_balance": 0.01
      },
      "volume_bundle": true
    }
  },
  "ocp": {
    "minimum_funder_balance": 7000000000
  }
}
```

### Check API health

`GET /health`

Returns a liveness flag and the server time. (No auth)

- Token: None. This endpoint is public.
- Retry: Safe to retry.

> Not called by the current web app.

#### Returns 200 OK

- `ok` (boolean): Always `true` when the API is up.
- `ts` (integer): Server time, in Unix milliseconds.

#### Example request

```bash
curl "https://api-mig.proxima.tools/health"
```

#### Example response

```json
{
  "ok": true,
  "ts": 1793613600123
}
```

### Retrieve platform constants

`GET /get-constants`

Returns the platform configuration for the current license. (Bearer JWT)

- Token: Upgraded session token, bound to a license.
- Read-only tokens: allowed.
- Retry: Safe to retry.

The web app loads constants once a license is selected and refetches them every 30 seconds. It reads chain and platform availability, launch and funding bounds, the Shield funder minimum and the `fee_activation` switch that opens the Rewards section.

#### Returns 200 OK

Returns a [Constants](#object-constants) object.

#### Example request

```bash
curl "https://api-mig.proxima.tools/get-constants" \
  -H "Authorization: Bearer $PROXIMA_JWT"
```

#### Example response

```json
{
  "launch_scripts_only": false,
  "fee_activation": {
    "active": true,
    "referral": true
  },
  "funding": {
    "buyback_min_fund_multiplier": 1.2,
    "max_funding_delay": 60,
    "min_holder_base_funding": 0.01
  },
  "aged_wallets": {
    "max_delay": 30,
    "max_loops": 5,
    "min_balance_multiplier": 1.5
  },
  "launch": {
    "min_buy_delay_mev": 0,
    "max_buy_delay_mev": 10,
    "min_buy_delay_stagger": 1,
    "max_buy_delay_stagger": 60,
    "min_holders_count": 1,
    "max_holders_count": 50,
    "max_total_buy_percentage": {
      "pumpfun": 80
    },
    "default_front_to_back_delay_ms": 400,
    "default_back_to_temp_delay_ms": 800,
    "max_mev_step_delay_ms": 5000,
    "autosell": {
      "max_autosell_session_duration": 3600,
      "min_replication_factor": 1,
      "max_replication_factor": 10,
      "min_swap_back_rate": 0.1,
      "min_timed_exact_in_delay": 1,
      "max_timed_exact_in_delay": 300
    }
  },
  "chains": {
    "sol": {
      "network_type": "svm",
      "chainId": "sol",
      "name": "Solana",
      "symbol": "SOL",
      "decimals": 9,
      "live": true,
      "dexs": {
        "pumpfun": {
          "id": "pumpfun",
          "name": "Pump.fun",
          "decimals": 6,
          "live": true,
          "available_quotes": [
            "So11111111111111111111111111111111111111112"
          ],
          "max_total_buy_percentage": 80,
          "max_dev_buy_percentage": 80
        }
      },
      "lock_token": false
    },
    "bsc": {
      "network_type": "evm",
      "chainId": "bsc",
      "name": "BNB Chain",
      "symbol": "BNB",
      "decimals": 18,
      "live": true,
      "dexs": {
        "fourmeme": {
          "id": "fourmeme",
          "name": "Four.meme",
          "decimals": 18,
          "live": true
        }
      },
      "tokens": {
        "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c": {
          "symbol": "BNB",
          "decimals": "1000000000000000000"
        }
      },
      "lock_token": {
        "fee_bps": 100,
        "min_native_balance": 0.01
      },
      "volume_bundle": true
    }
  },
  "ocp": {
    "minimum_funder_balance": 7000000000
  }
}
```
