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.

Parameter

Description

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.

Parameter

Value

as

divisor
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

Parameter

Values

pretty

no value
Returns an easily readable JSON format

format

json_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 Ticker

Currency

#'s Past Decimal Point

GBP

Pound Sterling

2

USD

United States Dollar

2

AUD

Australian Dollar

2

EUR

Euro

2

NZD

New Zealand Dollar

2

CAD

Canadian Dollar

2

ARS

Argentine Peso

2

CHF

Swiss Franc

2

CLP

Chilean Peso

2

COP

Colombian Peso

2

CZK

Czech Koruna

2

DKK

Danish Krone

2

ILS

Israeli New Shekel

2

INR

Indian Rupee

2

ISK

Icelandic Króna

2

MYR

Malaysian Ringgit

2

NOK

Norwegian Krone

2

PHP

Philippine Peso

2

PLN

Polish Złoty

2

SEK

Swedish Krona

2

SGD

Singapore Dollar

2

THB

Thai Baht

2

TRY

Turkish Ira

2

VND

Vietnamese Đồng

2

JPY

Japanese Yen

0

BRL

Brazilian Real

2

CNY

Chinese Yuan

2

MXN

Mexican Peso

2

HKD

Hong Kong Dollar

2

KRW

South Korean Won

0

ZAR

South African Rand

2

BTC

Bitcoin

8

ETH

Ethereum

18

WETH

Wrapped Ethereum

18

DAI

DAI

18

PDAI

pDAI

18

USDC

USD Coin

6

USDT

Tether

6

BUSD

Binance USD

18

GUSD

Gemini Dollar

2

HUSD

Huobi Dollar

8

PAX

Paxos Standard

18

USDS

Stable USD

6

COMP

Compound

18

CRV

Curve

18

UMA

UMA

18

YFI

Yearn.finance

18

WBTC

Wrapped Bitcoin

8

LINK

Chainlink

18

MKR

Maker

18

BAT

Basic Attention Token

18

UNI

Uniswap

18

SNX

Synthetix

18

AAVE

Aave

18

ZUSD

ZUSD

6

XLM

Stellar

18

AVAX

Avalanche

18

MATIC

Matic

18

SUSDC

Stellar USDC

6

MUSDC

Matic USDC

6

RAI

RAI

18

AVAXC

Avax C-Chain

18

ALGO

Algorand

18

AUSDC

Algorand USDC

6

AUSDT

Algorand USDT

6

LETH

Loopring ETH

18

LUSDC

Loopring USDC

6

EGBTC

EGBTC

18

EBTCQ

EBTCQ

18

EDI

Ember Defi Index

18

SYF

Stablecoin Yield Fund

18