FX

All the necessary APIs to manage FX

Overview

Welcome to the FX API Documentation! Our FX API is designed to provide developers with seamless access to real-time foreign exchange rates, currency conversion capabilities, and currency pairs. Whether you're building financial applications, conducting international business transactions, or integrating currency exchange functionality into your platform, our API offers the tools and data you need to power your FX solutions

Definitions

Here are some key terms used frequently in this documentation to describe API functionality. Feel free to refer back to this section if any term is unclear.

Currency: This is a unit of monetary value used in financial transactions. Currencies are denoted by unique codes (e.g., USD for US Dollar, EUR for Euro).

Pairs: Currency pairs are combinations of two different currencies, used to establish exchange rates in foreign exchange markets. Each pair consists of a base currency and a quote currency (e.g., EUR/USD, USDT/NGN).

Fetch currencies

Use this endpoint to retrieve a list of available currencies supported by the FX API.

curl --location 'https://business-api-testnet.palremit.com/core/fx/currencies?currency=NGN' \
--header 'Authorization: Bearer xxxxx'
Response

🟢 200: successful.

{
    "status": "success",
    "message": "Successful",
    "data": [
        {
            "id": "653ea5e9836c6b0d32593bed",
            "code": "NGN",
            "name": "Nigeria Naira",
            "type": "CRYPTO",
            "actions": {
                "deposit": true,
                "withdraw": false,
                "swap": true
            },
            "supportedSwapCurrencies": [
                {
                    "code": "USDT",
                    "pairSymbol": "USDTNGN"
                },
                {
                    "code": "ETH",
                    "pairSymbol": "ETHNGN"
                },
                {
                    "code": "BTC",
                    "pairSymbol": "BTCNGN"
                },
                {
                    "code": "USD",
                    "pairSymbol": "USDNGN"
                }
            ],
            "active": true,
            "createdAt": "2023-10-29T18:35:21.964Z",
            "updatedAt": "2023-10-29T18:35:21.964Z"
        },
        {
            "id": "6541175ca34d8a32541ca105",
            "code": "BTC",
            "name": "Bitcoin",
            "type": "CRYPTO",
            "actions": {
                "deposit": true,
                "withdraw": true,
                "swap": true
            },
            "supportedSwapCurrencies": [
                {
                    "code": "USDT",
                    "pairSymbol": "BTCUSDT"
                },
                {
                    "code": "USD",
                    "pairSymbol": "BTCUSD"
                },
                {
                    "code": "NGN",
                    "pairSymbol": "BTCNGN"
                },
                {
                    "code": "KES",
                    "pairSymbol": "BTCKES"
                }
            ],
            "active": true,
            "createdAt": "2023-10-31T15:03:56.337Z",
            "updatedAt": "2023-10-31T15:03:56.337Z"
        },
        {
            "id": "655c25dc603808d4ac9450c9",
            "code": "ETH",
            "name": "Ethereum",
            "type": "CRYPTO",
            "actions": {
                "deposit": true,
                "withdraw": true,
                "swap": true
            },
            "supportedSwapCurrencies": [
                {
                    "code": "USDT",
                    "pairSymbol": "ETHUSDT"
                },
                {
                    "code": "NGN",
                    "pairSymbol": "ETHNGN"
                },
                {
                    "code": "KES",
                    "pairSymbol": "ETHKES"
                },
                {
                    "code": "USD",
                    "pairSymbol": "ETHUSD"
                }
            ],
            "active": true,
            "createdAt": "2023-11-21T03:37:00.514Z",
            "updatedAt": "2023-11-21T03:37:00.514Z"
        },
        {
            "id": "655c2635603808d4ac9450ca",
            "code": "KES",
            "name": "Kenyan Shilling",
            "type": "FIAT",
            "actions": {
                "deposit": true,
                "withdraw": true,
                "swap": true
            },
            "supportedSwapCurrencies": [
                {
                    "code": "USDT",
                    "pairSymbol": "USDTKES"
                },
                {
                    "code": "BTC",
                    "pairSymbol": "BTCKES"
                },
                {
                    "code": "ETH",
                    "pairSymbol": "ETHKES"
                },
                {
                    "code": "USD",
                    "pairSymbol": "USDKES"
                }
            ],
            "active": true,
            "createdAt": "2023-11-21T03:38:29.580Z",
            "updatedAt": "2023-11-21T03:38:29.580Z"
        },
        {
            "id": "6572ebef69ba5d414369801d",
            "code": "USD",
            "name": "US Dollar",
            "type": "FIAT",
            "actions": {
                "deposit": true,
                "withdraw": true,
                "swap": true
            },
            "supportedSwapCurrencies": [
                {
                    "code": "USDT",
                    "pairSymbol": "USDTUSD"
                },
                {
                    "code": "BTC",
                    "pairSymbol": "BTCUSD"
                },
                {
                    "code": "ETH",
                    "pairSymbol": "ETHUSD"
                }
            ],
            "active": true,
            "createdAt": "2023-12-08T10:11:59.950Z",
            "updatedAt": "2023-12-08T10:11:59.950Z"
        },
        {
            "id": "65800beb8b2ca0992fb6a5b6",
            "code": "USDT",
            "name": "Tether USD",
            "type": "CRYPTO",
            "actions": {
                "deposit": true,
                "withdraw": true,
                "swap": true
            },
            "supportedSwapCurrencies": [
                {
                    "code": "NGN",
                    "pairSymbol": "USDTNGN"
                },
                {
                    "code": "KES",
                    "pairSymbol": "USDTKES"
                },
                {
                    "code": "BTC",
                    "pairSymbol": "BTCUSDT"
                },
                {
                    "code": "ETH",
                    "pairSymbol": "ETHUSDT"
                },
                {
                    "code": "USD",
                    "pairSymbol": "USDTUSD"
                }
            ],
            "active": true,
            "createdAt": "2023-12-18T09:07:55.394Z",
            "updatedAt": "2023-12-18T09:07:55.394Z"
        }
    ]
}

Fetch pairs

Use this endpoint to fetch currency pairs available for trading.

curl --location 'https://business-api-testnet.palremit.com/core/fx/pairs?pair=USDNGN' \
--header 'Authorization: Bearer xxxxx'
Response

🟢 200: successful.

{
    "status": "success",
    "message": "Successful",
    "data": [
        {
            "id": "6579cf08ad9656d1cc1887df",
            "pair": "BTCUSDT",
            "buy": 45776.81,
            "sell": 45776.81,
            "active": true,
            "buy_markup": 3,
            "sell_markup": 3
        },
        {
            "id": "6579cf13ad9656d1cc1887e0",
            "pair": "BTCNGN",
            "buy": 58012045.484,
            "sell": 58012045.484,
            "active": true,
            "buy_markup": 2,
            "sell_markup": 1
        },
        {
            "id": "6579cf1aad9656d1cc1887e1",
            "pair": "BTCKES",
            "buy": 7468704.918000001,
            "sell": 7373281.586,
            "active": true,
            "buy_markup": 2,
            "sell_markup": 1
        },
        {
            "id": "6579cf25ad9656d1cc1887e2",
            "pair": "BTCUSD",
            "buy": 46887.308,
            "sell": 46887.308,
            "active": true,
            "buy_markup": 3,
            "sell_markup": 1
        },
        {
            "id": "6579cf31ad9656d1cc1887e3",
            "pair": "ETHUSDT",
            "buy": 2599.47,
            "sell": 2599.47,
            "active": true,
            "buy_markup": 2,
            "sell_markup": 1
        },
        {
            "id": "6579cf3dad9656d1cc1887e4",
            "pair": "ETHNGN",
            "buy": 3345335.646,
            "sell": 3260088.96,
            "active": true,
            "buy_markup": 2,
            "sell_markup": 1
        },
        {
            "id": "6579cf44ad9656d1cc1887e5",
            "pair": "ETHKES",
            "buy": 442283.6360000001,
            "sell": 416322.682,
            "active": true,
            "buy_markup": 2,
            "sell_markup": 1
        },
        {
            "id": "6579cf4bad9656d1cc1887e6",
            "pair": "ETHUSD",
            "buy": 2780.992,
            "sell": 2524.574,
            "active": true,
            "buy_markup": 2,
            "sell_markup": 1
        },
        {
            "id": "6579cf51ad9656d1cc1887e7",
            "pair": "USDTNGN",
            "buy": 1244.018,
            "sell": 1244.018,
            "active": true,
            "buy_markup": 1,
            "sell_markup": 1
        },
        {
            "id": "6579cf58ad9656d1cc1887e8",
            "pair": "USDTKES",
            "buy": 161.798,
            "sell": 161.22,
            "active": true,
            "buy_markup": 6,
            "sell_markup": 1
        },
        {
            "id": "6579cf5fad9656d1cc1887e9",
            "pair": "USDTUSD",
            "buy": 0.9994,
            "sell": 0.9994,
            "active": true,
            "buy_markup": 3,
            "sell_markup": 2
        },
        {
            "id": "658ead0991791eaf46e83c34",
            "pair": "USDKES",
            "buy": 161.804,
            "sell": 161.19,
            "active": true,
            "buy_markup": 2,
            "sell_markup": 1
        },
        {
            "id": "658ead1391791eaf46e83c35",
            "pair": "USDNGN",
            "buy": 1243.998,
            "sell": 1243.998,
            "active": true,
            "buy_markup": 2,
            "sell_markup": 1
        }
    ]
}

Get quote

Use this endpoint to provide real-time exchange rate quotes for specific currency pairs.

curl --location 'https://business-api-testnet.palremit.com/core/fx/pairs/qoute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxx' \
--data '{
    "from": "NGN",
    "to": "USD",
    "amount": "5000",
    "inverse": false
}'
Body
from : String *required
to : String *required
amount : String *required
inverse : Strings *required
Response

🟢 200: successful.

{
    "status": "success",
    "message": "Successful",
    "data": {
        "rate": "1268.89836",
        "conversion": "3.94042593",
        "rateCurrency": "NGN",
        "perCurrency": "USD"
    }
} 

Last updated