Wewire Documentation
  • Documentation
  • BASICS
    • Onboarding
    • Wallets
    • Customers
      • Individuals
      • Businesses
  • DIsbursements
    • Global
    • Africa
  • COLLECTIONS
    • Global
    • Africa
  • Virtual Accounts
    • Creating Virtual Accounts
    • Virtual Account Statuses
    • Webhooks
  • REFERENCES
    • Prohibited Businesses
    • Prohibited Countries
    • Settlement Times
    • Supported Currencies
  • Rates
    • Rates
Powered by GitBook
On this page
  1. Rates

Rates

WeWire's Rates API allows you to preview near real-time exchange rates between various currencies.

PreviousSupported Currencies

Last updated 1 month ago

WeWire's Rates API allows you to preview near real-time exchange rates between our supported . Whether you're building a payment platform, marketplace, or financial service, this API helps you fetch the latest market rates to display, calculate, or execute currency conversions confidently.

The API provides bid and ask prices for each currency pair:

  • Bid Rate: This is the price at which WeWire is willing to buy the base currency. In other words, it's the rate you will receive if you are selling the base currency to WeWire.

  • Ask Rate (also called Offer Rate): This is the price at which WeWire is willing to sell the base currency. It's the rate you will pay if you are buying the base currency from WeWire.

In every currency pair, there are two currencies involved:

  • Base Currency: This is the first currency in the currency pair. It is the currency you want to convert from.

  • Destination Currency (also called Quote Currency): This is the second currency in the currency pair. It is the currency you want to convert to.

The exchange rate tells you how much of the destination currency is equivalent to one unit of the base currency.

Example: For the currency pair USD/GHS:

  • Base Currency = USD (US Dollar)

  • Destination Currency = GHS (Ghanaian Cedi)

The difference between the bid and ask rates is known as the spread, which reflects market liquidity, demand, and transaction costs.

currencies

Get all exchange rates

get

Retrieves all available currency exchange rates

Authorizations
Responses
200
List of all exchange rates
application/json
get
GET /v1/rates HTTP/1.1
Host: wewireproduction.com
ww-api-key: YOUR_API_KEY
Accept: */*
200

List of all exchange rates

[
  {
    "from": "USD",
    "to": "EUR",
    "bid": 1,
    "ask": 1
  }
]

Get exchange rate for currency pair

get

Retrieves the exchange rate between two specified currencies

Authorizations
Query parameters
fromstring · enumRequired

Source currency code

Possible values:
tostring · enumRequired

Target currency code

Possible values:
Responses
200
Exchange rate for the currency pair
application/json
400
Invalid currency codes
get
GET /v1/rates/pair HTTP/1.1
Host: wewireproduction.com
ww-api-key: YOUR_API_KEY
Accept: */*
{
  "currency": "USD",
  "rate": 0.85,
  "targetCurrency": "EUR"
}
  • GETGet all exchange rates
  • GETGet exchange rate for currency pair
  • POSTPreview currency conversion

Preview currency conversion

post

Calculates the result of converting an amount between currencies including fees

Authorizations
Body
objectOptional
Responses
200
Conversion preview with rates and fees
application/json
post
POST /v1/rates/conversion/preview HTTP/1.1
Host: wewireproduction.com
ww-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "from": "USD",
  "to": "EUR",
  "amount": 100
}
200

Conversion preview with rates and fees

{
  "convertedAmount": 85,
  "rate": 0.85,
  "fee": 2.5
}