Skip to content

Single rate

GET
/reference-data/fx/{sourceCurrency}/{targetCurrency}
curl --request GET \
--url https://api.wink.travel/reference-data/fx/USD/THB \
--header 'Authorization: Bearer <token>' \
--header 'Wink-Version: 2.0'

Returns the exchange-rate quote between a specific source and target currency pair, or fails if no quote exists.

sourceCurrency
required
string

ISO 4217 source currency code

Example

USD
targetCurrency
required
string

ISO 4217 target currency code

Example

THB
Wink-Version
string
default: 2.0.0
Allowed values: 2.0

Exchange-rate quote for the requested currency pair

Media typeapplication/json

Lightweight representation of an exchange rate quote between a source and target currency pair

object
exchangeRate
required

Exchange rate from source to target currency

number
source
required

ISO 4217 source currency code

string
>= 1 characters
target
required

ISO 4217 target currency code

string
>= 1 characters
timestamp
required

Unix epoch milliseconds when the quote was recorded

integer format: int64

Example

{
"exchangeRate": 33.5,
"source": "USD",
"target": "THB",
"timestamp": 1705233000000
}

Bad Request — missing or invalid request parameter or body

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Unauthorized — authentication is required or the session has expired

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Forbidden — authenticated but lacking the required permission or scope

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Not Found — the requested resource does not exist

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Method Not Allowed — the HTTP verb is not supported on this endpoint

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Conflict — the resource was modified by someone else since you read it; re-read it and retry with the new version

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Unsupported Media Type — use application/json

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

No quote exists for the requested currency pair

Media typeapplication/json

Lightweight representation of an exchange rate quote between a source and target currency pair

object
exchangeRate
required

Exchange rate from source to target currency

number
source
required

ISO 4217 source currency code

string
>= 1 characters
target
required

ISO 4217 target currency code

string
>= 1 characters
timestamp
required

Unix epoch milliseconds when the quote was recorded

integer format: int64

Example

{
"exchangeRate": 33.5,
"source": "USD",
"target": "THB",
"timestamp": 1705233000000
}

Internal Server Error — an unexpected failure occurred on the server

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Service Unavailable — a downstream dependency is unreachable

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}