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'
import requests
url = "https://business-api-testnet.palremit.com/core/fx/currencies?currency=NGN"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://business-api-testnet.palremit.com/core/fx/currencies?currency=NGN',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/fx/currencies?currency=NGN');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/fx/currencies?currency=NGN"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
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'
import requests
url = "https://business-api-testnet.palremit.com/core/fx/pairs?pair=USDNGN"
payload = {}
headers = {
'Authorization': 'Bearer xxxxx'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://business-api-testnet.palremit.com/core/fx/pairs?pair=USDNGN',
'headers': {
'Authorization': 'Bearer xxxxx'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/fx/pairs?pair=USDNGN');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer xxxxx'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/fx/pairs?pair=USDNGN"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
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
}'
import requests
import json
url = "https://business-api-testnet.palremit.com/core/fx/pairs/qoute"
payload = json.dumps({
"from": "NGN",
"to": "USD",
"amount": "5000",
"inverse": False
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://business-api-testnet.palremit.com/core/fx/pairs/qoute',
'headers': {
'Content-Type': 'application/json',
'Authorization': 'Bearer xxxxx'
},
body: JSON.stringify({
"from": "NGN",
"to": "USD",
"amount": "5000",
"inverse": false
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://business-api-testnet.palremit.com/core/fx/pairs/qoute');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Content-Type' => 'application/json',
'Authorization' => 'Bearer xxxxx'
));
$request->setBody('{
\n "from": "NGN",
\n "to": "USD",
\n "amount": "5000",
\n "inverse": false
\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://business-api-testnet.palremit.com/core/fx/pairs/qoute"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"from": "NGN",`+"
"+`
"to": "USD",`+"
"+`
"amount": "5000",`+"
"+`
"inverse": false`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer xxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Last updated