> For the complete documentation index, see [llms.txt](https://docs.pandaboost.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pandaboost.app/api-for-developers/api-methods-reference.md).

# API Methods Reference

PandaBoost API v2 endpoints, eligibility, idempotency, order states, and structured errors.

## Authentication

Send `x-api-key` on every request. JSON request bodies also need `Content-Type: application/json`. Keep the key in a server-side environment variable.

## Base URL

```
https://web.pandaboost.app/api/v2
```

All endpoint paths below are relative to this URL.

## Response envelope

Success responses contain `success: true` and `data`. Errors contain `success: false` and an error object. Branch on `error.code`, not on message text.

```json
{
  "success": false,
  "error": {
    "code": "not_eligible",
    "message": "This token cannot be boosted on DexScreener and is not eligible for Trending.",
    "retryable": false,
    "details": { "check": "dexscreener_boostable" }
  }
}
```

`details` is present when the error has additional context. Examples on this page illustrate the documented response shape, not a live account balance or a guaranteed delivery result.

## GET /balance

Returns the account balance and currency in `data.balance` and `data.currency`.

```bash
curl -sS -H "x-api-key: ${PANDABOOST_API_KEY}" \
  'https://web.pandaboost.app/api/v2/balance'
```

## GET /services

Returns available services and order types with your account's prices and requirements. Read the catalog when building your checkout; do not hard-code availability or rates.

```bash
curl -sS -H "x-api-key: ${PANDABOOST_API_KEY}" \
  'https://web.pandaboost.app/api/v2/services'
```

Each order type describes:

| Field                                                           | Use                                                              |
| --------------------------------------------------------------- | ---------------------------------------------------------------- |
| `id`                                                            | Send as `orderTypeId`.                                           |
| `price.unit`, `price.currency`                                  | Account-specific unit price and currency.                        |
| `quantity.min`, `quantity.max`, `quantity.fixed`                | Quantity limits and whether quantity is fixed.                   |
| `target.level`                                                  | `token` or `pair`.                                               |
| `target.chains`, `target.excludedChains`, `target.detectsChain` | Network requirements and detection support.                      |
| `options`                                                       | Accepted package settings and their requirements.                |
| `eligibility`                                                   | Rules, rule codes, descriptions, and blocking/advisory policies. |
| `reorders`                                                      | `queue`, `refuse`, or `parallel`.                                |

`target.chains: null` means any chain DexScreener lists, except those in `excludedChains`. Use `/eligibility` for the resolved target and order quote.

## POST /eligibility

Send the same body you plan to send to `/orders`. This resolves the target, runs eligibility checks, and returns a quote without charging your balance.

```bash
curl -sS -X POST \
  -H "x-api-key: ${PANDABOOST_API_KEY}" \
  -H 'Content-Type: application/json' \
  --data '{
    "orderTypeId": "dex-trending-sol-24h",
    "target": { "address": "TOKEN_CONTRACT_ADDRESS" },
    "clientOrderId": "shop-order-1042"
  }' \
  'https://web.pandaboost.app/api/v2/eligibility'
```

| Response field | Meaning                                                                                      |
| -------------- | -------------------------------------------------------------------------------------------- |
| `orderable`    | The order would be accepted, subject to account balance and live service capacity.           |
| `eligible`     | `true` if all rules passed; `false` if a rule failed; `null` if a rule could not be checked. |
| `problem`      | Why the target cannot be ordered when `orderable` is false.                                  |
| `checks`       | Individual rule results, policies, messages, and details.                                    |
| `quote`        | `unitPrice`, `quantity`, `total`, and `currency`.                                            |
| `target`       | The resolved target, including selected chain and pair when applicable.                      |
| `pairs`        | Verified pairs for pair-level packages, highest liquidity first.                             |
| `startsAt`     | Start time when this package queues an order behind a running boost; otherwise null.         |

HTTP `200` can still contain `orderable: false`. Check the body before taking payment. `eligible: null` is not a passing result; decide how your checkout handles an unavailable check rather than treating it as proof of eligibility.

### Blocking and advisory rules

Blocking rules refuse the order before charging. Advisory rules report a warning but **do not prevent a paid order**. Set `requireEligible: true` at the root of the order body to require eligibility instead. Send it to `/eligibility` too, so the check uses the same policy as the order.

| Rule                    | Packages                                | Policy and requirement                                                                         |
| ----------------------- | --------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `dexscreener_boostable` | DEX Screener Trending                   | Blocking: DexScreener must allow boosts for the selected pair.                                 |
| `min_market_cap`        | `phantom-chat-trending-24h`             | Advisory: token market cap of at least $200,000 on DexScreener.                                |
| `cmc_listing`           | `cmc-4h`, `cmc-8h`, `cmc-12h`           | Blocking: a listed CoinMarketCap coin with at least $2M in 24-hour volume.                     |
| `coingecko_listing`     | `coingecko-search`, `coingecko-country` | Blocking: a listed CoinGecko coin. Search also requires a market-cap rank of #1,000 or better. |

Read current rules from the catalog and actual check results. Eligibility can change between checking and creating an order. Failing an advisory rule alone is not a reason for a refund.

### Target and pair selection

Send a token contract or mint in `target.address`. For pair-level packages, a pair address is also accepted. If an address exists on several networks, supply `target.chainId` from the reported `details.chainIds`.

Without an override, the API selects the highest-liquidity verified pair with at least $1,000 liquidity on the token's chain, preferring pairs where the token is the base token. Check the selected `target.pairAddress` before charging your customer. To use a different verified pair, send it in `target.pairAddress`.

## POST /targets/resolve

This was a separate step in the v1 integration flow. The recommended v2 flow uses `POST /eligibility`, which resolves the target, returns verified pairs, checks eligibility, and quotes the order. New v2 examples do not require a separate resolver call.

## POST /orders

Creates an order and charges your PandaBoost balance when accepted. Use a test key for a no-charge validation flow.

### Request body

| Field                | Type    | Requirement                                                                                                                             |
| -------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `orderTypeId`        | string  | Required package ID from `GET /services`.                                                                                               |
| `target.address`     | string  | Required token contract/mint or supported pair address, except for coin-link packages. Based Bot also accepts its full token-page link. |
| `target.chainId`     | string  | Optional network disambiguation.                                                                                                        |
| `target.pairAddress` | string  | Optional explicit pair for pair-level packages.                                                                                         |
| `quantity`           | number  | Required unless the catalog says the package has a fixed quantity.                                                                      |
| `options`            | object  | Package settings, such as `speed`. CoinMarketCap and CoinGecko use a full page URL in `options.coin`, with no `target`.                 |
| `clientOrderId`      | string  | Your stable reference, up to 100 characters: letters, digits, `.`, `_`, `:`, and `-`. Use it for safe retries.                          |
| `requireEligible`    | boolean | Refuse before charging if an eligibility rule fails.                                                                                    |
| `serviceName`        | string  | No longer required: inferred from `orderTypeId`. If supplied, it must match the package.                                                |

### Token-first format

```json
{
  "orderTypeId": "dex-trending-sol-24h",
  "target": { "address": "TOKEN_CONTRACT_ADDRESS" },
  "clientOrderId": "shop-order-1042"
}
```

### Successful response

HTTP `201` creates a new order. The success data includes `replayed`, `newBalance`, and `order`. Store `order.id`, not the v1 `publicId` field. The order includes its status, `underReview`, resolved `target`, `options`, `progress`, and `charge`.

### Order creation outcomes

| HTTP / code                  | Outcome                                                                                                              |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `201`                        | A new order was created.                                                                                             |
| `200`, `data.replayed: true` | The same order already exists; no second charge.                                                                     |
| `202`                        | The order exists, but hand-off failed temporarily; the payment is held for operator review with `underReview: true`. |
| `409 idempotency_conflict`   | The reference was already used for a different order; inspect `details.order`.                                       |
| `422 order_rejected`         | The service refused to start it; fully refunded order is in `details.order`.                                         |
| `500 order_failed`           | The order could not start and the automatic refund failed. Contact support; do not retry blindly.                    |

### Safe retries

Persist the order body and `clientOrderId` before sending a paid request. For a timeout, network failure, or an error marked `retryable: true`, retry the **same body and ID**. Changing the body while keeping the ID can return `409 idempotency_conflict`.

A replay preserves the existing outcome: a rejected order still returns `422 order_rejected` with `details.replayed: true`, and a held order still returns `202`. Use a new ID only when intentionally placing a new order, for example after a refunded rejection.

For `internal_error`, retrying an order is safe only when the original request included `clientOrderId`: a charge may already have occurred. Respect `Retry-After` on `429`.

## GET /orders

Lists your orders. Optional query parameters:

| Parameter       | Use                                            |
| --------------- | ---------------------------------------------- |
| `clientOrderId` | Find an order by your reference.               |
| `status`        | Filter by order status.                        |
| `page`          | Page number; default `1`.                      |
| `limit`         | Results per page; default `20`, maximum `100`. |

```bash
curl -sS -G \
  -H "x-api-key: ${PANDABOOST_API_KEY}" \
  --data-urlencode 'clientOrderId=shop-order-1042' \
  'https://web.pandaboost.app/api/v2/orders'
```

Orders placed through v1 also appear in this history. Do not assume that a filtered list has the same response wrapper as an individual order.

## GET /orders/:id

Returns the order in `data.order`.

```bash
curl -sS -H "x-api-key: ${PANDABOOST_API_KEY}" \
  'https://web.pandaboost.app/api/v2/orders/ORDER_ID'
```

Poll every 1–5 minutes per order rather than repeatedly refreshing at short intervals.

## Order lifecycle

| Status       | Meaning                                                            |
| ------------ | ------------------------------------------------------------------ |
| `pending`    | Created but not started, including manual-service or review cases. |
| `processing` | Running; queued extensions can also show this before `startsAt`.   |
| `completed`  | Delivered.                                                         |
| `failed`     | Stopped early. Inspect `charge.refunded` and `underReview`.        |
| `refunded`   | Fully refunded: `charge.refunded` equals `charge.amount`.          |
| `cancelled`  | Cancelled before it started.                                       |

The net charge is `charge.amount - charge.refunded`. It is final at `completed`, `refunded`, or `cancelled`, or at `failed` with `underReview: false`. While `underReview` is true, the team is still deciding the refund. A failed time-based order does not automatically mean a full refund.

### Re-orders and extensions

Read `reorders` from `GET /services`:

* `queue`: accepted and starts when the running boost ends, for its full duration. Check `startsAt`. The running order may have been placed by another customer.
* `refuse`: returns `already_active` with `details.activeUntil`; no charge for the refused order.
* `parallel`: can run alongside an existing order.

A queued order cancelled before starting can end `failed` with `underReview: true`; inspect the actual refund outcome rather than inferring it from cancellation alone.

### CoinMarketCap delivery and settlement

For `cmc-4h`, `cmc-8h`, and `cmc-12h`, purchased hours mean time **in the TOP 10** of CoinMarketCap's main Trending list. Time before entering it does not count.

The order ends when its hours are delivered. If it is short of its hours but still in the TOP 10 when the time is up, it can be extended to make them up, never beyond twice the purchased hours from the start. If it never reaches the TOP 10 or leaves before its hours are delivered, it can end `failed` with `underReview: true`.

`GET /orders/:id` and the order list expose proof in `order.delivery`: `top10Seconds`, `planSeconds`, `firstTop10At`, `lastTop10At`, `bestRank`, `currentRank`, and `endsAt`. It may temporarily be `null`; request it again later.

Once the CMC order ends (`completed` or `failed`), its delivery proof is final. You can settle delivery with your customer from that proof without waiting for the balance-refund review. That review determines the refund to your PandaBoost balance, later reflected in `charge.refunded`. Do not confuse delivery settlement with a finalized balance refund.

## HTTP responses

| Error code                                             | HTTP      | Handling                                                                                        |
| ------------------------------------------------------ | --------- | ----------------------------------------------------------------------------------------------- |
| `invalid_json`, `invalid_request`                      | 400       | Correct malformed JSON or unknown fields.                                                       |
| `invalid_order_type`                                   | 400       | Correct package ID or mismatched `serviceName`.                                                 |
| `invalid_quantity`, `invalid_option`                   | 400       | Follow catalog limits and accepted settings.                                                    |
| `target_required`, `invalid_target`                    | 400       | Supply a supported target.                                                                      |
| `unsupported_chain`                                    | 400       | Choose a package covering that chain.                                                           |
| `ambiguous_target`                                     | 400       | Supply `target.chainId` from `details.chainIds`.                                                |
| `unauthorized`, `forbidden`                            | 401 / 403 | Correct the key or enable API access.                                                           |
| `insufficient_balance`                                 | 402       | Add funds.                                                                                      |
| `not_found`                                            | 404       | Check the order belongs to this account and the ID is correct.                                  |
| `idempotency_conflict`                                 | 409       | Inspect the existing order; do not change a request under the same ID.                          |
| `already_active`                                       | 409       | Check `details.activeUntil` and the package re-order policy.                                    |
| `not_eligible`                                         | 422       | Inspect rule details; nothing was charged.                                                      |
| `order_type_unavailable`                               | 422       | Package is temporarily disabled.                                                                |
| `order_rejected`                                       | 422       | Refused to start; refunded in full. Inspect `details.order`.                                    |
| `order_failed`                                         | 500       | Automatic refund failed; contact support.                                                       |
| `target_lookup_unavailable`, `eligibility_unavailable` | 503       | Data source unavailable; retry when `retryable: true`.                                          |
| `rate_limited`                                         | 429       | Respect `Retry-After`; limit is 60 requests/minute **per IP**, shared by clients using that IP. |
| `internal_error`                                       | 500       | For order creation, retry safely only if the original request used `clientOrderId`.             |

See [Service Payload Examples](https://docs.pandaboost.app/api-for-developers/service-payload-examples) for current package IDs and request bodies.
