Type/to search
Built-in Functions
Global
Log
Market
Trade
Account
Futures
Exchange
exchange.GetName
exchange.GetLabel
exchange.GetCurrency
exchange.SetCurrency
exchange.GetQuoteCurrency
exchange.GetPeriod
exchange.SetMaxBarLen
exchange.SetPrecision
exchange.GetRate
exchange.SetRate
exchange.SetBase
exchange.GetBase
exchange.SetProxy
exchange.SetTimeout
exchange.Encode
IO
Network
Storage
Threads
TA
Talib
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

Gets the currently set trading pair.

exchange.GetCurrency()

Examples

Print the current trading pair of the exchange object.

javascript
function main() { Log("Current trading pair", exchange.GetCurrency()) // Output: Current trading pair BTC_USDT }
python
def main(): Log("Current trading pair", exchange.GetCurrency()) # Output: Current trading pair BTC_USDT
rust
fn main() { Log!("Current trading pair", exchange.GetCurrency()); // Output: Current trading pair BTC_USDT }

Returns

TypeDescription

string

Trading pair set on the current exchange object.

See Also

Remarks

The trading pair format uniformly uses uppercase, with an underscore separating baseCurrency and quoteCurrency, for example: BTC_USDT. On a few exchanges the pair keeps the case it was set with (for example case-sensitive token addresses or lowercase sub-market prefixes); see "Trading Pairs and Contract Codes" on each exchange page.