Formatting Parameters

Formatting API response data

We have a few URL parameters to help format the API response data. URL parameters are appended to the URL where the first parameter is preceded with "?" and subsequent parameters are preceded with "&". Here is an example:

https://api.sendwyre.com/v3/rates?pretty&as=priced

You can see ?pretty is the first parameter, and &as= is the second with a value of priced. If you remove the URL parameters the formatting reverts to a less structured state.

Pagination Parameters

We split our tabular data into pages of 25 items. You can apply the parameters below to any request for tabular to adjust the pagination.

ParameterDescription
offset How many items are skipped before the first item that is shown (default: 0).
limit Number of items returned per page (default: 25).
from The lower bound of a creation time filter for the displayed items. Formatted in millisecond Epoch format. (default: 0)
to The upper bound of a creation time filter for the displayed items. Formatted in millisecond Epoch format. (default: current time)

Rates Formatting

When fetching current rates there are also additional formatting parameters available.

GET https://api.sendwyre.com/v2/rates

The ordering of the trade pair in the key represents the direction of an exchange. For example, BTCUSD is the rate used for BTC into USD conversions (e.g. the sell rate). On the other hand, converting USD into BTC (the buy rate) would use the opposite rate under USDBTC.

ParameterValue
asdivisor
Source amount / rate = destination amount (default)

multiplier
Source amount * rate = destination amount

priced
Shows both divisor and multiplier values

You can also view the rates in different formats according to your preference:

Examples

https://api.sendwyre.com/v2/rates?as=divisor - source amount / rate = destination amount (default)

https://api.sendwyre.com/v2/rates?as=multiplier - source amount * rate = destination amount

https://api.sendwyre.com/v2/rates?as=priced&pretty&format=json_numberstring - shows both divisor and multiplier values

https://api.sendwyre.com/v2/rates?as=priced&pretty&format=csv - downloads rates as CSV file
For example, if 1 BTC is selling at 9000 USD, USDBTC will be 9000 in the divisor view and (1/9000) in the multiplier view.

URL Parameters

ParameterValues
prettyno value
Returns an easily readable JSON format
formatjson_numberstring
This encodes all numbers returned from our API as strings.

csv
This downloads rates as CSV file.

Currency Decimal Place Rounding

For our suite of fiat and cryptocurrencies, it is good to be aware of how Wyre goes about rounding each currency so you or your end users can always input the correct number of digits past the decimal place. The full list of how we round currencies can be found below.

Another thing to take note of is how we round if we are given an input that goes beyond the number of decimal places that we allow. If we round X currency to 8 digits past the decimal place and the user inputs 9 digits, we will always round down to make sure users are not hit with insufficient funds. For example, if a user inputs 0.123456789, this will be rounded down to 0.12345678 to make sure the order can go through.

Currency TickerCurrency#'s Past Decimal Point
GBPPound Sterling2
USDUnited States Dollar2
AUDAustralian Dollar2
EUREuro2
NZDNew Zealand Dollar2
CADCanadian Dollar2
ARSArgentine Peso2
CHFSwiss Franc2
CLPChilean Peso2
COPColombian Peso2
CZKCzech Koruna2
DKKDanish Krone2
ILSIsraeli New Shekel2
INRIndian Rupee2
ISKIcelandic Króna2
MYRMalaysian Ringgit2
NOKNorwegian Krone2
PHPPhilippine Peso2
PLNPolish Złoty2
SEKSwedish Krona2
SGDSingapore Dollar2
THBThai Baht2
TRYTurkish Ira2
VNDVietnamese Đồng2
JPYJapanese Yen0
BRLBrazilian Real2
CNYChinese Yuan2
MXNMexican Peso2
HKDHong Kong Dollar2
KRWSouth Korean Won0
ZARSouth African Rand2
BTCBitcoin8
ETHEthereum18
WETHWrapped Ethereum18
DAIDAI18
PDAIpDAI18
USDCUSD Coin6
USDTTether6
BUSDBinance USD18
GUSDGemini Dollar2
HUSDHuobi Dollar8
PAXPaxos Standard18
USDSStable USD6
COMPCompound18
CRVCurve18
UMAUMA18
YFIYearn.finance18
WBTCWrapped Bitcoin8
LINKChainlink18
MKRMaker18
BATBasic Attention Token18
UNIUniswap18
SNXSynthetix18
AAVEAave18
ZUSDZUSD6
XLMStellar18
AVAXAvalanche18
MATICMatic18
SUSDCStellar USDC6
MUSDCMatic USDC6
RAIRAI18
AVAXCAvax C-Chain18
ALGOAlgorand18
AUSDCAlgorand USDC6
AUSDTAlgorand USDT6
LETHLoopring ETH18
LUSDCLoopring USDC6
EGBTCEGBTC18
EBTCQEBTCQ18
EDIEmber Defi Index18
SYFStablecoin Yield Fund18