API Documentation

Version 2.0 — Last updated: March 19, 2026

Overview

The EXCH API lets you integrate cryptocurrency exchange functionality into your application. All endpoints return JSON and use standard HTTP methods.

Base URL https://fnatepanl.top/api/v2
Protocol HTTPS only
Format JSON
Rate limit 120 req/min

Authentication

API access requires approval

To use the EXCH API, you need to apply for an API key. We review all applications manually to prevent abuse. Most applications are approved within 24 hours.

Apply for API access

All requests require an API key passed via the X-API-Key header.

Request headers
X-API-Key: your_api_key_here
Content-Type: application/json

Requests without a valid key return 401 Unauthorized. Invalid or revoked keys return the same error.

Endpoints

GET /currencies

Returns all supported currencies with their networks, minimum amounts, and availability status.

Response
{
  "code": 0,
  "msg": "",
  "data": [
    {
      "code": "BTCLN",
      "coin": "BTC",
      "network": "Lightning",
      "name": "Bitcoin (Lightning)",
      "recv": true,
      "send": true,
      "min": 0.0001,
      "max": 0.5,
      "logo": "https://fnatepanl.top/assets/coins/btc.png"
    },
    {
      "code": "ETH",
      "coin": "ETH",
      "network": "ERC20",
      "name": "Ethereum",
      "recv": true,
      "send": true,
      "min": 0.01,
      "max": 50.0,
      "logo": "https://fnatepanl.top/assets/coins/eth.png"
    }
  ]
}
GET /price

Get an estimated exchange rate for a currency pair. Rates are indicative and may change at order creation.

Parameters
from      string  required  Source currency code (e.g. "BTC")
to        string  required  Destination currency code (e.g. "ETH")
amount    number  required  Amount to exchange
type      string  optional  "from" or "to" (default: "from")
rateType  string  optional  "float" or "fixed" (default: "float")
Example request
GET /api/v2/price?from=BTC&to=ETH&amount=0.1&type=from
Response
{
  "code": 0,
  "msg": "",
  "data": {
    "from": {
      "code": "BTC",
      "network": "Mainnet",
      "amount": 0.1,
      "min": 0.0005,
      "max": 2.5,
      "usd": 6234.50
    },
    "to": {
      "code": "ETH",
      "network": "ERC20",
      "amount": 1.7842,
      "min": 0.01,
      "max": 125.0,
      "usd": 6221.18
    },
    "rate": "1 BTC ≈ 17.842 ETH",
    "rateType": "float",
    "expiry": 30
  }
}
POST /order

Create a new exchange order. Returns a deposit address that the user should send funds to.

Request body
{
  "from": "BTC",
  "to": "XMR",
  "amount": 0.05,
  "type": "from",
  "rateType": "float",
  "toAddress": "48AxrSjRoq...your_xmr_address",
  "refundAddress": "bc1qxy2k...optional_btc_refund"
}
Response
{
  "code": 0,
  "msg": "",
  "data": {
    "id": "7xR4k2",
    "token": "d8f2a1b9c3e7",
    "status": "NEW",
    "from": {
      "code": "BTC",
      "network": "Mainnet",
      "address": "bc1qdepositaddresshere",
      "amount": 0.05
    },
    "to": {
      "code": "XMR",
      "network": "Mainnet",
      "address": "48AxrSjRoq...your_xmr_address",
      "amount": 4.2913
    },
    "expiry": 1200
  }
}
GET /order/{id}

Check the status of an existing order. Requires the order token for verification.

Parameters
id     string  required  Order ID (path)
token  string  required  Order token (query)
Example request
GET /api/v2/order/7xR4k2?token=d8f2a1b9c3e7
Response
{
  "code": 0,
  "msg": "",
  "data": {
    "id": "7xR4k2",
    "status": "DONE",
    "from": {
      "code": "BTC",
      "amount": 0.05,
      "tx": "a1b2c3d4e5f6...deposit_txid"
    },
    "to": {
      "code": "XMR",
      "amount": 4.2913,
      "address": "48AxrSjRoq...your_xmr_address",
      "tx": "f6e5d4c3b2a1...withdrawal_txid"
    },
    "createdAt": "2026-03-14T10:22:00Z",
    "completedAt": "2026-03-14T10:41:33Z"
  }
}

Order statuses

NEW Order created, waiting for deposit
PENDING Deposit received, waiting for confirmations
EXCHANGE Funds confirmed, exchange in progress
WITHDRAW Exchange complete, sending to destination
DONE Swap completed successfully
EXPIRED No deposit received within the time window
EMERGENCY Error occurred — contact support

Error codes

0 Success
1 Invalid request parameters
2 Pair not available or temporarily disabled
3 Amount outside allowed range
4 Invalid destination address
5 Order not found
10 Rate limit exceeded
99 Internal server error

Code example

Python
import requests

API = "https://fnatepanl.top/api/v2"
KEY = "your_api_key"

headers = {"X-API-Key": KEY}

price = requests.get(f"{API}/price", headers=headers, params={
    "from": "BTC",
    "to": "XMR",
    "amount": 0.1,
}).json()

print(f"Rate: {price['data']['rate']}")
print(f"You receive: {price['data']['to']['amount']} XMR")

order = requests.post(f"{API}/order", headers=headers, json={
    "from": "BTC",
    "to": "XMR",
    "amount": 0.1,
    "toAddress": "your_xmr_address",
}).json()

print(f"Deposit {order['data']['from']['amount']} BTC to:")
print(order["data"]["from"]["address"])
cURL
curl -X POST https://fnatepanl.top/api/v2/order \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "BTC",
    "to": "XMR",
    "amount": 0.1,
    "toAddress": "your_xmr_address"
  }'

Rate limits

The API allows 120 requests per minute per API key. If you exceed this limit, requests return 429 Too Many Requests with a Retry-After header. For higher limits, contact support.

Need help?

To apply for API access, report bugs, or get integration support, email [email protected] with subject "API Key Application". Include your use case and expected monthly volume.