Skip to content

Currency conversion

Łukasz Domeradzki edited this page Apr 19, 2021 · 19 revisions

Currency conversion

ArchiBot offers quite advanced convert command which allows to convert between different currencies, as well as whole ecosystems.

The actual syntax is:

convert [Amount] [FromPlatform-]<FromSymbol> [ToPlatform-]<ToSymbol> 

Where:

Amount - the amount of an asset defined by FromSymbol. Defaults to 1 when not supplied.

FromPlatform - the platform of an asset defined by FromSymbol. Defaults to World when not supplied.

FromSymbol - the symbol of an asset on given FromPlatform.

ToPlatform - the platform of an asset defined by ToSymbol. Defaults to World when not supplied.

ToSymbol - the symbol of an asset on given ToPlatform.

Examples:

convert 1 USD PLN
convert XTB-BITCOIN XTB-ETHEREUM
convert 1000 STEAM-GEMS WORLD-USD

Supported platforms

Platform is defined as independent ecosystem with its own rules and assets. Every ecosystem has a multiplier that specifies the relationship with the default, World ecosystem. Some ecosystems convert to World at 1:1 rate (e.g. XTB), others do not (e.g. Steam). Conversions within the given ecosystem (e.g. World to World or Steam to Steam) are not affected by the multiplier. Each platform is assigned a short alias, which can be used instead of a full name.


World (W)

World is the default ecosystem used when omitted from the command. It presents fiat money in form of various supported currencies that can be compared across.

Symbol is declared as 3-letter ISO 4217 currency code. Majority of currencies are supported, albeit not all.

ArchiBot supports three independent sources of currencies, namely XTB, ECB and Currency Converter API, and will attempt to use them in this order, provided the third-party service is online and supports given currency.

Example:

convert 1 W-EUR W-USD

Steam (S)

Steam is ecosystem made by Valve available officially through Steam Market, and unofficially through various third-party services (e.g. BitSkins). It presents selected choice of items available on the platform, as well as a Steam wallet funds in given currency corresponding to the World currencies.

The multiplier in regards to the World ecosystem is equal to the lowest listing of TF2 key on BitSkins divided by the lowest listing of TF2 key on Steam Market, cached up to a maximum of an hour. Usually the value fluctuates between 0.7 and 0.8. The rate can always be checked by issuing appropriate convert command, e.g. convert S-USD W-USD or convert W-USD S-USD, depending on the direction of the conversion.

Symbol can be either any valid World currency, or selected Steam items available below:

Symbol Description
CSGO Alias for CSGO_0
CSGO_<n> The n-th most popular out of the CS:GO keys currently available, starting from 0. Popularity is determined by the number of active sell listings. For example, CSGO_2 will be the 3rd most popular key
GEM SACK divided by 1000
GEMS Alias for GEM
SACK Sack of gems
SACKS Alias for SACK
TF2 Mann Co. Supply Crate Key

Example:

convert 1 S-TF2 W-USD

XTB (X)

XTB is ecosystem provided by XTB which offers access to stock exchange. It presents selected exchanged assets on the stock market, including forex, indices, commodities, cryptocurrencies, stocks, as well as ETFs.

The multiplier is equal to 1, as XTB directly converts to World ecosystem.

Symbol can be any symbol currently supported on XTB platform. Stocks and ETFs are usually available under name of the asset and stock market they're listed on, for example GME.US. Country-agnostic assets do not carry the second, for example GOLD or BITCOIN.

Example:

convert 1 X-GOLD W-USD
Clone this wiki locally