> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.senjaropay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.senjaropay.com/_mcp/server.

# Exchange rates

Use SenjaroPay’s exchange-rate API to read live FX quotes and recent trade history. These routes are **GET**, do **not** use `x-api-key` / `x-api-secret`, and return a JSON **array**.

Access is controlled by **IP allowlisting** in the SenjaroPay dashboard. Calls from an IP that is not allowlisted are rejected.

Base URL: `https://api.senjaropay.com`

## Allowlist your server IPs

Before you call any exchange-rate endpoint, register the public IPs of the servers (or NAT gateways) that will make the requests.

1. Sign in to the [SenjaroPay dashboard](https://senjaropay.com/).
2. Open **Developers**.
3. Open **Allowed IPs** (or **IP allowlist**).
4. Add each outbound public IP that should be able to call the exchange-rate API.
5. Save the changes, then retry from that server.

Use the IP your production traffic exits on — not `127.0.0.1` or a private LAN address. If you scale across multiple regions or load balancers, add every egress IP. Local laptop calls only work if that machine’s public IP is allowlisted.

> **Note**
>
> Exchange-rate routes do not accept API keys. IP allowlisting is the access control for this API.

## Endpoints

| Method | Path                           | Purpose                                        |
| ------ | ------------------------------ | ---------------------------------------------- |
| `GET`  | `/public/monierate/tickers`    | Live ticker snapshot (price, volume, high/low) |
| `GET`  | `/public/monierate/pairs`      | Supported pairs with current bid / ask         |
| `GET`  | `/public/monierate/historical` | Recent trades for a single `ticker_id`         |

## 1. List tickers

```
GET https://api.senjaropay.com/public/monierate/tickers
```

Returns the current market snapshot for each pair.

```bash
curl -sS "https://api.senjaropay.com/public/monierate/tickers"
```

### Response

```json
[
  {
    "ticker_id": "CNY_TZS",
    "base_currency": "CNY",
    "quote_currency": "TZS",
    "last_price": 395.8,
    "base_volume": 0,
    "quote_volume": 0,
    "bid": 388,
    "ask": 395.8,
    "high": 395.8,
    "low": 388,
    "effective_at": "2026-08-07T14:08:48.828Z"
  },
  {
    "ticker_id": "KES_TZS",
    "base_currency": "KES",
    "quote_currency": "TZS",
    "last_price": 4000,
    "base_volume": 0,
    "quote_volume": 0,
    "bid": 2000,
    "ask": 4000,
    "high": 4000,
    "low": 2000,
    "effective_at": "2026-04-30T11:00:35.042Z"
  }
]
```

| Field                              | Description                                               |
| ---------------------------------- | --------------------------------------------------------- |
| `ticker_id`                        | Pair identifier, `{BASE}_{QUOTE}` (for example `USD_TZS`) |
| `base_currency` / `quote_currency` | Currencies in the pair                                    |
| `last_price`                       | Most recent trade price                                   |
| `bid` / `ask`                      | Current bid and ask                                       |
| `high` / `low`                     | Session high and low                                      |
| `base_volume` / `quote_volume`     | Traded volume in base and quote units                     |
| `effective_at`                     | When this quote became effective (ISO 8601)               |

## 2. List pairs

```
GET https://api.senjaropay.com/public/monierate/pairs
```

Returns supported pairs with the current bid and ask.

```bash
curl -sS "https://api.senjaropay.com/public/monierate/pairs"
```

### Response

```json
[
  {
    "ticker_id": "CNY_TZS",
    "base_currency": "CNY",
    "quote_currency": "TZS",
    "bid": 388,
    "ask": 395.8,
    "effective_at": "2026-08-07T14:08:48.828Z"
  },
  {
    "ticker_id": "KES_TZS",
    "base_currency": "KES",
    "quote_currency": "TZS",
    "bid": 2000,
    "ask": 4000,
    "effective_at": "2026-04-30T11:00:35.042Z"
  },
  {
    "ticker_id": "USD_TZS",
    "base_currency": "USD",
    "quote_currency": "TZS",
    "bid": 2640,
    "ask": 2665,
    "effective_at": "2026-11-19T08:56:16.028Z"
  }
]
```

| Field          | Description                                    |
| -------------- | ---------------------------------------------- |
| `ticker_id`    | Pair identifier. Pass this value to historical |
| `bid` / `ask`  | Current bid and ask                            |
| `effective_at` | When this quote became effective               |

## 3. Historical trades

```
GET https://api.senjaropay.com/public/monierate/historical
```

Returns recent completed trades for one pair. Pass `ticker_id` from pairs or tickers.

### Query parameters

| Parameter   | Required | Description                             |
| ----------- | -------- | --------------------------------------- |
| `ticker_id` | Yes      | Pair identifier (for example `USD_TZS`) |
| `limit`     | No       | Max number of trades to return          |

```bash
curl -sS "https://api.senjaropay.com/public/monierate/historical?ticker_id=USD_TZS&limit=20"
```

### Response

```json
[
  {
    "ticker_id": "USD_TZS",
    "trade_id": "dfeecab6-eb25-4dfe-b3ea-96cc2a408a47",
    "timestamp": "2026-11-03T07:00:54.000Z",
    "price": 2655.0,
    "base_volume": 3.77,
    "quote_volume": 10000.0,
    "status": "COMPLETED"
  },
  {
    "ticker_id": "USD_TZS",
    "trade_id": "59b08199-c3b4-442c-bcc5-7e3359dfe872",
    "timestamp": "2026-10-29T13:44:25.000Z",
    "price": 2655.77,
    "base_volume": 3.64,
    "quote_volume": 9667.0,
    "status": "COMPLETED"
  }
]
```

| Field          | Description                           |
| -------------- | ------------------------------------- |
| `ticker_id`    | Pair that was traded                  |
| `trade_id`     | Unique trade identifier               |
| `timestamp`    | When the trade occurred (ISO 8601)    |
| `price`        | Executed price                        |
| `base_volume`  | Volume in the base currency           |
| `quote_volume` | Volume in the quote currency          |
| `status`       | Trade state (for example `COMPLETED`) |

Examples on this page are illustrative. Live quotes and history change over time.