Airwallex logo

Rates

Copy for LLMView as Markdown

You can retrieve the current rates that a conversion request would be booked at.

Endpoints
GET /api/v1/fx/rates/current

Retrieve a current rate

GET /api/v1/fx/rates/current

Retrieve a current rate for the buy/sell currency and amount. Note that the amount is validated against the upper conversion limit to ensure that a conversion for the specified amount can be executed.

Parameters
buy_currencyrequiredstring

Currency (3-letter ISO-4217 code) the client buys

sell_currencyrequiredstring

Currency (3-letter ISO-4217 code) the client sells. This is the currency you will need to send us by the settlement cutoff time

buy_amountnumber

Amount the client buys in buy_currency (must be blank if sell_amount is specified). Defaults to 10000 if neither buy_amount or sell_amount is specified.

conversion_datestring

Date on which the conversion will be settled. conversion_date defaults to current date, if funding is available, unless specified.

sell_amountnumber

Amount the client sells in sell_currency (must be blank if buy_amount is specified)

Response body - 200 OK
buy_currencystring

Buy currency of the rate (3-letter ISO-4217 code)

conversion_datestring

Date on which the conversion will be settled. conversion_date defaults to current date, if funding is available, unless specified.

created_atstring

The time at which the request was made. Follows the same timestamp format as the rest of Airwallex’s APIs.

currency_pairstring

The currency pair that the rate is for. The direction of the currency pair is per market convention where possible

dealt_currencystring

The currency where the client provided the exact amount for in the request

ratenumber

sell_amount copied from the Rate request (if specified). Otherwise, this is calculated by multiplying/dividing the buy_amount by the FX rate depending on the direction of the currency pair

rate_detailsarray

Breakdown of rates at different user levels.

rate_details.buy_amountnumber

The total amount being bought at the respective level.

rate_details.levelstring

Supported levels include: CLIENT, AWX, PLATFORM_CLIENT

rate_details.ratenumber

The exchange rate from the respective level's perspective.

rate_details.sell_amountnumber

The total amount being sold at the respective level.

sell_currencystring

Sell currency of the rate (3-letter ISO-4217 code)

Errors
Error statusDescription
400

Possible errors: amount_above_limit, invalid_settlement_date, invalid_endpoint, invalid_argument, unsupported_currency

401

Possible errors: credentials_invalid, credentials_expired

429

Too many requests

500

Service unavailable

GET /api/v1/fx/rates/current
$curl --request GET \
> --url 'https://api-demo.airwallex.com/api/v1/fx/rates/current' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "buy_currency": "AUD",
3 "conversion_date": "2017-04-01",
4 "created_at": "2019-05-04T02:49:05+0000",
5 "currency_pair": "AUDUSD",
6 "dealt_currency": "AUD",
7 "rate": 7632,
8 "rate_details": [
9 {
10 "buy_amount": 10000,
11 "level": "CLIENT",
12 "rate": 0.781523,
13 "sell_amount": 12794.27
14 }
15 ],
16 "sell_currency": "USD"
17}
Was this section helpful?