API Reference

Query FX Rate

POST /query/getForeignExchangeRate

<Use this endpoint to get the current foreign exchange rate>

Parameters

Parameters
Type
Description
Is Required

currency

string

The foreign currency, the fx rate of which is to be queried

Allowed values:

USD GBP EUR CNY TZS UGX RWF

TRUE

Response

{
  "UnitAmount": 1,
  "CurrencyPairs": "USD/KES",
  "TT": {
    "SELL": "", //The FX rate when Choice Bank SELLs foreign currency
    "BUY": "", //The FX rate when Choice Bank BUYs foreign currency
  }
}

Initiate an FX Request

POST /trans/applyForFcExchange

<Use this endpoint to initiate a foreign exchange request>

Parameters

Parameters
Type
Description
Is Required

kesAccountId

string

The number of the KES account, that is to credit/debit in the forex trade.

TRUE

fcAccountId

string

The number of the foreign currency account, that is to debit/credit in the forex trade.

The KES account and FCY account have to be under the same client.

TRUE

currency

string

The foreign currency

TRUE

amount

decimal

The exchange amount, in foreign currency

TRUE

operation

string

buy

sell

Notes: here it refers to buy or sell the foreign currency

TRUE

Response

{
  "applicationId": "", //application id of the fx request
}

Query FX Request Status

POST /query/getFxRequestStatus

<Use this endpoint to query the information and status of a foreign exchange request>

Parameters

Name
Type
Description
Is Required

applicationId

string

application id of the fx request

TRUE

Response

{
  "applicationId": "", //application id of the fx request
  "kesAccountId": "", 
  "fcAccountId": "",
  "outTxId": "",
  "inTxId": "",
  "status": "", //1-Submitted; 2-Quoted; 4-Rejected; 5-Approved; 6-Successful; 7-Failed
  "currency": "", //foreign currency
  "amount": "", //exchange amount in foreign currency
  "fxRate": "", //exchange rate
  "operation": "", //buy or sell
  "errorMsg": "",
  "errorCode": ""
}

Last updated