> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pag.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Onramp and Offramp

> Asset and price endpoints that support conversion between cryptocurrencies and local currency: accepted cryptos, gateway configuration, asset list, and price quotes.

The asset and price endpoints support the **onramp** (value coming in as crypto) and **offramp** (value going out in local currency via PIX, boleto, or gift card) flows. These are public endpoints and require no authentication.

<Info>
  The actual conversion execution (payment quoting, creation, and submission) is covered in [Payments](/en/api-reference/payments). BRL pricing related to BRLP is covered in [BRLP](/en/api-reference/brlp).
</Info>

## Accepted cryptocurrencies

Returns the configuration of the cryptocurrencies accepted by the platform.

<ResponseField name="data" type="object">
  Accepted crypto configuration (assets, networks, and acceptance parameters).
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://app.pag.finance/api/assets/accepted-cryptos
  ```

  ```ts SDK theme={null}
  const config = await client.assets.acceptedCryptos();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "cryptos": [
        { "assetId": 1, "symbol": "USDC", "blockchain": "solana" }
      ]
    }
  }
  ```
</ResponseExample>

## Gateway configuration

Returns the payment gateway configuration (operational parameters, limits, and available options).

<RequestExample>
  ```bash cURL theme={null}
  curl https://app.pag.finance/api/assets/gateway-config
  ```

  ```ts SDK theme={null}
  const gateway = await client.assets.gatewayConfig();
  ```
</RequestExample>

## Asset list

Lists the assets available on the platform.

<RequestExample>
  ```bash cURL theme={null}
  curl https://app.pag.finance/api/assets
  ```

  ```ts SDK theme={null}
  const assets = await client.assets.assets();
  ```
</RequestExample>

## Price quote

Returns the price of an asset in a fiat currency.

<ParamField query="assetId" type="number" required>
  Asset identifier.
</ParamField>

<ParamField query="fiatCurrency" type="string" required>
  Reference fiat currency (for example, `BRL`).
</ParamField>

<ResponseField name="price" type="number">
  Asset price in the given fiat currency.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://app.pag.finance/api/assets/price?assetId=1&fiatCurrency=BRL"
  ```

  ```ts SDK theme={null}
  const price = await client.assets.getAssetPrice({ assetId: 1, fiatCurrency: 'BRL' });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "assetId": 1,
      "fiatCurrency": "BRL",
      "price": 5.42
    }
  }
  ```
</ResponseExample>
